diff --git a/.gitignore b/.gitignore index 211b38d..6235104 100644 --- a/.gitignore +++ b/.gitignore @@ -185,3 +185,10 @@ dataset/**/*.ico dataset/*telegram*/* !*.gitkeep WC-exp/* + +modeloutputs/* +/tmp/* +cache.pkl +hfd.sh +rpa_cache.pkl +settings-bot8006.jsonc diff --git a/WC-exp b/WC-exp index 1831e88..5eda682 160000 --- a/WC-exp +++ b/WC-exp @@ -1 +1 @@ -Subproject commit 1831e881c3d445965367cd395f2ce4725289b488 +Subproject commit 5eda682331cc248b6935fa2ab55b6ba80a3f3663 diff --git a/settings.template.jsonc b/settings.template.jsonc index ea2cfd4..59ec60b 100644 --- a/settings.template.jsonc +++ b/settings.template.jsonc @@ -84,7 +84,7 @@ "infer_args": { "repetition_penalty": 1.2, "temperature": 0.5, - "max_length": 50, + "max_length": 256, "top_p": 0.65 }, "vllm_args": { diff --git a/weclone/core/inference/offline_infer.py b/weclone/core/inference/offline_infer.py index 2085455..2541e05 100644 --- a/weclone/core/inference/offline_infer.py +++ b/weclone/core/inference/offline_infer.py @@ -143,6 +143,8 @@ def vllm_infer( chat_template_kwargs={"enable_thinking": False}, ) # type: ignore + del llm + failed_indexs = [] if guided_decoding_class: # TODO better json decode https://github.com/vllm-project/vllm/commit/1d0ae26c8544fd5a62e171e30c2dcc2973a23bc8#diff-3b27790a2ce97bc50cdd5476f7b0057da682ed0d1ec8426a7b76c5e21454e57d diff --git a/weclone/utils/config_models.py b/weclone/utils/config_models.py index 66140e1..49c85e2 100644 --- a/weclone/utils/config_models.py +++ b/weclone/utils/config_models.py @@ -80,7 +80,7 @@ class CommonArgs(BaseConfigModel): """NOTE that all parameters here will be parsed by `HfArgumentParser`. Non-HfArgumentParser parameters should be placed in make_dataset_args.""" model_name_or_path: str = Field(...) - adapter_name_or_path: str = Field("./model_output", description="Also as output_dir of train_sft_args") + adapter_name_or_path: Optional[str] = Field(None, description="Also as output_dir of train_sft_args") template: str = Field(..., description="model template") default_system: str = Field(..., description="default system prompt") finetuning_type: FinetuningType = Field(FinetuningType.LORA) @@ -243,10 +243,9 @@ class WCTrainSftConfig(CommonArgs, TrainSftArgs): if adapter_name_value: self.output_dir = adapter_name_value - try: + # Always remove adapter_name_or_path field after processing + if hasattr(self, "adapter_name_or_path"): delattr(self, "adapter_name_or_path") - except AttributeError: - pass return self