Downloads · 30 days
0
axondendriteplus/LegalLoRA-IndicTrans2-en_indic
LegalLoRA-IndicTrans2-en_indic is a translation model from axondendriteplus. Use it when you need text moved from one language to another. The card lists the license as mit.
This model is a LoRA fine-tuned version of ai4bharat/indictrans2-en-indic-1B on 80,000 high-quality English-Hindi legal sentence pairs. The training data consists of parallel sentences from Indian Supreme Court and Pu…
Downloads · 30 days
0
Access
Public
Updated Apr 11, 2025
Repo size
79.1 MB
Likes
1
Public
Click a slice to open those files.
.pt28.5 MB · 54%
From the Hugging Face model README
This model is a LoRA fine-tuned version of ai4bharat/indictrans2-en-indic-1B on 80,000 high-quality English-Hindi legal sentence pairs. The training data consists of parallel sentences from Indian Supreme Court and Punjab & Haryana High Court orders.
ai4bharat/indictrans2-en-indic-1Bq_proj, k_projEvaluated on a development set (Dev Set) derived from the training corpus (prior to training); 8,000 pairs (10%)
Metrics at best checkpoint (20000 steps):
Prediction: न्यायालय ने आगे कहा कि प्रक्रिया भी प्राकृतिक न्याय के सिद्धांतों के अनुरूप होनी चाहिए ।
Reference: न्यायालय ने आगे कहा कि प्रक्रिया प्राकृतिक न्याय के सिद्धांतों के अनुरूप भी होनी चाहिए ।
To assess real-world performance, we evaluated the model on 100 randomly selected legal documents that were excluded from the training and development datasets. Each sample contained:
original_content_{id}.txt: Original English legal documenttranslated_content_{id}.txt: Human-translated Hindi versionmodel_output_{id}.txt: Hindi translation generated by the modelresults_{id}.json: File containing similarity scores per documentWe used LaBSE (Language-agnostic BERT Sentence Embedding) to compute semantic similarity between:
original English document ↔ human Hindi translationoriginal English document ↔ model's Hindi outputThe final metric represents how close the model's translation is to the meaning conveyed in the original English document.
0.70This indicates that the model retains approximately 70% of the semantic meaning when translating legal English documents into Hindi in a zero-shot, full-document setting.
All raw files and result data can be found here: Evaluation Data & Results
The folder includes:
original_content, translated_content, model_output)results_{id}.json)all_evaluation_results.jsonThe dataset was curated using publicly available bilingual judgments from the Supreme Court of India and the Punjab & Haryana High Court. Original English and Hindi PDF orders were parsed using OCR. Sentence alignment was performed using SentAlign, and pairs with alignment similarity score greater than 0.6 were selected. The final dataset consists of 80,000 English-Hindi aligned legal sentence pairs.
Dataset: https://huggingface.co/datasets/Wasserstoff-AI/legalTransEn_Indic
Training was performed using the IndicTrans2 hugging_face LoRA fine-tuning pipeline with the following parameters:
python3 train_lora.py \
--data_dir en-indic-exp/ \
--model ai4bharat/indictrans2-en-indic-1B \
--output_dir ./output-lora-finetuned\
--src_lang_list eng_Latn \
--tgt_lang_list hin_Deva \
--save_steps 20000 \
--max_steps 40000 \
--batch_size 1 \
--grad_accum_steps 32 \
--warmup_steps 4000 \
--max_grad_norm 1.0 \
--learning_rate 2e-4 \
--adam_beta1 0.9 \
--adam_beta2 0.98 \
--optimizer adamw_torch \
--lr_scheduler inverse_sqrt \
--num_workers 0 \
--weight_decay 0.01 \
--metric_for_best_model eval_BLEU \
--greater_is_better \
--patience 10 \
--lora_target_modules "q_proj,k_proj" \
--lora_dropout 0.1 \
--lora_r 16 \
--lora_alpha 32 \
--print_samples
To run inference using this LoRA fine-tuned checkpoint, run the following github repo.
Github Repo: https://github.com/adw777/Legal-IndicTrans2
This model is intended for English to Hindi legal translation tasks. It performs best on judicial or government domain text. It is not recommended for casual or general-purpose translation applications.
@misc{ LegalLoRA-IndicTrans2-en_indic,
title={LoRA Fine-tuned IndicTrans2 1B for English to Hindi Legal Translation},
author={Aman Dogra},
year={2025},
url={https://huggingface.co/axondendriteplus/LegalLoRA-IndicTrans2-en_indic}
}