Spaces:
Sleeping
Sleeping
eronariodito
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -8,11 +8,11 @@ import torch
|
|
8 |
# model = AutoModelForCausalLM.from_pretrained(model_name, device_map="cpu") # Force model to load on CPU
|
9 |
|
10 |
model_id = "unsloth/Phi-3.5-mini-instruct"
|
11 |
-
|
12 |
|
13 |
-
model = AutoModelForCausalLM.from_pretrained(
|
14 |
# model.load_adapter(peft_model_id)
|
15 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
16 |
|
17 |
# Ensure pad_token_id is set to eos_token_id to avoid errors
|
18 |
model.config.pad_token_id = model.config.eos_token_id
|
|
|
8 |
# model = AutoModelForCausalLM.from_pretrained(model_name, device_map="cpu") # Force model to load on CPU
|
9 |
|
10 |
model_id = "unsloth/Phi-3.5-mini-instruct"
|
11 |
+
peft_model_id = "eronariodito/SFT_LAB2_ID2223"
|
12 |
|
13 |
+
model = AutoModelForCausalLM.from_pretrained(peft_model_id)
|
14 |
# model.load_adapter(peft_model_id)
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
|
16 |
|
17 |
# Ensure pad_token_id is set to eos_token_id to avoid errors
|
18 |
model.config.pad_token_id = model.config.eos_token_id
|