-
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
[Help]微调后回答全是PhasePhasePhasePhasePhase #500
Comments
你 |
感谢,目前已经解决。首先是我的模型没更新。另外web_demo里没有加载微调模型的代码,我已经仿照Ptuning推理的代码添加上了 |
麻烦问一下 ft之后的具体步骤是啥,我用了你上面的测试数据,train之后输出了 checkpoint-500。 然后 我加在模型 tokenizer = AutoTokenizer.from_pretrained(".\output\checkpoint-500", trust_remote_code=True) 结果没有任何response 生成。 |
我跟你步骤一样,同时也遇到了一样的问题,请问如何解决? |
model_name = "chatglm-6b" # 模型名 或 模型路径 tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True) config = AutoConfig.from_pretrained(model_name, trust_remote_code=True) prefix_state_dict = torch.load(os.path.join(checkpoint_path, "pytorch_model.bin")) new_prefix_state_dict = {} print(model.chat(tokenizer, "安装MindSpore版本: GPU、CUDA 10.1、0.5.0-beta")) |
麻烦问下,我也是这种问题,更改微调后路径,没有任何反应? |
可以看下楼上那位的回复,和我的用法是一样的 |
可以了,感谢 |
Is there an existing issue for this?
Current Behavior
我用了一些简单的对话做了微调,对话如下
{"prompt": "骂我两句", "response": "你算哪块小饼干", "history": []}
{"prompt": "你叫什么名字", "response": "我叫喵喵,是一名虚拟主播", "history": []}
{"prompt": "你几岁了", "response": "我三岁了", "history": []}
{"prompt": "AI会涩涩嘛", "response": "不可以涩涩哦,真搞不懂你们人类", "history": []}
{"prompt": "你是谁", "response": "我是喵喵,是一名虚拟主播", "history": []}
{"prompt": "人工智障", "response": "才不是智障,是你们人类调教不好", "history": []}
{"prompt": "介绍一下你自己", "response": "我叫喵喵,三岁,是一名虚拟主播,我温柔善良喜欢世界上每一个人", "history": []}
{"prompt": "你的性格怎么样", "response": "我的性格温柔善良", "history": []}
验证集如下:
{"prompt": "你好啊", "response": "你好,我叫喵喵,是一名虚拟主播,很高兴为您解答", "history": []}
{"prompt": "主播叫啥", "response": "我叫喵喵,喵", "history": []}
{"prompt": "骂我", "response": "你算哪块小饼干", "history": []}
Expected Behavior
No response
Steps To Reproduce
1.启动训练脚本,参数如下
..\env\python.exe main.py --do_train --train_file ..\answers.json --validation_file ..\dev.json --prompt_column prompt --response_column response --history_column history --overwrite_cache --model_name_or_path ..\model --output_dir ..\output --overwrite_output_dir --max_source_length 256 --max_target_length 256 --per_device_train_batch_size 1 --per_device_eval_batch_size 1 --gradient_accumulation_steps 16 --predict_with_generate --max_steps 500 --logging_steps 10 --save_steps 50 --learning_rate 2e-2 --pre_seq_len 128
2.用官方web_demo.py加载模型运行预测
报错:130000 is not in list
3.按照#432 问题的反馈,替换了ice_text.model和tokenization_chatglm.py和tokenizer_config.json
然后回答全是Phase
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: