Training
Data
The model was fine-tuned on Macedonian translations of
UltraChat, a set of
multi-turn dialogues generated by ChatGPT and released under the MIT licence.
The training data combines
- LVSTCK/ultrachat-sft-mk,
a sample of 16,150 conversations translated with the Google Translate API and
released under the MIT licence, which contains 33.8 million tokens when
formatted with the model's chat template, and
- a translation of UltraChat made by FCSE, which is not publicly released.
Each training epoch covered about 182,000 conversations, which follows from
2,842 optimizer steps per epoch at an effective batch size of 64.
The base model, mk-gemma-4-e4b-pt, was trained on
LVSTCK/macedonian-corpus-cleaned-dedup,
as described on its model card.
Method and Hyperparameters
The model was trained by supervised fine-tuning of mk-gemma-4-e4b-pt. The
training run was scheduled for 3 epochs (8,526 optimizer steps), and the
published weights are the checkpoint at step 5,500 (epoch 1.94).
Table with columns: Hyperparameter, Value| Hyperparameter | Value |
|---|
| Optimizer steps | 5,500 of a scheduled 8,526. |
| Training tokens | 353.8 million. |
| Batch size per device | 1. |
| Gradient accumulation steps | 16. |
| Effective batch size | 64 conversations (1 per device, 16 accumulation steps, and 4 GPUs). |
| Maximum sequence length | 4,096 tokens, with longer conversations truncated at the end. |
| Packing | None. |
| Loss | Computed on the assistant's tokens only. |
| Optimizer | AdamW (PyTorch implementation), with β₁ = 0.9, β₂ = 0.999, and ε = 1e-8. |
| Weight decay | 0.1. |
| Gradient clipping | Maximum norm of 1.0. |
| Peak learning rate | 2e-5. |
| Learning rate schedule | Linear warmup over 3% of the scheduled steps (256 steps), then cosine decay to zero at step 8,526. |
| Learning rate at the checkpoint | 5.9e-6. |
| Evaluation loss at the checkpoint | 0.926. |
Compute
Training ran on four NVIDIA A100 80 GB GPUs with Fully Sharded Data Parallel
(FSDP) and took 2.36 × 10¹⁸ floating-point operations up to the checkpoint, as
estimated by the Trainer. It used about 80 to 105 GPU hours up to the
published checkpoint, estimated from the evaluation throughput logged during
training.
Evaluation
The model, its base model, and Google's instruction-tuned
Gemma 4 E4B were evaluated
zero-shot on the
Macedonian LLM evaluation suite,
which was machine-translated from the Serbian LLM evaluation suite. The table reports accuracy with its standard error.
Table with columns: Benchmark, mk-gemma-4-e4b-pt, gemma-4-E4B-it, mk-gemma-4-e4b-it| Benchmark | mk-gemma-4-e4b-pt | gemma-4-E4B-it | mk-gemma-4-e4b-it |
|---|
| ARC Easy | 0.5265 ± 0.0102 | 0.4364 ± 0.0102 | 0.5227 ± 0.0102 |
| ARC Challenge | 0.3413 ± 0.0139 | 0.3097 ± 0.0135 | 0.3311 ± 0.0138 |
| BoolQ | 0.7352 ± 0.0077 | 0.7489 ± 0.0076 | 0.7988 ± 0.0070 |
| HellaSwag | 0.4526 ± 0.0050 | 0.3744 ± 0.0048 | 0.4703 ± 0.0050 |
| OpenBookQA | 0.2940 ± 0.0204 | 0.2600 ± 0.0196 | 0.3000 ± 0.0205 |
| PIQA | 0.6926 ± 0.0108 | 0.5909 ± 0.0115 | 0.6964 ± 0.0107 |
| WinoGrande | 0.6014 ± 0.0138 | 0.5659 ± 0.0139 | 0.6125 ± 0.0137 |

These benchmarks measure knowledge and reasoning through
answer likelihoods, and they do not measure how well the model follows
instructions.
Intended Use and Limitations
Intended Uses
- The model serves as a Macedonian conversational assistant for research and
prototyping.
- The model answers questions, follows instructions, and generates text in
Macedonian.
- The model serves as a starting point for fine-tuning on Macedonian tasks.
Out-of-Scope Uses
- The model must not be used for decisions that affect people's health, legal
standing, finances, or access to services without human review.
- The model must not be deployed to the public without a safety evaluation
for the intended setting.
- The model must not be used in breach of applicable law or to cause harm to
people.
Known Limitations
- No safety evaluation is reported for this model, and it can produce false,
offensive, or harmful text.
- The model can state incorrect facts fluently, so its output needs checking
before it is relied on.
- The published weights are an intermediate checkpoint of the training run,
taken before the learning rate schedule completed.
- The evaluation covers text only. The image and audio abilities of the model
have not been evaluated for Macedonian.
- The evaluation suite was machine-translated, so its scores include
translation noise and do not measure open-ended generation.
Bias and Risks
More than 86% of the base model's pre-training corpus comes from web crawls.
The model can therefore reproduce the stereotypes, biases, and inaccuracies of
Macedonian web text, including those about gender, ethnicity, religion, and
politics. The instruction data was generated by ChatGPT and translated into
Macedonian, partly by machine translation, so the model can also reproduce the
biases of that generator and the errors and unidiomatic phrasing of
translation.
How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer model_id = "vezilka-ai/mk-gemma-4-e4b-it" tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto") messages = [{"role": "user", "content": "Кој е главниот град на Македонија?"}]inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256, do_sample=True, temperature=0.7) reply = outputs[0][inputs["input_ids"].shape[-1]:]print(tokenizer.decode(reply, skip_special_tokens=True))
Citation
@misc{mkgemma4e4bit2026, title = {{mk-gemma-4-e4b-it}: An Instruction-Tuned Language Model for {Macedonian}}, author = {Gajdov, Hristijan and Ristevska, Ekaterina and Veljanovski, Kiril and Ilioska, Veronika and Peshevski, Dimitar and Trajanov, Dimitar}, year = {2026}, publisher = {Hugging Face}, url = {https://huggingface.co/vezilka-ai/mk-gemma-4-e4b-it}}
Funding Acknowledgement and Disclaimer
This project has received co-funding from the European High-Performance Computing Joint Undertaking (JU) under grant agreement No 101263128. The JU receives support from the Horizon Europe research and innovation programme and from the Participating States, including the Republic of North Macedonia. Additional support is provided by the Faculty of Computer Science and Engineering, Ss. Cyril and Methodius University in Skopje, and the Ministry of Digital Transformation of North Macedonia.
Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European High Performance Computing Joint Undertaking (JU). Neither the European Union nor the granting authority can be held responsible for them.