Elamur Research

Adapting Open-Source Generative Large Language Models for Low-Resource Languages: A Case Study for Turkish

Paper · 2024 · Cagri Toraman

Summary

A system that writes fluent English may still struggle to answer a simple question in Turkish. One response is to train a system from scratch on Turkish text, which demands substantial computing resources. Another is to start with a system trained across many languages, where the amount and quality of material available for each language can vary. This paper tests a third route. It takes an existing open-weight system trained mostly on English and asks what different kinds of Turkish training can teach it. The experiments center on LLaMA.

The authors call the Turkish adaptations LlamaTurk. They compare continued training on Turkish Wikipedia, general instruction fine-tuning on translated and manually corrected Alpaca examples, and task-specific training on labeled reviews. They also test whether adding Turkish entries to the tokenizer's vocabulary improves the results of those training procedures. Their evaluations distinguish between predicting Turkish text and carrying out a requested task. The former uses perplexity, a measure of how much probability a system assigns to the text that actually follows. The latter measures accuracy on sentiment analysis, causal reasoning, and reading comprehension.

Continued training lowered perplexity on every Turkish collection in the main comparison. On XQuAD questions, the original Llama-7b scored 6.6916 and the version trained on Wikipedia scored 5.5088, with lower values indicating better prediction. Yet the Wikipedia stage alone brought little improvement in sentiment classification. The best setting without examples in the evaluation prompt was trained directly on sentiment, with accuracy of 0.90 on held-out Turkish reviews. With demonstrations in the prompt, general instruction training followed by sentiment training did best. Its accuracy was 0.93 in the 2-shot setting. General instruction training also produced improvements on the multilingual benchmarks' Turkish subsets, although the size and consistency of the gains varied with the benchmark and prompt.

The tested vocabulary extensions yielded no clear downstream benefit and had higher perplexity than the original Llama-7b. The larger Llama variant improved sentiment performance when task-specific training was paired with demonstrations at evaluation time. Adapting multilingual MaLA improved some scores over its own starting point, but it offered no consistent advantage over adapting English-dominant Llama. The experiments show why the choice of training material depends on the result that matters. Reading more Turkish helped the system predict Turkish text. Learning how Turkish instructions are answered and practicing the target task helped in different ways.

Deep dive: Adapting Open-Source Generative Large Language Models for Low-Resource Languages: A Case Study for Turkish

The LlamaTurk study compares ways to adapt English-dominant Llama to Turkish, measuring how each affects text prediction and task accuracy. · about 34 minutes to read

The problem and its context

Why start with a system trained mostly on English?

The study treats Turkish as a low-resource language in a specific sense. Its concern is how well Turkish is represented in the material used to train open generative systems. A researcher might have enough Turkish text for a useful corpus and still be working with an initial system whose training was dominated by English. The paper asks how to improve that starting point with the resources available for a modest adaptation project.

In the authors' account, proprietary systems frequently led published comparisons at the time, while open efforts were working to close the performance gap and improve how their systems respond to human requests. The availability of an open starting point makes it possible to change the weights or alter the vocabulary and then evaluate the consequences. Availability alone leaves the language imbalance unresolved. If a system has learned primarily from English, its strong English answers give little guidance about which changes will improve its Turkish answers. The paper names open efforts such as Falcon in setting out that background.

One approach discussed in the paper is monolingual pretraining. A team can assemble material in its target language and make that language the focus of training from the start. The paper cites examples of monolingual efforts, including Turkish work, and emphasizes the hardware costs associated with bringing a generative system through pretraining. A team adapting an existing system begins with weights it can reuse. Whether those weights are a good basis for a new language, and which changes make the best use of them, become experimental questions.

The other common route in the paper is multilingual pretraining. Putting material from many languages into pretraining can give a single system experience with all of them. The paper points to an uneven distribution of training material as an important reason that this coverage can yield uneven performance. A language's inclusion and the strength of the resulting system on that language are separate issues. This motivates both adapting English-dominant Llama and checking whether a multilingual starting point makes the adaptation easier.

The authors chose Llama partly because versions of a workable size were available and in part because its English-heavy training makes it a useful case for examining transfer. A comparison involving a Turkish-first system would ask how to improve a system already designed around Turkish. Here the starting question is how far existing weights, learned largely from another language, can be made useful with Turkish text and examples. The authors present Turkish as a case for studying the procedure. The procedure can be applied to other languages, while the evidence for its effects comes from Turkish.

What the earlier work offered

The paper identifies continued pretraining as one established way to adapt a system. The researcher keeps training an existing system and supplies a corpus whose language or domain reflects the intended new use. Earlier work had used this approach to adapt encoder systems such as BERT to new domains. The paper also describes continued training in generative settings involving underrepresented languages, mixed-language text, different writing systems, and multiple languages. For LlamaTurk, the relevant question is what exposure to Turkish prose alone contributes.

Supervised adaptation uses examples with an expected answer. General instruction tuning provides many kinds of requests so a system can learn the pattern of producing a response to an instruction. The paper connects this approach to prior work on zero-shot instruction following and instruction following with human feedback. It describes Alpaca as an example of adapting an open generative system through instruction examples. Alpaca and Vicuna obtained examples by prompting proprietary systems, while Dolly used human labor to build its instruction collection. LlamaTurk takes the Alpaca collection as a starting point for creating Turkish examples.

Task-specific tuning narrows the supervision to the work the system is expected to do. Every example can teach the same decision process, such as assigning a sentiment label, even though the text to be judged changes from case to case. The paper cites prior uses in editing, sentiment classification, and machine translation. It also notes earlier concerns about specializing at the expense of general capabilities. Those concerns matter here because a configuration can become better at emitting a valid sentiment label while becoming worse at predicting other Turkish text.

