mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-08-11 12:51:55 +00:00
add boxed reward
This commit is contained in:
parent
14c01aec00
commit
064be50946
@ -144,8 +144,8 @@ if __name__ == "__main__":
|
|||||||
max_length=args.max_new_tokens + args.max_prompt_tokens,
|
max_length=args.max_new_tokens + args.max_prompt_tokens,
|
||||||
do_sample=True,
|
do_sample=True,
|
||||||
max_new_tokens=None,
|
max_new_tokens=None,
|
||||||
early_stopping=False,
|
early_stopping=False if args.reward_type == "think_answer_tags" else True,
|
||||||
stop_strings=["</answer>"],
|
stop_strings=["</answer>"] if args.reward_type == "think_answer_tags" else None,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif args.backend == "vllm":
|
elif args.backend == "vllm":
|
||||||
@ -161,9 +161,9 @@ if __name__ == "__main__":
|
|||||||
generate_config.update(
|
generate_config.update(
|
||||||
dict(
|
dict(
|
||||||
max_tokens=args.max_new_tokens, # max new tokens
|
max_tokens=args.max_new_tokens, # max new tokens
|
||||||
ignore_eos=True,
|
ignore_eos=True if args.reward_type == "think_answer_tags" else False,
|
||||||
include_stop_str_in_output=True,
|
include_stop_str_in_output=True,
|
||||||
stop=["</answer>"],
|
stop=["</answer>"] if args.reward_type == "think_answer_tags" else None,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user