Instructions to use Changahou/Llama8B_mathinstruct_SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Changahou/Llama8B_mathinstruct_SFT with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/home/chenjh2/disk_chenjh/models/models/Llama-3-8b-Instruct") model = PeftModel.from_pretrained(base_model, "Changahou/Llama8B_mathinstruct_SFT") - Notebooks
- Google Colab
- Kaggle
| {% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|> | |
| '+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|> | |
| ' }}{% endif %} |