Development of Pre-Trained Transformer-based Models for the Nepali Language
Paper · 2025 · Prajwal Thapa, Jinu Nyachhyon, Mridul Sharma et al.
Summary
Nepali is spoken by roughly 32 million people, yet researchers have had relatively little Nepali text available in collections large enough for pretraining. Thapa and colleagues address that shortage by gathering material from 99 news websites. After removing duplicates, handling passages in other languages, cleaning up web formatting, and normalizing the text, they retain 27.5 GB. The authors describe the collection as roughly 2.4x larger than previously available Nepali corpora. They use it to train versions of Transformer architectures that work exclusively with Nepali, extending earlier efforts on language analysis to Nepali text generation.
The authors train BERT and RoBERTa to recover concealed parts of a passage using the surrounding text. They train GPT-2 to predict what follows a passage, which lets it build an output a little at a time. One version of that generator receives further practice with Nepali requests paired with example responses. The authors then use task-specific fine-tuning to teach the encoders to make judgments about text and to teach both versions of the generator to write summaries.
On the Nep-gLUE test set, the new encoders score above all the earlier entries on every task, which together cover grammatical tagging, entity recognition, classification, and judgments about pairs of texts. BERT earns an overall score of 95.18 and RoBERTa reaches 95.60. NepBERTa, the strongest prior entry, scores 93.55. On a separate Nepali text summarization evaluation split, both GPT-2 versions exceed the earlier Nepali generator on the reported measures of overlap with reference summaries. The version with instruction training achieves the highest scores, with 20.42 on ROUGE-1, 15.89 on ROUGE-2, and 17.76 on ROUGE-L.
The encoder scores compare complete training recipes, and the authors used the Nep-gLUE test set to select the best configuration for each task. The summarization experiment offers a more direct comparison. Both versions start with the same pretrained GPT-2 and both learn summarization from examples, with instruction training added to one branch in between. Its higher overlap scores show an advantage for adding that stage in this setup. The authors also saw the generator introduce unsupported content and struggle with long articles. The experiment leaves open how reliably either version summarizes such inputs or follows requests on other tasks.
Deep dive: Development of Pre-Trained Transformer-based Models for the Nepali Language
Thapa and colleagues train Nepali BERT, RoBERTa, and GPT-2 on a large news corpus and evaluate them on language understanding and summarization. · about 33 minutes to read
The problem and its context
What it takes to support Nepali
A language can have a large community of speakers and still have relatively few resources for natural language processing. The paper centers on one resource in particular. Training a system to make useful predictions about Nepali requires enough accessible Nepali writing for it to encounter words, grammatical patterns, and expressions repeatedly in context. A collection suitable for that purpose has to be assembled and prepared. Software may already accept Nepali text through a multilingual system, while the training available specifically for Nepali remains limited. That is the sense in which the paper treats Nepali as a low-resource language.
The authors give grammatical reasons for paying attention to the language used in training. They describe the typical English clause as placing its verb between subject and object. In their account of a typical Nepali clause, the object precedes the verb. A learner that encounters Nepali clauses can observe how the surrounding words help identify the roles of those elements in that order. Such observations also bear on prediction direction. In a left-to-right exercise, the earlier parts of the clause are available when the time comes to predict a later verb. A bidirectional exercise can reveal the verb when the unknown item falls earlier in the clause.
The paper also discusses morphology, the structure and variation of words. Nepali nouns, adjectives, and verbs can occur in different inflected forms. The authors mention gender, case, and number in their description of nouns. These patterns matter when a system must represent writing as a finite set of units. A vocabulary that assigns a separate entry to every surface form would need entries for many closely related strings. A scheme that can reuse pieces offers another way to represent the forms encountered in ordinary writing. The corpus determines which forms the system sees, while the vocabulary determines what units it receives when it sees them.
These observations motivate language-specific design, but the paper’s aim goes beyond handling individual words or sentences. It addresses the material needed to train systems for both natural language understanding and text generation. The former includes decisions such as which grammatical label belongs to a word. The latter requires composing an output, as when an article is condensed into a summary. The authors describe prior Nepali work as concentrated on encoders, the systems typically adapted to make the first kind of decision. They see room to develop a Nepali decoder whose training prepares it to produce text.
How pretraining became a way to use ordinary text
The paper traces its approach back to statistical prediction and hand-built language rules. An n-gram uses a contiguous stretch of units, which makes it a way to describe local regularities. Rules can state a pattern explicitly. The authors describe such approaches as a foundation for processing language, with difficulties in representing the range of structures and contextual cues that occur in ordinary communication. As the relevant material becomes farther apart, the system needs a way to use information that extends beyond its immediate neighborhood.
Recurrent neural networks let information from earlier positions influence later ones through an evolving internal state. The paper credits recurrent systems, including long short-term memory networks, with improving sequence prediction. It also describes difficulties with long-distance relationships and the cost of processing sequences. A recurring question in this history is how to make the relevant context accessible at the moment a prediction is made. That question reappears in the authors’ choice of architectures and in their observation about summarizing long inputs.
In another strand of the history, word embeddings provide numerical representations that can capture relationships between words. The authors discuss learning such representations from large text collections, with Word2Vec and GloVe as examples. They then describe a shift toward representations that depend on the particular use of a word in a passage. The illustration is ELMo, which uses recurrent processing in both directions so that the representation at a position can respond to what surrounds it. The paper cites applications such as answering questions and identifying named entities in explaining the usefulness of these contextual representations. Word2Vec, GloVe, ELMo.
The Transformer gives positions in a passage a mechanism for drawing information from one another. Through self-attention, the representation at a position depends on how strongly the system weights other positions that it can see. The paper presents this as a way to learn dependencies in text more effectively. Different training exercises make different portions of the text available. A system filling a blank may be able to use words after the blank. A system predicting a continuation must work from the prefix. Both exercises can obtain their correct answers from ordinary writing. Attention Is All You Need.
That availability of answers is what makes general pretraining practical with an unlabeled corpus. A source passage supplies the word or piece that can be concealed in a fill-in exercise. It also supplies the next piece in a continuation exercise. The article itself need carry no grammatical tags or summary for those exercises to work. A later stage can then use task examples to teach a different output. For grammatical tagging, the examples provide labels. For summarization, they provide versions of source texts that demonstrate the intended compression. The large news collection and the smaller downstream datasets thus serve different purposes in the study.
Shared and language-specific training
The paper credits multilingual work with making tools available for more languages. It discusses multilingual BERT, XLM, and XLM-RoBERTa as examples of systems built to process several languages, including Nepali. The authors point to factors that can make this support uneven. A language may receive relatively little training text. The units in a shared vocabulary may divide its words in ways poorly suited to their structure. Grammatical variation across languages can also be hard to accommodate within a shared setup. These considerations give the authors reasons to investigate training and vocabulary construction dedicated to Nepali. Multilingual BERT, XLM-RoBERTa.
Their related-work discussion describes language-specific training as an established alternative. The examples include FinBERT for Finnish and GBERT for German, as well as systems tailored to other languages. The authors use these efforts to motivate choosing training material and segmentation for a particular language. They also discuss IndicBERT, which covers a set of Indic languages that includes Nepali. These precedents clarify the design space around the paper. A system can be built for a broad multilingual collection, a group of languages, or a single language. In each case the choice bears on which writing is available to learn from and what units will represent it. FinBERT, GBERT, IndicBERT.
The direct precedent is NepBERTa. Its authors assembled a collection of 0.8 billion words from several sources and used it to train a BERT-based system for Nepali. They also introduced Nep-gLUE, providing later researchers with a common evaluation for Nepali encoders. The paper describes another dedicated BERT effort under the name NepaliBERT. By the time Thapa and colleagues undertook their study, they could therefore build on existing Nepali-specific work and ask how far a new collection and training recipe could take the established understanding tasks.
The decoder raises a related question about how to get from general prediction to a useful response. A continuation exercise treats what follows a passage as the answer. An instruction exercise gives the learner a request and an example of the response that fulfills it. The authors cite earlier work that used this format to improve performance on tasks absent from task-specific training, a setting known as zero-shot evaluation. They describe work of that kind as more developed for languages with more resources. Their Nepali experiment takes up the question of instruction training with a cleaned Nepali collection and a subsequent task in which the system must produce an output in the language. Finetuned Language Models Are Zero-Shot Learners.
The method, step by step
Collect the text and decide what belongs in it
The procedure starts with a web crawl and ends with separate evaluations for systems that read and systems that generate. The news corpus supplies the shared material for general pretraining. The instructions belong to a later stage and go to one copy of the pretrained decoder. Task data enter at the end, when the encoders learn the judgments measured in Nep-gLUE and the two decoder branches learn to summarize. These stages have different targets even when training still consists of adjusting a system to produce an expected output.
From collecting Nepali news to evaluating task performance
The steps in order.
The authors collected 30.4 GB of raw text across 99 Nepali news sites. Growth in digital publishing motivated their choice of source. The sites gave them a way to build a large Nepali collection directly, with enough newly gathered material to make training an encoder and a decoder part of the same project. The raw figure describes the size before the cleanup, so it includes material that the authors subsequently decided to discard or transform.
Several collections already existed. The paper describes the Nepali Wikipedia dataset as smaller than 1GB and OSCAR as roughly 3GB. It also gives 12.5 GB for the corpus associated with NepBERTa. The authors gathered their new collection from scratch because they expected overlap between existing resources and the sources they were scraping. The concern is straightforward. If the same piece of news writing enters through several collections, the volume of material goes up while that particular piece contributes repeated exposure to the same text. A direct crawl let the authors handle the combined material at the point where they prepared their own corpus.
Their first reported operation on the crawl was deduplication. In training, each retained occurrence can contribute to what the system sees. Repeated material can therefore make a particular passage recur more frequently than its distinct content would warrant. Deduplication addresses that problem within the collected data. The authors also found passages in languages other than Nepali. Depending on the context, they removed them or translated them. Removal excludes the passage from the training material, while translation preserves information from it in a Nepali rendering. The paper describes the choice as context dependent.
The crawl also contained material left over from publishing the text on the web. The authors used scripts to strip HTML, formatting artifacts, and unwanted special characters. They applied Unicode normalization as part of standardizing the remaining material. In a training pipeline, character representation has consequences beyond how text looks on screen. Inconsistent representations can enter vocabulary learning as different strings. Normalization is the step that brings the text into a more consistent form before the system learns to divide it into units.
The finished corpus measures 27.5 GB. The size describes the material available after the collection and preprocessing stages together. The paper does not give separate counts for text discarded as repeated, text removed for language reasons, or material changed by translation. The final resource is what the new encoders and decoder have in common. The next stages determine which pieces of that text they see as input units and what each system is asked to predict.
Learn the units the systems will read and write
Tokenization converts a passage into units that the software can represent. A token might correspond to a word or to a piece of one. Each token is treated as an entry in a vocabulary, so the decision about where to split the text determines which entries appear in a training example. The decision also affects how much writing fits in a sequence of a given length. When a form requires several tokens, it uses several positions in the sequence.
The authors choose byte-pair encoding, or BPE, for subword tokenization. The idea is to let recurring combinations have entries and to represent rarer forms by composing smaller units. This is helpful for the problem the paper raises about inflection. A string the system seldom encounters as a whole can still contain pieces seen in other forms. The pieces offer a way to encode it within the learned vocabulary. The paper treats BPE as a compromise between the resources needed to maintain a vocabulary and the range of Nepali writing that the vocabulary should accommodate. Subword units for rare words.
Both tokenizers were learned from the full corpus. The tokenization section lists vocabulary sizes of 30,522 and 50,256. The encoder training description assigns BERT the 30,522-entry tokenizer and lists 50,257 entries for RoBERTa. The larger vocabulary thus has two reported sizes. The paper gives the decoder’s architecture and training settings without explicitly identifying which vocabulary it uses. For understanding the experiment, the important documented choice is that the encoders used different vocabulary sizes, with both vocabularies derived from the Nepali collection.
A larger inventory makes room for more entries. Its practical value depends on which pieces enter that inventory, and on where those pieces occur in the text the system will face. The paper explains the motivation for using smaller pieces and learning the vocabulary from Nepali. It does not trace sample inflections through the two tokenizers or report how long the same passages become after splitting. The vocabulary figures therefore describe the available inventory. They leave the differences in how the two systems actually divide a passage to be measured separately.
Give the encoders text with missing pieces
BERT and RoBERTa both use the encoder side of the Transformer architecture. In the paper, their shared pretraining exercise is masked language modeling. The original text is tokenized, some of it is concealed, and the encoder predicts what was hidden. The target comes from the original text. The encoder can use context on either side of the gap, so clues appearing near the end of a sentence can help with a missing item near the beginning. The practice is useful for an architecture that will later be given a complete input before making a decision about one of its parts.
The prefix and suffix in such an exercise can offer different kinds of guidance. Earlier words may establish what the sentence is discussing. Later words can help narrow down what fits syntactically or semantically at the gap. The loss gives feedback when the system assigns too little probability to the original item. Across the collection, that feedback gives the encoder many opportunities to learn representations sensitive to context. During downstream training the same representations can support different predictions, including labels for words and judgments about entire passages.
BERT also uses next sentence prediction. As described in the paper, this exercise presents a pair of sentences and asks whether the latter is the continuation of the former or a randomly chosen sentence. The answer concerns the relation between the sentences. In the masking exercise, by comparison, the prediction concerns the identity of concealed text. The training description gives RoBERTa just the masked objective. This matters when comparing the training curves because the recipes do different work during pretraining, even though both are adapted to the same downstream tasks.
The paper describes training one configuration of each encoder. The narrative puts BERT and RoBERTa at 110 million parameters apiece. The results table gives BERT as 110M and RoBERTa as 125M. A parameter is a numerical value learned during training that helps determine how the network transforms information and produces a prediction. The discrepancy in RoBERTa’s count leaves its exact reported capacity unresolved. Both parts of the paper identify it as the RoBERTa trained for this comparison.
Both encoders use a batch size of 256, and the authors train them for 400k steps. A batch is the group of training examples used to work out an update. A step is an occasion on which the optimizer updates the learned parameters. Batch size and step count matter because they describe the organization and duration of learning in a way that the corpus size alone cannot. The paper gives those settings separately from the epoch counts later used to describe task adaptation.
Set the optimizer and training schedule
The authors use Adam for the encoder runs. It uses running estimates based on gradients to decide how to update parameters. A gradient describes how the loss changes as a parameter changes. Adam’s estimates help determine the size and direction of an update given the current gradient and its history. The learning-rate setting reported for these runs is also the one used in GPT-2 pretraining and in its separate instruction stage.
1 × 10⁻⁴
The 1 is the coefficient, × means multiplication, 10 is the base, and ⁻⁴ means that the base is raised to the negative fourth power. The expression gives the reported learning rate, which controls the scale of parameter updates. In the general pretraining runs, the schedule warms up during the first 10,000 steps and then decreases linearly. The schedule specifies that the rate varies over training, with the warmup governing the early updates and the decay governing the subsequent ones.
The authors give the encoder settings for Adam’s running estimates as follows.
β₁ = 0.9
The symbol β₁ identifies the coefficient that controls how much weight Adam carries forward from its existing estimate of the gradient. The sign = assigns the value on the right, and 0.9 is the reported setting for both encoders. The decoder pretraining uses this value as well.
β₂ = 0.999
The symbol β₂ identifies the coefficient for the running estimate based on squared gradients. The sign = gives its value, and 0.999 is the setting for the encoder runs. The decoder run uses a different value for this coefficient.
The paper reports L2 weight decay of 0.01. Weight decay serves as regularization by discouraging large weights. The authors also set dropout, which temporarily suppresses activations in training, to a probability of 0.1 across the layers. The activation function is GELU, short for Gaussian Error Linear Unit. An activation function changes the output of a layer’s computation before it is used in further processing. The paper gives the choice of GELU and the optimization settings in place of explicit equations for the architectures or the training objectives.
Teach the decoder to continue text
GPT-2 uses causal language modeling. At a prediction position, the text already encountered serves as the context, and the next token from the article serves as the target during training. The future target is withheld from the information used to make the prediction. A causal exercise can do this at successive points in the same passage. The decoder gets feedback on how well it anticipated each continuation using the prefix available at that point.
This prediction order provides the mechanism for writing after training. The decoder can predict a token from the text it receives, add a token to the output, and use the extended sequence in the next prediction. For summarization, the source article supplies information for starting the output, and the developing summary becomes part of what the decoder has already produced. Pretraining practices the underlying continuation task. The later summary examples teach it that the continuation sought in this particular setup should condense the source.
The authors’ GPT-2 has 124M parameters. It uses batches of 256 and runs for 500k steps in general pretraining. The report gives the same learning-rate setting as for the encoders, with warmup over the first 10,000 steps and linear decay afterwards. The weight decay is 0.01, the across-layer dropout probability is 0.1, and the activation function is GELU. The Adam setting for the running gradient estimate remains 0.9. The other coefficient is reported as follows.
β₂ = 0.98
As with the encoder setting, β₂ is the coefficient controlling how much of the previous estimate based on squared gradients is carried into the next update. The sign = assigns the numerical setting, and 0.98 is the value for GPT-2 pretraining.
The initial GPT-2 training used sequences of 512 tokens. This is a statement about the number of positions in its pretraining sequences, measured after segmentation. Depending on the units used to represent an article, a given number of written words can occupy a different number of token positions. The distinction matters in the later discussion of long inputs. The authors also train the decoder for more update steps than the encoders, so the general procedure shares a corpus and several settings while each branch has a schedule and prediction task of its own.
Add a stage for requests and responses
For the instruction experiment, the authors use the publicly available Nepali Alpaca dataset, named alpaca-nepali-sft in the paper. It begins with 52k instruction rows. The authors remove or translate non-Nepali material and retain 40k rows. These rows belong to a separate resource from the news corpus. They supply demonstrations of responding to a request, whereas news pretraining takes a continuation from the original passage as the target.
The instruction stage uses supervised fine-tuning of the pretrained GPT-2. The requests identify an intended action and the associated outputs provide the examples used to train the response. In this setting a decoder can practice generating text of the kind called for by the request. That form of learning is especially relevant to a system that will be evaluated on the output it writes. The paper reports a batch size of 16, Adam with the learning rate shown above, and attention dropout of 0.01 for this stage. The attention dropout setting concerns attention during instruction training. The dropout probability specified earlier belongs to the general pretraining recipe.
GPT-2-Instruct is the branch that goes through this extra stage. The original pretrained GPT-2 provides the other starting point. The authors preserve that distinction when they move to summarization so they can see whether the extra preparation matters after task training. In both branches, the examples in the final training stage show the desired relationship between a source passage and its summary. Precisely where the training histories diverge is important. The instruction branch has already learned from the cleaned request-and-response data by the time both variants see examples from the summarization dataset.
Adapt the pretrained systems to their tasks
Each encoder is fine-tuned on the Nep-gLUE tasks. At this point the training target can be a tag for an element of the input or a judgment applying to a text or text pair. The encoder’s representation is adapted to help recover that task’s expected answer. The authors vary the duration and learning rate and describe choosing a run per task. The benchmark scores consequently reflect what each pretrained encoder can do after this additional supervised learning and selection.
For GPT-2 and GPT-2-Instruct, the final training goal is to produce summaries. In abstractive summarization, the output can be composed in new words rather than restricted to passages drawn from the source. The training dataset provides examples of the desired compressed text, and the evaluation examples give reference summaries for scoring what the decoder produces. The result is a comparison between task-trained summarizers with different preparation. The next section describes the selections, splits, and metrics that give those results their meaning.
Experiments and results
The understanding benchmark and how configurations were selected
Nep-gLUE supplies four tasks. Named entity recognition asks the system to identify spans that refer to named entities and determine their types. Part-of-speech tagging assigns grammatical categories in context. The output of text classification concerns the category of the input as a whole. Categorical pair similarity asks for a judgment involving a pair. Together they put the encoder’s representations to use at different scales, from a word or span to a relationship across inputs.
Fine-tuning uses batches of 32. The authors explore 3-10 epochs, where an epoch is a pass through the task’s training examples. They try learning rates of 5e-5, 4e-5, 3e-5, and 2e-5, as well as 1e-5. For each task, they report selecting the configuration that performed best on the test set. That selection procedure is part of the result. A single schedule need not account for all of a system’s scores, because each task can have a different selected configuration. The test examples contribute to the selection of settings through the scores observed on them.
The paper reports task scores under the labels NER and POS for the two tagging tasks, CC for classification, and CPS for categorical pair similarity. It also gives the overall Nep-gLUE score. The evaluation description names the tasks and the benchmark without specifying the formula used for each reported task score. The numbers are best read as the scores under those benchmark headings. The encoder pretraining curves use accuracy and loss for a separate prediction exercise and have their own scale.
The comparison covers multilingual and Nepali-specific baselines. Multilingual BERT and XLM-Rbase provide the multilingual entries. The earlier Nepali-specific entries are NepBERT, NepaliBERT, and NepBERTa. NepBERTa, which introduced the benchmark, is the strongest previous entry in the table on each task. The paper’s own BERT and RoBERTa entries are Nepali-only configurations trained with the new corpus. The names in the chart distinguish them from the prior entries with similar architecture names.
Encoder systems compared by overall Nep-gLUE test score
The newly trained Nepali encoders lead the comparison, with RoBERTa at the top.
The numbers
| System or setting | Nep-gLUE score |
|---|---|
| NepBERT | 87.94 |
| NepaliBERT | 88.42 |
| Multilingual BERT | 91.19 |
| XLM-Rbase | 92.11 |
| NepBERTa | 93.55 |
| Nepali BERT in this study | 95.18 |
| Nepali RoBERTa in this study (this paper) | 95.60 |
The aggregate places both new encoders above the earlier configurations, with RoBERTa collecting the highest score. The rankings within the prior work are informative as well. NepBERTa scores above the multilingual entries overall, while NepBERT and NepaliBERT score below them. A reader comparing monolingual with multilingual training thus has several different outcomes represented in the same table. The reported advantage belongs to these particular Nepali-only recipes and to the task settings selected for them.
On the named entity recognition test task, RoBERTa scores 93.74, BERT 93.57, and NepBERTa 91.09. Among the multilingual baselines, XLM-Rbase scores 87.59 and multilingual BERT 85.45. NepaliBERT scores 82.45 and NepBERT scores 79.12. This is a task where the representation has to support judgments about portions of the input. The lead is present at that level as well as in the aggregate, although the reported metric gives no breakdown by entity type.
The part-of-speech tagging test scores put RoBERTa at 97.52, BERT at 96.94, and NepBERTa at 95.56. Multilingual BERT scores 94.65 and XLM-Rbase scores 94.88. NepaliBERT scores 91.67 and NepBERT scores 90.63. The ordering at the top persists when the labels describe grammatical categories. That is a distinct use of context from assigning an entity type. The scores give evidence for performance on both tagging tasks without identifying specific grammatical forms that contributed to it.
For CC, the text classification test task, the new BERT scores 94.47 and RoBERTa scores 94.68. NepBERTa earns 93.13. XLM-Rbase scores 92.33 and multilingual BERT 91.08. The remaining monolingual baselines are NepBERT at 90.98 and NepaliBERT at 90.10. Here the output describes the input as a unit. The two encoders have an advantage in the table when their task-specific training calls for such a judgment as well as when it calls for labels inside a sequence.
On categorical pair similarity, the test score is 96.49 for RoBERTa and 95.72 for BERT. NepBERTa reaches 94.42. XLM-Rbase has 93.65 and multilingual BERT has 93.60. NepBERT and NepaliBERT score 91.05 and 89.46, respectively. The task involves a relationship across inputs, giving the comparison an additional kind of judgment. At the top, the same ordering holds through all four tasks. Lower in the table, the relative order of the prior configurations varies by task.
The table also records parameter counts. Multilingual BERT is listed at 172M and XLM-Rbase at 270M. NepBERT, NepaliBERT, and NepBERTa are each listed at 110M. The paper’s BERT is listed at 110M and the paper’s RoBERTa at 125M, with the RoBERTa discrepancy noted earlier. These values help characterize the systems contributing to the ranking. Several entries with higher recorded counts score lower than the new encoders. Since the systems also differ in training language coverage, material, and design, the table provides a comparison across existing configurations with those differences in place.
Summarization data and what ROUGE counts
The authors say that they lacked an established Nepali benchmark for natural language generation. They use Bhandari’s public dataset, listed as Xlsum-nepali-summerization-dataset, to evaluate the decoders on abstractive summarization. The dataset has 7,258 examples. Of those, 5,806 (80%) are assigned to training and 1,452 (20%) to evaluation. The split provides one set of examples for adapting the decoder to the summary task and a reserved set for comparing its outputs with reference text.
Both GPT-2 variants are fine-tuned for summarization with a batch size of 8 and 3,000 steps. These settings apply to the stage in which they learn the task from the training part of the dataset. GPT-2 starts this stage from the news-pretrained checkpoint. GPT-2-Instruct starts from the version adapted to the Nepali instruction examples. The paper compares them with the generator named distilgpt-nepali in the results table, credited to Maskey. The baseline is listed at 88.2M parameters, and both of the paper’s decoders are at 124M. The protocol explicitly describes summary training for the two new variants.
The reported measures belong to ROUGE, a family of scores based on matching text generated by a system to reference text. ROUGE-1 considers individual units of wording. ROUGE-2 uses adjacent pairs of units, giving a way to register overlap in local phrasing. ROUGE-L uses a longest common subsequence. It looks for a sequence of units that the generated and reference texts share in the same order, allowing intervening units between matches. The paper reports the measures by name, with its focus on the resulting comparison. Lin and Och’s work on evaluation with common subsequences.
The distinction between the measures affects what evidence a match supplies. If a candidate contains much of the same vocabulary as a reference, that can contribute to individual-unit overlap. Arranging that vocabulary in the same short phrases can also contribute to adjacent-pair overlap. A common subsequence can register ordering across a longer stretch even if other wording interrupts it. The measures draw on the same generated and reference summaries, so consistency among them shows that the ranking survives different ways of counting shared text.
Generator comparison on the Nepali summarization evaluation split by ROUGE-1
Both new generators exceed the earlier system, and the instruction-trained branch leads.
The numbers
| System or setting | ROUGE-1 |
|---|---|
| distilgpt-nepali | 10.16 |
| GPT-2 | 19.66 |
| GPT-2-Instruct (this paper) | 20.42 |
On the evaluation split, the plain GPT-2 scores 19.66 on ROUGE-1, 14.51 on ROUGE-2, and 16.84 on ROUGE-L. The corresponding baseline scores are 10.16, 8.63, and 9.19. The decoder that went directly from news pretraining to summary training thus already exceeds the earlier entry under each matching rule. Its position establishes the result for the recipe before the paper considers the effect of adding the instruction stage.
Generator comparison on the Nepali summarization evaluation split by ROUGE-2
The ordering persists when overlap is measured through adjacent pairs.
The numbers
| System or setting | ROUGE-2 |
|---|---|
| distilgpt-nepali | 8.63 |
| GPT-2 | 14.51 |
| GPT-2-Instruct (this paper) | 15.89 |
The branch with instruction training reaches 20.42 on ROUGE-1, 15.89 on ROUGE-2, and 17.76 on ROUGE-L on the same evaluation split. It leads even when the metric asks for matches to occur together or to preserve their order. The observations are about similarities to the reference summaries. They also give a basis for comparing the two preparations for summarization because both new systems received the final task training. The report of unreliable behavior on long articles, discussed below, concerns an aspect of summary performance that these overlap scores leave unresolved.
What the training figures report
The paper plots pretraining progress separately for the encoders and the decoder. For BERT, the reported training loss starts at 8.34 and reaches 1.51 after 400k steps. Training accuracy begins at 3% and reaches 68.11% at the end of that run. The loss reflects the objective driving optimization, while accuracy reports success on the predictions scored during training. These changes show that the system became more successful at the pretraining exercise under its reported settings.
RoBERTa starts at a training loss of 7.45 and finishes at 1.47 after 400k steps, with final training accuracy at 69.72%. The authors describe RoBERTa as converging faster. That description comes from the training trajectories. The higher downstream score comes from the Nep-gLUE comparison after fine-tuning. The two observations concern different stages, and the paper offers no analysis mapping a point on a training curve to the performance of a particular benchmark task.
For GPT-2, the pretraining figure follows loss and perplexity. Perplexity expresses uncertainty about the tokens being predicted, and a lower reported value corresponds to better prediction of the text being scored under that measure. Over 500k steps, the paper reports training loss going from 10.34 to 3.001 and perplexity going from 60.03 to 24.13. The figure shows both measures declining during causal pretraining. The paper gives the endpoints as separate reported quantities and leaves the details of how they were calculated unspecified. The exercise behind them is predicting continuations, which differs from both filling masked gaps and generating a complete, useful summary.
What the ablations show
The paper reports no systematic component ablation. Its most direct comparison examines the inclusion of an instruction stage, with the encoder comparison, training curves, and observations about long inputs offering other kinds of evidence.
What changes when instruction training is added
The summarization branch comparison starts with one pretrained GPT-2. Both reported variants have 124M parameters, and both are trained on the same summarization split using the reported batch size and step count. One variant receives supervised fine-tuning on Nepali instructions before that shared task procedure. The experiment observes what happens to the final summary scores when the decoder reaches task training with this additional experience.
The instruction-trained branch leads by every reported measure of reference overlap. The higher ROUGE-2 and ROUGE-L scores matter to the interpretation alongside the higher ROUGE-1 score because they follow the same ordering when matches must satisfy conditions beyond the presence of individual units. The branch comparison supports using the instruction-trained checkpoint as the starting point in this particular summary training setup. The external baseline supplies a separate comparison showing the performance of the new GPT-2 even before the instruction stage is included.
Several things happen during the added stage. The system sees the request-and-response structure, encounters a different collection of Nepali text, and undergoes more optimization. Those changes belong to one intervention in the study. A comparison with the same amount of additional training on comparable text without paired requests would help distinguish the contribution of the format. The paper reports no such condition. Its evidence concerns the effect of including the instruction stage as a whole, with the data and supervision the authors used.
The final task training also determines the scope of the result. A reader interested in instruction following on an unfamiliar task would need to know what the system does when it has learned from instructions but has received no examples of the target task during adaptation. Here both branches get examples of Nepali summarization. The result shows what the instruction stage adds when the generator will subsequently be trained for summaries, and it leaves open its value when that subsequent supervision is unavailable.
How to read the encoder comparison
The encoders share the new corpus, batch size, duration of general training, and much of the optimization recipe. Their order in pretraining also agrees with their order on the benchmark in the sense that RoBERTa finishes with the lower reported training loss and the higher reported training accuracy, then obtains the higher score on each downstream task. That pattern establishes how the two complete runs turned out. It gives a reader grounds for preferring the reported RoBERTa settings when the criterion is performance in this comparison.
BERT and RoBERTa differ in the training objectives used and in vocabulary size. According to the results table, they also differ in parameter count, while the training narrative gives equal counts. The objective difference is visible in how each system is trained. BERT has a sentence-pair exercise in addition to recovering masked content. RoBERTa has the masking exercise alone. The vocabulary difference changes the units on which the masked predictions are made. Since these choices enter together, the experiment leaves the effect of each choice individually undetermined.
There is a similar issue with the explanation the authors give for the advantage over earlier encoders. They attribute it primarily to a large and diverse corpus, which they argue helps capture a broader range of linguistic patterns. The results are consistent with that explanation because both of their recipes use the corpus and both achieve stronger benchmark scores. A comparison of the same training recipe on different volumes of text or on different source collections would address the explanation directly. The paper compares systems whose training recipes and materials already differ in multiple ways.
The two encoder training curves describe what happened under the corresponding objectives. The training loss in each is meaningful as a record of that run. To use the final losses to explain why one encoder leads downstream would require accounting for the differences in the prediction problems and scoring. The figures document learning progress, while the benchmark shows where the resulting systems rank after adaptation. The evidence for each observation comes from the relevant stage.
Long articles expose a failure mode
The authors observed trouble with long summarization inputs, typically those over 400 tokens. They report that the generator tended to hallucinate in very long contexts. In this setting a hallucination is generated content unsupported by the source article. They connect the difficulty to the training setup, in which GPT-2 originally saw sequences of 512 tokens. The observation about failing on many long inputs and the sequence length used in training are different facts. The paper offers the latter as an explanation for the former.
The analysis is qualitative. The paper neither gives scores for bands of input lengths nor compares decoders pretrained at different sequence lengths. Consequently the length mentioned in the observation is an indication of where the authors saw problems, and the report leaves uncertainty about the frequency of errors and the shape of the decline. It identifies a behavior worth weighing against the aggregate ROUGE ranking. A generator can score well across the evaluation set compared with the other entries and also exhibit a concentrated weakness on long inputs.
Limitations
Limits the authors identify
The authors’ generation evaluation starts from a shortage of established benchmarks. They use one public Nepali summarization dataset as a task for which there is both training material and an evaluation split. The choice makes comparison possible within that dataset. It also limits the range of behavior directly observed. Summarization uses an article as a source and rewards producing a compressed account. The experiment gives no comparable results for other generation tasks that place different demands on the input or output.
Long-input behavior is the paper’s clearest reported weakness. The authors noticed poor performance and hallucinated content on very long passages and explain that GPT-2 was initially trained with sequences of 512 tokens. They describe problematic inputs as typically exceeding 400 tokens. The report does not establish an input length at which failures start reliably, and it supplies no measurements of how many summaries become unfaithful. It does put an important qualification on the application. Better average reference overlap can accompany difficulty accounting for the contents of longer articles.
The authors present instruction tuning in Nepali as an exploratory effort. Earlier work in their discussion motivates it through gains on unseen tasks. The study tests how it affects subsequent summarization, with training examples specifically for that task. The task-directed setup gives an answer about summarizers with the reported preparation. It leaves the more general question of how flexibly the decoder follows instructions, including requests with which it has had little direct practice, for future evidence.
Limits of the comparisons and selection procedure
The most consequential qualification on the encoder results is the decision to select configurations using their test scores. When several learning rates and training durations are tried, the choice giving the highest measured score can partly reflect the particular mix of examples in the test set. That score then describes the winner on examples that have already influenced which configuration was chosen. A separate sample would be needed to assess how much of the lead carries over after those choices are fixed. This matters for the individual task results and for an overall number formed from task performances.
Run-to-run variation is also unknown. The result tables give a score for each combination of system and reported measure. They give no range over repeated runs or uncertainty estimate for the ranking. The two new encoders’ advantage across the tasks and the new generators’ advantage across overlap measures describe consistent patterns in the reported comparisons. That consistency does not measure how much scores would move if training were repeated. In summarization, the ROUGE variants are calculated from the same generated outputs, so they reflect related aspects of one set of predictions.
The corpus explanation has a similar boundary. Comparing the new encoders with their predecessors establishes relative benchmark performance under their respective settings. The paper leaves the contribution of corpus size, the distribution of writing in the corpus, and the language-specific vocabulary unresolved. Even the comparison between the two new encoders changes the objective and vocabulary together. The instruction experiment holds the starting GPT-2 fixed and uses the same downstream task procedure, giving a more specific contrast. Its scores still represent the combination of additional training time, new text, and supervision used in the extra stage.
The generation baseline contributes to the performance comparison but has a different parameter count. The paper gives the fine-tuning procedure for both new decoders without the same procedural detail for the external comparator. This leaves open how much the training history or adaptation settings affect the baseline’s position in the table. The direct comparison for the extra instruction stage remains between the two branches of the authors’ GPT-2. Comparisons with the earlier generator address how the full systems performed in the reported evaluation.
Coverage, overlap, and details needed for reproduction
There is a difference between the amount of Nepali available for training and the range of Nepali writing represented. The new data come from news websites, and neither the data description nor the results break performance down by register or variety. A large collection of news can provide substantial exposure to published prose. The experiments give limited grounds for predicting how that exposure transfers to other kinds of Nepali. The argument that the collection helped capture more language patterns is plausible within the authors’ explanation. The scores do not identify which patterns the encoders learned better or which portions of the collection helped them do so.
Deduplication addresses repetition in the collected material, and choosing a fresh crawl addresses the authors’ concern about adding overlapping training collections. The paper gives no documented comparison between the pretraining material and the examples used for downstream evaluation. Such a check would address whether examples meant to test downstream performance have counterparts in the broader corpus. Its absence leaves both the extent of any overlap and its possible influence unknown. The paper’s account provides evidence of efforts to control duplication during corpus construction.
Some reported details are hard to reconcile for reproduction. The larger vocabulary is listed as 50,256 in the tokenization discussion and 50,257 in the RoBERTa description. The RoBERTa parameter count appears as 110 million in the pretraining narrative and 125M in the benchmark table. The GPT-2 vocabulary is unspecified in its training description. The authors document the principal stages of cleaning for both the news and instruction material, but they give few details about how the stages determine whether individual passages are discarded or translated. Recreating the same inputs would require those decisions as well as the sizes and training settings.
What the scores leave open about individual outputs
The task scores summarize how systems perform over the benchmark examples. They leave open which kinds of entities, grammatical categories, or text pairs account for the improvement. The consistent lead across Nep-gLUE tasks is evidence of an advantage across the kinds of judgments represented there. The evidence bears less directly on particular patterns of word order and inflection, since the paper does not isolate examples of those properties and evaluate them separately.
Reference overlap gives a way to measure whether the generated summary resembles the expected wording. Factual faithfulness calls for a different judgment about the relationship between output and source. A summary could retain much of the reference’s vocabulary while making a claim the article fails to support. A faithful rephrasing could use words with less overlap. The paper’s observation about hallucination in long contexts is therefore pertinent to interpreting the result even though the instruction-trained branch leads under each ROUGE measure. The scores establish the ordering by textual overlap, and the qualitative observation shows why an evaluation of source support would answer a further question.
What came after
No later citing study is documented. The authors close by presenting the Nepali corpus, the pretrained encoders and decoder, and the instruction experiment as starting points for further work. Their own comparisons leave open how much of the encoder improvement comes from the corpus and how much from other training choices. On the generation side, they leave open whether the extra instruction stage helps outside summarization and whether summaries can stay faithful as inputs grow longer.
Cite
Cite as Prajwal Thapa, Jinu Nyachhyon, Mridul Sharma and Bal Krishna Bal. 2025. Development of Pre-Trained Transformer-based Models for the Nepali Language. Proceedings of the First Workshop on Challenges in Processing South Asian Languages (CHiPSAL 2025).
@inproceedings{thapa2025development,
title = {{Development of Pre-Trained Transformer-based Models for the Nepali Language}},
author = {Prajwal Thapa, Jinu Nyachhyon, Mridul Sharma and Bal Krishna Bal},
booktitle = {Proceedings of the First Workshop on Challenges in Processing South Asian Languages (CHiPSAL 2025)},
year = {2025},
url = {https://aclanthology.org/2025.chipsal-1.2/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/thapa-2025-development-pre-trained-transformer-based/