Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ attn_implementation=None
|
|
29 |
base_model = AutoModelForCausalLM.from_pretrained(base_model_name,return_dict=True,device_map="auto", torch_dtype=torch.float16,)
|
30 |
#base_model = AutoModelForCausalLM.from_pretrained(base_model_name, return_dict=True, device_map = {"":0}, attn_implementation = attn_implementation,).eval()
|
31 |
|
32 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
33 |
ft_model = PeftModel.from_pretrained(base_model, sft_model)
|
34 |
model = ft_model.merge_and_unload()
|
35 |
model.save_pretrained(".")
|
|
|
29 |
base_model = AutoModelForCausalLM.from_pretrained(base_model_name,return_dict=True,device_map="auto", torch_dtype=torch.float16,)
|
30 |
#base_model = AutoModelForCausalLM.from_pretrained(base_model_name, return_dict=True, device_map = {"":0}, attn_implementation = attn_implementation,).eval()
|
31 |
|
32 |
+
tokenizer = AutoTokenizer.from_pretrained(base_model_name, max_length = max_seq_length)
|
33 |
ft_model = PeftModel.from_pretrained(base_model, sft_model)
|
34 |
model = ft_model.merge_and_unload()
|
35 |
model.save_pretrained(".")
|