Vocabulary extension changes the representation of the input and output. A tokenizer maps text into the units a system reads and generates. If it has learned its units primarily from English, an incoming Turkish expression may be represented by a sequence of smaller pieces. Adding units drawn from a Turkish corpus gives the system another way to represent such expressions. The new entries also require learned parameters. Earlier adaptation work had combined vocabulary changes with continued training or supervised examples, leaving the effect of the vocabulary tied to the other stages that accompanied it.

In the authors' view, these strands of research provided several plausible methods but had frequently examined them in different languages and experimental settings. Comparing their reported outcomes across papers would make it hard to tell which differences came from the method and which came from the starting weights, the training data, or the evaluation. LlamaTurk puts the main training choices, and selected combinations, into a common experiment. It also asks two practical questions about the starting system. One is whether a larger Llama improves adaptation. The other is whether prior multilingual training offers an advantage under the Turkish tuning recipe.

Why the evaluation is part of the problem

A system can have learned enough about Turkish word sequences to favor a fluent continuation, yet still fail to produce the answer a user requested. The paper therefore evaluates prediction and task performance separately. A text prediction measure lets the researchers ask whether an adaptation has become more familiar with different kinds of Turkish writing. An evaluation that requires a specific answer tests whether that familiarity can be turned into an observable decision. The two measures correspond to different demands on a generative system.

There is a practical constraint on what counts as observable evidence. Human review can assess generated text, but the paper describes the labor it takes and the difficulty of relying on it for low-resource settings. The authors also note that benchmark and evaluation tools often concentrate on English. They discuss GLUE and SuperGLUE as examples of established benchmark practice, then work with Turkish data that fit their own setup. Their experiment combines a purpose-built sentiment evaluation with Turkish portions of existing multilingual benchmarks. That choice shapes what can be tested with substantial supervised data and what can be evaluated chiefly through general instruction tuning.

The method, step by step

Choose a starting point and the kind of change to make

The main experiments begin with Llama-7b. The paper calls the family of Turkish adaptations LlamaTurk and uses suffixes to identify the intervention applied to each version. The letter c indicates continued training, i indicates general instruction tuning, t indicates sentiment-specific tuning, and v indicates a vocabulary extension. A name with several letters records the order in which its stages were applied. For instance, i-t starts with broad instruction examples and ends with labeled examples from the sentiment task.

The suffixes matter because the study compares training histories. When a configuration ends with sentiment supervision, a version with a preceding Wikipedia stage can be compared with a version that went straight to sentiment. Likewise, the vocabulary variants are evaluated against configurations trained without a vocabulary change. This design lets the authors ask about the contribution of the preceding stage under a shared final task or training objective. The diagram shows the branches of the study. The training path through them varies with the configuration.

From pretrained Llama to Turkish adaptation and evaluation

The steps in order.

From pretrained Llama to Turkish adaptation and evaluationStep 1: Start with pretrained Llama weights1. Start with pretrained Llama weightsStep 2: Expand the tokenizer vocabulary in selected variants2. Expand the tokenizer vocabulary in selected variantsStep 3: Continue training on Turkish Wikipedia where specified3. Continue training on Turkish Wikipedia where specifiedStep 4: Train on corrected Turkish instructions where specified4. Train on corrected Turkish instructions where specifiedStep 5: Specialize on labeled Turkish reviews where specified5. Specialize on labeled Turkish reviews where specifiedStep 6: Measure Turkish text prediction and task accuracy6. Measure Turkish text prediction and task accuracy

The paper uses LoRA, or Low-Rank Adaptation, to make training possible with its available hardware. In this setup, training uses a restricted set of adjustable parameters rather than doing an unrestricted update throughout the original network. The experiments also use 8-bit quantization, a lower-precision representation that reduces the resources needed to hold the starting weights. These choices define what the training comparisons mean in practice. Every conclusion about adding a vocabulary or passing through an extra training stage comes from adaptations under these resource constraints.

Continue learning from Turkish Wikipedia

Continued training asks the existing system to keep learning from ordinary text. The authors use a raw dump of Turkish Wikipedia from November 2023 containing 534,988 articles. There are no instruction and answer pairs in this stage. Training follows the generative task of learning from text in sequence. The new experience is the Turkish prose itself, including the contexts in which expressions occur and the continuations that follow them.

The paper describes a general concern with this approach. A system can get better at predicting its new corpus while losing capabilities learned earlier, a problem called catastrophic forgetting. The training objective in the paper's account is to reduce loss on the incoming text while retaining relatively low loss on the earlier material. The Turkish evaluation focuses on the new language. The possibility of forgetting explains the authors' interest in starting from carefully chosen weights and later bears on what the reported evaluation can establish.

The input sequences for continued training have a length of 512 tokens. A token is a unit of text identified by the tokenizer, so this setting describes how much tokenized input can be processed in a sequence. The batch setting is 128 instances, and the authors report 32 gradient accumulation steps. Accumulation lets training gather gradient information over successive computations before making a weight update. There are 100 linear warmup steps, during which the learning rate is brought up gradually. The learning rate is 3e-4, and there is a single epoch, meaning one pass through the training data under the chosen setup.

For LoRA, the rank setting R is 8, the scaling setting alpha is 16, and dropout is 0.05. The rank controls the size of the restricted update representation. The scale affects the contribution of that update, and dropout is a training setting that temporarily suppresses part of the computation. The authors ran continued training only for Llama-7b using 8-bit quantization. A run took approximately 206 hours on four NVIDIA RTX A4000 GPUs. That time commitment helps explain why the size comparison uses the supervised branches and why the full set of combinations is studied mainly at the smaller Llama size.

Teach the system to answer general instructions

