atrost commited on
Commit
f3f49da
1 Parent(s): bfcd36f

fix model type

Browse files
Files changed (1) hide show
  1. 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 = AutoModelForSeq2SeqLM.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)
 
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)