---
title: "From Bytes to Borsch — paper by Kiulian et al. (2024)"
description: "How Gemma and Mistral were fine-tuned for Ukrainian, why the authors built a locally grounded dataset, and what their exam and writing…"
canonical: "https://research.elamur.ai/free/en/papers/kiulian-2024-bytes-borsch-fine-tuning-gemma/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/kiulian-2024-bytes-borsch-fine-tuning-gemma/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / From Bytes to Borsch: Fine-Tuning Gemma and Mistral for the Ukrainian Language Representation

# From Bytes to Borsch: Fine-Tuning Gemma and Mistral for the Ukrainian Language Representation

Paper · 2024 · Artur Kiulian, Anton Polishko, Mykola Khandoga et al.

**Authors:** Artur Kiulian, Anton Polishko, Mykola Khandoga, Oryna Chubych, Jack Connor, Raghav Ravishankar and Adarsh Shirawalmath · **Year:** 2024 · **Venue:** Proceedings of the Third Ukrainian Natural Language Processing Workshop (UNLP) @ LREC-COLING 2024 · **Licence:** [CC BY-NC 4.0 (ELRA, LREC proceedings)](https://creativecommons.org/licenses/by-nc/4.0/)

Proceedings of the Third Ukrainian Natural Language Processing Workshop (UNLP) @ LREC-COLING 2024 · [licence](https://creativecommons.org/licenses/by-nc/4.0/)

- [Publisher's page](https://aclanthology.org/2024.unlp-1.11/)
- [PDF](https://aclanthology.org/2024.unlp-1.11.pdf)
- [DOI 10.63317/5dowr7hgrb4v](https://doi.org/10.63317/5dowr7hgrb4v)
- [arXiv 2404.09138](https://arxiv.org/abs/2404.09138)

## Summary

A system can write a competent sentence in Ukrainian and still get a basic question about Ukraine wrong. That distinction drives this study of [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/), the practice of adapting an already trained system with new examples. The authors adapt the open-weight Gemma and Mistral families for Ukrainian using [LoRA](https://md.research.elamur.ai/free/en/papers/hu-2021-lora-low-rank-adaptation-large/), which trains a relatively small set of added parameters while keeping the original weights fixed. They start with 3,063 training instructions from a Ukrainian natural language processing shared task. The authors still see mistakes, such as the system classifying borsch as an item used in cars, even though the instructions teach it how to answer a multiple-choice question. Two translated datasets, UAlpaca and Squad-uk, help with sentence formulation in the authors’ trials and yield little apparent improvement on the exam material.

The authors respond by building the Ukrainian Knowledge and Instruction Dataset, or UKID. They collect 1,064 Wikipedia pages in a monthly traffic range of 3,000 to 150,000 visits and retain 367 pages after screening for relevance to Ukraine. From article abstracts, they generate 962 training examples for UKID-v0.1. Each has a question, an answer, and a separate factual statement intended to give the answer a basis in the source material. The larger Gemma fine-tune uses UKID alongside the exam and UAlpaca instructions. The smaller Gemma fine-tune uses the exam and UAlpaca, while Mistral uses the exam and Squad-uk. The paper identifies public resources for repeating and extending the work.

On the multiple-choice benchmark, the authors report gains after fine-tuning Gemma and Mistral. The smaller tuned Gemma also beats the larger untuned Gemma on that test. The proprietary systems lead overall, and every tested system does better on Ukrainian history than on the combined language and literature category. The open-response assessment gives a different picture. The tuned Mistral has trouble following instructions, while the larger tuned Gemma scores worse for Ukrainian language use and grammar. Some of its answers mix Ukrainian and Russian, sometimes within the same word, in a pattern the authors connect to Azirivka. These examples document the behavior in generated answers and leave its frequency and cause open.

The study shows how a Ukrainian evaluation can measure differences across subject areas and expose tradeoffs between choosing the right answer and producing usable prose. It also introduces the Ukrainian Linguistic Inquiry Benchmark, or ULIB, as a starting format for human evaluation of tasks such as summarization, poetry, spelling, and plain-language explanation. UKID and ULIB address different needs. UKID supplies culturally specific training material, while ULIB gives evaluators a way to look beyond exam accuracy. The experiments establish the behavior of the tested configurations. The separate contribution of UKID to the gains remains an open question.

## Deep dive: From Bytes to Borsch: Fine-Tuning Gemma and Mistral for the Ukrainian Language Representation

How Gemma and Mistral were fine-tuned for Ukrainian, why the authors built a locally grounded dataset, and what their exam and writing tests revealed. · about 33 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What it takes to answer in Ukrainian

A Ukrainian-language exam question places several demands on a generative system at once. The system has to understand what the question asks, know enough about its subject to evaluate the alternatives, and produce an answer the examiner can score. A student reading the response might also expect its wording to be idiomatic and appropriate to the situation. These demands can come apart. A system that returns the requested letter reliably can still choose the wrong alternative. A system that recognizes the answer can make it unnecessarily difficult to extract by supplying a paragraph when the instructions call for a letter.

The authors see the uneven coverage of Ukrainian in [large language models](https://md.research.elamur.ai/free/en/concepts/large-language-models/) as a problem both of language use and of subject matter. A general system can draw on a large stock of patterns from its original training. The usefulness of that stock depends on what the original training material covered. In the paper’s account, the prominence of English can favor English-speaking users and the topics and perspectives represented in English-language material. For Ukrainian, that leaves an adaptation problem even where a system already shows enough command of the language to hold up its side of a simple exchange.

Calling Ukrainian a [low-resource language](https://md.research.elamur.ai/free/en/topics/low-resource-languages/) in this setting concerns the supply of suitable computational resources. The paper’s immediate difficulty is finding public Ukrainian instructions of the right kind. A passage in Ukrainian, an exercise about a general topic, and a question about Ukrainian history each supply different kinds of supervision. The authors need examples that demonstrate how a system should respond to an instruction and that give it material specific to the communities and subjects an evaluation will ask about. The supply of such examples matters separately from the presence of Ukrainian text on the web.

The distinction has practical consequences for education, one of the applications the authors discuss at length. A Ukrainian-language educational tool would have to do more than deliver prose in the right language. Its account of a literary work would depend on the accuracy of its cultural references and on its ability to explain what those references mean in context. A tool offering a plain-language explanation of a document would face a related combination of demands. The paper uses applications of this kind to motivate the research. Its experiment examines exam questions and prompted writing tasks, which offer a more bounded way to investigate what adaptation changes.

#### Why the authors start from existing systems

The paper situates the work in a transition from recurrent neural networks to systems based on the [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/). In its account, recurrent systems enabled important work in areas such as machine translation, while relationships between widely separated words and difficulties with efficient computation remained obstacles. The transformer’s attention mechanism lets a system take information from different positions in a sequence into account when computing a representation. Its architecture also improves opportunities for parallel processing. The authors connect those developments to the feasibility of training much larger systems on extensive text collections.

They distinguish earlier systems used primarily for language understanding from the generative systems that are the focus of their work. The former line is represented by [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/). The paper describes the GPT family as part of a shift towards systems that can produce text in response to a prompt. That shift changes the Ukrainian research question. A classifier can assign a label to an existing passage. An answer generator has to construct a response, which makes language choice, phrasing, factual adequacy, and compliance with instructions visible in the output.

The authors’ setup depends on the distinction between pretraining and adaptation. Pretraining supplies the starting capabilities by exposing a system to a broad text collection. Fine-tuning adjusts it for a narrower purpose using additional examples. Training from scratch would require assembling the original corpus and paying the computational cost of learning a general system. Starting from existing weights makes it feasible to ask a more focused question: what changes when an already capable generator receives instruction examples in Ukrainian and material about Ukraine?

Access to weights also determines what the researchers can change. The paper uses proprietary systems as performance references and points out that their providers control access and the permitted forms of adaptation. For the training experiments, it turns to open-weight systems whose parameters the researchers can use and adapt directly. Gemma gives the authors two sizes within a family to work with, and Mistral supplies a separate starting point. Their comparison therefore includes different underlying systems and, as the method makes clear, different ways of preparing and training them. [Gemma](https://md.research.elamur.ai/free/en/papers/gemma-2024-team-gemma-open-models-based-gemini/)

#### Where the Ukrainian work fits

The authors describe earlier Ukrainian research as concentrated in applications of BERT-like architectures. The examples they cite include contextual question answering, word sense disambiguation, and text classification. Those tasks show that Ukrainian computational linguistics already had active lines of work. The gap the authors identify lies in adapting general-purpose generators that can take a variety of instructions and produce extended replies. At the start of their project, they identify UAlpaca as the publicly available generator that had specifically been fine-tuned for Ukrainian. The scarcity of public instruction collections was a related problem for anyone trying another approach.

The paper places the Ukrainian case alongside efforts to adapt open systems for other languages, frequently starting from [Llama 2](https://md.research.elamur.ai/free/en/papers/touvron-2023-llama-2-open-foundation-fine/). The work it cites includes efforts for Italian, Dutch, Chinese, Hindi, Tamil, Vietnamese, Amharic, and Odia. The cited [Airavata](https://md.research.elamur.ai/free/en/papers/gala-2024-airavata-introducing-hindi-instruction-tuned/) concerns instruction tuning for Hindi, while [VinaLLaMA](https://md.research.elamur.ai/free/en/papers/nguyen-2023-vinallama-llama-based-vietnamese-foundation/) concerns a Vietnamese foundation system. The authors use these efforts to describe a field in which adapting an existing system had become a practical route to language-specific research. They also treat datasets as a lasting contribution, since a useful collection can carry over to a different starting system after the one that motivated it has been superseded.

The common strategy leaves a decision about what to put in the adaptation data. Translation offers an immediate way to reuse a collection and can expose a system to instructions and answers written in the desired language. Topic coverage travels with the underlying material. A translated exercise about a general subject still concerns that subject, however natural the Ukrainian translation may be. For an evaluation covering local history and literature, the authors need material whose subject matter was selected with Ukraine in mind. The project therefore has a data-construction objective alongside its training objective.

There is also a measurement question. The authors want to compare their adapted systems with existing alternatives and to examine how performance varies within Ukrainian tasks. An overall impression of fluent writing can overlook a weakness in historical knowledge. An exam score can overlook a switch into Russian or a failure to finish a story in the way requested. This motivates the division between a constrained test with answer keys and a human assessment of open writing. It also explains why the authors regard differences between history and language and literature as part of the result, even where the compared systems start from very different training backgrounds.

### The method, step by step

#### Start with the exam response format

The immediate task came from the UNLP shared task. Organizers supplied 3,063 instruction rows intended to familiarize systems with the multiple-choice format used in Ukrainian national testing. The item presents a question and its possible answers. The response required for evaluation is the letter associated with the correct option. That target gives the system a concrete behavior to imitate. It can learn how to terminate the response after an option letter and how to treat the entries beneath a question as alternatives to choose among.

The authors report that 3-5 epochs of LoRA fine-tuning were enough in their trials for the system to pick up the format. An epoch is a pass through the training collection. The observation concerns the acquisition of the answer convention under the authors’ experimental conditions. The same early trials produced wrong and sometimes incoherent answers, including the example involving borsch. In a choice test, the required letter is a compact way to represent the final decision. The shortness of that output gives the researcher little direct evidence about the knowledge or reasoning behind it.

The group next used UAlpaca and Squad-uk, the two publicly accessible Ukrainian instruction datasets it had identified. Both came from general-purpose English material translated into Ukrainian. They gave the researchers a way to test whether adapting on a broader collection of Ukrainian sentences and responses would address the weakness seen with the exam rows. The authors saw some improvement in formulation and apparent understanding and little progress on the exam material, including items the system had trained on. They attributed the shortfall to a gap between the content of the translated resources and the Ukrainian history and culture at issue in the exam. That interpretation led to a different procedure for finding training material.

#### Use readership to find topics, then screen for relevance

The authors frame the collection problem around what a Ukrainian user might want to know. They look to Wikipedia and Google as ways to locate topics of public interest, then use monthly visits to identify frequently consulted Wikipedia pages. Their chosen traffic band, from 3,000 to 150,000 visits per month, yields 1,064 candidate pages. Page visits give them a way to prioritize pages before constructing any instruction examples. The traffic range describes the source pages. It is separate from the eventual number of questions those pages support.

Popularity is an initial filter, and the authors add a separate decision about subject matter. Widely consulted pages can concern entities and events anywhere. The researchers want the selection to teach material relevant to Ukraine, so they classify each candidate page into one of two groups according to that criterion. This is a form of [text classification](https://md.research.elamur.ai/free/en/concepts/text-classification/) applied to source selection. After screening, 367 pages remain eligible for use in generating instructions. The source inventory is therefore shaped by a readership signal and a judgment about whether the subject belongs in a collection centered on Ukraine.

At this point the researchers have source pages. To make them useful for instruction tuning, they need examples of questions that can be asked about the material and responses that answer those questions. The input to this conversion step is the Wikipedia article abstract. A short abstract provides a bounded body of information from which the generation system can formulate a question and its answer. The paper discusses adding the underlying source paragraphs as a further improvement to the format. The initial release uses the abstract to generate examples and stops short of carrying those paragraphs into the training record.

From exam instructions to Ukrainian fine-tunes The steps in order.

#### Turn article abstracts into training instructions

The authors use the Gemini 1.0 API to generate the UKID records, citing the submission deadline as a reason for automating work that would have been impractical to complete by hand. An API is a programmatic interface through which they can submit the generation prompt and obtain a result. Their prompt demonstrates the desired task with an example and supplies text from a Wikipedia abstract. The example teaches the generator what sort of output to return in the current request. That use of examples in the prompt is [few-shot learning](https://md.research.elamur.ai/free/en/concepts/few-shot-learning/).

The resulting UKID example has a question, an answer, and a field named `fact_check`. The question makes the exercise an instruction the learner can respond to. The answer supplies the intended response. The factual field adds a self-contained statement meant to support or clarify the relevant fact. The authors refer to this structure as a question–answer–fact record, or QAF. UKID-v0.1 contains 962 of these records. A page is a unit of source collection, whereas a QAF record is a unit of instruction data. The count of screened pages and the count of generated records describe different stages of the pipeline.

The factual field is best understood through its role in constructing the example. A short answer might give a name or identify an event. A standalone statement can express the relationship that makes that answer appropriate. The authors intend that extra statement to help the system absorb the underlying fact during fine-tuning. A field called `fact_check` is still part of the training data: the procedure described here does not include a separate source lookup when Gemma or Mistral answers a test prompt. The evaluation tests the behavior of the trained system when asked to produce an answer.

The authors describe the public resource as a first version that they expect to expand. They contrast the small release with larger general-purpose English collections such as Alpaca and Squad. They also discuss earlier work suggesting that a smaller, carefully chosen instruction collection can suffice in a general English setting. Their interpretation is that the amount of useful supervision depends on what the starting system already understands and what information the adaptation has to supply. The UKID pipeline therefore addresses two jobs at once: making new examples available in Ukrainian and selecting facts whose relevance is determined by Ukrainian subject matter.

#### Prepare the examples for the starting system

A training record can be represented consistently in a dataset and still require different formatting when it is sent to different systems. An instruction-tuned starting point expects a particular way of marking who is giving the instruction and where the answer begins. The authors identify this as a practical issue with Llama, Mistral, and Gemma. In their experience, disregarding a system’s expected format led to worse behavior. They describe the observation as informal and leave its measurement for later work.

This formatting step is separate from the choice of training mixture. Reformatting an example changes the way its instruction and response are presented. Choosing a mixture determines which examples appear at all. The paper’s major comparisons involve both. It uses one data mixture for the smaller Gemma, another for the larger Gemma, and another for Mistral. The fact that they all use material from the exam task gives them a shared component. Their other sources and their training implementations vary. The flow shows the development of the project as a whole. UKID goes into the larger Gemma mixture, and the other runs use different combinations of the available data.

#### Adapt the two Gemma starting points

For Gemma, the authors begin with Google’s `gemma-2b-it` and `gemma-7b-it` weights. Both are already instruction-tuned. The study adapts that existing behavior with Ukrainian examples rather than building instruction following from the beginning. The researchers use Google’s Vertex AI platform and follow the official Gemma fine-tuning guidance. They identify their `from-bytes-to-borsch` repository as the home of the notebook and the published result.

The smaller system trains on 13,063 instructions. Its mixture consists of 10,000 UAlpaca rows and the 3,063 ZNO instructions supplied by the shared-task organizers. ZNO is the paper’s name for the Ukrainian exam data used for training. The larger Gemma trains on 14,025 instructions. It uses the same 10,000 UAlpaca rows and 3,063 ZNO instructions, together with the 962 UKID records. This gives the larger run an explicit source of Ukraine-centered examples in addition to exam questions and translated instructions.

The team uses a LoRA adapter from Keras v3. A LoRA adapter adds a trainable update to the existing system while leaving its original weights frozen. The update is constrained to have a low rank, which restricts how many independent directions it can use to change the original computation. In practical terms, the researchers can tune a much smaller set of values than they would have to adjust in a full fine-tune. The paper reports the Gemma rank setting as follows.

```
lora_r = 4
```

`lora_r` is the rank specified for the LoRA update. The equals sign shows the value assigned to that setting, and `4` is the rank used by the Gemma adapter. The authors report 11,067,392 trainable parameters for the Gemma-7B run. The original `7B` describes the size of the underlying Gemma variant, whereas the trainable-parameter count describes the part adjusted in the experiment.

The paper distinguishes the conference submission from the research comparison. A timing constraint prevented the group from submitting the larger Gemma to the UNLP competition. The submission contained the smaller instruction-tuned Gemma result. The authors nonetheless include the larger run in their own benchmarking discussion. Thus the two Gemma sizes both matter to the analysis, although they have different competition status.

#### Adapt Mistral through a separate pipeline

The Mistral run starts from `mistralai/Mistral-7B-Instruct-v0.1`. Its preparation uses Axolotl and the Hugging Face Transformers implementation of LoRA. The authors specify `LlamaTokenizer` for [tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/), the conversion of a text string into units the system can process. They train on Microsoft Azure with an instance described as `4x Nvidia Tesla A100-80Gb GPU`. They also acknowledge Tensoic and Microsoft Azure for providing computing resources. The platform and software differ from those used for Gemma, even though LoRA is the common adaptation strategy.

The Mistral collection combines ZNO and Uk-Squad, the paper’s name for Squad-uk in its training description. The combined mixture contains 37,890 instruction rows in a Llama/Alpaca-style format. A useful way to read that configuration is as a separate test of what can be achieved with more Ukrainian instructions built from exam and translated question-answering material. It contains neither the UAlpaca component of the Gemma mixtures nor the UKID component of the larger Gemma run. The results therefore compare complete adaptation choices, with the starting weights and data differing at the same time.

The optimizer is [AdamW](https://md.research.elamur.ai/free/en/papers/loshchilov-2017-decoupled-weight-decay-regularization/), which the authors use to update the adapter parameters during training. They specify both the rank and the scaling setting for the Mistral adapter.

```
lora_r = 32
```

`lora_r` again denotes the rank of the LoRA update. The equals sign gives the assignment, and `32` is the value used with the Mistral implementation.

```
lora_alpha = 16
```

`lora_alpha` is the adapter scaling setting, controlling the strength of the learned update in the implementation. The equals sign gives the assignment, and `16` is the chosen value. The paper reports 32,505,856 trainable parameters for this run. These settings describe the runs the authors carried out. They give no separate scoring or training equation and do not report a sweep to establish which rank or scaling value works best for Ukrainian.

### Experiments and results

#### Two tests with different criteria for success

The first test consists of multiple-choice questions from Ukraine’s external independent testing exam. The paper calls this benchmark `mcq` and reports a total of 3,063 questions. It gives the subject counts as 1,139 for Ukrainian history and 1,925 for Ukrainian language and literature. Those subject counts do not reconcile with the stated total. The training collection and the test benchmark are both described with the count 3,063, and the paper does not explain their relationship in enough detail to determine overlap from the counts alone.

The exam benchmark tests the ability to identify a correct answer among supplied options. The authors present the questions with a common instruction in Ukrainian that asks for the letter of the correct option. The scored output is an exact match between the answer letter and the answer key. In practice, the systems often add words beyond the requested letter. The authors manually filter these responses to recover the code and then score the code automatically. The reported comparison consequently concerns answer accuracy after extraction, while the need for extraction is itself evidence about compliance with the requested format.

The second test consists of 100 open instruction-based questions, called `oq`. Prompts ask the system to carry out tasks such as completing a story or producing a summary of an event. A human evaluator scores the responses. This benchmark makes a wider range of output qualities observable because the system has to produce connected text in reply to each instruction. Several responses can succeed on the same prompt, and a response can satisfy some parts of the rubric while failing others. [Text summarization](https://md.research.elamur.ai/free/en/concepts/text-summarization/)

The authors use separate criteria for language, content, task fulfillment, and writing quality. Ukrainian, abbreviated `U`, concerns whether the reply is in Ukrainian. Facts/Coherence, `C`, combines factual accuracy with how well the answer hangs together. Relevance, `R`, concerns whether the answer does what the instruction asks. Grammar, `G`, includes stylistic and grammatical quality. A response can earn up to 1 point in each category. Keeping the categories separate matters when a reply is clear and topical but slips into another language, or when it is well formed and misses the requested task.

#### Which configurations were compared

The benchmarking discussion centers on the two adapted Gemma versions, called Gemma2bFT and Gemma7bFT, with Gemma7b as the untuned reference. It also discusses Mistral before and after fine-tuning and includes proprietary systems as performance references. An untuned reference from the same family helps show what changed after the particular adaptation. The proprietary comparisons place the results in the context of stronger available alternatives. Their original training procedures, data, and access conditions differ, so the ordering is an empirical comparison on the authors’ tasks.

The benchmark runs for the fine-tuned systems used a DGX Station with four NVIDIA Tesla V100 GPUs, acknowledged separately from the training infrastructure. That distinction matters because the paper describes where adaptation was performed and where the post-training systems were evaluated. Cloud infrastructure for a particular training pipeline does not describe how its benchmark answers were obtained. The hardware details also help a reader distinguish the feasibility of producing adapter weights from the separate job of running the adapted systems to collect answers.

The chart compares the size of the instruction mixtures for the two Gemma settings against which the paper discusses its exam and writing results. The starred setting includes UKID. “Higher” orders the mixtures by instruction count. It carries no recommendation about how many examples produce the best answer quality.

Instruction rows in the Gemma fine-tuning mixtures The larger Gemma setting adds UKID to the exam and translated instructions used by the smaller setting.

**The numbers**

| System or setting | instruction rows |
| --- | --- |
| Gemma2bFT with UAlpaca and ZNO | 13,063 |
| Gemma7bFT with UAlpaca, ZNO, and UKID (this paper) | 14,025 |

#### Fine-tuning improves exam performance

For Gemma7b, the authors describe the improvement after adaptation as “roughly a quarter” in their discussion of the multiple-choice results. The wording gives the approximate size of the change the authors report. It does not specify whether they mean a relative change or a change in percentage points. They describe Mistral as improving more than Gemma did on the multiple-choice test. They also report that Gemma2bFT surpasses the untuned Gemma7b. Together, these comparisons show that the starting system’s size alone did not determine the outcome on this particular exam benchmark.

The adapted systems benefited from exposure to the exam’s task convention and to additional Ukrainian instruction material. Performance after adaptation reflects both influences, along with any changes in the system’s use of its existing knowledge. The comparison supports a direct statement about behavior: a system was more likely to select the keyed answer after adaptation. It supplies less information about how the correct answer was reached. A gain in scoring could reflect better interpretation of the alternatives, better use of a fact already encoded in the starting weights, a newly learned association, or some combination.

The proprietary systems generally perform better across the authors’ tasks. The paper highlights GPT-3.5 as a reference within reach of further improvements on particular Ukrainian-language tasks. That is a judgment about what the authors consider feasible, while the reported ordering concerns the systems evaluated in the study. They suggest scale, training data, and the use of human feedback as possible reasons for the advantage of proprietary systems. The benchmark itself does not vary those factors separately, so it cannot attribute the gap to any one of them.

The category split provides a comparison that cuts across those differences in training. In the authors’ account, every system evaluated scores better on history than on the language and literature category. This includes systems from different families and the proprietary group. The authors see the shared pattern as evidence of uneven representation of Ukrainian subject matter. The result also depends on what the two sections ask a system to do. The paper observes that factual recall can help with many history questions, while literary questions can demand interpretation of themes, language, or cultural references. The category score brings together those differences in content and in the kind of answer required.

#### Open answers reveal losses that exam scores miss

The adapted Mistral shows a problem with following the user’s instructions in open responses. The paper points to relevance as the category in which that behavior is visible. A system can become better at recognizing the expected action on a tightly constrained exam and less reliable when the instructions require a different form of response. In the multiple-choice setting, the output space is supplied by the question. In the open setting, the system has to decide what to write, how to structure it, and when it has done enough.

For Gemma7bFT, the authors report that performance on the Ukrainian criterion declines by 40% and describe the grammar score as reduced by nearly a half. That decline concerns the open-question assessment. It accompanies the stronger exam performance of the adapted configuration. Language and grammar are distinct ratings, but a generation that moves between Ukrainian and Russian can be affected on both. A language rating depends on which language the reply uses, while the grammar rating also concerns whether the resulting phrasing is well formed for the requested task.

The authors show examples of mixed Ukrainian and Russian from the larger tuned Gemma. In one, an assignment about a collection of colored pencils combines forms from both languages. In another, a complaint about the replacement of building pipes mixes languages within a passage that still has a recognizable communicative purpose. Some of the examples go beyond switching for an entire clause or using a word from the other language unchanged. They combine parts of words associated with different languages. The paper connects this to Azirivka, a named variety of Ukrainian–Russian mixing.

These examples help explain why the authors evaluate full replies as well as selected letters. Even a perfectly extracted multiple-choice answer could provide little opportunity to observe mixed endings or a switch to another language. In connected prose, those features become part of the answer a user would have to read. The examples show that the behavior occurred in the tested configuration. The evaluation reports the decline in the language and grammar criteria, while the examples give a more specific account of one pattern seen in the responses.

### What the ablations show

The paper reports no systematic ablation series and instead offers before-and-after comparisons, observations from successive data trials, a subject-level breakdown, and qualitative examples of generated language.

#### What adaptation changes as a whole

The larger Gemma comparison is the clearest way to see what happened after adapting the same starting variant. The authors compare Gemma7b with Gemma7bFT and observe higher multiple-choice performance alongside lower ratings for Ukrainian and grammar on open questions. The comparison includes the complete treatment: new examples, an adapter, an instruction format, and training. It establishes that the adapted configuration has a different performance profile on those benchmarks. It cannot distinguish how much of that profile depends on the exam data, the translated material, UKID, or the way the adapter was trained.

Mistral offers a separate before-and-after comparison that exhibits a related tradeoff. The adaptation helps on the exam and is associated with difficulty following open instructions. Its data and training implementation differ from those used for Gemma, and UKID is absent from its training mixture. The exam gain therefore occurs in a configuration that uses no UKID. This shows that the presence of the dataset is unnecessary for a gain somewhere in the study. A comparison of Mistral’s gain with Gemma’s gain would still leave open how much UKID helps when the starting system and every other setting are held fixed.

The result for Gemma2bFT and Gemma7b addresses a practical comparison between a smaller adapted system and a larger untouched one. The smaller system’s higher exam score shows that Ukrainian adaptation can affect the ordering on the task enough for the smaller configuration to lead. A controlled comparison of size would require the same adaptation conditions for both systems. Here, being adapted and being smaller are characteristics of the same contestant. The result speaks directly to the choice between those tested configurations.

#### What the changes in data suggest

The initial training trials separate ease of learning a response convention from the difficulty of answering the question itself. The exam instructions give a clear target output, and the authors find that a short run is enough to acquire that convention. They also encounter major errors in the substance of the resulting answers. The contrast is descriptive: format learning shows up in what sort of string the system returns, while content failures show up in which option it chooses or what explanation it gives. This is the evidence that directs the authors toward additional sources of local knowledge.

The subsequent trials with UAlpaca and Squad-uk add another observation. The authors see better sentence formulation and some improvement in what they describe as conceptual understanding, while progress on exam material remains limited. This suggests that a training example can improve some aspects of expressing an answer without supplying the facts needed to answer a different question. The trials are reported as practical development observations. They give no matched numerical comparison of translated and locally sourced collections of the same size, so the result supports the rationale for UKID more directly than a quantitative estimate of its benefit.

The larger Gemma’s mixture is the only reported mixture that adds UKID. It also uses different starting weights from the smaller Gemma. Comparing the two tuned Gemma variants consequently changes both what the systems saw and which variant learned from it. A comparison of the larger Gemma before and after fine-tuning holds the starting variant fixed, but all of its adaptation data enters at once. Taken together, those comparisons show how the authors used UKID and how the complete system behaved. They leave the marginal effect of the extra records undetermined.

The `fact_check` field has a similar evidential status. The authors give a reason for including a separate factual statement in a training record and describe how they generated the field. A direct test of its contribution would compare records with and without the field under otherwise matched conditions. Their evaluation concerns the mixtures they used. It does not separately score whether a generated answer correctly invokes a fact expressed in `fact_check` or whether adding such a statement improves recall of that fact.

#### What the output analysis adds

The history versus language and literature split identifies where the benchmark ordering consistently favors one subject category. The authors hypothesize that history is better represented in accessible material such as Wikipedia and that many historical questions reward recall of people, places, events, and dates. They also point to the interpretive demands of literature and to the limited attention major developers may give Ukrainian cultural materials. The same performance pattern is compatible with those explanations operating together. Since the study does not sort questions by type of reasoning or inspect the pretraining collections, it cannot tell how much each mechanism contributes.

The paper’s qualitative analysis of Azirivka is more specific about the form a failure can take. The authors define code-switching as alternating between languages within an utterance and discuss earlier research on whether multilingual systems can do this. Their examples include combinations of Ukrainian and Russian inside words, where a form from one language appears with an ending or inflection associated with the other. The presence of systematic-looking morphology makes the examples more informative than a bare report that some output failed a language check. [Multilingual Large Language Models Are Not (Yet) Code-Switchers](https://md.research.elamur.ai/free/en/papers/zhang-2023-multilingual-large-language-models-are/)

The authors describe the mixing as an emergent behavior because it appeared after adaptation without being a requested response style. In this context, “emergent” describes their observation of when the behavior became apparent. The examples do not establish its prevalence before or after adaptation. They also leave several explanations open, including patterns learned earlier that became easier to elicit, features of the new training mixture, and the behavior of the tuned system under particular prompts. The reported examples establish what the larger tuned Gemma sometimes generated. The human comparison the authors draw is about the form of the output, with the underlying mechanism left for further study.

### Limitations

#### Limits the authors identify

The authors present UKID-v0.1 as an initial collection. Its 962 records provide a concrete resource and a procedure for producing more. The authors expect an expanded collection to cover much more material, and they discuss preserving the original passages from which records were derived. That enhancement remains unfinished. As released, the format includes a generated factual field based on an article abstract. A reader wishing to inspect the underlying text for every claim would benefit from the fuller source context the authors propose.

The project had time and resource constraints. The authors automated the construction of UKID records to meet the submission deadline, and the larger Gemma missed the competition submission window. Their separate benchmark discussion includes that configuration. This means the larger Gemma’s results describe a research comparison made by the authors. The paper gives competition-submission status only to the smaller Gemma. The researchers also identify supporting code and configurations in their repository, which is useful provenance for the work described in the text.

The paper treats some observations as preliminary. It reports that ignoring a system’s expected instruction format produced worse outcomes in practice, while acknowledging that those observations had yet to receive formal documentation. It also calls for a closer study of code-switching. The examples show why the phenomenon deserves examination, but the authors give no systematic account of which prompts elicit it, which part of adaptation affects it, or how to make it occur on demand.

Similarly, the authors present ULIB as a starting point. The Ukrainian Linguistic Inquiry Benchmark proposes human assessment of [text generation](https://md.research.elamur.ai/free/en/topics/text-generation/) and related tasks, including summaries, poems, spelling, and simplified explanations. The paper announces the format and initial material and describes expansion as future work. The 100-prompt open-response experiment has its own reported scope and scoring categories. The broader ULIB proposal gives a sense of what a fuller evaluation could cover without supplying measured results for the full range of proposed tasks.

The authors also discuss social consequences, such as a reduced ability to use digital services in one’s own language and the loss of opportunities to transmit local cultural knowledge. These are part of their motivation and outlook. The research examines whether selected adapted systems answer particular exam and writing prompts. Its examples of educational assistance, access to explanations, and cultural preservation describe possible applications or risks whose outcomes would have to be studied separately.

#### Limits visible in the experimental design

The strongest causal claim the comparison supports concerns the adaptation package as a whole. Gemma mixtures vary with the underlying size, and Mistral introduces a different family, dataset mixture, tokenizer choice, adapter implementation, and training setup. A performance difference between the finished systems comes with all of those differences. For UKID specifically, the missing comparison is the larger Gemma run repeated in the same conditions with the UKID records omitted. The available results establish that the authors can include UKID in a working fine-tuning pipeline and measure the behavior of the result.

Fine-tuning can also improve a multiple-choice score in different ways. The system may get better at following the prompt, parsing the options, recalling an existing association, or using an association that the new data helped it acquire. The reported score credits the selected letter and cannot distinguish those routes. The authors interpret part of the gain as improvement in knowledge of the subject area. The direct observation is better selection of keyed answers under the experiment’s prompt and response extraction procedure.

The relationship between training and test data also affects how a reader interprets that accuracy. The paper gives 3,063 as the count of organizer-supplied training instructions and as the total reported for the multiple-choice test. The equal counts alone cannot tell a reader whether the questions are distinct, partly duplicated, or related in some other way. The separately reported subject counts also fail to reconcile with the stated test total. These are reasons to use the count labels with care. They leave the generalization to unseen questions less clearly documented than it would be with an explicit account of how the collections were separated.

Manual extraction of answer letters raises a further question about the unit being scored. Recovering an unambiguous letter from an explanatory reply can preserve credit for correct selection. Other responses can be harder to resolve, such as a reply that refers to several choices or puts the decisive statement in a later sentence. The paper explains that filtering was necessary but gives no detailed rules for ambiguous responses. The score therefore combines the outputs of the systems with this post-processing decision. A direct measure of exact compliance with the requested bare-letter format would address a different outcome.

The reported pattern favors history over language and literature on this exam. The authors relate the gap to cultural bias and describe the exam sections as intended to be comparable for school students. Comparable difficulty for the exam’s intended population does not ensure that the tasks put the same demands on a text generator. A literary interpretation question and a factual history question may require different operations even when students have similar chances of answering them correctly. A careful reading can treat the category gap as a measurable asymmetry on Ukrainian tasks while leaving open how much reflects relative exposure to topics, the type of reasoning required, or the structure of individual questions. [Bias, fairness & safety](https://md.research.elamur.ai/free/en/topics/bias-fairness-safety/)

The data selection procedure also has a boundary. Wikipedia traffic is a practical way of finding prominent subjects. Visits measure activity on the selected pages, while the relevance screen addresses whether those topics belong in a dataset about Ukraine. Neither establishes that the eventual records represent the full range of information needs among Ukrainian users. A topic important in a region, a particular literary tradition, or a specialized teaching setting could attract less web traffic. The authors’ method makes popularity and local relevance explicit. Its coverage of other kinds of importance remains a separate question.

Automated conversion adds a further step between the source and what is learned. The generator selects a relationship from an abstract, phrases the question, answers it, and produces the factual statement. An ambiguous abstract or a poor generation can yield a plausible-looking record that is weak as supervision. A standalone statement can make the intended fact easier to read and inspect. Its presence alone does not establish that the statement was checked independently against the source. The paper does not report a separate audit of UKID records that would quantify how frequently the question, answer, and factual field agree with the underlying article.

#### How far the open-response findings extend

The open-question rubric’s separate categories make it possible to see declines that an average would obscure. They also introduce judgments a reader needs to understand when interpreting scores. Facts/Coherence combines two properties. An answer might be coherent and wrong, or present a correct fact within a confusing explanation. Grammar gives a single rating to a category that includes grammar and style. The paper describes the criteria and maximum points, while giving no detailed account of how evaluators resolved borderline cases or how consistent the judgments were across evaluators. The reported effects are therefore best understood in the context of this particular set of prompts and human ratings.

The language criterion is motivated by ordinary usability: someone asking for a reply in Ukrainian needs to know whether they received one. A reply that switches language in a context where it was asked to stay in Ukrainian can reasonably score worse on that basis. The Azirivka examples raise a different question, about how faithfully a system can produce a mixed variety used in some settings. One benchmark would penalize unsolicited switching. A study of deliberate switching would need prompts and evaluation criteria that ask for the mixed variety. This paper supplies examples that make that distinction worth investigating and measures the quality of replies to its own instructions.

The fact that the examples look like language mixing found in human speech also leaves room for several mechanisms. A system can reproduce structural patterns encountered during training without having learned them in the way a bilingual speaker does. Neither the examples nor the aggregate language rating reveals which training text contributed the patterns or when the ability to combine forms arose. The appropriate claim is about available behavior: some replies from Gemma7bFT exhibit morphology and word choice the authors recognize as Ukrainian–Russian mixing.

Finally, the paper’s concern about cultural representation invites broader evaluation than the one it performs. It compares subjects within Ukrainian and tests whether selected systems can produce satisfactory replies to Ukrainian prompts. It does not present a matched English–Ukrainian assessment that would quantify a language-wide gap on exactly the same tasks. Its observations about the role of English in general training motivate the adaptation. The measured contribution is narrower and more concrete: the study documents exam gains, weaknesses revealed by open writing, and subject differences that recur across the tested systems. [Evaluation & benchmarks](https://md.research.elamur.ai/free/en/topics/evaluation-benchmarks/)

### What came after

The later citations concern different research questions involving language technology and Ukraine. One, [Hidden Persuasion: Detecting Manipulative Narratives on Social Media During the 2022 Russian Invasion of Ukraine](https://md.research.elamur.ai/free/en/papers/akhynko-2025-hidden-persuasion-detecting-manipulative-narratives/), addresses the detection of manipulative narratives on social media in the setting named in its title. The connection to *From Bytes to Borsch* is visible in the latter paper’s discussion of risks. The authors consider how language technologies can affect the distribution of propaganda and misinformation and refer to earlier multilingual detection research. The later paper cites the Ukrainian adaptation study and pursues a task centered on identifying manipulation, whereas the experiments described here concern generation and exam answers. The citation establishes a connection between the papers. It leaves open whether the later detection study used UKID, ULIB, or the authors’ fine-tuned weights.

The other later citation is [GBEM-UA gender bias evaluation](https://md.research.elamur.ai/free/en/papers/buleshnyi-2025-gbem-ua-gender-bias-evaluation/). Its stated subject makes evaluation the point of contact. *From Bytes to Borsch* looks for uneven performance across subject areas and task formats. Its notion of cultural bias concerns the representation of Ukrainian language, history, and literature, as reflected in the behavior of the systems it tests. The gender-bias work addresses another dimension of evaluation. Better selection of a Ukrainian history answer and better behavior on a gender-bias measure would be claims requiring their own evidence. The citation shows that the adaptation paper figures in the later work, while the nature of any reuse of its methods or resources remains unspecified.

Read alongside the original experiment, these citations show how the Ukrainian setting leads to questions with different objects of measurement. In the adaptation study, an evaluator checks whether a test answer matches the key or judges how well a generated reply fulfills an instruction. A study of manipulative narratives focuses on what is being communicated in social media text. An evaluation of gender bias concerns another property that a task score can leave unexplained. The later citations extend the range of questions associated with Ukrainian language technology. They provide no independent measurement of the exam gains, the effects of the UKID factual field, or the conditions that produced Azirivka in the larger Gemma. Those findings and open questions remain grounded in the original paper’s training mixtures, benchmarks, and examples.

## Cite

Cite as Artur Kiulian, Anton Polishko, Mykola Khandoga, Oryna Chubych, Jack Connor, Raghav Ravishankar and Adarsh Shirawalmath. 2024. From Bytes to Borsch: Fine-Tuning Gemma and Mistral for the Ukrainian Language Representation. Proceedings of the Third Ukrainian Natural Language Processing Workshop (UNLP) @ LREC-COLING 2024.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.63317/5dowr7hgrb4v](https://doi.org/10.63317/5dowr7hgrb4v) · [arXiv 2404.09138](https://arxiv.org/abs/2404.09138)

```bibtex
@inproceedings{kiulian2024bytes,
  title = {{From Bytes to Borsch: Fine-Tuning Gemma and Mistral for the Ukrainian Language Representation}},
  author = {Artur Kiulian, Anton Polishko, Mykola Khandoga, Oryna Chubych, Jack Connor, Raghav Ravishankar and Adarsh Shirawalmath},
  booktitle = {Proceedings of the Third Ukrainian Natural Language Processing Workshop (UNLP) @ LREC-COLING 2024},
  year = {2024},
  doi = {10.63317/5dowr7hgrb4v},
  eprint = {2404.09138},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.63317/5dowr7hgrb4v}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
