mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-24 17:06:53 +01:00
Make long_replies ban the eos token as well
This commit is contained in:
parent
9ae0eab989
commit
6c521ce967
@ -28,7 +28,7 @@ class MyLogits(LogitsProcessor):
|
||||
def __call__(self, input_ids, scores):
|
||||
if input_ids.shape[-1] - initial_size < params["min_length"]:
|
||||
scores[...,self.newline_id] = -1000
|
||||
# scores[...,shared.tokenizer.eos_token_id] = -1000
|
||||
scores[...,shared.tokenizer.eos_token_id] = -1000
|
||||
|
||||
# probs = torch.softmax(scores, dim=-1, dtype=torch.float)
|
||||
# probs[0] /= probs[0].sum()
|
||||
|
Loading…
Reference in New Issue
Block a user