{"repo":"jpmanson/llm_templates","free":true,"listed":false,"github":"https://github.com/jpmanson/llm_templates","clone":"git clone https://github.com/jpmanson/llm_templates.git","description":"Instruction/chat prompts creation library for text generation LLMs. It supports local and Hugging Face models.","language":"Python","stars":33,"topics":["chatbot","huggingface","library","llm","nlp","nlp-library","jinja2","llama2","mistral","template"],"license":"MIT","category":"ai-agents","readme_excerpt":"llm-templates It's a conversation formatter for chat models. The library allows you to easily format a chat conversation, with the same format with which the language model was trained. The library is installed with pip: or with uv: Requires Python 3.10 or newer. You can quickly start with the library using the following Colab notebook: The library has built in templates for the following models: - zephyr - llama2 - llama3 - llama31 - mistral - gemma - cohere - phi3 ...and HuggingFace models, using Jinja2 templates when tokenizer config.json file is available. This is a quick example with Llama3 model: And the result will be: Introduction Many models are based on foundational or pre-trained LLMs, which are then retrained (fin-tuning) with specially designed instruction datasets to improve and refine the abilities of these models on specific tasks: These data sets typically include a variety of text examples, which can range from questions and answers to instructions and answers. The main purpose is to teach the model how to follow instructions or how to appropriately respond to certain types of requests. When a language model like GPT-3 or GPT-4 is “fine-tuned” on these data sets, it learns to better understand and perform the tasks presented to it. For example, you may get better at understanding complex instructions, generating more relevant and accurate responses, or adapting to specific communication styles. This is particularly useful for specialized applications, where ","default_branch":null,"files":null,"tree":[],"storefront":"/r/jpmanson","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jpmanson/llm_templates/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}