Skip to content

Commit

Permalink
small typo fix in description
Browse files Browse the repository at this point in the history
  • Loading branch information
VladOS95-cyber committed Sep 10, 2024
1 parent 638ad30 commit 2754485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/generation/logits_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ class SequenceBiasLogitsProcessor(LogitsProcessor):
The full name of Donald is Donald Rumsfeld,
>>> # We can also add a positive bias to nudge the model towards specific tokens or continuations
>>> sequence_bias = [get_tokens("Donald Duck"): 10.0]
>>> sequence_bias = [get_tokens("Donald Duck"), 10.0]
>>> biased_ids = model.generate(inputs["input_ids"], max_new_tokens=4, num_beams=4, sequence_bias=sequence_bias)
>>> print(tokenizer.batch_decode(biased_ids, skip_special_tokens=True)[0])
The full name of Donald is Donald Duck.
Expand Down

0 comments on commit 2754485

Please sign in to comment.