Spaces:
Sleeping
Sleeping
Commit
·
36367ab
1
Parent(s):
ac528df
Enhance logging in load_model function
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ def load_model():
|
|
| 29 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 30 |
model_path,
|
| 31 |
trust_remote_code=True,
|
| 32 |
-
use_auth_token=HF_API_TOKEN
|
| 33 |
)
|
| 34 |
st.write("Loading model...")
|
| 35 |
model = AutoModelForCausalLM.from_pretrained(
|
|
@@ -37,7 +37,7 @@ def load_model():
|
|
| 37 |
device_map="auto",
|
| 38 |
torch_dtype=torch.float16,
|
| 39 |
trust_remote_code=True,
|
| 40 |
-
use_auth_token=HF_API_TOKEN
|
| 41 |
).eval()
|
| 42 |
st.write("Loading PEFT adapter...")
|
| 43 |
model.load_adapter(peft_model_path)
|
|
|
|
| 29 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 30 |
model_path,
|
| 31 |
trust_remote_code=True,
|
| 32 |
+
use_auth_token=HF_API_TOKEN
|
| 33 |
)
|
| 34 |
st.write("Loading model...")
|
| 35 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
|
| 37 |
device_map="auto",
|
| 38 |
torch_dtype=torch.float16,
|
| 39 |
trust_remote_code=True,
|
| 40 |
+
use_auth_token=HF_API_TOKEN
|
| 41 |
).eval()
|
| 42 |
st.write("Loading PEFT adapter...")
|
| 43 |
model.load_adapter(peft_model_path)
|