Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,8 @@ max_seq_length=400
|
|
26 |
attn_implementation=None
|
27 |
|
28 |
#base_model = AutoModelForCausalLM.from_pretrained(model_name,return_dict=True,torch_dtype=torch.float16,)
|
29 |
-
|
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(sft_model, max_length = max_seq_length)
|
33 |
ft_model = PeftModel.from_pretrained(base_model, sft_model)
|
|
|
26 |
attn_implementation=None
|
27 |
|
28 |
#base_model = AutoModelForCausalLM.from_pretrained(model_name,return_dict=True,torch_dtype=torch.float16,)
|
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(sft_model, max_length = max_seq_length)
|
33 |
ft_model = PeftModel.from_pretrained(base_model, sft_model)
|