Instructions to use kamel-usp/jbcs2025_Tucano-2b4-Instruct-tucano_classification_lora-C4-full_context-r16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use kamel-usp/jbcs2025_Tucano-2b4-Instruct-tucano_classification_lora-C4-full_context-r16 with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("TucanoBR/Tucano-2b4-Instruct") model = PeftModel.from_pretrained(base_model, "kamel-usp/jbcs2025_Tucano-2b4-Instruct-tucano_classification_lora-C4-full_context-r16") - Notebooks
- Google Colab
- Kaggle
Download chat_template.jinja from kamel-usp/jbcs2025_Tucano-2b4-Instruct-tucano_classification_lora-C4-full_context-r16: direct link, hf CLI and curl.
- Browser
- Download file 482 Bytes
-
https://huggingface.co/kamel-usp/jbcs2025_Tucano-2b4-Instruct-tucano_classification_lora-C4-full_context-r16/resolve/99f1e75c68c52c9ee5dd4fe3fa43ae6b9bcd8c7d/chat_template.jinja
- Command line
-
hf download hf://kamel-usp/jbcs2025_Tucano-2b4-Instruct-tucano_classification_lora-C4-full_context-r16@99f1e75c68c52c9ee5dd4fe3fa43ae6b9bcd8c7d/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/kamel-usp/jbcs2025_Tucano-2b4-Instruct-tucano_classification_lora-C4-full_context-r16/resolve/99f1e75c68c52c9ee5dd4fe3fa43ae6b9bcd8c7d/chat_template.jinja
482 Bytes
| {% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '<instruction>' + message['content'].strip() + '</instruction>'}}{% elif message['role'] == 'assistant' %}{{ message['content'].strip() + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %} |