EryriLabs Cymraeg 12B

A Welsh fine-tune of Gemma 4 12B. It continues from EryriLabs/gemma-4-12b-cymraeg-v6: six further rounds that were never published on their own (v7 to v7.4: spoken Welsh, yes/no answer forms, mutations, two DPO rounds against refusals and loops), then one more SFT round, v8, aimed at what v7.4 still got wrong: coarse language, yes/no answers when told which way to answer, and word and sentence judgements.

This repository has the merged bf16 weights and the last round's LoRA adapter in adapters/sft-v8. A Q8_0 GGUF is in EryriLabs/EryriLabs-cymraeg-12B-GGUF.

Load it the same way as v6, with Gemma4UnifiedForConditionalGeneration and transformers 5.15 or newer. The chat template opens the model turn with an empty thought block; use the template as shipped, with thinking off.

Results

CymraegBench v0.1, run locally on the Q8_0 GGUF with llama.cpp: up to 100 cases per suite, seed 1, temperature 0, thinking off. These are my own runs, not an independent evaluation. v6 is the figure AIsteddfod published.

v6 (published) v7.4 this model
Overall 52.70 57.87 62.36
Welsh reasoning 54.52 57.75 60.72
Practical Welsh 50.89 58.00 64.00
Legislation translation, BLEU 52.30 50.18 48.52
CCC language audit, mean of seven 72.56 71.72

Most of the gain over v7.4 is one suite: welsh-obscenities went from 20 to 81, which is worth 3.4 of the 4.5 points. That suite expects "Y" for every item, so it rewards a model for recognising coarse words but cannot show whether it also wrongly flags clean ones. On a balanced held-out set of my own (coarse words against look-alikes and neutral words) the model scores 73%, up from 60%. Other changes: welsh-yes-no 56 to 64, welsh-lexicon 87 to 92, piqa 64 to 70, arc-welsh-easy 74 to 79. Per-suite tables are in eval/cymraegbench-v0.1/.

Where it is weaker

  • welsh-toxigen fell from 82 to 72 and welsh-grammar from 63 to 55. On my own held-out grammar set the model is only a little above chance (58%).
  • Legislation translation BLEU dropped by 1.7, and place names are still very poor (5).
  • Maths without working is weak (mgsm-cy 26).
  • It invents facts freely and is better at short spoken replies than long explanations; v6's card describes the same limits.

I looked at CymraegBench results between rounds to decide what data to build, so the model is tuned towards the kinds of task that benchmark asks. No benchmark item was used in training: every generator loads the relevant suite and drops any matching word, sentence, question or place name, and the translated sets come from the train splits of datasets whose test splits the benchmark uses.

Training

v8 is one epoch of QLoRA on the merged v7.4 weights: 4-bit base, rank 32, alpha 32, on the attention and MLP projections of the language model, learning rate 5e-5 with cosine decay and 3% warmup, effective batch 16, loss on the final assistant turn. 16,972 rows on one RTX 3090 in about two hours.

Rows What Source
3,000 replay of the v7.4 round as for v7.4
3,000 general instructions BangorAI/alpaca-cy-1 (CC-BY-NC-4.0)
2,400 yes/no answers with a stated polarity generated (mine)
2,000 grammatical or not Senedd record (OGL v3), Cardiff University TM (CC-BY-4.0), own sentences, one error put in by rule
1,600 swearing and coarse slang hand-compiled list (mine), checked against CC0 transcripts
1,500 is this a Welsh word techiaith/lecsicon-cymraeg-bangor (CC0) and generated non-words
1,500 NLI nyu-mll/multi_nli train, fiction genre left out, machine translated
1,000 maths word problems openai/gsm8k train (MIT), machine translated
372 Welsh place names Welsh Language Commissioner, Standard Welsh Place-names (OGL v3)
800 output formats, context-grounded answers generated; Stop! Think Fraud Welsh pages (OGL v3)

The NLI and maths rows were translated from English by an automated pipeline and filtered by rule. An automated review of a 70-row sample found about 3% with a broken answer and about 30% with minor wording faults. No Welsh speaker has reviewed them, and the list of coarse words has not had a native review either.

The v7.4 weights this round started from were rebuilt from v6 and the six round adapters. The rebuilt model gives the same answer as the original v7.4 GGUF on 96.9% of 1,758 held-out prompts.

Licence and attribution

CC-BY-NC-4.0, non-commercial use only. v6 and the Gemma 4 12B base are Apache-2.0, but the v7 to v7.4 rounds and this one trained on BangorAI/alpaca-cy-1, which is CC-BY-NC-4.0, so these weights carry the same restriction. Contains public sector information licensed under the Open Government Licence v3.0 (Senedd Cymru record of proceedings; Welsh Language Commissioner place-names list, which contains OS data, Crown copyright and database right 2024). MultiNLI is by Williams, Nangia and Bowman (2018), used under the OANC terms and CC-BY 3.0. Cardiff University translation memories are CC-BY-4.0. Diolch to techiaith and Bangor University for the open Welsh data this rests on.

Downloads last month
75
Safetensors
Model size
12B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for EryriLabs/EryriLabs-cymraeg-12B

Adapter
(3)
this model
Adapters
2 models
Quantizations
1 model

Datasets used to train EryriLabs/EryriLabs-cymraeg-12B