Use enable_thinking=False
The MiniCPM5 chat template inserts an empty <think></think> block in front
of every assistant turn in the training data, but adds nothing after
<|im_start|>assistant when enable_thinking is left undefined. The adapter
learned to answer after the empty block, so prompts must be built with
enable_thinking=False. The table below shows how much this matters.
Results
Accuracy on the 1,200 LaguQA multiple-choice questions, scored from the mean
log-probability of each option's text. One seed.
Table with columns: Prompt template, Before training, After training, Change| Prompt template | Before training | After training | Change |
|---|
| Template default (protocol used for all 14 open-weight models) | 24.2 | 36.9 | +12.8 |
enable_thinking=False (same format as the training data) | 24.3 | 51.0 | +26.8 |
Per question group, enable_thinking=False:
Table with columns: Overall, Facts, Title, Lyrics, Notation, Reasoning | Overall | Facts | Title | Lyrics | Notation | Reasoning |
|---|
| Before training | 24.3 | 18.5 | 23.4 | 22.3 | 22.3 | 34.8 |
| After training | 51.0 | 52.4 | 16.8 | 26.0 | 61.1 | 75.9 |
| Answer-distribution baseline | 32.1 | 58.4 | 17.8 | 24.0 | 17.6 | 20.3 |
Under the template default, 192 questions went from wrong to right and 39 from
right to wrong (McNemar p ≈ 1.8 × 10⁻²⁵). For comparison, the Gemma 4 E2B
adapter trained with the same recipe rose from 24.1 to 53.3 (mean of three
seeds).
Effect on ability outside songs
IndoMMLU, 2,000 questions, neutral system prompt, random guessing 23.4%.
Table with columns: Prompt template, Before training, After training, Change| Prompt template | Before training | After training | Change |
|---|
| Template default | 28.4 | 25.8 | −2.6 |
enable_thinking=False | 33.6 | 27.2 | −6.4 |
Unlike Gemma 4 E2B, whose IndoMMLU score rose after the same training, this
model loses general Indonesian knowledge. Use the base model for anything
outside the songbook.
Usage
from peft import PeftModelfrom transformers import AutoModelForCausalLM, AutoTokenizer dasar = "openbmb/MiniCPM5-2B"tok = AutoTokenizer.from_pretrained(dasar)model = AutoModelForCausalLM.from_pretrained(dasar, dtype="bfloat16")model = PeftModel.from_pretrained(model, "IRedDragonICY/LaguQA-MiniCPM5-2B-LoRA") pesan = [{"role": "system", "content": "Kamu asisten yang menguasai lagu nasional dan lagu daerah " "Indonesia, termasuk notasi angka dan notasi ABC-nya."}, {"role": "user", "content": "Siapa pencipta lagu Gugur Bunga?"}]teks = tok.apply_chat_template(pesan, tokenize=False, add_generation_prompt=True, enable_thinking=False)keluar = model.generate(**tok(teks, return_tensors="pt").to(model.device), max_new_tokens=192, do_sample=False)print(tok.decode(keluar[0], skip_special_tokens=True))
Training
Table | |
|---|
| Training file | laguqa_train.jsonl, sha256 70d497ae… (20,944 training and 1,102 validation examples, split with the run seed) |
| LoRA | r 16, alpha 32, dropout 0.05 on q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj; 294 modules in 42 layers |
| Trained parameters | 25,116,672 of 2,541,873,152 (0.99%) |
| Schedule | 2 epochs, 2,618 steps, learning rate 4e-4, cosine, 78 warmup steps, batch 4 with 4 accumulation steps, loss on the assistant turn only, sequences cut at 768 tokens, seed 1 |
| Hardware | one NVIDIA Tesla T4 on Kaggle Notebooks, float16 with a gradient scaler (the T4 has no bfloat16), 3.8 s per step, 2.8 hours |
| Loss | training 3.196 → 0.083; validation 0.244 (epoch 1) → 0.110 (epoch 2) |
| Libraries | torch 2.10.0, transformers 5.16.1, peft 0.20.0, trl 1.12.0 |
The recipe is identical to the Gemma 4 E2B "final" variant except for the
precision, which the T4 forced. Full settings are in manifest.json.
Limitations
- One seed. The Gemma runs showed a standard deviation of about 4 points
between seeds, so single-run differences smaller than that cannot be read.
- Trained on all 107 songs with none held out; the scores measure memorised
knowledge of one book, not generalisation to other songs.
- The model card of the base model names English and Chinese; Indonesian is
not listed, and general Indonesian ability drops after training.
- 28 of the 107 transcriptions are still marked raw, so some notation answers
in the training data may be wrong.
Licence
Adapter weights: Apache-2.0, the licence of openbmb/MiniCPM5-2B. Data: CC BY-NC
4.0; per-song rights are listed in HAK-CIPTA.md in the dataset repository.