Instructions to use marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Polygl0t/Tucano2-qwen-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k") - Transformers
How to use marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k
- SGLang
How to use marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k with Docker Model Runner:
docker model run hf.co/marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k
Tucano2 1.5B PT-BR Roleplay LoRA 9k
LoRA adapter for Polygl0t/Tucano2-qwen-1.5B-Instruct, fine-tuned for short Brazilian Portuguese role-play conversations.
This is an adapter-only upload. Load it with the original base model.
Intended Use
- Simulate a simple character in daily-life conversations.
- Maintain the assigned role.
- Answer in short, natural Brazilian Portuguese.
- Support voice-agent style interactions where another system handles speech input/output.
This adapter is not intended to be a grammar teacher or a precise linguistic correction model.
Training
- Base model:
Polygl0t/Tucano2-qwen-1.5B-Instruct - Method: LoRA SFT
- Trainable parameters: 17,432,576
- Dataset: 1,811 approved synthetic PT-BR role-play conversations
- SFT examples: 9,055 prompt/completion turns
- Train split: 8,512 examples
- Validation split: 543 examples
- Epochs: 1
- Max sequence length: 768
- Learning rate: 1e-4
- LoRA rank: 16
- LoRA alpha: 32
- LoRA dropout: 0.05
- Hardware: RTX 3090 24 GB
- Training runtime: about 22 minutes
Evaluation
Manual benchmark with 30 turns across daily-life role-play scenarios:
| Model | Good | Partial | Bad | Peak CUDA VRAM |
|---|---|---|---|---|
| 1.5B Instruct original FP16 | 9/30 | 16/30 | 5/30 | n/a |
| 1.5B Instruct + LoRA FP16 | 15/30 | 9/30 | 6/30 | 2.9 GB |
| 1.5B Instruct original 4-bit NF4 | 5/30 | 13/30 | 12/30 | 1.44 GB |
| 1.5B Instruct + LoRA 4-bit NF4 | 16/30 | 11/30 | 3/30 | 1.44 GB |
| 3.7B Instruct original 4-bit NF4 | 13/30 | 12/30 | 5/30 | 3.6 GB |
The LoRA improved short PT-BR role-play behavior substantially, especially after 4-bit loading. Remaining weak points are precise grammar explanations and some direction-giving scenes.
Loading Example
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "Polygl0t/Tucano2-qwen-1.5B-Instruct"
adapter = "YOUR_USERNAME/tucano2-1p5b-ptbr-roleplay-lora-9k"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto")
model = PeftModel.from_pretrained(model, adapter)
model.eval()
Notes
- This adapter does not generate Mimi/audio tokens by itself.
- For audio output, connect it to a separate Talker/adaptor trained to predict Mimi codes.
- The repo is intended to be private while the dataset and product direction are still experimental.
- Downloads last month
- 6
Model tree for marcosremar2/tucano2-1p5b-ptbr-roleplay-lora-9k
Base model
Qwen/Qwen3-1.7B-Base