The next data source changes what a training example looks like. An instruction asks for an action, an input can supply the material needed to carry it out, and an output shows the desired response. The authors took Alpaca's 52k English instructions and used Google Translate to create a Turkish version. The goal was a collection broad enough to show how many kinds of requests can be answered in Turkish. It was supervised with responses, so the training signal concerned how to complete a request as well as which Turkish strings are plausible.

Machine translation did not by itself produce a suitable training set. The authors found missing letters and words that had stayed in English. They also found cases where translation had changed material that should have remained intact, such as reserved words in programming languages. A further class of problems involved constraints that survive as instructions but change their relationship to the example. If a request specifies a phrase of five words, an acceptable translation of its original answer can have fewer words. The translated example then pairs a request with an answer that no longer fulfills it. The authors manually reviewed and corrected the collection before training.

The instruction template presents the request in Turkish and places the task, any accompanying input, and the desired response in separate fields. This gives the system a repeated structure across otherwise varied tasks. It can learn that the content under the instruction field specifies what to do, that a separate field can provide data for the task, and that the output field is where the answer belongs. The paper publishes the corrected instruction collection as part of the LlamaTurk resources, along with the code and the adapted weights.

General instruction tuning was applied to Llama-7b, Llama-13b, and the multilingual MaLA starting point. The methods section names the latter MaLA-10b. The experiments use LoRA with 8-bit quantization. The paper reports that this setup trains 12.4% of the parameters in the instruction experiments. It retains the continued-training hyper-parameters with a shorter input length of 256 tokens and two epochs through the instruction data. One Llama-7b run took roughly 17.5 hours on two NVIDIA RTX 2080Tis.

This stage differs from Wikipedia training in both content and structure. Wikipedia offers examples of Turkish prose in context. Alpaca offers demonstrations of an action requested and a response supplied. The resulting system might become more familiar with the language in which a request is made or with the convention of answering a request in a particular field. The experiment compares their effects on general text prediction and on evaluations where the system has to produce an answer.

Teach one task with labeled reviews

The task-specific stage uses TRSAv1, a Turkish e-commerce review dataset. The authors sample 2,500 positive reviews and 2,500 negative reviews from it, giving the 5k training instances reported for this stage. The selected examples give equal representation to the two sentiment labels. A manually written Turkish instruction asks the system to return the polarity of the comment in the input. The expected output is the corresponding Turkish label.

The authors tried prompts drawn from PromptSource in preliminary experiments. They settled on a manually written prompt after observing better performance with it. The prompt is therefore part of the adaptation recipe. It supplies a consistent relationship among the instruction, the review, and the exact form of the output. A system trained on these examples gets repeated practice in mapping a variety of reviews to the same small set of permissible answers.

The task stage is applied to the same starting systems as general instruction tuning. It uses the instruction-stage hyper-parameters, including the 256-token input length and two epochs, with LoRA and 8-bit quantization. The paper again reports training 12.4% of the parameters in this setup. For Llama-7b, a run took approximately 2.5 hours on two NVIDIA RTX 2080Tis.

The tuning corpus gives the task stage some breadth in the kinds of reviews it encounters and a very narrow range of required outputs. That combination is intentional. The output space is limited because the experiment measures binary classification. The range of inputs matters because the system has to carry that decision process over to reviews it did not see during tuning. The paper later uses the same task in several evaluation prompt settings, allowing it to examine the interaction between training on the labels and seeing demonstrations at test time.

Add Turkish entries to the tokenizer

Subword tokenization represents words or other strings with pieces from a fixed vocabulary. The authors describe Llama's vocabulary as consisting of 32k entries and being predominantly English. They use a Turkish tokenizer with 28,600 entries learned with byte-pair encoding, or BPE. In this context BPE provides a way to learn reusable text pieces that can be combined to represent an input. The paper cites an earlier account of BPE for representing rare words when describing the tokenization method.

The authors combine the Turkish vocabulary with the existing Llama vocabulary. The result has 59,773 entries, with 827 found in both sources. Extending the vocabulary enlarges the learned representations associated with the entries. The paper reports that the extension adds almost 228m parameters that need training. This is more than a change to how a string is divided. The system must learn how the additional units relate to the contexts it reads and how to use them when generating text.

The extension is tested with Llama-7b and LoRA. In one branch it precedes general instruction tuning, in another it precedes sentiment-specific tuning, and in another it precedes continued training. These branches ask whether the new units help once the system has been exposed to a relevant training source. The results do not isolate a tokenizer swap with no training afterwards. They instead reflect versions in which the new vocabulary has been given a particular amount and kind of training.

Put the stages together in different orders

The paper uses sequential training to test whether the options reinforce each other. In the c-i configuration, Wikipedia training comes first and the corrected general instructions come next. The motivation is that exposure to Turkish prose might make it easier to learn from varied Turkish requests. The c-t configuration also begins with Wikipedia but goes directly to sentiment examples. That branch tests whether prior exposure to ordinary text helps when the next step is learning a specific decision.

The i-t configuration begins with general instruction training and ends with sentiment training. It asks whether answering a wide range of requests is useful preparation for giving a standardized answer to a review. The c-i-t variant includes all three training stages in that order. It tests a pipeline that moves from raw Turkish prose to supervised responses and finally to a single application. The order gives each stage a distinct role and lets the later stages build on weights learned in earlier ones.

Vocabulary extension is applied before the stage with which it is combined, giving v-i, v-t, and v-c. The combined configurations use the settings described for their constituent stages. A comparison such as v-i against i holds the general instruction source in common, while the vocabulary and its associated parameters differ. A comparison such as i-t against t holds the final task training in common, while the prior supervised experience differs. Each comparison measures the contribution of a training history under the paper's settings. Longer histories receive additional training as well as different data.

