Downloads · 30 days
879
100% of all-time downloads
luispoveda93/MiniCPM5-2B-catalan-chat
MiniCPM5-2B-catalan-chat is a text generation model from luispoveda93. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
A conversational Catalan chat model: LoRA fine-tune of openbmb/MiniCPM5-2B on the full projecte-aina/InstruCAT instruction dataset (165,100 samples, 11 task categories, ~43M tokens, 1 epoch).
Downloads · 30 days
879
100% of all-time downloads
All-time downloads
879
Public
Parameters
2.5B
5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5 GB · 100%
From the Hugging Face model README
A conversational Catalan chat model: LoRA fine-tune of openbmb/MiniCPM5-2B on the full projecte-aina/InstruCAT instruction dataset (165,100 samples, 11 task categories, ~43M tokens, 1 epoch).
| Setting | Value |
|---|---|
| Method | LoRA (r=32, α=64, dropout 0.05, all attention+MLP projections) |
| Trainer | TRL SFTTrainer v1.12.0, transformers 5.16.1, peft 0.20.0 |
| Prompt format | MiniCPM5 chat template; system prompt "Ets un assistent conversacional que respon sempre en català."; completion-only loss on the assistant turn |
| Sequence length | 2048, packed |
| Effective batch | 32 (4 × grad-accum 8) |
| LR / schedule | 2e-4, cosine, 200 warmup steps |
| Steps / hardware | 711 steps (~19h) on 1× A10G 24GB, bf16 + gradient checkpointing |
Observed training curve (completion-only loss, every 10 steps): 2.39 → 1.48 (step 20) → 1.04 (step 30) → 0.45 (step ~70) → ~0.35–0.40 at the end. Mean token accuracy reached ~0.91–0.92 by the second half of the run. Eval on 1,000 held-out validation samples ran at step 500 without errors.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"luispoveda93/MiniCPM5-2B-catalan-chat",
dtype="bfloat16",
)
tok = AutoTokenizer.from_pretrained("luispoveda93/MiniCPM5-2B-catalan-chat")
messages = [{"role": "system", "content": "Ets un assistent conversacional que respon sempre en català."},
{"role": "user", "content": "Explica'm què és la Sardana."}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
out = model.generate(inputs, max_new_tokens=256)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
The LoRA adapter alone is at luispoveda93/MiniCPM5-2B-catalan-chat-lora.
Please cite the InstruCAT dataset and Projecte AINA if you use this model: