mirror of
https://github.com/xming521/WeClone.git
synced 2026-08-29 02:10:55 +08:00
新增enable_thinking参数以支持推理过程中的思考功能;更新repetition_penalty和max_new_tokens配置以优化数据清理策略。
This commit is contained in:
@@ -26,6 +26,7 @@ def vllm_infer(
|
||||
max_samples: Optional[int] = None,
|
||||
vllm_config: str = "{}",
|
||||
save_name: str = "generated_predictions.jsonl",
|
||||
enable_thinking: bool = False,
|
||||
temperature: float = 0.95,
|
||||
top_p: float = 0.7,
|
||||
top_k: int = 50,
|
||||
@@ -61,6 +62,7 @@ def vllm_infer(
|
||||
"top_k": top_k,
|
||||
"max_new_tokens": max_new_tokens,
|
||||
"repetition_penalty": repetition_penalty,
|
||||
"enable_thinking": enable_thinking,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -117,8 +117,9 @@ class LLMCleaningStrategy(CleaningStrategy):
|
||||
template=self.make_dataset_config.template,
|
||||
temperature=0,
|
||||
guided_decoding_class=QaPairScore,
|
||||
repetition_penalty=1.2,
|
||||
repetition_penalty=1.5,
|
||||
bad_words=[r"\n"],
|
||||
max_new_tokens=self.make_dataset_config.messages_max_length + 1024, # add prompt length
|
||||
)
|
||||
|
||||
parsed_scores: List[QaPairScore] = []
|
||||
|
||||
Reference in New Issue
Block a user