The paper tests Llama-7b and Llama-13b in the size comparison. For the multilingual comparison it chooses MaLA-500, which was developed to cover 534 languages by extending the vocabulary and continuing the training of Llama 2. In discussing alternatives, the authors report that BLOOM and Yi did not include Turkish in training and that Aya was larger than MaLA. The comparisons with MaLA center on general instruction and task-specific tuning. They give the authors a way to ask how the Turkish adaptation behaves when multilingual experience is already part of the starting point.

Measure prediction and requested answers separately

For intrinsic evaluation, the paper uses the following perplexity formula. Intrinsic here means that the evaluation looks at how the system assigns probability to an observed text sequence. It uses the text itself as the answer key.

perplexity = 2^(−(1/N) ∑ᵢ₌₁ᴺ log₂ P(wᵢ | w₁, …, wᵢ₋₁))

N is the number of words in the sequence under the paper's notation. i is the position of the word being predicted, wᵢ is that word, and w₁, …, wᵢ₋₁ are its predecessors. P is the probability assigned by the system, and the vertical bar means that the probability for the current word is conditional on the words to its left. log₂ is a logarithm in base 2. The sum runs from position 1 through N. The factor 1/N averages the log probabilities, the minus sign makes their average into a non-negative prediction cost, and the caret raises 2 to that cost. Assigning greater probability to the observed continuations leads to lower perplexity.

The paper explains the formula in terms of words and also reports token counts for its corpora. That distinction is especially relevant when a tokenizer changes, since a single stretch of written text can then be divided differently. In the main comparison with the original tokenizer, the measure asks how well each training history predicts several kinds of Turkish text on separate evaluation collections. The authors use question text and passages from XQuAD, and instructions and responses from a Turkish translation of Databricks Dolly.

For task evaluation, the Turkish prompt includes the input and requests an output that can be scored for correctness. In zero-shot evaluation, the prompt contains the request for the current case without a solved example. In few-shot evaluation, it also contains completed examples that illustrate what is expected. These demonstrations are inserted at inference time. They leave the weights fixed, whereas general or task-specific tuning changes weights before evaluation.

In the sentiment experiment, the zero-shot format is the same one used in task-specific training. The few-shot version puts completed review-label examples before the review whose label must be generated. The paper's example uses a short comment with clearly favorable descriptions, paired with the Turkish positive label. The test input then occupies the same position as the earlier comment, with the answer left open. The evaluator checks whether the generated text matches the expected positive or negative label. This makes output format part of what the experiment measures, alongside successful interpretation of the review.

The benchmark prompts likewise cast the items as instructions, drawing on the default prompts available through LM Evaluation Harness and modifying them to match the study's format. In the XCOPA example, the prompt presents a situation and alternative continuations. The demonstration shows the chosen continuation as part of a completed sentence. In Belebele, the prompt gives a passage, a question, and lettered options, with the expected response represented by a letter. The format differs because the tasks call for different decisions, while each asks the system to produce a response under an explicit Turkish instruction.

Experiments and results

Text prediction on questions, passages, instructions, and responses

The intrinsic evaluation uses text distinct from the collections employed for adaptation. XQuAD supplies Turkish questions and the passages associated with them. The question and passage collections each have 1.2k instances in the paper's data statistics. The instructions and responses come from a Turkish translation of Databricks Dolly, with 15.0k instances in each collection. The paper scores these fields separately. A question and the passage it refers to have different purposes and different lengths, and the wording used to make a request can differ from the wording used to answer it.

The starting baseline is Llama-7b without extra Turkish training. Continued training alone lowered perplexity across all the evaluation collections. On XQuAD questions it took the score from 6.6916 for the original to 5.5088. On the XQuAD passages the original scored 1.5487 and the Wikipedia-trained version scored 1.5064. On Dolly responses the corresponding scores were 9.0259 and 7.0924. Continued training alone was the strongest setting for those collections. The score for a question collection and the score for a passage collection each describe prediction within that particular kind of text. The comparisons with the baseline use the same evaluation material for each version.

Dolly instructions show a different ordering. The original Llama-7b has a perplexity of 9.5845. Wikipedia training by itself lowers that score to 8.4364, and general instruction tuning by itself reaches 8.3131. Continuing on Wikipedia and then tuning on general instructions gives the lowest result in this column, 8.2488. In contrast, training directly for sentiment gives 13.7173 on the same instructions. The collection distinguishes broad practice with requests from practice in producing a sentiment label under a fixed request.

Training and vocabulary settings on Turkish Dolly instruction perplexity

Wikipedia training followed by general instruction tuning gives the lowest perplexity on the instruction prompts.

Training and vocabulary settings on Turkish Dolly instruction perplexityOriginal Llama-7b: 9.5845Original Llama-7b9.5845Wikipedia training: 8.4364Wikipedia training8.4364General instruction tuning: 8.3131General instruction tuning8.3131Sentiment tuning: 13.7173Sentiment tuning13.7173Wikipedia, then instructions (this paper): 8.2488Wikipedia, then instructions (thispaper)8.2488Instructions, then sentiment: 13.0113Instructions, then sentiment13.0113Wikipedia, then sentiment: 12.5591Wikipedia, then sentiment12.5591Expanded vocabulary, then instructions: 22.1750Expanded vocabulary, then instructions22.1750Expanded vocabulary, then sentiment: 37.6394Expanded vocabulary, then sentiment37.6394Expanded vocabulary, then Wikipedia: 23.9212Expanded vocabulary, then Wikipedia23.9212
The numbers
System or settingperplexity
Original Llama-7b9.5845
Wikipedia training8.4364
General instruction tuning8.3131
Sentiment tuning13.7173
Wikipedia, then instructions (this paper)8.2488
Instructions, then sentiment13.0113
Wikipedia, then sentiment12.5591
Expanded vocabulary, then instructions22.1750
Expanded vocabulary, then sentiment37.6394
Expanded vocabulary, then Wikipedia23.9212

