-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
special token未能输出 #7080
Comments
训练时候没有添加 |
我看到代码里有: |
希望这个【官方能否出一个新增token训练/merge/推理的脚本】+1,十分感谢! 以及想要确认一下,在现在的代码中, 在lora merge的时候使用 那么merge之后的新模型的embed_tokens,lm_head是训练后的吧,还是base model的呢? |
补充一点,即使加了additional_target: embed_tokens,lm_head和resize_vocab: true参数进行lora训练,得到的adapter_config.json文件里面,target_modules中也没有embed_tokens,lm_head,我用别的框架训练的时候,target_modules中是有这两个参数的。 |
@lifeng7777 modules_to_save 里面不是有吗 |
@katouHui 你好,请问你直接微调带<……>的数据,模型输出能输出该特殊标签吗? 我这里遇到了同样的问题,请问你是怎么解决的? |
Reminder
System Info
INFO 02-26 15:55:11 init.py:190] Automatically detected platform cuda.
llamafactory
version: 0.9.2.dev0Reproduction
我的数据集为包含近1000条,输出格式为 **<...>.....</...>....**的数据,想通过微调Qwen模型使其能够输出<...>标签,直接进行微调的已经尝试过,现在需要将<...>作为special token的形式进行微调,微调结束并将模型合并之后进行推理,结果中并没有包含<...>标签,参考#6630 和 #6749 等方法尝试无果,因此来咨询一下,希望能得到您的回复。
训练过程
训练代码:llamafactory-cli train examples/train_lora/deepseek_v3.yaml
具体的配置文件如下:
merge过程
训练代码:llamafactory-cli export examples/merge_lora/qwen_deep_v3.yaml
具体的配置文件如下:
推理过程
推理代码:CUDA_VISIBLE_DEVICES=0,1,2,3 python scripts/vllm_infer.py --model_name_or_path ./output/deep_1.5_merge_v3 --dataset deepseek750_dev
推理结果中 只有这个标签"label": "<|im_end|>\n"
也参照一些issue通过调参等方式进一步尝试,但依旧不会输出special token
麻烦占用您的一部分时间,指点一下我该如何去修改,才能让微调之后的模型能够准确地输出special_token
Others
No response
The text was updated successfully, but these errors were encountered: