When a model "understands" a language badly, the first place to look is not the weights — it is how the text was
cut into tokens. If a Bosnian word costs 2.5 tokens while the same meaning costs 1 token in English, the model
pays 2.5× the context and 2.5× the training compute for the same sentence, and the attention budget is spent on
word fragments instead of meaning.

We trained our own BPE byte-level tokenizer for the from-scratch model: 65,536 tokens, trained on Bosnian +
English. Fertility on our Bosnian eval text: 1.45 tokens per word.

What that number decides:

  • context: a 1,024-token window holds ~700 Bosnian words, not ~1,000
  • cost: every training token is 1.45 words, so a 4B-token run sees ~2.8B words
  • morphology: Bosnian has case endings that a 65k vocabulary can absorb as suffixes instead of spelling out

The model built on it: 375.4M parameters (24 layers, d_model 1024, RMSNorm, RoPE, SwiGLU, tied embeddings),
trained on 4B tokens at LUMI-G (8× AMD MI250X). Held-out val_bpb 0.8955 (seed 2027) / 0.90345 (seed 1337) —
a 0.9 % seed-to-seed gap that we treat as the measurement floor, not as noise to average away.

After SFT: tool calls 30/30 = 100 %, classification macro-F1 0.6615, ijekavica 66.7 % — on 30/50/30
item sets, so one or two items is noise, and ijekavica is the weak spot we name on the card.

Honest limits: 4B tokens is ~53 % of the Chinchilla budget for this size (deliberately undertrained — we wanted
the pipeline before the compute), and it is not a chat model. Next run: 1.5B params on 30B tokens.

Model + tokenizer + training code + raw logs:
https://huggingface.co/BH-Language-AI/bs-llm-375m-4b-sft
https://huggingface.co/BH-Language-AI/bs-llm-375m-2b