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

Question about promt templates #927

Open
sanitar1988 opened this issue Sep 25, 2024 · 2 comments
Open

Question about promt templates #927

sanitar1988 opened this issue Sep 25, 2024 · 2 comments

Comments

@sanitar1988
Copy link

sanitar1988 commented Sep 25, 2024

Description

Good afternoon.

How and where (you can even have a code example, for example with llama 3.1) can I create a prompt template for LLM?

And how can I see (if possible) what the default prompt template looks like (also with a code example)?

Thank you

@martindevans
Copy link
Member

We have the PromptTemplateTransformer which should automatically apply whatever template is embedded into the model.

If you want to see what that template looks like I think it's encoded as one of the model metadata items (I can't remember the name, but if you just print all of them it should be obvious which it is).

@asmirnov82
Copy link
Contributor

asmirnov82 commented Oct 2, 2024

You may find an example of using PromtTemplateTransformer in LLama3ChatSessions
Default template in case if PromtTemplateTransformer is not used - DefaultHistoryTransform

If you would like to see chat templates for different models without downloading them, here is a good link: https://github.com/chujiezheng/chat_templates/tree/main/chat_templates

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

3 participants