liltii-v0.2-qwen2.5-0.5b
Liltii is the on-device chat companion persona for the CupCake project: a small,
emotion-aware assistant that you talk to in Bangla (or romanized "Banglish") and that
answers in short, casual, in-character turns. This is a QLoRA fine-tune of
Qwen/Qwen2.5-0.5B-Instruct.
Replies are formatted as a leading emotion tag, an optional *action*, then text:
user: dosto i'm sleepy now
assistant: [sleepy] *lies down* ghum... goodnight...
The emotion tag drives the companion's face/animation in the host app.
Model Details
- Developed by: bayazidhs04
- Model type: Causal LM (Qwen2 architecture)
- Base model:
Qwen/Qwen2.5-0.5B-Instruct - Language(s): Bangla (
bn), English (en), and romanized Bangla ("Banglish") - License: Apache-2.0 (inherited from the base model)
Architecture
| Field | Value |
|---|---|
model_type | qwen2 |
| Parameters | 495,114,112 (~0.5B); 1,081,344 trained via LoRA (~0.22%) |
| Layers | 24 |
| Hidden size | 896 |
| Attention heads / KV heads | 14 / 2 (GQA) |
| Intermediate size | 4864 |
| Vocab size | 151,936 |
| Context length | 32,768 |
| Precision | float16 |
Emotion tags
[happy] [sad] [angry] [surprised] [confused] [sleepy] [excited]
[neutral] [shy] [bored]
Uses
Direct Use
On-device / edge chat companion for Bangla-speaking (or Banglish-typing) users, running
locally via llama.cpp GGUF quants. Small enough for a mid-range phone, and pairs with
the CupCake BLE-connected microcontroller.
Out-of-Scope Use
- Factual QA, coding, math, translation, or any high-stakes decision support.
- Safety-critical, medical, legal, or financial use.
- Long-form generation — tuned for short, casual, in-character turns.
Training Details
Training Data
bayazidhs04/cupcake-liltii
— 4,000 emotion-tagged Banglish chat samples (single-turn + multi-turn), split
3,600 train / 400 validation.
Training Procedure
- Method: QLoRA (LoRA on a 4-bit base)
- LoRA:
r=8,alpha=16,dropout=0.05, targetsq_proj, k_proj, v_proj, o_proj - Epochs: 3 (339 optimizer steps)
- Effective batch size: 8
- Learning rate: 2e-4, cosine schedule, 50 warmup steps
- Weight decay: 0.01
- Max sequence length: 2048
- Precision: fp16
- Hardware: 1× Tesla T4 (16 GB), trained on Kaggle
- Seed: 42
Results
| Epoch | eval_loss |
|---|---|
| 1 | 2.758 |
| 2 | 1.754 |
| 3 | 1.610 |
Benchmarks
Measured with llama.cpp build b11669 on 4 CPU threads, all models Q4_0, using each model's
own chat template. PPL / BPB are on an in-domain Banglish chat corpus (40,645 bytes).
tag% = replies starting with an [emotion] tag, action% = replies containing an *action*
beat, chars = average reply length, over 25 chat prompts (temperature 0.7, seed 42).
| Model | Params | Size | pp64 (t/s) | tg32 (t/s) | PPL ↓ | BPB ↓ | tag% | action% | chars |
|---|---|---|---|---|---|---|---|---|---|
| liltii-v0.2 (this model) | 494M | 271 MiB | 84.7 | 20.9 | 16.1 | 1.35 | 52 | 56 | 56 |
| Qwen2.5-0.5B-Instruct (base) | 494M | 331 MiB | 71.4 | 17.1 | 25.2 | 1.56 | 0 | 0 | 200 |
| SmolLM2-360M-Instruct | 362M | 217 MiB | 75.7 | 18.8 | 18.6 | 1.55 | 0 | 0 | 182 |
| SmolLM2-135M-Instruct | 134M | 86 MiB | 164.9 | 33.9 | 22.3 | 1.64 | 0 | 4 | 181 |
| Qwen3-0.6B | 596M | 359 MiB | 65.4 | 16.0 | 26.8 | 1.59 | 0 | 0 | 159 |
| Llama-3.2-1B-Instruct | 1.24B | 730 MiB | — | 9.5 | 23.0 | 1.52 | 0 | 12 | 204 |
Takeaways
- Best in-domain quality of every tiny model tested (BPB 1.35, ahead of Llama-3.2-1B at 1.52) and the only one that reliably follows the persona format.
- Faster than its own base at equal parameter count (20.9 vs 17.1 tok/s) thanks to the Q4_0-with-quantized-embeddings export.
- Short by design: 56 characters per reply vs 160–200 for the general-purpose models — which is the point for a chat companion.
- BPB (bits per byte) is shown because it is comparable across tokenizers; raw PPL is not.
Files
| File | Format | Size | Notes |
|---|---|---|---|
model.safetensors | fp16 safetensors | ~988 MB | Merged LoRA, for Transformers |
liltii-v0.2-v3-f16.gguf | GGUF F16 | ~994 MB | Full-precision GGUF |
liltii-v0.2-v3-q4_0.gguf | GGUF Q4_0 | ~271 MB | Recommended — smallest and best quality |
Why Q4_0 and not k-quants? Qwen2's tensor dimensions (hidden 896, KV projection 128) are not divisible by the 256-element blocks used by Q2_K/Q3_K/Q4_K, so llama.cpp falls back to higher-precision types for a large share of tensors. A clean Q4_0 (32-element blocks) applies to every tensor; with quantized token embeddings and output tensor it reaches 4.50 bits/weight, ~271 MB — smaller and better than the Q2_K build.
How to Get Started
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "bayazidhs04/liltii-v0.2-qwen2.5-0.5b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
messages = [{"role": "user", "content": "dosto i'm sleepy now"}]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(prompt, return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=64, do_sample=True, temperature=0.8, top_p=0.9)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
llama.cpp
The GGUF carries the chat template, so conversational mode formats turns for you:
llama-cli -m liltii-v0.2-v3-q4_0.gguf -p "dosto i'm sleepy now" -cnv -n 64
Or straight from the Hub:
llama-cli -hf bayazidhs04/liltii-v0.2-qwen2.5-0.5b \
--gguf-file liltii-v0.2-v3-q4_0.gguf -cnv
Bias, Risks, and Limitations
- Trained on a small synthetic/augmented Banglish chat set; replies are often non-grammatical mixed Bangla/English and should be treated as stylistic, not correct Bangla.
- May reproduce slang or stereotypes present in the training data.
- No RLHF/DPO safety stage. Do not ship to end users without an output filter; keep the persona deliberately non-abusive.
- Emotion tags are dataset conventions, not a reliable affect classifier.
Recommendations
Use the Q4_0 GGUF for phones, keep temperature around 0.7-0.9, and pair with a host-side
safety filter. Always disclose that replies are model-generated.
Citation
@misc{liltii-v0.2-qwen2.5-0.5b,
title = {liltii-v0.2-qwen2.5-0.5b},
author = {bayazidhs04},
year = {2026},
howpublished = {\url{https://huggingface.co/bayazidhs04/liltii-v0.2-qwen2.5-0.5b}},
note = {QLoRA fine-tune of Qwen/Qwen2.5-0.5B-Instruct}
}