https://github.com/theroyallab/llm-prompt-templates
Prompt Jinja2 templates for LLMs
https://github.com/theroyallab/llm-prompt-templates
Last synced: 5 months ago
JSON representation
Prompt Jinja2 templates for LLMs
- Host: GitHub
- URL: https://github.com/theroyallab/llm-prompt-templates
- Owner: theroyallab
- License: mit
- Created: 2023-12-18T03:09:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-09T00:38:27.000Z (7 months ago)
- Last Synced: 2024-09-09T19:07:08.078Z (7 months ago)
- Language: Jinja
- Size: 21.5 KB
- Stars: 25
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - theroyallab/llm-prompt-templates - Prompt Jinja2 templates for LLMs (Jinja)
README
# LLM Prompt Templates
A repository of Jinja2 templates that can be used in backends such as [TabbyAPI](), [Aphrodite Engine](https://github.com/PygmalionAI/aphrodite-engine/), and any backend that uses `apply_chat_template` from HuggingFace.
## How do I make these?
Look at [Huggingface's Documentation](https://huggingface.co/docs/transformers/chat_templating). It contains all the information you need to understand Jinja2's syntax and a straightforward way to create a chat template.
## Downloading
1. Click on the template file
2. Click the download button
3. Move the jinja file to the appropriate folder for your backend
## Plug into TabbyAPI
An alternative way to get all these templates at once is to do the following inside your TabbyAPI install:
1. Remove the existing templates folder
2. Open up a terminal and `cd `
3. Clone this repo (`git clone https://github.com/theroyallab/llm-prompt-templates templates`)
4. Run TabbyAPI (and set your config to use a new template)
## Contributing
If you have issues with the project:
- Describe the issues in detail
- If you have a feature request, please indicate it as such.
If you have a Pull Request
- Describe the pull request in detail, what, and why you are changing something
## Thanks to
- The Aphrodite team for introducing us to Jinja and its lightweight system.
- The vllm project for initial chat templates.
- HuggingFace for making Jinja's syntax understandable for chat templating and adding AutoTokenizer support.