A small Bangla/Banglish emotion-aware companion language model, fine-tuned from
rnnandi/bangla-smollm-135m with
QLoRA. It powers the on-device chat companion in the CupCake project, where it is
spoken to in mixed Bangla (Banglish) and replies with a leading emotion tag, an
optional *action*, and short casual text.
Example:
user: dosto i'm sleepy now
assistant: [sleepy] *lies down* ghum... goodnight...
rnnandi/bangla-smollm-135mbn), English (en), and romanized Bangla ("Banglish")rnnandi/bangla-smollm-135m| Field | Value |
|---|---|
model_type |
llama |
| Parameters | ~210.9M (921.6K trained via LoRA, ~0.44%) |
| Layers | 30 |
| Hidden size | 576 |
| Attention heads / KV heads | 9 / 3 |
| Intermediate size | 1536 |
| Vocab size | 180,177 |
| Max sequence length | 8192 |
| Precision | float16 |
The assistant prefix encodes the emotion that drives the companion's face/animation in the host app. Observed tags include:
[happy] [sad] [angry] [surprised] [confused] [sleepy] [excited]
[neutral] [shy] [bored]
On-device / edge chat companion for Bangla-speaking (or Banglish-typing) users.
Small enough to run on a phone (via llama.cpp GGUF quants) alongside a BLE-connected
microcontroller.
bayazidhs04/cupcake-liltii
— ~4K emotion-tagged Banglish chat samples (single-turn + multi-turn), split
3600 train / 400 validation.
Sample record:
{"messages": [
{"role": "user", "content": "hello i had a bad day actually"},
{"role": "assistant", "content": "[sad] *sits beside you* oh tumi... my sathe thak, sob kichu good hobey..."}
]}
r=8, alpha=16, dropout=0.05, targets q_proj, k_proj, v_proj, o_projThe released model.safetensors here is the LoRA adapter merged back into the fp16
base model.
| File | Format | Size | Notes |
|---|---|---|---|
model.safetensors |
fp16 safetensors | ~420 MB | Merged LoRA, for Transformers |
bangla-smollm-135m-v3-f16.gguf |
GGUF F16 | ~415 MB | Full-precision GGUF |
bangla-smollm-135m-v3-q4_0.gguf |
GGUF Q4_0 | ~127 MB | Recommended — smallest and best quality |
Why Q4_0 and not k-quants? This model's tensor dimensions (hidden 576, KV projection 192, vocab 180,177) are not divisible by the 256-element blocks that Q2_K/Q3_K/Q4_K need, so llama.cpp silently falls back to higher-precision types for almost every tensor. The resulting "Q2_K" file is ~174 MB at an effective 6.35 bits/weight — larger and worse than a clean Q4_0. Q4_0 (32-element blocks) applies to every tensor here; combined with quantized token embeddings and output tensor it reaches 4.50 bits/weight, i.e. ~127 MB.
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 (Qwen2.5-0.5B) | 494M | 271 MiB | 84.7 | 20.9 | 16.1 | 1.35 | 52 | 56 | 56 |
| 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 |
| bangla-smollm-135m (base) | 210M | 113 MiB | 168.7 | 29.6 | 413.4 | 3.04 | 0 | 0 | 168 |
| bangla-smollm-135m-cupcake (this model) | 210M | 127 MiB | 182.0 | 29.0 | 1005.9 | 3.76 | 0 | 0 | 181 |
Honest result: this fine-tune is a regression. It scores worse than its own base model (BPB 3.04 → 3.76, PPL 413 → 1006) and tends to ramble in repetitive loops, never emitting the
[emotion]format it was trained on. It is kept published for transparency and reproducibility, but for real use preferliltii-v0.2-qwen2.5-0.5b— 2× larger but ~2.8× better BPB and the only model that follows the persona. BPB (bits per byte) is shown because it is comparable across tokenizers; raw PPL is not.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "bayazidhs04/bangla-smollm-135m-cupcake"
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))
The GGUF carries the chat template, so use conversational mode (-cnv):
llama-cli -m bangla-smollm-135m-v3-q4_0.gguf -p "dosto i'm sleepy now" -cnv -n 64
Use the Q4_0 GGUF for local inference, keep temperature around 0.7-0.9, and pair
with a host-side safety filter. Always disclose to users that replies are model-generated.
@misc{bangla-smollm-135m-cupcake,
title = {bangla-smollm-135m-cupcake},
author = {bayazidhs04},
year = {2026},
howpublished = {\url{https://huggingface.co/bayazidhs04/bangla-smollm-135m-cupcake}},
note = {QLoRA fine-tune of rnnandi/bangla-smollm-135m}
}
rnnandi/bangla-smollm-135m