Advertisement
Guest User

Untitled

a guest
Jun 10th, 2023
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.91 KB | None | 0 0
  1. diff --git a/modules/text_generation.py b/modules/text_generation.py
  2. index 00b7cc7..3637dc9 100644
  3. --- a/modules/text_generation.py
  4. +++ b/modules/text_generation.py
  5. @@ -237,6 +237,7 @@ def generate_reply_HF(question, original_question, seed, state, eos_token=None,
  6.      # Update generate_params with the eos token and the stopping strings
  7.      generate_params['eos_token_id'] = eos_token_ids
  8.      generate_params['stopping_criteria'] = stopping_criteria_list
  9. +    generate_params['decoder_input_ids'] = input_ids.clone()
  10.  
  11.      t0 = time.time()
  12.      try:
  13. @@ -244,6 +245,7 @@ def generate_reply_HF(question, original_question, seed, state, eos_token=None,
  14.              yield ''
  15.  
  16.          # Generate the entire reply at once.
  17. +        print(f">> GEN: {generate_params}")
  18.          if not state['stream']:
  19.              with torch.no_grad():
  20.                  output = shared.model.generate(**generate_params)[0]
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement