Highlights
- +32.4 pp over the base model on the same test set, from a LoRA adapter of ~171 MB.
- +26.5 pp vs GPT-5.6 Terra — ahead of a frontier model, at a fraction of its size; runs on a single GPU.
- Validation-only model selection, frozen before the test set was opened.
- Prompts, decoding settings, labels and data hashes are published for reproduction.
Benchmark results
Table with columns: Model, Adaptation, Test accuracy, Test macro F1, Validation accuracy| Model | Adaptation | Test accuracy | Test macro F1 | Validation accuracy |
|---|
| This model | Nest LoRA | 84.31% | 84.25% | 83.33% |
| GPT-5.6 Terra | zero-shot | 57.84% | 55.67% | 57.84% |
| Qwen3.5-4B (base) | none | 51.96% | 48.58% | 55.88% |
Test: 102 conversations. Validation: 102 conversations. Macro F1 averages all classes, with zero for undefined class F1. LoRA − Terra on test macro F1: +28.6 pp, group bootstrap 95% CI [+18.9, +39.3] pp (10,000 resamples over 93 similarity groups, seed 42).
How Nest ran this benchmark
- Splits. The source corpus mixes original conversations with synthetic ones generated by Claude Sonnet. Nest evaluated only on original conversations, in similarity groups kept apart from training. The seeds used to generate the synthetic examples are not identified upstream, so grouping reduces but does not rule out leakage. Labels and the model's outputs are Portuguese identifiers (
cancelamento, compra, duvida_produto, duvida_servico, elogio, reclamacao, saudacao, suporte_tecnico).
- Selection. Nest chose the training round on validation only and froze that choice, with hashes, before evaluating on test. The adapter was scored on test once.
- Frontier baseline. GPT-5.6 Terra received the same instruction and intent list, no examples (zero-shot), medium reasoning. It ran through Codex agents on blind, shuffled batches with opaque IDs, not as one isolated API request per example; inference contexts and reasoning budgets therefore differ from the adapter's.
- Base model. The untuned Qwen3.5-4B used the adapter's exact prompt and greedy decoding. Its test score was measured after the LoRA-vs-Terra comparison had been frozen, so it played no part in any choice.
- Decoding. Thinking disabled, temperature 0, and the output limit in
inference_config.json.
Quickstart
Requires transformers>=5.5, peft>=0.21, torch and accelerate. The base weights are downloaded from the Hub; this repository holds only the adapter.
import jsonimport torchfrom huggingface_hub import hf_hub_downloadfrom peft import PeftModelfrom transformers import AutoModelForImageTextToText, AutoTokenizer repo = "guistmartin/qwen3.5-4b-talkex-pt-br-lora"config = json.load(open(hf_hub_download(repo, "inference_config.json")))tokenizer = AutoTokenizer.from_pretrained(config["base_model"], revision=config["base_revision"])base = AutoModelForImageTextToText.from_pretrained( config["base_model"], revision=config["base_revision"], dtype="auto", device_map="auto")model = PeftModel.from_pretrained(base, repo).eval() # keep the adapter attached: do not merge_and_unload() messages = [ {"role": "system", "content": config["system_prompt"]}, {"role": "user", "content": "Cliente: Oi, quero cancelar minha assinatura, não uso mais o serviço."},]inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, enable_thinking=False, return_dict=True, return_tensors="pt").to(model.device)with torch.inference_mode(): output = model.generate(**inputs, max_new_tokens=config["max_output_tokens"], do_sample=False)print(tokenizer.decode(output[0, inputs.input_ids.shape[-1]:], skip_special_tokens=True).strip())# prints exactly one label from labels.json, e.g. cancelamento
Model details
Table | |
|---|
| Developed by | Nest |
| Model type | LoRA adapter (PEFT) for a causal language model |
| Base model | Qwen/Qwen3.5-4B |
| Task | Brazilian Portuguese support-intent classification |
| Language | Portuguese (Brazil) |
| Dataset | TalkEx PT-BR (Apache 2.0) |
| License | Apache 2.0 |
Training
Table | |
|---|
| Method | Supervised LoRA fine-tuning on Tinker, one round |
| Steps | 180 optimizer steps |
| Training data | 1,916 conversations from the TalkEx train portion |
| LoRA rank / learning rate | 16 / 2e-4 |
| Seed | 42 |
The adapter was converted from the native Tinker checkpoint to PEFT, preserving LoRA scaling, fusing Q/K/V updates into the Qwen3.5 layout and keeping the output-head adapter separate from the tied input embeddings. Nest verified projection equivalence, every saved tensor and PEFT loading on the exact base architecture. Keep the adapter attached rather than calling merge_and_unload().
Files
Table with columns: File, Contents| File | Contents |
|---|
adapter_model.safetensors, adapter_config.json | The LoRA adapter |
inference_config.json | Exact system prompt, renderer and decoding settings |
labels.json | The exact output labels, in order |
metrics.json | Aggregate scores, training counts and provenance hashes |
data_manifest.json | Dataset revision, split hashes and counts |
base_test_metrics.json | The untuned base model's test scores (post-hoc run) |
benchmark.png | The benchmark card above |
Limitations
- Results hold for this benchmark's prepared splits; they do not establish general superiority over frontier models or over a canonical API deployment of GPT-5.6 Terra.
- The model is specialized: outside its task and label set its behavior is not evaluated.
- 102 test conversations give wide uncertainty on any single number.
- Source labels were preserved and may contain ambiguities or errors.
- End-to-end generation with the full Hugging Face base weights and vLLM/SGLang serving were not part of the conversion checks.
Citation
@misc{nesttalkexptbr2026, title = {Qwen3.5-4B TalkEx PT-BR: a Nest LoRA for Brazilian Portuguese support-intent classification}, author = {Nest}, year = {2026}, url = {https://huggingface.co/guistmartin/qwen3.5-4b-talkex-pt-br-lora}}
About Nest
Nest turns the narrow, repeated LLM calls inside an agent into small models trained for that one task: same quality or better, at a fraction of the cost and latency. More results at nest.technology/benchmarks.