Instruction tuning alone improves on the original on the XQuAD questions and Dolly responses as well as the Dolly instructions. On XQuAD context passages its perplexity is 1.5674 against the original 1.5487. The direction of that result is unfavorable and the authors describe the values as close. The combined Wikipedia and general instruction variant has perplexity of 7.0676 on XQuAD questions and 9.4570 on Dolly responses. In each case the original is already better than the combined version, even though each stage on its own improves on the original for those collections. The sequence that is best for predicting Dolly instructions is consequently a poor choice if the only goal is to minimize perplexity across every text type tested.

Training solely on sentiment raises perplexity above the original across these collections. Its XQuAD question score is 9.2267 and its Dolly response score is 13.2289. Configurations that finish with sentiment also fare poorly on the general text collections. For instance, Wikipedia followed by sentiment reaches 10.7188 on Dolly responses, while the sequence of Wikipedia, general instructions, and sentiment reaches 10.6943 on that same collection. Each is above the original's 9.0259. The next experiment shows why these figures provide an incomplete account of the usefulness of the task-trained systems.

Vocabulary extension also brings higher reported perplexity across these text collections. On XQuAD passages, the version that expands the vocabulary and then trains on general instructions scores 3.8897. The corresponding instruction version with the original vocabulary scores 1.5674. On Dolly responses the expanded-vocabulary version followed by Wikipedia training scores 23.2612, compared with 7.0924 for Wikipedia training using the original vocabulary. These are comparisons of the adaptation settings as implemented. The downstream accuracy experiments offer another way to see whether any improvement from the added entries is apparent in use.

Sentiment accuracy on held-out reviews

The sentiment evaluation uses 100 TRSAv1 reviews withheld from task tuning. The set contains 50 examples of each class. Because the classes are balanced here, the accuracy gives equal representation to the positive and negative cases in the evaluation pool. The authors use different random seeds and average five runs. They assess pairwise differences with a two-tailed paired t-test at a 95% interval. The evaluations share the source dataset with the sentiment training examples but use different review instances.

For inference, the authors load the weights using 8-bit quantization. They set the temperature to 0.2, use beam search with four beams, and set top-p to 0.75. Temperature scales the relative preferences assigned to candidate continuations, beam search keeps several possible continuations in consideration, and top-p is the reported setting for restricting candidates by cumulative probability. At the end of generation, the evaluator checks the text against the required label. With the hardware used for these runs, the authors report roughly six hours for zero-shot inference and eight hours for 3-shot inference on Llama-7b, using two NVIDIA RTX 2080Tis.

Without solved examples in the prompt, the original Llama-7b scored 0.00 on the review set. Continued training by itself also scored 0.00. The instruction-only system reached 0.06, while the sentiment-only version reached 0.90. Under the same prompting format used during sentiment tuning, direct supervision delivered the best score. General instruction followed by sentiment training scored 0.83, and Wikipedia followed by sentiment training scored 0.82. The paper's significance markings exempt the former from the reported significant pairwise differences with the highest zero-shot result.

Adaptation settings on zero-shot Turkish TRSAv1 sentiment accuracy

Sentiment tuning alone has the highest accuracy when the prompt gives no solved examples.

Adaptation settings on zero-shot Turkish TRSAv1 sentiment accuracyOriginal Llama-7b: 0.00Original Llama-7b0.00Wikipedia training: 0.00Wikipedia training0.00General instruction tuning: 0.06General instruction tuning0.06Sentiment tuning (this paper): 0.90Sentiment tuning (this paper)0.90Wikipedia, then instructions: 0.10Wikipedia, then instructions0.10Instructions, then sentiment: 0.83Instructions, then sentiment0.83Wikipedia, then sentiment: 0.82Wikipedia, then sentiment0.82Wikipedia, instructions, then sentiment: 0.62Wikipedia, instructions, then sentiment0.62Expanded vocabulary, then instructions: 0.35Expanded vocabulary, then instructions0.35Expanded vocabulary, then sentiment: 0.44Expanded vocabulary, then sentiment0.44
The numbers
System or settingaccuracy
Original Llama-7b0.00
Wikipedia training0.00
General instruction tuning0.06
Sentiment tuning (this paper)0.90
Wikipedia, then instructions0.10
Instructions, then sentiment0.83
Wikipedia, then sentiment0.82
Wikipedia, instructions, then sentiment0.62
Expanded vocabulary, then instructions0.35
Expanded vocabulary, then sentiment0.44

The ranking changes in the presence of examples. The original Llama-7b has an accuracy of 0.50 at 1-shot, 0.53 at 2-shot, and 0.50 at 3-shot. Direct sentiment tuning scores 0.84, 0.61, and 0.78 in those respective settings. General instruction followed by sentiment tuning scores 0.90, 0.93, and 0.89, taking the highest reported value at each of those prompt sizes. The table's significance notation exempts sentiment tuning alone in the 1-shot comparison with the winner. At 3-shot, it exempts Wikipedia followed by sentiment, which scores 0.86 against 0.89 for general instruction followed by sentiment.

Adaptation settings on 2-shot Turkish TRSAv1 sentiment accuracy

General instruction tuning followed by sentiment tuning has the highest accuracy when the prompt supplies demonstrations.

