Instructions to use snxtyle/chitrapathak_marguj_mixed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use snxtyle/chitrapathak_marguj_mixed with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("checkpoints/data/chitrapathak2") model = PeftModel.from_pretrained(base_model, "snxtyle/chitrapathak_marguj_mixed") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from snxtyle/chitrapathak_marguj_mixed: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/snxtyle/chitrapathak_marguj_mixed/resolve/main/README.md
- Command line
-
hf download hf://snxtyle/chitrapathak_marguj_mixed/README.md
-
curl -L -o README.md https://huggingface.co/snxtyle/chitrapathak_marguj_mixed/resolve/main/README.md
1.18 kB
| base_model: snxtyle/chitrapathak2 | |
| library_name: peft | |
| pipeline_tag: image-text-to-text | |
| tags: | |
| - lora | |
| - ocr | |
| - marathi | |
| - gujarati | |
| - chitrapathak | |
| - peft | |
| language: | |
| - mr | |
| - gu | |
| # chitrapathak_marguj_mixed | |
| One shared LoRA adapter for **Marathi** and **Gujarati** OCR on top of Chitrapathak-2. | |
| ## What this is | |
| - **Base model:** Chitrapathak-2 | |
| - **Adapter type:** PEFT LoRA (r=32, α=64) | |
| - **Languages:** Marathi + Gujarati in a **single** adapter | |
| - **Not** language routing and **not** stacked Marathi-v7 + guj_v1 | |
| ## Load | |
| ```python | |
| from peft import PeftModel | |
| from transformers import AutoModelForImageTextToText, AutoProcessor | |
| base = "YOUR_BASE_OR_LOCAL_CHITRAPATHAK2" | |
| adapter = "snxtyle/chitrapathak_marguj_mixed" | |
| model = AutoModelForImageTextToText.from_pretrained(base) | |
| model = PeftModel.from_pretrained(model, adapter) | |
| processor = AutoProcessor.from_pretrained(base) | |
| ``` | |
| ## Frozen-100 (vs original base) | |
| | Language | Exact match | CER | Script accuracy | | |
| |---|---:|---:|---:| | |
| | Marathi | 44/100 (base 26/100) | 4.10% (base 5.56%) | 95% | | |
| | Gujarati | 11/100 (base 0/100) | 10.61% (base 82.73%) | 100% | | |
| Source training checkpoint: bilingual reviewed MPS v2 step-414. | |