Skip to content

Commit

Permalink
fixed line length under 120 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjeevk-os committed Aug 23, 2023
1 parent 63bd311 commit 386801b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/transformers/generation/logits_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,10 @@ class EpsilonLogitsWarper(LogitsWarper):
The full name of Donald is Donald J. Trump –
>>> set_seed(19)
>>> # The use of the `epsilon_cutoff` parameter (best performing values between 3e-4 and 9e-4 from the paper mentioned above) generates tokens
>>> # by sampling from a variety of tokens with probabilities greater than or equal to epsilon value. The disadvantage of this sampling is that
>>> # if there are many possible tokens to sample from, the epsilon value has to be very small for sampling to occur from all the possible tokens.
>>> # The use of the `epsilon_cutoff` parameter (best performing values between 3e-4 and 9e-4 from the paper
>>> # mentioned above) generates tokens by sampling from a variety of tokens with probabilities greater than
>>> # or equal to epsilon value. The disadvantage of this sampling is that if there are many possible tokens to
>>> # sample from, the epsilon value has to be very small for sampling to occur from all the possible tokens.
>>> outputs = model.generate(
... **inputs, max_new_tokens=4, do_sample=True, epsilon_cutoff=6e-4
... ) # need to set do_sample=True for epsilon_cutoff to work
Expand Down

0 comments on commit 386801b

Please sign in to comment.