Qwen
/

yangapku commited on
Commit
07d3a05
1 Parent(s): e326b6c

fix random seed in stream generator

Browse files
Files changed (1) hide show
  1. modeling_qwen.py +1 -0
modeling_qwen.py CHANGED
@@ -1079,6 +1079,7 @@ class QWenLMHeadModel(QWenPreTrainedModel):
1079
  return_dict_in_generate=False,
1080
  generation_config=stream_config,
1081
  logits_processor=logits_processor,
 
1082
  **kwargs):
1083
  outputs.append(token.item())
1084
  yield tokenizer.decode(outputs, skip_special_tokens=True, errors='ignore')
 
1079
  return_dict_in_generate=False,
1080
  generation_config=stream_config,
1081
  logits_processor=logits_processor,
1082
+ seed=-1,
1083
  **kwargs):
1084
  outputs.append(token.item())
1085
  yield tokenizer.decode(outputs, skip_special_tokens=True, errors='ignore')