Adaptation settings on 2-shot Turkish TRSAv1 sentiment accuracyOriginal Llama-7b: 0.53Original Llama-7b0.53Wikipedia training: 0.54Wikipedia training0.54General instruction tuning: 0.48General instruction tuning0.48Sentiment tuning: 0.61Sentiment tuning0.61Wikipedia, then instructions: 0.50Wikipedia, then instructions0.50Instructions, then sentiment (this paper): 0.93Instructions, then sentiment (thispaper)0.93Wikipedia, then sentiment: 0.62Wikipedia, then sentiment0.62Wikipedia, instructions, then sentiment: 0.56Wikipedia, instructions, then sentiment0.56Expanded vocabulary, then instructions: 0.49Expanded vocabulary, then instructions0.49Expanded vocabulary, then sentiment: 0.53Expanded vocabulary, then sentiment0.53
The numbers
System or settingaccuracy
Original Llama-7b0.53
Wikipedia training0.54
General instruction tuning0.48
Sentiment tuning0.61
Wikipedia, then instructions0.50
Instructions, then sentiment (this paper)0.93
Wikipedia, then sentiment0.62
Wikipedia, instructions, then sentiment0.56
Expanded vocabulary, then instructions0.49
Expanded vocabulary, then sentiment0.53

More demonstrations do not give a steadily increasing score. The sentiment-only version's weakest result with demonstrations is the 2-shot result, and its strongest result overall is zero-shot. For the general-instruction-plus-sentiment version, the 2-shot condition has the highest accuracy and the 3-shot condition is lower. The findings therefore concern particular training and prompt combinations. General instruction training helps most in this experiment when it has been followed by sentiment training and the evaluation provides examples.

The vocabulary results are also sensitive to which comparison is used. With no examples, the expanded vocabulary followed by instruction tuning scores 0.35, whereas instruction tuning with the original vocabulary scores 0.06. Yet the expanded instruction setting fails to establish a consistent gain across shot counts, and the expanded vocabulary followed by sentiment is much weaker in zero-shot than sentiment tuning with the original vocabulary. At 3-shot the expanded-vocabulary sentiment setting scores 0.53 against 0.78 for ordinary sentiment tuning. The authors' broad conclusion is about the absence of a reliable downstream advantage from the extension, rather than an identical ordering in every evaluation cell.

Causal reasoning and reading comprehension

The benchmark experiment uses Turkish portions of XCOPA and Belebele. The XCOPA task asks the system to choose an appropriate causal alternative. Belebele asks for an answer to a question about a passage from four choices. The authors compare the original Llama-7b with general instruction tuning, Wikipedia followed by general instruction tuning, and vocabulary extension followed by general instruction tuning. These experiments show how the general tuning recipe performs on benchmark tasks beyond the sentiment application used to construct the task-specific branch.

The paper reports little change in preliminary runs that tuned on the available Turkish task data, giving 600 instances for XCOPA and 900 for Belebele. The benchmark results it presents therefore focus on settings involving general instruction tuning. The paper contrasts those preliminary outcomes with the stronger result for sentiment, where 5k instances were used for task-specific tuning. The difference in training-set sizes helps explain the decision about which runs to report, while the tasks and datasets also differ.

On XCOPA, general instruction tuning raises zero-shot accuracy from 0.53 for Llama-7b to 0.58. At 1-shot both score 0.51. At 2-shot general instruction tuning scores 0.50 against 0.48 for the original, and at 3-shot it scores 0.55 against 0.52. The vocabulary extension paired with instruction tuning has the highest 2-shot result, 0.54, but its zero-shot accuracy of 0.55 is below the 0.58 obtained with instruction tuning alone. Wikipedia followed by instruction tuning gives 0.52 without demonstrations and 0.50 in the 3-shot setting. The gains from earlier Wikipedia exposure on perplexity do not carry over consistently to causal choice.

For Belebele, the original Llama-7b has an accuracy of 0.23 with no demonstrations, compared with 0.24 for all three adapted settings. At 1-shot, instruction tuning alone and vocabulary extension followed by instruction tuning each reach 0.27, against 0.23 for the original. At 2-shot, general instruction tuning gives 0.25, while the original and the other adapted versions each give 0.23. At 3-shot, instruction tuning alone and vocabulary extension followed by instruction tuning are tied at 0.28. Wikipedia followed by instruction tuning reaches 0.27, and the original scores 0.24. The authors read the benchmarks as evidence for the value of instruction tuning, with no consistent additional gain from Wikipedia training or a larger vocabulary.

Larger and multilingual starting points

The size experiment compares instruction-tuned and sentiment-tuned versions at 7b and 13b. The paper reports lower perplexity for the larger adapted Llama in both branches. One comparison is with the smaller adapted system. A different comparison is with the larger system before it is adapted. In the task-specific branch, the original Llama-13b still has better perplexity than its sentiment-tuned counterpart in most cases. Larger size can improve the level at which a specialized system predicts text while the specialization itself still imposes a cost relative to that same system's original weights.

For sentiment accuracy, the reported benefit of the larger starting point is clearest with task-specific tuning and few-shot evaluation. General instruction tuning of the larger Llama has no significant effect on downstream performance in the paper's account of that comparison. The size finding therefore concerns a specific combination of capacity, task supervision, and prompt examples. The paper presents these results in a figure and describes their direction in prose.

In the multilingual comparison, both general instruction tuning and sentiment tuning improve MaLA over its own starting version on the reported perplexity and accuracy measures. The paper reports that adapted English-dominant Llama retains better perplexity in every case and better task-specific accuracy in most cases. It identifies the instruction-tuned setting as the one area where the multilingual option shows a benefit. This gives a distinction between successful adaptation within the MaLA family and a practical advantage for MaLA over the adapted Llama starting point. The former is visible in the paper, while the latter is limited to particular conditions.

What the ablations show

Raw Turkish text and general instructions contribute differently

The paper's most direct comparisons start with the same Llama-7b weights and change what the system sees next. Continued training alone consistently lowers perplexity. General instruction tuning alone also helps on most of the text collections. Direct sentiment tuning worsens perplexity while delivering the best zero-shot sentiment accuracy. Taken together, these comparisons distinguish the ability to predict varied text from the ability to respond in the form required by the task. Each objective can improve while a different measure moves in the opposite direction.

