mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
parent
2a5cef2914
commit
77745a84ea
@ -203,7 +203,9 @@ class HuggingFace(BaseModel):
|
||||
max_length=self.max_seq_len -
|
||||
max_out_len)['input_ids']
|
||||
input_ids = torch.tensor(input_ids, device=self.model.device)
|
||||
outputs = self.model.generate(input_ids,
|
||||
# To accommodate the PeftModel, parameters should be passed in
|
||||
# key-value format for generate.
|
||||
outputs = self.model.generate(input_ids=input_ids,
|
||||
max_new_tokens=max_out_len,
|
||||
**kwargs)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user