First systematic study of parameter-efficient Named Entity Recognition for Nepali using Low-Rank Adaptation (LoRA) with Hindi cross-lingual transfer.
Paper: Parameter-Efficient Nepali NER with LoRA and
Hindi Cross-Lingual Transfer
Authors: Avinash Gautam, Smarika Ghimire
Institution: School of Engineering, Pokhara University, Nepal
Code: https://github.com/a-proton/nepali-ner-lora
Model: https://huggingface.co/a-proton/nepali-ner-lora
W&B: https://wandb.ai/a-proton-/nepali-ner-lora
| Model | F1 | Params | Time |
|---|---|---|---|
| mBERT Full FT (Yadav 2024) | 86.2% | 177M | 12hr |
| Config 5: LoRA all attn (ours) | 81.87% ± 0.81% | 2.7M | 12min |
| Config 2: LoRA q+v | 79.25% ± 0.71% | 0.6M | 12min |
| Config 3: Two-phase LoRA | 75.31%* | 0.6M | 24min |
| Config 4: LoRA r=32 | 72.06%* | 0.6M | 12min |
| Config 1: LoRA q+v Nepali only | 77.92%* | 0.6M | 12min |
*Single-seed result (seed=42)
Results for Config 2 and Config 5 reported as
mean ± std over 5 seeds (42, 123, 456, 789, 2024)
98.50% fewer parameters. 60× faster training. Zero inference overhead (weights merged at inference).
All methods below use Nepali-only training to isolate the effect of PEFT method choice from Hindi transfer.
| Method | F1 | Trainable Params |
|---|---|---|
| Full FT (mBERT) | 79.97% | 177M |
| LoRA (ours) | 77.74% | 595K |
| Prefix Tuning | 63.96% | 374K |
| BitFit | 60.97% | 102K |
LoRA outperforms all PEFT baselines by +13-17% F1.
| Hindi Sentences | F1 | Improvement |
|---|---|---|
| 0 (Nepali only) | 75.06% | baseline |
| 1,000 | 77.21% | +2.15% |
| 3,000 | 75.76% | +0.70% |
| 6,000 | 77.90% | +2.85% ← optimal |
Note: Single-seed results. Non-monotonic trend at 3,000 sentences likely due to subset composition.
| Target Modules | F1 | Params |
|---|---|---|
| query only | 73.47% | 300K |
| value only | 76.02% | 300K |
| query + value | 77.74% | 595K |
| query + value + key | 78.04% | 890K |
| all attention | 81.43% | 2.7M |
Single-seed results. Multi-seed result for all attention: 81.87% ± 0.81% (reported in paper).
- LoRA all attention modules outperforms q+v by +2.62% F1
- Hindi transfer improves Nepali NER by +2.85% F1
- Combined training beats sequential by +4.2% F1
- LoRA outperforms BitFit by +16.77% F1
- r=16 prevents overfitting in low-resource settings
- Zero inference overhead via weight merging
Full training curves, metrics, and logs available on Weights & Biases:
Project: https://wandb.ai/a-proton-/nepali-ner-lora
Run: https://wandb.ai/a-proton-/nepali-ner-lora/runs/hfblpfpq
Tracks: training loss, validation loss, F1 score, learning rate, and per-entity metrics.
See experiment_analysis.ipynb for detailed results
visualization and error analysis including:
- Dataset statistics
- Configuration comparison charts
- Multi-seed reproducibility analysis
- Hindi data scaling visualization
- PEFT methods comparison
- Module ablation charts
- Live model demo on Nepali text
pip install -r requirements.txtgit clone https://github.com/oya163/nepali-ner.gitHindi data downloads automatically via HuggingFace datasets library (WikiANN Hindi, 6,000 sentences).
python train.pyDefault config uses all attention modules (best result). Edit CONFIG dictionary in train.py to try other configurations:
# Config 5 (best - default)
"target_modules": ["query", "value", "key", "dense"]
# Config 2 (lighter)
"target_modules": ["query", "value"]python evaluate.py- Exact train/validation/test splits in data_splits.json
- All experiment results in experiments.json
- Results reported as mean ± std over 5 random seeds
- Seed values: 42, 123, 456, 789, 2024
- Best model weights available on HuggingFace
- Training curves available on W&B
HuggingFace: https://huggingface.co/a-proton/nepali-ner-lora
Uploaded model uses seed=456 (best individual run: 83.22% F1). Paper reports mean ± std over all 5 seeds (81.87% ± 0.81%).
nepali-ner-lora/ ├── train.py ← Training script ├── evaluate.py ← Evaluation script ├── requirements.txt ← Dependencies ├── README.md ← This file ├── experiments.json ← All experiment results ├── results.json ← Final model results ├── data_splits.json ← Reproducible data splits ├── experiment_analysis.ipynb ← Analysis notebook └── figures/ ← All visualization plots ├── config_comparison.png ├── seed_analysis.png ├── hindi_scaling.png ├── module_ablation.png ├── peft_comparison.png ├── efficiency_analysis.png └── dataset_analysis.png
Paper under review. Citation will be added upon publication.
Apache 2.0
AI writing assistance was used for drafting and editing the paper. All experiments and research decisions were made by the authors.






