INSAIT introduces MamayLM-Gemma-3-12B-IT-v1.0, the best performing Ukrainian language model based on google/gemma-3-12b and google/gemma-3-12b-it. MamayLM-Gemma-3-12B-IT-v1.0 is free to use and distributed under the Gemma Terms of Use. This model was created by INSAIT, part of Sofia University St. Kliment Ohridski, in Sofia, Bulgaria.
Model description
The model was built on top of Google’s Gemma 3 12B open models. It was continuously pre-trained on a large pre-filtered dataset using the combination of data mixing and model merging, allowing the model to gain outstanding Ukrainian cultural and linguistic capabilities while retaining its English performance. During the pre-training stage, we use various datasets, including Ukrainian web crawl data (Kobza), freely available datasets such as Wikipedia, a range of specialized Ukrainian datasets, and machine translations of popular English datasets. The model was then instruction-fine-tuned on a newly constructed Ukrainian instruction dataset created using machine translations of current best English datasets and specialized Ukrainian datasets, prepared by Ukrainian community. For more information check our blogpost (available in English and Ukrainian).
Benchmarks and Results
image/png
image/png
We evaluate our models on a set of standard English benchmarks, a translated version of them in Ukrainian, as well as, Ukrainian specific benchmarks we collected:
Winogrande challenge: testing world knowledge and understanding
Hellaswag: testing sentence completion
ARC Easy/Challenge: testing logical reasoning
TriviaQA: testing trivia knowledge
GSM-8k: solving multiple-choice questions in high-school mathematics
MMLU: testing knowledge on a multitude of topics
IFEval: testing instruction-following skills
ZNO: testing knowledge of the Ukrainian high school curriculum in Ukrainian language & literature, history, mathematics and geography
These benchmarks test logical reasoning, mathematics, knowledge, language understanding and other skills of the models and are provided at https://github.com/insait-institute/lm-evaluation-harness-uk. The graphs above show the performance of MamayLM 12B compared to other large open models. The results show the excellent abilities of MamayLM in Ukrainian, which allow them to outperform much larger models, including Alibaba’s Qwen 2.5 72B and Meta’s Llama3.1 70B. Finally, our models retain the excellent English performance inherited from the original Google Gemma 3 models upon which they are based.
image/png
MamayLM v1.0 12B also shows improved performance on visual benchmarks like MMMU and ZNO-Vision(MMZNO):
image/png
image/png
Use in 🤗 Transformers
First install the latest version of the transformers library:
In principle, increasing temperature should work adequately as well.
Instruction format
In order to leverage instruction fine-tuning, your prompt should begin with a beginning-of-sequence token <bos> and be formatted in the Gemma 3 chat template. <bos> should only be the first token in a chat sequence.
E.g.
<bos><start_of_turn>user
Хто такий Козак Мамай?<end_of_turn>
<start_of_turn>model
This format is also available as a chat template via the apply_chat_template() method: