Paper Reading AI Learner

Towards Nepali-language LLMs: Efficient GPT training with a Nepali BPE tokenizer

2025-12-16 16:53:11
Adarsha Shrestha, Basanta Pokharel, Binit Shrestha, Smriti Adhikari, Dinesh Gothe

Abstract

Nepali, a low-resource language spoken by over 32 million people, continues to face challenges in natural language processing (NLP) due to its complex grammar, agglutinative morphology, and limited availability of high-quality corpora. Most efforts to date have centered on basic encoder architectures; they remain insufficient for Nepali-specific text generation. This study presents a GPT-2-based Nepali language model trained using several training strategies inspired by GPT-3, including optimized learning rate schedules, batch scaling, and architectural refinements. A custom 16k Byte-Pair Encoding (BPE) tokenizer was trained exclusively on Nepali text to ensure more consistent segmentation and improved input representation. The model was pretrained on a combined dataset comprising a 10.75GB cleaned NepBERTa corpus and additional web-scraped Nepali news articles. FlashAttention was integrated to reduce memory usage and stabilize training. After two epochs, the model achieved a training loss of 3.168177, a validation loss of 3.081982, and a final perplexity of 21.80, demonstrating its capability to generate coherent Nepali news-style text.

Abstract (translated)

尼泊尔语是一种资源较少的语言,全世界有超过三千万人使用。由于其复杂的语法、黏着形态学以及高质量语料库的稀缺性,自然语言处理(NLP)领域在处理尼泊尔语时仍面临诸多挑战。迄今为止,大多数努力集中在基本编码架构上;然而,这些方法对于特定于尼泊尔语的文本生成来说依然不够充分。本研究提出了一种基于GPT-2的尼泊尔语语言模型,并采用了几种受GPT-3启发的训练策略进行训练,包括优化的学习率计划、批量缩放以及架构改进。为了确保更一致的分词和改善输入表示,我们专门为尼泊尔文本训练了一个定制的16k字节对编码(BPE)词元化器。模型在包含经清理后的NepBERTa语料库(大小为10.75GB)以及额外抓取的尼泊尔新闻文章所组成的组合数据集上进行了预训练。此外,还整合了FlashAttention技术以减少内存使用量并稳定训练过程。经过两轮训练后,模型达到了3.168177的训练损失、3.081982的验证损失以及最终困惑度为21.80的表现,证明其能够生成连贯的尼泊尔新闻风格文本。

URL

https://arxiv.org/abs/2512.14585

PDF

https://arxiv.org/pdf/2512.14585.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot