fix random seed in stream generator
Browse files- 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')
|