Spaces:
Configuration error
Configuration error
fix model type
Browse files- local_perplexity.py +1 -1
local_perplexity.py
CHANGED
@@ -107,7 +107,7 @@ class Perplexity(evaluate.Metric):
|
|
107 |
else:
|
108 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
109 |
|
110 |
-
model =
|
111 |
model = model.to(device)
|
112 |
|
113 |
tokenizer = AutoTokenizer.from_pretrained(model_id, local_files_only=local_file_only)
|
|
|
107 |
else:
|
108 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
109 |
|
110 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, local_files_only=local_file_only)
|
111 |
model = model.to(device)
|
112 |
|
113 |
tokenizer = AutoTokenizer.from_pretrained(model_id, local_files_only=local_file_only)
|