The order of the Wikipedia and instruction stages tests an intuitive hypothesis. If these sources teach complementary things, exposure to both might deepen the improvement in predicting Turkish text. On Dolly instructions, the combined configuration beats both standalone configurations. That outcome is compatible with the paper's explanation that the training stages prepare a system differently for different kinds of text. The same combination falls behind the standalone stages on questions, passages, and responses. Even Dolly prompts and Dolly answers favor different recipes, which matters if an application mostly processes incoming requests or largely produces longer replies.

These comparisons concern training on data sources with different structures and volumes. The Wikipedia corpus exposes the system to sustained prose, while the Alpaca data repeatedly connect requests to answers. The combined system receives both training stages in a fixed order. The experiment gives a direct answer about adding one stage under that order and those settings. It leaves open whether a different mixture, schedule, or selection of examples would yield a different balance among the evaluation collections.

The last task stage matters, and the stages before it can matter too

The sentiment results provide the clearest comparison between task supervision and a general ability to answer instructions. Instruction tuning on its own adds little accuracy on the review task. Adding a sentiment stage after it produces the best tested variant in all the few-shot settings. The two variants share exposure to general instructions. The final stage adds supervised examples that teach which textual cues support each label and what an acceptable answer looks like. The study measures those contributions together through the generated label.

The comparison of t with i-t asks a narrower question. Both versions train on the sentiment examples, but only the latter first sees varied requests and responses. With no demonstrations, the sentiment-only route ranks higher. With demonstrations, the instruction-first route does better. One interpretation is that broad instruction experience could help the system use a completed example to interpret a new request after it has learned the sentiment decision. The paper measures the resulting accuracy. It does not directly test which part of the prompt the system uses to achieve it.

Wikipedia followed by sentiment offers a different route to the same final supervision. Continued training alone had little effect on sentiment, yet the two-stage combination is competitive with direct task tuning in some conditions. Its 3-shot result of 0.86 sits close enough to the 0.89 of i-t that the paper marks it as an exception to the significant pairwise differences with the best result. At zero-shot, direct tuning leads. This variation is the basis for the authors' suggestion that Wikipedia training may help task tuning in some circumstances. Support in the main experiment comes from selected prompt settings on a single downstream task.

The full sequence of Wikipedia, general instructions, and sentiment training shows how individual contributions can fail to add up. It has a zero-shot review accuracy of 0.62, compared with 0.83 for the general-instruction-plus-sentiment route and 0.82 for the Wikipedia-plus-sentiment route. At 3-shot, the full sequence scores 0.51. Every version in this comparison receives sentiment supervision, so the presence of that supervision cannot by itself explain the ordering. The extra stages alter the weights that enter the final one, and the final score reflects the history as a whole.

New vocabulary entries need support from the training recipe

The vocabulary experiment pairs each expanded setting with a corresponding training procedure using the existing tokenizer. Adding entries before the general instruction phase substantially raises reported perplexity on all the intrinsic collections. Pairing the extension with the largest raw-text source in the experiment produces a similar pattern. The effect on task accuracy is less uniform across prompts, but the added entries fail to give a consistent improvement on the sentiment task or the benchmarks.

The authors give several possible explanations. New entries introduce additional parameters for embeddings, and there may be too little training to learn useful representations for them. They point to the scale of the continued-training corpus and to the number of entries introduced relative to the original vocabulary. They also raise the possibility that using quantization with limited weight updates made it harder to integrate the new entries. Those are explanations compatible with the setup. The experiment does not vary the quantity of added entries, embedding training, and corpus size independently.

For the benchmark comparison, the best 2-shot XCOPA setting happens to contain the expanded vocabulary, and a version with expansion ties for best at some Belebele prompt sizes. This is compatible with the authors' overall judgment because additional benefits are sporadic and general instruction tuning alone often matches or exceeds them. The vocabulary change is also bundled with a different set of token units and additional parameters. Where its perplexity is poor, the matching task comparisons are useful because the task asks for the same correct choice regardless of how a version divides its input internally.

Size and multilinguality are comparisons of starting points

The Llama size comparison keeps the family and the supervised recipe in common while changing the starting capacity. The larger adapted version achieves lower perplexity, and the larger sentiment-tuned version improves few-shot task performance. In the paper's description, general instruction tuning at the larger size produces no significant downstream gain. The extra capacity is therefore most visible in the tested application when the system has received supervision for the decision it must make and then sees examples of the expected answer at evaluation time.

The MaLA comparison asks whether adapting a multilingual system with an already enriched vocabulary works better than adapting English-dominant Llama. It shows that MaLA can improve over its original version and that the resulting adaptation usually has weaker task-specific accuracy and higher perplexity than adapted Llama. The instruction branch offers the favorable case for multilingual adaptation. The paper points out that pretraining material differs between the two starting systems in quantity and quality. Their training histories and vocabulary designs also differ. The comparison is consequently about the practical outcomes for these two choices of starting weights, with multilinguality one of several properties that change.

Limitations

Limits the authors identify

The authors limit their conclusions to the English-dominant Llama and multilingual MaLA families they examined under LoRA and 8-bit quantization. Full-precision training or other starting systems could produce different outcomes. Available hardware restricted the variety and scale of the experiments. The main continued-training and vocabulary combinations use Llama-7b, and the study did not evaluate systems larger than 13b. Evaluation size was also constrained by the time required to generate answers. These limits make the study a comparison of feasible recipes under particular conditions.

The target language is Turkish. The stages themselves can be applied to another language with appropriate data, but the results depend on what can be collected, how an instruction translates, and how the evaluation prompt is worded. The authors specifically recognize that the instruction set and the prompt templates influence outcomes. In this study, some translations required intervention because they changed the relationship between a request and its response. For another adaptation, both the amount of correction required and the behavior elicited by the finished examples could differ.

