Skip to content
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

加载chinese-alpaca-plus-13b模型推理异常 #25

Closed
ghscut opened this issue Jun 9, 2023 · 3 comments
Closed

加载chinese-alpaca-plus-13b模型推理异常 #25

ghscut opened this issue Jun 9, 2023 · 3 comments
Labels
solved This problem has been already solved

Comments

@ghscut
Copy link

ghscut commented Jun 9, 2023

python src/cli_demo.py --model_name_or_path xxx --prompt_template alpaca
xx是合并后的chinese-alpaca-plus-13b目录。模型确认没有问题,用chinese-alpaca官方的cpp文件推理没有问题。
image

@ghscut
Copy link
Author

ghscut commented Jun 9, 2023

补充: cli_demo参数换成https://github.com/ymcui/Chinese-LLaMA-Alpaca/blob/main/scripts/inference/inference_hf.py这里面参数后, 结果更离谱, 如下:
gen_kwargs = {
"input_ids": input_ids,
"do_sample": True,
"top_p": 0.9,
"temperature": 0.2,
"top_k":40,
"num_beams": 1,
"max_new_tokens": 400,
"repetition_penalty": 1.3,
"logits_processor": get_logits_processor(),
"streamer": streamer
}
image

@hiyouga
Copy link
Owner

hiyouga commented Jun 12, 2023

修改了template,重新试一下呢。

@ghscut
Copy link
Author

ghscut commented Jun 14, 2023

ok, 已经正常,感谢~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

2 participants