Spaces:
Sleeping
Sleeping
kz209
commited on
Commit
•
8f783e1
1
Parent(s):
d6563b9
update
Browse files- utils/model.py +1 -1
utils/model.py
CHANGED
@@ -108,4 +108,4 @@ class Model(torch.nn.Module):
|
|
108 |
temperature=temp,
|
109 |
eos_token_id=self.tokenizer.eos_token_id,
|
110 |
)
|
111 |
-
return self.tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
|
|
108 |
temperature=temp,
|
109 |
eos_token_id=self.tokenizer.eos_token_id,
|
110 |
)
|
111 |
+
return self.tokenizer.batch_decode(outputs[:, input_ids.shape[1]:], skip_special_tokens=True)
|