Wikipedia is the sole raw corpus used for continued training. The paper points to larger multilingual collections and corpus filtering as possible alternatives that could change the results. The authors also chose sequence lengths up to 512 tokens for efficiency even though Llama supports up to 2048 tokens. They note that this restriction particularly affects Wikipedia, where the material includes long articles. Limiting the amount of context processed in each example may discard information relevant to predicting passages or text whose cues occur farther apart.

The intrinsic evaluation samples particular kinds of Turkish material. The authors acknowledge that a different raw source, such as Common Crawl, might produce a different perplexity ordering. The downstream benchmarks were limited to the Turkish subsets the authors found usable in multilingual collections at the time. The paper notes that TurkishMMLU appeared after submission. Its mention in the paper provides context for the authors' data choices. Its results are outside the experimental comparison.

The authors also raise a limitation concerning the released systems. Their starting weights and the raw text involved in training can carry cultural and ethical biases, and the resulting text can reflect those biases. The paper discusses corpus filtering as work for a separate investigation. The reported perplexity and task accuracy measure the specified language and classification outcomes. The study provides no direct measurement of how the adaptations affect bias and fairness.

What the setup leaves unresolved

The sentiment test uses distinct review instances, but both the training and evaluation examples come from TRSAv1. The accuracy therefore measures generalization to held-out Turkish e-commerce reviews drawn from the same dataset. It gives no direct estimate for other domains, a different class distribution, or prompts that require explanations or more detailed judgments. Repeating runs helps characterize performance under the chosen evaluation procedure. It leaves the range of Turkish sentiment tasks represented by the evaluation unchanged.

Exact output matching makes scoring straightforward and places a narrow requirement on the generated answer. A system might judge the sentiment correctly and express it in a sentence that fails the label check. The zero-shot scores for the untuned versions measure the rate of successful label emission under that instruction, which includes both making the judgment and following the format. Without a separate analysis of malformed answers and wrong labels, the experiment cannot say how much of the task-tuning improvement came from each. This matters for interpreting the zero-shot score of 0.00 for the original Llama-7b.

The benchmark results cover causal choice and reading comprehension. The paper's account of preliminary task tuning uses fewer examples for those benchmarks than for sentiment. The outcome gives a reason for emphasizing general instruction tuning in the reported comparison. It does not establish a minimum useful amount of task supervision because the dataset, task, and answer format change together. Similarly, the paper reports a significance procedure for the repeated sentiment runs. Small gaps among benchmark scores can be described as observed accuracy differences without assigning them the same statistical interpretation.

For perplexity, the comparison involving the vocabulary extension needs particular care. The formula is described over words, while the system performs prediction on tokenized sequences. If the vocabulary changes how text is split, the units going into a likelihood calculation may also change. The paper reports the resulting perplexities and describes the word-level formula, but does not detail a common normalization for the tokenizer comparison. The direction of the downstream results gives independent evidence about how useful the extension was in these tasks. The perplexity figures alone cannot isolate how much of the gap came from learned probability assignments and how much might arise from comparing tokenizations.

The multilingual comparison changes the starting system along several dimensions. There is also a naming inconsistency to keep in view. The methods section identifies the instruction-tuned MaLA starting point as MaLA-10b, while the prose around the multilingual comparison uses MaLA-7b and MaLATurk-7b labels. The paper's directional claims can be reported as a comparison between the MaLA and Llama adaptations. Those labels leave the exact size relationship in that comparison ambiguous. Along with the pretraining differences the authors acknowledge, this limits any claim that multilinguality alone accounts for the result.

Finally, the study considers catastrophic forgetting as a risk of continued training, but its reported evaluations focus on Turkish. Lower perplexity on Turkish evaluation corpora gives evidence that the system has adapted to those texts. The experiments leave retention of English or other prior capabilities unresolved. Likewise, there is no matched end-to-end experiment training a Turkish system from scratch. The hardware figures document what the adaptation runs required. They do not provide a controlled estimate of their savings over a Turkish-first training project aimed at equivalent performance.

What came after

TurkBench (2026) is a later citing work that introduces a benchmark for evaluating large language systems in Turkish. Its subject is the measurement side of the problem. LlamaTurk compares adaptation procedures using held-out reviews and Turkish portions of multilingual benchmarks. TurkBench makes Turkish benchmark evaluation the focus of the work itself.

That connection matters because the adaptation study found that different measurements can favor different training choices. Wikipedia training was consistently useful for perplexity, sentiment supervision led the zero-shot review test, and general instruction tuning was useful on the benchmarks. A Turkish benchmark addresses the need for task evidence in the target language, a need the adaptation paper encountered when choosing which experiments it could run. The citation establishes a connection between the studies. The title and scope of TurkBench establish its role as an evaluation effort, without establishing that it reused the LlamaTurk weights, prompts, or adaptation stages.

Cite

Cite as Cagri Toraman. 2024. Adapting Open-Source Generative Large Language Models for Low-Resource Languages: A Case Study for Turkish. Proceedings of the Fourth Workshop on Multilingual Representation Learning (MRL 2024).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2024.mrl-1.3

@inproceedings{cagri2024adapting,
  title = {{Adapting Open-Source Generative Large Language Models for Low-Resource Languages: A Case Study for Turkish}},
  author = {Cagri Toraman},
  booktitle = {Proceedings of the Fourth Workshop on Multilingual Representation Learning (MRL 2024)},
  year = {2024},
  doi = {10.18653/v1/2024.mrl-1.3},
  url = {https://doi.org/10.18653/v1/2024.mrl-1.3}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/toraman-2024-adapting-open-source-generative-large/