Instructions to use vrishv/Shodhana-34M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vrishv/Shodhana-34M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vrishv/Shodhana-34M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("vrishv/Shodhana-34M") model = AutoModelForCausalLM.from_pretrained("vrishv/Shodhana-34M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vrishv/Shodhana-34M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vrishv/Shodhana-34M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vrishv/Shodhana-34M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/vrishv/Shodhana-34M
- SGLang
How to use vrishv/Shodhana-34M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "vrishv/Shodhana-34M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vrishv/Shodhana-34M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "vrishv/Shodhana-34M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vrishv/Shodhana-34M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use vrishv/Shodhana-34M with Docker Model Runner:
docker model run hf.co/vrishv/Shodhana-34M
Shodhana-34M (शोधन)
Shodhana is Sanskrit for purifying, correcting.
A small English model that corrects lines misread by a handwriting reader. Give it a misread line (and, if you have it, the line before it), and it writes the corrected line. It is Viveka-34M trained further on free Colab and Kaggle T4 GPUs, half on ordinary text (so it still knows English) and half on correction examples.
How to use
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained('vrishv/Shodhana-34M')
lm = AutoModelForCausalLM.from_pretrained('vrishv/Shodhana-34M', dtype='float32').eval()
def fix(bad, prev=''):
x = tok(f'<fix> {prev[-80:]} | {bad} <to>', return_tensors='pt').input_ids
out = lm.generate(x, max_new_tokens=int(len(tok(' ' + bad).input_ids) * 1.5) + 6, do_sample=False,
eos_token_id=tok.eos_token_id, pad_token_id=tok.eos_token_id)
return tok.decode(out[0, x.shape[1]:], skip_special_tokens=True).strip()
print(fix('saw his frlend standinq in the rain .', prev='He opened the door and'))
Results
Character errors in lines read by a handwriting reader (lower is better):
| Test lines | Reader alone | + Shodhana |
|---|---|---|
| 300 Wikipedia sentences, written by hand and misread | 6.14% | 3.34% |
| 528 real-world handwriting lines (GNHK) | 10.70% | 10.76% |
It fixes almost half the mistakes on ordinary sentences, but not yet on messy real-world handwriting: there its mistakes are of a different kind than the ones it practised on. Use it together with a check against the handwriting (keep its correction only if the letters still fit the picture), as the AksharaVardhan reader does.
Limitations
Small (33.9M numbers): it can turn a badly misread word into a different real word ("the knife is metal" can become "the trigger is vital"). English only. It may change capital letters and punctuation.
About the maker
Shodhana was built by Vrishvardhan Sharma (vrishv), a 9-year-old self-taught builder from India. His other work:
- GitaVardhan: a free, offline Bhagavad Gita app in 13 Indian languages, and a pocket-sized voice-controlled Gita device he designed, wired and coded himself.
- Sanskrit Vardhan: an app for learning Sanskrit through the Bhagavad Gita, with word-by-word meanings and step-by-step Pāṇinian derivations. Launched on 20 October 2026 by Prof. Shrinivasa Varakhedi, Vice-Chancellor of Central Sanskrit University.
- Kannada, Tamil and Telugu Vardhan: apps that teach everyday spoken Kannada, Tamil and Telugu.
- Hindi Vardhan (hindivardhan.in): a dictionary of pure, Sanskrit-rooted Hindi. Over 6,000 borrowed words in everyday Hindi, each with native alternatives checked against five classical Sanskrit dictionaries.
- AksharaVardhan: a handwriting reader that runs on an ordinary computer.
- graphics-studio: a free Space that makes and edits images, videos, music and narration.
- Viveka-34M: the sentence judge Shodhana is built from.
- Jigyasa Simple: 473 everyday science questions with short, plain-text answers.
- Jigyasa Medium and Jigyasa Big: 969 and 970 deeper science questions, built from his own questions, with answers of up to 7 and 10 sentences.
He has memorised the Bhagavad Gita and Pāṇini's Aṣṭādhyāyī, won national Sanskrit recitation competitions, and speaks six languages. More at vrishvardhan.in.
CC BY-NC 4.0 © 2026 Vrishvardhan Sharma. Built from Viveka-34M, whose first training stage used IAM handwriting texts (non-commercial research licence).
- Downloads last month
- 40
Model tree for vrishv/Shodhana-34M
Base model
vrishv/Viveka-34M