SnakModel: Lessons Learned from Training an Open Danish Large Language Model
Paper · 2025 · Mike Zhang, Max Müller-Eberstein, Elisa Bassignana et al.
Summary
A system can answer a Danish question correctly when its choices are restricted and still answer in English when given room to write. It can also learn to reply in Danish without getting much better at interpreting Danish proverbs. SnakModel investigates how these abilities develop when a primarily English large language model is adapted for Danish. The authors use Danish because there is enough ordinary text to support substantial additional training, while examples of instructions written by native speakers are scarce. That combination makes it possible to study what Danish text and translated instructions each contribute.
The authors start with Llama 2 and continue training it on a collection of 13.6B Danish words. They assemble the collection from sources such as news articles, parliamentary transcripts, subtitles, and webpages, applying a common language filter and removing repeated material. The result is SnakModel-7B base. To make SnakModel-7B instruct, they then train it on 3.7M Danish instruction–answer pairs drawn from translated collections. Checkpoints saved during training let the authors examine when different abilities emerge and whether they survive the transition from predicting text to answering instructions.
On the Danish ScandEval test split, SnakModel-7B instruct averages 56.63, ahead of every Llama 2-7B variant in the comparison, including variants trained on the same Danish instructions. The gains over the original Llama 2-7B base are especially visible on grammatical acceptability, Danish proverbs, and citizenship questions. The Mistral-based systems in the comparison achieve higher averages. The checkpoint results show why the final ranking tells only part of the story. During Danish pretraining, the base version gets better at several tasks grounded in Danish material while its question answering performance drops. Instruction tuning recovers question answering and makes Danish responses more consistent in unconstrained generation.
Several validation scores approach their final levels well before pretraining ends, and most of the gains observed during instruction tuning arrive after one pass through the instruction data. These findings tie the value of additional training to the task and to the stage at which it is measured. The authors release the weights, intermediate checkpoints, code, and most of the pretraining sources. The release makes it possible to examine the intermediate behavior behind the final scores, including which abilities came from Danish text exposure and which became much easier to elicit after instruction tuning.
Deep dive: SnakModel: Lessons Learned from Training an Open Danish Large Language Model
SnakModel shows how Danish text and translated instructions shape language ability, instruction following, and cultural knowledge on ScandEval. · about 33 minutes to read
The problem and its context
Adapting a system for a smaller language community
Danish occupies a middle ground in the paper's account of language resources. A research team can collect substantial Danish text from public sources, yet the supply is smaller than for neighboring Swedish. The shortage becomes more severe when the required data must show how a person asks for a task and what a satisfying answer looks like. The authors also identify a shortage of Danish human-preference data, which captures judgments about the relative quality of possible answers. A community can therefore have ample material for learning the forms and usage of its language while still relying on translation to teach a system how to interact with users.
The distinction matters because those data serve different purposes. A news article or a parliamentary transcript supplies examples of how people use Danish in a particular setting. An instruction and its paired response supply a demonstration of the behavior expected when a reader makes a request. A translation can preserve that request-and-response structure, even when its subject matter and examples were selected for an English-speaking audience. The authors wanted to find out how far translated instructions go on their own and what changes when instruction tuning follows substantial exposure to Danish text.
Earlier work on English-centered and multilingual systems supplied checkpoints that a smaller research team could build on. The paper describes English-centered releases such as Qwen and Phi alongside multilingual efforts such as mT5 and Aya. Those approaches are part of the context of multilingual and cross-lingual NLP, where representations or training resources are shared across languages. The authors describe previous research that found difficulties in less well-resourced settings, particularly where interpreting a request depends on how people use language in a social or cultural setting. Supporting a language in training and responding appropriately to its speakers are separate questions for evaluation.
Danish and English are related and use largely overlapping character sets. Those properties make Danish a useful setting for asking how much of an English starting point can be reused. The paper also draws on linguistic work describing Danish pronunciation as challenging for human learners and associating that difficulty with more redundancy in conversation. That work helps explain why knowing that two languages are related tells a researcher relatively little about what happens during actual language use. SnakModel is a study of written and transcribed material. The linguistic observations motivate attention to language-specific behavior, while the experiments concern text.
The route from a general checkpoint to Danish
Continued pretraining means resuming the general text-learning objective from a checkpoint whose parameters have already been learned. The paper places this approach in a line of research on adaptation for both encoders, which build representations of input, and decoders, which can generate continuations. It cites applications to specialized domains such as biomedical text and social media, as well as Don't Stop Pretraining for the general practice of adapting through more pretraining. The same idea had already been applied to languages including Finnish, Dutch, Basque, and Modern Greek. For Danish, the choice lets the authors begin with a functioning text generator and examine how it changes as the training distribution shifts.
The paper describes several routes that had already been taken for Danish. One effort trained a Danish T5 system, using the architecture associated with T5. Munin started from a Mistral checkpoint and continued pretraining on Danish Gigaword, which the paper describes as containing 1B words. Viking used the Llama 2-7B architecture and trained from scratch on a mixture that included Danish, other Nordic languages, English, and code. These approaches pose different research questions. A system trained on a mixture from the start reflects the full training mixture, while a system continued from an available checkpoint lets researchers compare behavior before and after a targeted training stage.
The authors could draw on existing Danish resources without treating any single one as a complete account of the language. They identify toolkits and task datasets, dedicated text collections such as DaNewsroom and Danish Gigaword, and Danish portions of multilingual web collections. A collection made for news summarization can also supply full articles for text prediction. Parliamentary material brings in transcribed speech, and subtitles bring in another kind of dialogue. Combining these sources widens the range of material available, while making repeated documents, source permissions, and inconsistent language labels practical concerns.
What an open release lets researchers inspect
The paper distinguishes an open-weight release from the fuller disclosure expected of open-source work. Someone with the weights can run a system and examine its parameters. Reconstructing how it was made also requires the training data, the software that processes and trains on the data, and the evaluation procedure. The authors follow projects such as Pythia, OLMo, and Latxa in treating the supporting artifacts as research outputs of their own. They release training and evaluation scripts, intermediate checkpoints, and most of the sources for their own pretraining stage.
Intermediate checkpoints are particularly important to this study. A final Danish system can show how well the recipe turned out. A series of checkpoints can show whether exposure to Danish first helps with grammatical judgments, whether some response formats become harder to produce, or whether instruction tuning could begin earlier. The authors set up their experiment around those questions. Their comparisons separate the starting checkpoint, the amount of continued pretraining it receives, and the effect of adding Danish instructions to checkpoints at different points in training.
The method, step by step
How SnakModel is trained and evaluated
The steps in order.
Build a corpus from sources with different uses
The authors assemble a corpus, a collection of texts used together for training, from sources that cover different registers and topics. DaNewsroom contributes full articles from 19 news outlets. The dataset had originally been prepared for summarization, but the authors use the articles as general reading material for pretraining, where the relevant input is the text of the article itself. FTSpeech contributes transcriptions from the Danish parliament. Danish Gigaword contributes material from several domains, including books, the web, and social media. Dawiki contributes a cleaned snapshot of Danish Wikipedia dated 01-01-2024.
Other sources broaden the kinds of text in the mix. The EU Bookshop contains official publications across a range of topics, converted from PDFs. OpenSubtitles2016 supplies Danish subtitle text through OPUS. The Reddit material comes from the Danish collection in ConvoKit. The Twitter material comes from a public stream whose language labels the authors considered inaccurate enough to recheck. These sources can look quite different at the document level. A document in the corpus can be a short unit such as a sentence or paragraph, so document counts and word counts describe different aspects of the data.
The largest inputs come from the web. CC-100 supplies Danish text from a cleaned Common Crawl dump. CulturaX combines material from mC4 and accessible OSCAR collections. The paper places CC-100 in the line of web data processing described in CCNet and used in cross-lingual representation learning. Because CC-100 and CulturaX draw on web material, the authors expect substantial overlap. A union of individually prepared collections can still give some passages extra weight simply because they appear in multiple sources.
The authors check source licensing where possible. The paper records several kinds of permission, including open-data and television terms for the parliamentary material and licenses for the Bookshop and Wikipedia sources. It also records sources whose license is unknown. The authors' release covers most of the data sources and includes the scripts for gathering and processing the corpus. The source-by-source accounting matters for anyone trying to understand which parts of this training collection can be obtained and used again.
Apply a common language filter and remove repeats
The initial collection contains 927M documents and 24.6B words, with the word count obtained using the Unix wc utility. These figures already refer to material taken from the designated Danish slices of the sources. The authors then apply the same language identification procedure across the combined collection. They use fastText with a threshold of 0.6. This stage asks whether a document is sufficiently likely to be Danish to keep for the next stage.
After language filtering, the paper reports 672M documents and 22.6B words. It describes the filter as removing 28% of documents while retaining 92% of the tokens. That pattern fits the authors' observation that many short items were removed, since a short item gives the classifier little text on which to base a language decision. The reported word counts refer to corpus measurement. The later vocabulary size refers to the units the neural system actually reads, which can be smaller than written words.
Per-source counts show how unevenly a shared filter can affect a collection. Twitter goes from 1.69M documents to 406K after filtering, consistent with the authors' reason for rechecking the supplied labels. The Bookshop goes from 8.65M documents containing 208M words to 6.80M documents containing 187M words. CulturaX goes from 14.8B words to 13.7B words at this stage. Those figures describe what passed the language filter. The quality of a surviving article, subtitle, or post remains a separate property.
The authors then use text-dedup on the pooled material. Deduplication removes repeated text so the corpus places less emphasis on material that appears multiple times. According to the paper, this step cuts the filtered collection’s document count by 48% and its token count by 40%. The resulting training collection contains roughly 350M documents and 13.6B words. Applying this step across the full pool is important to the authors' design because collections assembled independently can contain the same underlying text.
Keep the inherited vocabulary
Once the text is ready, the authors must represent it in units the starting checkpoint already knows how to read. Subword tokenization divides text into pieces that may be whole words, parts of words, or other recurring units. The checkpoint associates each token with an entry in its vocabulary. That vocabulary is part of the system's interface to text, including both the units supplied as input and the units it can generate.
SnakModel retains Llama 2-7B's vocabulary of 32,000 sub-words. The tokenizer uses byte-pair encoding as implemented by SentencePiece. Byte-pair encoding builds longer units by repeatedly combining recurring pieces. An item without a dedicated vocabulary entry can still be represented by a sequence of the available pieces. This property lets Danish text enter the existing system even when some Danish words are segmented differently from frequent English ones.
The authors' rationale is that Danish and English have enough overlap in their character sets and sub-words to make reuse reasonable. Keeping the inventory fixed also preserves the correspondence between token identifiers and the pretrained parameters that read and predict them. Those parameters can change their behavior during Danish pretraining even though the inventory stays fixed. Thus the study can ask how the system adapts its use of existing sub-words. The relative merits of keeping, expanding, or retraining the vocabulary remain a separate experimental question.
Continue text prediction from Llama 2-7B base
The next stage starts from the 7B-parameter Llama 2 base checkpoint. It learns further by predicting text from its preceding context. Training on ordinary Danish gives the system examples of how the language is written and which content is likely in a Danish context. A question within that stream is still a piece of text to continue. The corpus supplies few cues from its training objective alone that a question presented by an evaluator should produce a short answer in a specified format.
The authors use Megatron-LLM for continued pretraining and later fine-tuning. They allocate 96.9% of the pretraining data to training and 3.1% to validation. The latter portion is used to track text prediction away from the material used to update the weights. This validation loss differs from ScandEval validation performance, which is measured with separate task datasets and scoring procedures.
The completed run uses a context length of 4,096 tokens, a global batch size of 512, and 12,500 training steps over 1 epoch. The context length determines how much tokenized text can be used together in a training sequence. The global batch size describes the batch for an update across the training setup. An epoch denotes a pass through the training data. The run has 1,250 warmup steps, during which the learning rate rises toward its peak before the later part of the schedule.
AdamW governs the updates. The paper gives its coefficients as β₁ of 0.9 and β₂ of 0.95. The coefficients control how the optimizer smooths its estimate of the gradient and its estimate of the squared gradient, respectively. The optimizer's small stabilizing constant ϵ is 10 −5. The peak learning rate is 1.5 × 10 −5 and the minimum is 5 × 10 −8. Weight decay is 0.1 and gradient clipping is set to 1.0. The learning rate sets the scale of the updates, weight decay regularizes the parameters, and clipping limits unusually large gradients. The final choice of peak rate followed unsuccessful attempts to resume training with larger updates.
The stage was completed on a single node equipped with 1TB of RAM, a 128-core AMD Epyc 7662 processor, and four NVIDIA A100-PCIe GPUs with 40GB each. The paper reports the duration as roughly 93 days and gives the corresponding GPU time as follows.
8,928 = 93 × 24 × 4
Here 8,928 is the number of GPU hours reported for the completed pretraining run. The factors are 93 days, 24 hours per day, and 4 GPUs, respectively. The multiplication counts the time across the devices. The authors also estimate emissions from this run at 272.3 kg CO₂ eq. using a machine-learning emissions calculator and the electricity figures they report for Denmark. That estimate describes the completed base-training run under those conditions.
Provide explicit examples of answering requests
The instruction stage starts from a Danish base checkpoint and changes the form of the training examples. Each example now gives an instruction and a corresponding output. Seeing them in a consistent format teaches the system what kind of continuation should follow the instruction. The goal is to make producing a response, in Danish and in the requested form, a likely behavior under conversational or task prompts.
The authors manually inspect candidate collections and select SkoleGPT, Danish OpenHermes, and the Danish portion of the Aya Collection. SkoleGPT supplies 21.6k instruction–output pairs from a translated and filtered subset of OpenOrca. Danish OpenHermes supplies 98.7k pairs from a translated subset of the automatically generated OpenHermes data. The Aya Collection combines 44 datasets and contributes 3.6M pairs from its Danish portion. The authors use translations from the collection because the Danish part of the underlying native-speaker Aya Dataset has less than 100 instances. They report 3.7M pairs across the selected sources.
The origins of these pairs matter to the interpretation of the experiment. They supply examples in Danish on a scale the authors could obtain, while the source tasks and many of their answers originate elsewhere or were generated automatically. Translation provides instruction-following examples in the target language. The pretraining corpus serves a complementary purpose by exposing the checkpoint to Danish text across news, government, conversation, and other domains. The final system combines those experiences, and the experimental design includes a separate comparison that holds the instruction data fixed.
The authors use LoRA, or low-rank adaptation, to make this stage practical across several training conditions. LoRA represents a learned change to a weight matrix through smaller matrices. Restricting the rank limits the space of possible changes and reduces the work of updating the system. The authors choose a comparatively high rank to approximate full fine-tuning more closely within their budget.
r = 128
Here r is the rank of the LoRA adaptation, and 128 is the rank used for the instruction-tuning runs. The authors report applying these adaptations across the system's parameters without quantization, which would represent weights at reduced numerical precision. Training runs for a single epoch using AdamW, with the global batch size set to 64 and the learning rate held at 2 × 10⁻⁴. The constant rate belongs to instruction tuning. The peak and minimum rates described earlier belong to continued pretraining.
Mark where the request ends
The same instruction and response can be placed together in several ways. Concat directly joins them. Chat puts the instruction between [INST] and [/INST], using the convention of Llama 2-7B chat. Those markers are already indivisible units for the tokenizer. Alpaca uses separate lines with Danish headers for the instruction, input, and answer. Its layout is associated in the paper with Self-Instruct.
Each choice provides a different cue about when the response should begin. A direct join relies on patterns the system can infer from seeing many pairs. The Chat format indicates the end of the request with a dedicated closing marker. The Alpaca layout identifies the parts by labels and line structure. The authors evaluate these formats on the Danish ScandEval validation split and use Chat in the final setup. They also inspect what happens when a prompt is missing its closing cue, where the generated continuation can reveal whether the training format taught a usable boundary.
Finally, the authors apply the instruction stage to checkpoints taken at different points in Danish pretraining, including the original Llama 2-7B base. They also observe progress within instruction tuning over repeated passes through the data. In the first comparison, the checkpoint changes while the Danish instruction resource provides a common basis. In the second, the number of passes changes. Putting these comparisons beside the untreated base checkpoints helps distinguish the behavior of a text predictor from the behavior of a checkpoint that has been taught to answer.
Experiments and results
What the Danish benchmark measures
The authors use the Danish portion of ScandEval for evaluation and benchmarking. Its tasks cover several types of language use, and the paper distinguishes progress on the validation split from final results on the test split. Validation scores inform the choice of instruction format and show the trajectory of intermediate checkpoints. Test scores compare the finished systems and their baselines. Keeping the splits distinct is especially important here because the authors make several design decisions by inspecting validation behavior.
ScaLA measures linguistic acceptability, the ability to judge whether a sentence is well formed. The Danish data are based on material from the Danish dependency treebank. DANSK measures named entity recognition, where the system identifies and labels mentions in text. Its ScandEval setup requires structured answers in JSON. AngryTweets measures sentiment analysis on Danish tweets. Nordjylland-News measures abstractive summarization, where a system produces a condensed account whose wording can differ from that of the source.
The commonsense task uses a Danish translation of HellaSwag, so the wording is Danish while the underlying examples originate in another benchmark. ScandiQA also comes from translation, in this case of the English MKQA dataset. The paper points out that ScandiQA is consequently able to test answering a question expressed in Danish while including questions whose subject matter is outside Scandinavia. In particular, some expected answers are English names. This helps explain why writing a plausible continuation in Danish can be a poor strategy for the task.
The two explicitly cultural tasks concern proverbs and citizenship. Danske Talemåder asks for the meaning of familiar Danish sayings. Success requires connecting the saying with its conventional interpretation, which can differ from a reading of the individual words. The citizenship task uses official Danish test questions. It tests a different kind of familiarity, drawing on the material covered by those questions. Both tasks let the comparison ask how a system handles language and knowledge specific to the target setting.
The benchmark uses several metrics. Accuracy is the proportion of answers judged correct and is used for commonsense reasoning, proverbs, and citizenship. F₁ balances precision, the proportion of proposed answers or labels that are correct, with recall, the proportion of the expected items that were retrieved. The paper reports F₁ for question answering, macro-averaged F₁ for acceptability and sentiment, and micro-averaged F₁ for entity recognition. Macro averaging gives each label its own influence in the average. Micro averaging pools decisions across labels before scoring. Summarization is scored with BERTScore, which compares a generated summary with a reference using contextual representations of their wording. The overall average combines the task scores reported using these different metrics.
How much the starting point and training route matter
The baseline that starts the adaptation is Llama 2-7B base. The comparison also includes Llama 2-7B chat, whose prior training gives the authors a second starting point. They train both on the Danish instructions used for SnakModel. These variants carry the label +INST da. The direct comparison between Llama 2-7B base + INST da and SnakModel-7B instruct asks what Danish continued pretraining adds when the starting lineage and subsequent instruction dataset are shared. The chat comparison also tests what happens when the starting checkpoint has already been trained for conversation.
Viking-7B provides a comparison with a system prepared on a multilingual mixture that included Danish. The authors also evaluate Mistral-7B-v0.1 and two Danish-adapted Munin versions from that family. This broader group situates the result among systems of comparable parameter count. Its members bring different pretraining histories to the benchmark, so the comparison with them addresses what the completed systems achieve under the evaluation.
Overall average on the Danish ScandEval test split for the Llama 2-7B comparison
SnakModel instruct leads its comparison group, including both systems given the same Danish instructions.
The numbers
| System or setting | Average benchmark score |
|---|---|
| Llama 2-7B base | 46.48 |
| Llama 2-7B chat | 49.50 |
| Llama 2-7B base + INST da | 49.35 |
| Llama 2-7B chat + INST da | 51.39 |
| Viking-7B | 37.82 |
| SnakModel-7B base | 46.45 |
| SnakModel-7B instruct (this paper) | 56.63 |
SnakModel-7B instruct reaches 56.63 on the Danish ScandEval test average. The Danish-instruction Llama 2 chat version reaches 51.39, the strongest of the Llama 2 comparisons outside SnakModel. The Danish-instruction Llama 2 base version reaches 49.35. These comparisons support a contribution from Danish pretraining in combination with instruction tuning. They also show that the same Danish instructions can lead to different aggregate performance depending on the preceding checkpoint.
The base scores tell a different story about continued pretraining on its own. SnakModel-7B base averages 46.45 and the original Llama 2-7B base averages 46.48 on the test split. Both averages conceal substantial changes. SnakModel-7B base reaches 56.28 macro F₁ on linguistic acceptability and 69.14 accuracy on proverbs, while its question-answering F₁ is 18.52. The resulting aggregate puts gains on some tasks alongside losses on others. Its value is therefore greatest when read with the task results and with evidence about how the base system responds to prompts.
Where the Danish adaptation helps most
On linguistic acceptability, SnakModel-7B instruct reaches 52.91 macro F₁ on the test split, compared with 33.43 for the original Llama 2-7B base. SnakModel-7B base achieves 56.28 on the same task. Training on Danish text supports this capability strongly, and the base checkpoint retains the highest score of those two SnakModel variants. That ordering is one example of why a training stage that improves the average can still have different effects on individual tasks.
The test accuracy on citizenship questions is 71.88 for SnakModel-7B instruct, compared with 57.05 for Llama 2-7B base and 55.59 for Llama 2-7B chat + INST da. The proverb comparison similarly favors the system with continued Danish pretraining. Because the instruction-only baselines use the final system's Danish instruction data, these tasks are particularly informative about the additional contribution of the text stage in this pipeline.
Proverb-meaning accuracy on the Danske Talemåder test task
SnakModel instruct leads the Llama-based settings shown, and its base checkpoint is already strong on proverbs.
The numbers
| System or setting | Accuracy % |
|---|---|
| Llama 2-7B base | 38.69 |
| Llama 2-7B chat | 46.67 |
| Llama 2-7B base + INST da | 49.10 |
| Llama 2-7B chat + INST da | 57.26 |
| SnakModel-7B base | 69.14 |
| SnakModel-7B instruct (this paper) | 71.05 |
The strongest differences between SnakModel's two checkpoints occur on tasks that demand a particular kind of response. On the DANSK test set, the base checkpoint scores 19.91 micro F₁ and the instruction-tuned checkpoint scores 29.76. Llama 2-7B chat + INST da reaches 29.70 there. The proximity of the two tuned scores places the contribution of pretraining in perspective for this task. In ScandiQA, SnakModel-7B instruct reaches 64.66 F₁, while Llama 2-7B base + INST da reaches 64.40 and the original Llama 2-7B base scores 63.54. The contrast between the two SnakModel checkpoints is large. The contrast between the instruction-tuned SnakModel and a strong answer-producing baseline is much smaller.
On AngryTweets, SnakModel-7B instruct scores 66.70 macro F₁, compared with 65.92 for Llama 2-7B chat + INST da and 57.42 for SnakModel-7B base. On Nordjylland-News, SnakModel-7B instruct reaches 66.61 BERTScore after its base version scores 58.95. Llama 2-7B base + INST da scores 66.43. Commonsense reasoning gives yet another ordering. SnakModel-7B instruct reaches 29.46 accuracy, compared with 30.47 for its base counterpart and 32.24 for the original Llama 2-7B chat. The final aggregate reflects strong gains in selected areas, fairly close performance in others, and variation in which version leads on a given task.
The scope of the headline ranking
On the same test average, Mistral-7B-v0.1 scores 53.76, Munin-7B-Alpha scores 57.48, and Munin-7B-v0.1dev0 reaches 61.28. The two Danish-adapted Munin runs thus finish above SnakModel-7B instruct, while their untuned Mistral baseline finishes below it. The paper reports an advantage of up to 4.65% abs. for the stronger Mistral-based systems over the final SnakModel. It also reports a 7.28% gap between the Mistral and Llama base averages. Those comparisons establish that the starting family already matters before comparing the adapted systems. The closer test of the contribution of Danish pretraining remains the comparison with Llama variants trained on the same instruction data.
The authors supplement the scores with observations from unconstrained generation. Much of ScandEval is scored with constrained generation, which restricts the continuation the system can choose. This makes it possible to evaluate a selected answer even from a system that often replies in the wrong language when allowed to continue freely. The original Llama 2 systems show that distinction in practice. They achieve meaningful scores under the benchmark's constraints while generating Danish inconsistently under free prompting, even when a prompt explicitly asks for Danish.
With Danish instruction tuning, the Llama 2 variants generate Danish responses even to English prompts. This is an observation about output behavior. It helps explain how translated instructions can have a practical effect even when improvements on culturally specific tests are modest. SnakModel-7B instruct combines that response behavior with stronger results on native Danish tasks. The two forms of evidence show why a Danish response language and familiarity with Danish material should each be measured.
The validation comparison for instruction formats
The paper selects the final instruction format using the Danish ScandEval validation split. Chat has the highest average there. Concat is close on the aggregate, yet has a recurrent failure when generating freely. The authors observe that it sometimes extends the instruction instead of beginning the response. Alpaca has the lowest average, and also shows difficulty recovering when a prompt is missing the cue that the instruction has ended.
Instruction template comparison on the Danish ScandEval validation average
Chat gives the highest validation average of the tested instruction formats.
The numbers
| System or setting | Average benchmark score |
|---|---|
| Concat | 55.52 |
| Alpaca | 53.26 |
| Chat (this paper) | 56.37 |
The Chat result of 56.37 is a validation figure for template selection. The overall 56.63 is the final instructed system's test average. The qualitative observations add information to the validation ranking. When a prompt omits the instruction terminator, the Chat-trained system consistently supplies [/INST] itself in the authors' observations. The Alpaca-trained system frequently struggles with an incompletely terminated prompt. A task score under a carefully formatted benchmark and the ability to recover from a prompt that lacks a boundary represent different demands on the interface.
What the ablations show
How early the Danish task gains appear
The checkpoint study follows the same training run at successive stages. The authors first test each checkpoint as a base system, then examine what happens when Danish instruction tuning is applied at different points. This design captures how much ability a checkpoint demonstrates before it has learned the instruction format and how much it can demonstrate afterward. The trajectories are measured on the Danish ScandEval validation split.
Before instruction tuning, acceptability, proverbs, and citizenship generally improve until around 4,000–6,000 steps of Danish pretraining and then level off. Sentiment, summarization, and commonsense reasoning are relatively steady over the same run. The spread across tasks matters more than a single turning point. Continuing to read Danish appears especially consequential for judgments about Danish sentences and for questions drawn from Danish cultural material. Several tasks created for other purposes or translated into Danish show smaller changes along the trajectory.
The pretraining loss also becomes progressively slower to improve. The authors track text prediction through a loss curve described in terms of perplexity, a measure of how surprising the observed tokens are under the predictor. They suggest that the slowing gain could reflect proximity to convergence or the reduction in learning rate. They also cite earlier work in which downstream task performance can keep improving after these indicators have leveled off. In SnakModel, the per-task curves give a more direct view of the abilities the authors want to study, including abilities that rise and abilities that decline during the same training phase.
Why some base-checkpoint scores fall
Question answering is the sharpest decline reported in the validation trajectories. It falls from 61. During the first 2,000 steps of continued pretraining, F₁ rises from 9% to approximately 20%. The F₁ figures here concern intermediate validation behavior. They differ in role from the final test figures for ScandiQA. Named entity recognition also declines during base pretraining, although the paper's account emphasizes different possible causes for the two tasks.
For question answering, the authors observe that the Danish base checkpoints frequently continue a question instead of supplying an answer. Their task still consists of predicting text, and a question can have several plausible continuations in such a setting. The choice of language can also affect scoring. These checkpoints tend to continue in Danish, while the expected answers in ScandiQA frequently include English names. The decline is compatible with a shift in what the system chooses to generate. The experiment gives no independent measure of whether particular facts became inaccessible internally.
For entity recognition, the paper proposes a formatting explanation. ScandEval expects JSON, including punctuation such as braces, while the continued-pretraining data consist of ordinary language. A predictor adapted to that data may be less inclined to produce code-like punctuation in the required pattern. Its score reflects its ability to deliver the entities in the specified form as part of the task. The authors present this account as a hypothesis. They do not separately measure recognition of the same entities with a different response format.
Taken together, the declines clarify what a base score measures. A checkpoint that performs worse may be responding in a way that the task cannot use. Improving the predictor's familiarity with Danish text changes which strings it finds plausible, including the string that follows a question or a tagging request. The instruction-tuning comparison tests whether making the task and answer structure explicit recovers the lost benchmark performance.
What the instruction stage recovers and when
After the authors apply Danish instruction tuning, the losses on entity recognition and question answering seen in the base trajectories are no longer apparent in the same way. Instruction tuning recovers much of the earlier performance and raises validation performance broadly. This supports the view that part of the apparent loss arose in the way the checkpoint responded to the prompt. The recovery is consistent with the authors' explanations about JSON and question continuation, while the precise contribution of those mechanisms remains unmeasured.
For acceptability, proverb meaning, and citizenship, the instructed checkpoints improve and approach a plateau after 2,000–5,000 steps of Danish pretraining followed by instruction tuning. That interval measures the amount of pretraining the starting checkpoint received. The authors interpret the figures as evidence that less than half of their corpus may suffice for close-to-final performance on the evaluated setup. The statement depends on the particular sequence of material encountered during the run, the starting checkpoint, the instruction procedure, and the validation tasks.
The authors separately vary how long instruction tuning continues. One epoch yields most of the observed gains, including recovery on entity recognition and question answering. They consider the possibility of some benefit from one or two additional epochs and judge the first pass the most efficient at this scale. They leave the tradeoff open because earlier work has found that exposure to duplicate data across epochs can hurt downstream performance. The analysis concerns repeated passes over this collection. It gives a different answer from what an experiment adding new instruction examples would provide.
Read together, the two schedules locate gains at different points. More Danish pretraining can help the checkpoint with tasks based on native data before the first instruction update. The instruction stage makes it easier to get an answer the evaluator can use. An earlier checkpoint can consequently be a strong candidate when its task scores after instruction tuning are already close to those of the completed run. The paper draws this conclusion from the measured curves for these tasks, while differences across tasks explain why the loss curve alone could not tell the same story.
What changed inside the Danish base checkpoint
The weight analysis asks where continued Danish pretraining changed the stored parameters. The authors compare corresponding matrices before and after adaptation using principal subspace angles, abbreviated SSA in the paper. A subspace here captures directions associated with a matrix. The angle indicates how closely directions in one version align with directions in the other. It summarizes a geometric property of the weights that a benchmark score cannot identify.
0° ↔ similar, 90° ↔ dissimilar
The two numbers mark the ends of the angle scale used in the analysis. The degree sign indicates the angle's unit. An angle of 0° corresponds to aligned directions and thus similarity, and 90° corresponds to orthogonal directions and thus dissimilarity. Each arrow connects one endpoint with its interpretation. The authors show total SSA by layer and mean SSA by parameter type, using one view to describe where changes accumulate and the other to distinguish parts within layers.
The layer totals show somewhat more divergence toward the layers just before the end. The authors relate this pattern to a possible division of labor in which early layers retain relatively transferable representations and later layers specialize more for the target language. Within a layer, the feed-forward gate and upward projection exhibit comparatively strong changes.
G, W↑, W↓, Q, K, V, O
These labels denote the parameter groups the paper compares. G is the gate in the SwiGLU feed-forward block, which modulates the features passed onward. W↑ is the upward projection into a wider internal representation, and W↓ is the downward projection back to the layer's working dimension. In transformer attention, Q, K, and V are the query, key, and value projections. Queries and keys determine how positions attend to one another, and values supply the information drawn from those positions. O is the projection of the attention output. The analysis finds relatively little divergence in W↓ and the attention projections compared with G and W↑.
The input embeddings, which associate the vocabulary entries with vectors, and the language-modeling head, which supplies scores for possible output tokens, also diverge considerably. The authors inspect changes at the token level in those components by comparing the corresponding rows before and after adaptation. Sub-words shared by Danish and other Germanic languages are among those with larger updates. Sub-words in other scripts tend to show less change. This adds detail to the vocabulary decision. Even when the inventory is unchanged, continued pretraining can alter how individual pieces are represented and predicted.
The paper suggests that future adaptation could concentrate updates on the embeddings, the gate, the upward projection, and the output head. The suggestion follows from where changes were observed in the completed training. The experiment establishes the pattern of divergence after ordinary adaptation. The performance and efficiency of actively restricting pretraining to those parameters would require its own comparison.
Limitations
Limits discussed by the authors
Training stability was an important practical constraint. The authors report that their first attempt restarted from the Llama 2-7B checkpoint with the original system's learning rate. Gradients became very large at iteration 2,031, making the updates unstable. They attempted to control the problem with clipping, then encountered server crashes at step 3,500 and persistent instability. The run ended after approximately 46 days with a reported final language-modeling loss of ±1.77. These figures describe an interrupted training attempt, where hardware problems accompanied the optimization difficulties.
In the second attempt they reduced the peak learning rate to 1.5 × 10 −4 and changed other settings. The gradients again became unstable, at step 1,390. The run ended after about 10 days with a reported final loss of ±1.79. With a peak rate of 1.5 × 10 −5 in the successful attempt, training reached iteration 12,500 after roughly 93 days and a reported language-modeling loss of ±1.72. The authors relate the successful choice to resuming training from weights that had already been optimized with a falling learning rate. Because other settings changed and failures interrupted the earlier runs, the sequence supplies practical evidence about this setup while leaving the effect of the learning rate alone unresolved.
The authors also investigate evaluation overlap. Llama 2-7B's original training data are unavailable to them, so they cannot directly search that corpus. They instead ask the starting system about the datasets and prompt it to complete the first five sentences of each one. The probes produce no evidence of inclusion. Their reach is limited to what can be elicited from those prompts. The question of whether particular examples were present in the original training data remains open.
For the Danish adaptation stage, the corpus is available to the authors, so they can perform a direct search. They look for 200 random 8-grams from each evaluation dataset in the raw material. An 8-gram is a contiguous sequence used here as a signature for a piece of text. The paper reports overlap for AngryTweets at 6/200 in the Twitter data. It also reports that the DANSK text was completely included without labels because it was sampled from Gigaword. Many parts of ScaLA appear in their original forms in Gigaword and CC-100. The authors release the code for these checks.
The distinction between text and labels matters for interpreting that overlap. Exposure to the source wording can make a passage familiar without showing the entity tags or the acceptability judgment expected by the benchmark. Thus the overlap establishes prior exposure to some input material. It leaves the effect of that exposure on the eventual task score unmeasured. The raw-corpus search also has a different evidentiary status from the indirect prompts used for the unavailable Llama 2 corpus. The two checks answer different questions about possible exposure.
The authors qualify their efficiency claims as well. Their loss curves leave room for continued task gains after text prediction seems to level off. In instruction tuning, they leave open whether additional passes are worth their compute and what effect repetition would have. Their explanation for the relatively small change in attention weights is also explicitly provisional. Danish and English have fairly similar syntax, and they suggest that adaptation across a larger typological distance might require more change to attention. The paper's experiments concern the English-to-Danish case.
Further limits of the experimental setup
The final scores characterize performance on the selected Danish ScandEval tasks. They give a combined picture of grammatical judgments, labeling, sentiment, summarization, reasoning, question answering, proverbs, and citizenship knowledge. They leave broad questions about everyday interaction open, including how reliably the system follows unusual Danish requests or handles variation among speakers and settings. The free-generation observations are informative about language choice and instruction boundaries. They are qualitative observations alongside the scored benchmark, and the paper reports no comparable aggregate score for that behavior.
The mix of native and translated evaluation tasks helps locate differences within the benchmark while leaving their cause only partly isolated. The strongest gains occur on several native Danish tasks, but those tasks also differ from the translated tasks in what an answer requires, how it is scored, and how much knowledge of Denmark it calls on. The result supports a contribution from continued Danish pretraining for these specific tasks. It leaves open how much of the advantage comes from the origin of the text, the content it covers, or the conditions under which responses are scored.
The instruction-data comparison holds the translated collection fixed while changing the checkpoint that receives it. That gives evidence about the contribution of Danish pretraining in the authors' pipeline. Comparing native and translated instructions directly would require native Danish instructions in a comparable setup, which the paper identifies as a scarce resource. Similarly, the tokenizer choice follows a linguistic and engineering rationale, with no alternate vocabulary trained and tested alongside it. The results establish what the inherited vocabulary supports for Danish.
The preprocessing accounting measures the amount of material removed at each stage. Each filtering choice is part of the recipe for the released collection. The experiments leave open how much of the final benchmark result is attributable separately to language identification, deduplication, or the breadth of the source mixture. A count of removed short documents also leaves open whether some useful brief Danish expressions or mixed-language passages were lost. The authors acknowledge that language filters can be biased toward larger related languages. Their measurements describe the effect on quantity more fully than the effect on coverage.
Finally, the cross-family comparison includes different starting systems and training histories. It shows that the strongest result depends on which set of competitors is considered. The Llama comparisons provide the narrower evidence that the Danish pretraining and instruction pipeline improves on related checkpoints. The Mistral comparisons establish a higher observed benchmark average in a different family. The weight analysis and early stopping curves share a similar scope. They identify promising ways to save work on a related adaptation, while leaving the result of selective parameter updates or a different corpus order to be tested.
What came after
Later papers cite SnakModel in research on Danish evaluation, language-specific resources, and the quality of multilingual data. The citation establishes a connection to the earlier work. For these papers, the documented topics give the scope of that connection. They leave open whether any individual study reused the SnakModel weights, adopted the training procedure, or cited it as background.
DaKultur evaluates cultural awareness in Danish with native speakers. This takes up a question raised by the difference between SnakModel's general Danish task scores and its scores on proverbs and citizenship questions. Those two ScandEval tasks provide a specific view of cultural knowledge. An evaluation organized around cultural awareness and native speakers directly addresses how Danish speakers figure in defining the ability under study.
SDUs DAISY likewise focuses on evaluation, through a benchmark for Danish culture. SnakModel's analysis brings cultural tasks into a broader suite and shows how those task scores change during pretraining and instruction tuning. DAISY gives Danish culture a benchmark of its own. Its focus is relevant to judging whether progress on the cultural portion of a general benchmark carries over to other ways of measuring cultural knowledge.
How Good is Your Wikipedia? audits Wikipedia data quality for multilingual work and low-resource languages. SnakModel uses a cleaned Danish Wikipedia snapshot as one source and evaluates corpus construction mainly through the effects of common filtering and deduplication. The Wikipedia study directs attention to the quality of one resource category that frequently enters that kind of mixture. The relation is about what a resource contributes before its text is combined with data from other sources.
MameLoshnLM presents a Yiddish language model and evaluation benchmark. Its pairing of a language-specific system with a way to assess it parallels SnakModel's concern with making an adaptation and judging it in the target language. The Yiddish work is evidence of the same broad research problem being pursued in another language. The citation leaves open which parts of the Danish approach, if any, traveled to that setting.
LLMs as annotators of credibility assessment in Danish asylum decisions examines classification performance and errors beyond aggregate metrics in a specific legal AI application. SnakModel's benchmark already shows that a single Danish average can hide markedly different task outcomes. The credibility assessment study takes up the question of how to examine errors within one consequential Danish classification task. Its subject is a different use of evaluation, where the pattern of errors is itself part of what the study sets out to measure.
Cite
Cite as Mike Zhang, Max Müller-Eberstein, Elisa Bassignana and Rob van der Goot. 2025. SnakModel: Lessons Learned from Training an Open Danish Large Language Model. Proceedings of the Joint 25th Nordic Conference on Computational Linguistics and 11th Baltic Conference on Human Language Technologies (NoDaLiDa/Baltic-HLT 2025).
@inproceedings{zhang2025snakmodel,
title = {{SnakModel: Lessons Learned from Training an Open Danish Large Language Model}},
author = {Mike Zhang, Max Müller-Eberstein, Elisa Bassignana and Rob {van der Goot}},
booktitle = {Proceedings of the Joint 25th Nordic Conference on Computational Linguistics and 11th Baltic Conference on Human Language Technologies (NoDaLiDa/Baltic-HLT 2025)},
year = {2025},
url = {https://aclanthology.org/2025.nodalida-1.80/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/zhang-2025-snakmodel-lessons-learned-training-open/