Update generation_test_hf_script.py
Browse files
generation_test_hf_script.py
CHANGED
|
@@ -33,10 +33,10 @@ def run_test(model_name, test_ds):
|
|
| 33 |
print("update: model - ", model_name)
|
| 34 |
print("update: device - ", device)
|
| 35 |
|
| 36 |
-
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 37 |
model.to(device)
|
| 38 |
|
| 39 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 40 |
|
| 41 |
for i, entries in enumerate(test_ds):
|
| 42 |
|
|
|
|
| 33 |
print("update: model - ", model_name)
|
| 34 |
print("update: device - ", device)
|
| 35 |
|
| 36 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
|
| 37 |
model.to(device)
|
| 38 |
|
| 39 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
| 40 |
|
| 41 |
for i, entries in enumerate(test_ds):
|
| 42 |
|