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

大模型Prompt Template格式 #233

Open
fang-siqi opened this issue Aug 6, 2024 · 4 comments
Open

大模型Prompt Template格式 #233

fang-siqi opened this issue Aug 6, 2024 · 4 comments

Comments

@fang-siqi
Copy link

你好,我是一名学生,想知道每个大模型的Prompt Template格式,应该怎么查询,我在微调过程中,发现每个大模型的Prompt Template都不一样,不知道从哪里能够找到针对特定模型的正确的Prompt Template,用来做指令微调。。。可以解答一下吗?

@fang-siqi
Copy link
Author

比如CodeGeeX4模型,我在项目中没有找到示例代码,微调过程中Prompt Template格式就不知道怎么弄了。。。。

@KMnO4-zx
Copy link
Contributor

KMnO4-zx commented Aug 7, 2024

  • 可以在模型文件中搜索 “build_inputs”函数,如果有chat模型的话,一般会有这个函数。
  • 可以使用transformers的“tokenizer.apply_chat_template(messages, tokenize=False)”,tokenize=False可以保证只输出未经token化的prompt。

@fang-siqi
Copy link
Author

谢谢

@fang-siqi
Copy link
Author

可以给一个使用template的比较全面的使用资料,,用于微调吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants