Downloads · 30 days
42
100% of all-time downloads
KatheBathe/Kathe-Bathe
Kathe-Bathe is a machine learning model from KatheBathe. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as gpl-3.0.
KATHE 2026/ KatheBathe is an English → Kashmiri machine translation model developed by Muqarab Farooq Vaid and Suhaib Fida for KATHE 2026.
Downloads · 30 days
42
100% of all-time downloads
All-time downloads
42
Public
Repo size
300 MB
Likes
1
Trending 1
Click a slice to open those files.
.safetensors262 MB · 87%
From the Hugging Face model README
KATHE 2026/ KatheBathe is an English → Kashmiri machine translation model developed by Muqarab Farooq Vaid and Suhaib Fida for KATHE 2026.
The model is fine-tuned from sarvamai/sarvam-translate using QLoRA / LoRA with PEFT.
LINK : https://excalidraw.com/#json=fmEi9loC9z-9HUeORrQ4Y,cBAFupy9-eVpeILLJf1Yjg
Model:
https://huggingface.co/KatheBathe/Kathe-Bathe
The Hugging Face repository contains:
inference.pyRepository:
https://github.com/suhaibfida/Kathe-Bathe
The GitHub repository contains:
inference.pyrequirements.txtREADME.mdThe GitHub inference script loads the submitted KatheBathe adapter from Hugging Face.
There are two ways to run KatheBathe:
Recommended: We recommend Option 1 (Hugging Face) because it downloads the submitted
inference.pydirectly from the Hugging Face model repository and uses the submitted model and adapter.
The preferred method is to download the submitted inference script directly from the KatheBathe Hugging Face repository.
Hugging Face Model:
https://huggingface.co/KatheBathe/Kathe-Bathe
Install the required packages:
pip install -r requirements.txt
If huggingface_hub is not already installed:
pip install -U huggingface_hub
inference.pyUse hf_hub_download to download the exact submitted inference script:
from huggingface_hub import hf_hub_download
hf_hub_download(
repo_id="KatheBathe/Kathe-Bathe",
filename="inference.py",
local_dir="/kaggle/working",
force_download=True,
)
print("inference.py downloaded")
This downloads:
KatheBathe/Kathe-Bathe
↓
inference.py
↓
/kaggle/working/inference.py
python /kaggle/working/inference.py
The script automatically loads:
from Hugging Face.
You do not need to manually download the model weights.
The complete inference code is also available through GitHub.
GitHub Repository:
https://github.com/suhaibfida/Kathe-Bathe
git clone https://github.com/suhaibfida/Kathe-Bathe.git
cd Kathe-Bathe
pip install -r requirements.txt
python inference.py
The GitHub inference.py loads the KatheBathe model and adapter from Hugging Face.
The model weights do not need to be manually copied into the GitHub repository.
You do not need to manually download the model weights.
The provided inference.py automatically loads the required model components from Hugging Face.
The loading process is:
Run inference.py
↓
Load tokenizer
↓
Load BF16 base model
↓
Load KatheBathe QLoRA adapter
↓
Prepare model
↓
Generate translation
The base model is:
sarvamai/sarvam-translate
The submitted adapter is:
KatheBathe/Kathe-Bathe
The script automatically downloads the required files if they are not already available locally.
You do not need to manually download:
The first run may take longer because the model files need to be downloaded.
Subsequent runs can reuse the locally cached files.
Internet access is required when the required model files are not already cached locally.
A merged model is not required for the provided inference script.
| Configuration | Value |
|---|---|
| Task | English → Kashmiri |
| Base Model | sarvamai/sarvam-translate |
| Base Architecture | Gemma 3 4B IT |
| Fine-tuning | QLoRA / LoRA |
| Framework | PEFT |
| Inference dtype | BF16 |
| Maximum input length | 1024 |
| Maximum new tokens | 232 |
| Beam size | 6 |
| Repetition penalty | 1.15 |
| No-repeat n-gram size | 3 |
| EOS token ID | 1 (<eos>) |
| Default batch size | 16 |
| License | GPL-3.0 |
KatheBathe was developed using parameter-efficient fine-tuning with QLoRA / LoRA and PEFT.
Sarvam-Translate
↓
Gemma 3 4B IT
↓
QLoRA / LoRA Fine-tuning
↓
KatheBathe Adapter
↓
English → Kashmiri Translation
The base model used for fine-tuning is:
sarvamai/sarvam-translate
The trained adapter is loaded on top of the original base model during inference.
A merged model is not required for the provided inference script.
The model was fine-tuned using the following datasets.
Dataset:
https://huggingface.co/datasets/SMUQamar/Kashmiri-English-Parallel-Corpus
Dataset:
https://huggingface.co/datasets/ai4bharat/BPCC
Before running the inference script, you need:
Install all Python dependencies:
pip install -r requirements.txt
The required packages are:
transformers==4.51.3
peft==0.15.2
accelerate
sentencepiece
safetensors
pandas
huggingface_hub
The provided inference setup:
bitsandbytes quantizationThe repository contains a single inference script:
inference.py
The script supports:
The quickest way to verify that the model, tokenizer, adapter, and inference code are working is:
python inference.py --text "She was a true visionary."
The script will:
Example:
Input:
She was a true visionary.
Output:
سۄ ٲس اکھ حقیقی بصیرت تھون واجیٚنۍ۔
If a translation is generated successfully, the inference setup is working.
Translate a single English sentence:
python inference.py \
--text "She was a true visionary."
You can also provide multiple sentences:
python inference.py \
--text "She was a true visionary." \
--text "The weather is beautiful today."
For batch inference, the input CSV must contain:
ID,sentence
Example:
ID,sentence
1,She was a true visionary.
2,The weather is beautiful today.
3,I like learning new things.
Run:
python inference.py \
--input /path/to/test.csv \
--output predictions.csv
The output contains:
ID,kashmiri_text
Example:
ID,kashmiri_text
1,سۄ ٲس اکھ حقیقی بصیرت تھون واجیٚنۍ۔
2,...
3,...
The script validates:
In Kaggle:
Notebook
→ Settings
→ Accelerator
→ GPU
Use an NVIDIA GPU with BF16 support.
inference.pyThe preferred method is to download the exact submitted inference script directly from Hugging Face:
from huggingface_hub import hf_hub_download
hf_hub_download(
repo_id="KatheBathe/Kathe-Bathe",
filename="inference.py",
local_dir="/kaggle/working",
force_download=True,
)
print("inference.py downloaded")
This downloads:
KatheBathe/Kathe-Bathe
↓
inference.py
↓
/kaggle/working/inference.py
!python /kaggle/working/inference.py
The script automatically searches:
/kaggle/input/**/*.csv
for compatible CSV files.
The expected input columns are:
ID
sentence
If multiple compatible CSV files are found, specify the input manually:
!python /kaggle/working/inference.py \
--input /kaggle/input/my-dataset/test.csv \
--output /kaggle/working/predictions.csv
The required columns are:
IDsentenceExample:
ID,sentence
1,She was a true visionary.
2,The weather is beautiful today.
3,I like learning new things.
Specify the input and output paths:
!python inference.py \
--input /path/to/test.csv \
--output /path/to/predictions.csv
!python inference.py \
--text "She was a true visionary."
!python inference.py \
--text "She was a true visionary." \
--text "The weather is beautiful today."
Load tokenizer
↓
Load BF16 base model
↓
Load QLoRA adapter
↓
One-sentence diagnostic
↓
Translate input
↓
Validate predictions
↓
Save CSV
↓
Print first 10 results
↓
ALL CHECKS PASSED
The one-sentence inference is used as a diagnostic.
The first 10 results printed at the end are previews of predictions that have already been generated.
MAX_INPUT_LENGTH = 1024
MAX_NEW_TOKENS = 232
NUM_BEAMS = 6
REPETITION_PENALTY = 1.15
NO_REPEAT_NGRAM_SIZE = 3
# Explicit EOS token - required
EOS_TOKEN_ID = 1
Generation uses deterministic decoding:
do_sample=False
Default batch size:
16
If GPU memory is insufficient:
python inference.py --batch-size 8
eos_token_id must be set to 1, the tokenizer's <eos> token.
Do not change it to 106, which corresponds to <end_of_turn>.
The inference configuration uses:
eos_token_id = 1
The two settings behave differently:
| Setting | Behavior |
|---|---|
eos_token_id = 1 (<eos>) | Correct setting used for the submitted model |
eos_token_id = 106 (<end_of_turn>) | Do not use for the submitted configuration |
In testing, using <end_of_turn> caused generation to stop earlier, but resulted in a lower reported score.
Using:
eos_token_id = 1
allows beam search to continue evaluating candidate sequences until the actual EOS token is reached.
The trade-off is:
However, this setting produced the better reported score for the submitted configuration.
Therefore:
Do not change
eos_token_id = 1to106if you want to reproduce the submitted configuration.
If runtime is a concern, adjust:
--batch-sizerather than changing the EOS token.
Because generation uses the true <eos> token (1) rather than <end_of_turn> (106), the raw decoded output can sometimes contain extra trailing content.
This may include:
<unused...> tokensThe inference script handles this through post-processing.
After decoding, the script keeps the first valid non-empty translation line and removes trailing content.
This ensures that:
If you re-implement or modify inference.py, keep this cleanup step.
The cleanup step should not be replaced by changing the EOS token to 106.
Gemma 3 4B IT
↓
Sarvam-Translate
↓
QLoRA Fine-tuning
↓
KatheBathe Adapter
BF16 inference is designed for an NVIDIA CUDA GPU with BF16 support.
KATHE-KatheBathe/
│
├── inference.py
├── requirements.txt
└── README.md
inference.pyThe main inference script responsible for:
requirements.txtContains the Python packages required to run the inference script.
README.mdContains:
The GitHub inference code and Hugging Face model are designed to work together.
GitHub
│
└── inference.py
│
▼
Hugging Face
│
├── KatheBathe Adapter
└── Tokenizer / Configuration
│
▼
sarvamai/sarvam-translate
│
▼
English → Kashmiri
The adapter is loaded together with the original base model.
A merged model is not required for the included inference script.
The submitted code can therefore be tested directly against the submitted Hugging Face model weights.
To reproduce the submitted inference configuration:
eos_token_id = 1
Do not replace it with:
eos_token_id = 106
The generation settings should otherwise remain unchanged:
MAX_INPUT_LENGTH = 1024
MAX_NEW_TOKENS = 232
NUM_BEAMS = 6
REPETITION_PENALTY = 1.15
NO_REPEAT_NGRAM_SIZE = 3
do_sample = False
KatheBathe is intended for:
The model should not be treated as:
Machine translation can produce:
For important translations, human review is recommended.
KatheBathe is intended for English → Kashmiri translation.
No numerical evaluation results are claimed in this repository because an official evaluation table and test-set results are not provided.
The final competition evaluation may use a private test set.
KATHE 2026
Year: 2026
If you use KatheBathe or its training resources in research, projects, or tools, please acknowledge the model creators, base model, and datasets.
@misc{kathebathe2026,
title={KATHE / KatheBathe: English-to-Kashmiri Translation Model},
author={Muqarab Farooq Vaid and Suhaib Fida},
year={2026},
publisher={Hugging Face}
}
Base model:
https://huggingface.co/sarvamai/sarvam-translate
@article{gemma_2025,
title={Gemma 3},
url={https://arxiv.org/abs/2503.19786},
publisher={Google DeepMind},
author={Gemma Team},
year={2025}
}
Paper:
https://arxiv.org/abs/2503.19786
Dataset:
https://huggingface.co/datasets/SMUQamar/Kashmiri-English-Parallel-Corpus
Please cite:
Qumar, S.M.U., Azim, M. & Quadri, S.M.K.
Addressing the data gap: building a parallel corpus for Kashmiri language.
Int. J. Inf. Tecnol. (2024).
https://doi.org/10.1007/s41870-024-01979-8
Dataset:
https://huggingface.co/datasets/ai4bharat/BPCC
Please cite:
@article{gala2023indictrans,
title={IndicTrans2: Towards High-Quality and Accessible Machine Translation Models for all 22 Scheduled Indian Languages},
author={Jay Gala and Pranjal A Chitale and A K Raghavan and Varun Gumma and Sumanth Doddapaneni and Aswanth Kumar M and Janki Atul Nawale and Anupama Sujatha and Ratish Puduppully and Vivek Raghavan and Pratyush Kumar and Mitesh K Khapra and Raj Dabre and Anoop Kunchukuttan},
journal={Transactions on Machine Learning Research},
issn={2835-8856},
year={2023},
url={https://openreview.net/forum?id=vfT4YuzAYA}
}
Paper:
https://openreview.net/forum?id=vfT4YuzAYA
This model is released under:
GPL-3.0
We acknowledge the creators of:
sarvamai/sarvam-translateSMUQamar/Kashmiri-English-Parallel-Corpusai4bharat/BPCCThese resources were used in developing KatheBathe.
KATHE / KatheBathe
Authors:
For questions or issues, use the model repository discussion/issues mechanism on Hugging Face.