Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,8 +32,8 @@ max_seq_length=400
|
|
| 32 |
attn_implementation=None
|
| 33 |
|
| 34 |
#base_model = AutoModelForCausalLM.from_pretrained(model_name,return_dict=True,torch_dtype=torch.float16,)
|
| 35 |
-
|
| 36 |
-
base_model = AutoModelForCausalLM.from_pretrained(base_model_name, return_dict=True, device_map = {"":0}, attn_implementation = attn_implementation,).eval()
|
| 37 |
|
| 38 |
tokenizer = AutoTokenizer.from_pretrained(base_model_name, max_length = max_seq_length)
|
| 39 |
ft_model = PeftModel.from_pretrained(base_model, sft_model)
|
|
|
|
| 32 |
attn_implementation=None
|
| 33 |
|
| 34 |
#base_model = AutoModelForCausalLM.from_pretrained(model_name,return_dict=True,torch_dtype=torch.float16,)
|
| 35 |
+
base_model = AutoModelForCausalLM.from_pretrained(base_model_name,return_dict=True,device_map="auto", torch_dtype=torch.float16,)
|
| 36 |
+
#base_model = AutoModelForCausalLM.from_pretrained(base_model_name, return_dict=True, device_map = {"":0}, attn_implementation = attn_implementation,).eval()
|
| 37 |
|
| 38 |
tokenizer = AutoTokenizer.from_pretrained(base_model_name, max_length = max_seq_length)
|
| 39 |
ft_model = PeftModel.from_pretrained(base_model, sft_model)
|