Unverified Commit f40c434e authored by Lintang Sutawika's avatar Lintang Sutawika Committed by GitHub
Browse files

Update huggingface.py

`max_length` was misdefined as a tuple.
parent 176d5a26
...@@ -758,7 +758,7 @@ class HFLM(LM): ...@@ -758,7 +758,7 @@ class HFLM(LM):
attn_masks = attn_masks.to(self.device) attn_masks = attn_masks.to(self.device)
if "max_length" not in kwargs: if "max_length" not in kwargs:
kwargs["max_length"] = (context_enc.shape[1] + max_gen_toks,) kwargs["max_length"] = context_enc.shape[1] + max_gen_toks
# perform batched generation # perform batched generation
cont = self._model_generate( cont = self._model_generate(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment