Spaces:
Running
Running
Tonic
commited on
add config argument
Browse files
app.py
CHANGED
|
@@ -14,13 +14,13 @@ def load_model():
|
|
| 14 |
model_id,
|
| 15 |
trust_remote_code=True
|
| 16 |
)
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
_model = AutoModelForCausalLM.from_pretrained(
|
| 22 |
model_id,
|
| 23 |
-
|
| 24 |
torch_dtype=torch.bfloat16,
|
| 25 |
trust_remote_code=True
|
| 26 |
)
|
|
|
|
| 14 |
model_id,
|
| 15 |
trust_remote_code=True
|
| 16 |
)
|
| 17 |
+
config = AutoConfig.from_pretrained(
|
| 18 |
+
model_id,
|
| 19 |
+
trust_remote_code=True
|
| 20 |
+
)
|
| 21 |
_model = AutoModelForCausalLM.from_pretrained(
|
| 22 |
model_id,
|
| 23 |
+
config=config,
|
| 24 |
torch_dtype=torch.bfloat16,
|
| 25 |
trust_remote_code=True
|
| 26 |
)
|