mirror of
https://github.com/QwenLM/Qwen.git
synced 2026-05-20 16:35:47 +08:00
specify repetition penalty
This commit is contained in:
@@ -35,6 +35,7 @@ def load_models_tokenizer(args):
|
||||
args.checkpoint_path, trust_remote_code=True
|
||||
)
|
||||
model.generation_config.do_sample = False # use greedy decoding
|
||||
model.generation_config.repetition_penalty = 1.0 # disable repetition penalty
|
||||
return model, tokenizer
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user