Instructions to use Balab2021/Nemotron-Mini-4B-LoRA-OpenAssistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Balab2021/Nemotron-Mini-4B-LoRA-OpenAssistant with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("nvidia/Nemotron-Mini-4B-Instruct") model = PeftModel.from_pretrained(base_model, "Balab2021/Nemotron-Mini-4B-LoRA-OpenAssistant") - Notebooks
- Google Colab
- Kaggle
| {{'<extra_id_0>System'}}{% for message in messages %}{% if message['role'] == 'system' %}{{' | |
| ' + message['content'].strip()}}{% if tools or contexts %}{{' | |
| '}}{% endif %}{% endif %}{% endfor %}{% if tools %}{% for tool in tools %}{{ ' | |
| <tool> ' + tool|tojson + ' </tool>' }}{% endfor %}{% endif %}{% if contexts %}{% if tools %}{{' | |
| '}}{% endif %}{% for context in contexts %}{{ ' | |
| <context> ' + context.strip() + ' </context>' }}{% endfor %}{% endif %}{{' | |
| '}}{% for message in messages %}{% if message['role'] == 'user' %}{{ '<extra_id_1>User | |
| ' + message['content'].strip() + ' | |
| ' }}{% elif message['role'] == 'assistant' %}{{ '<extra_id_1>Assistant | |
| ' + message['content'].strip() + ' | |
| ' }}{% elif message['role'] == 'tool' %}{{ '<extra_id_1>Tool | |
| ' + message['content'].strip() + ' | |
| ' }}{% endif %}{% endfor %}{%- if add_generation_prompt %}{{'<extra_id_1>Assistant | |
| '}}{%- endif %} |