Instructions to use vrishv/thinker-34M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vrishv/thinker-34M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="vrishv/thinker-34M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("vrishv/thinker-34M") model = AutoModelForSequenceClassification.from_pretrained("vrishv/thinker-34M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
thinker-34M
Does this question need careful thinking? thinker-34M answers quick or think for a question, so an assistant
can switch a model's slower "thinking" mode on only when it helps. It is Viveka-34M
fine-tuned as a classifier and runs in milliseconds on a laptop CPU, next to router-34M.
93.6% correct on 1,798 held-out questions it never saw in training (version 3, November 2026). The first version, tested on the same questions, gets 71%.
| Label | Typical questions |
|---|---|
quick |
small talk, a fact ("What is the capital of France?"), a simple explanation, a one-step sum |
think |
word problems, competition maths, proofs, multi-step puzzles, hard science questions |
Use
from transformers import pipeline
clf = pipeline('text-classification', model='vrishv/thinker-34M')
print(clf('What is the derivative of x squared?'))
An ONNX copy (model.onnx) is included for CPUs without PyTorch, e.g. with onnxruntime and tokenizers:
import numpy as np, onnxruntime as ort
from tokenizers import Tokenizer
from huggingface_hub import hf_hub_download
tok = Tokenizer.from_file(hf_hub_download('vrishv/thinker-34M', 'tokenizer.json'))
sess = ort.InferenceSession(hf_hub_download('vrishv/thinker-34M', 'model.onnx'))
ids = tok.encode('What is the derivative of x squared?').ids[:128]
logits = sess.run(None, {'input_ids': np.array([ids]), 'attention_mask': np.ones((1, len(ids)), dtype=np.int64)})[0]
print(['quick', 'think'][int(logits.argmax())])
Training
Version 3 is built on the IAM-free Viveka-34M (v3) and was fine-tuned on a Kaggle T4 GPU (learning rate 1e-4,
3 epochs, the better of two settings kept) on 9,000 quick and 9,000 think questions. The two labels are matched
length by length (and chatty lead-ins appear equally in both), so the model cannot just count words: a guess
from length alone gets only about 52%.
| Label | Examples from |
|---|---|
quick |
small talk from Google Synthetic-Persona-Chat (CC BY 4.0), facts from Natural Questions (NQ-open, CC BY-SA 3.0), AI2 ARC-Easy (CC BY-SA 4.0), Jigyasa Simple, Medium and Big (Apache 2.0), one-step sums made by a script |
think |
GSM8K and MATH (MIT), AQuA-RAT (Apache 2.0), proofs and theory from StackMathQA (CC BY 4.0), AI2 ARC-Challenge (CC BY-SA 4.0), multi-step puzzles and short-but-hard questions made by a script |
Limitations
- Some of the training questions were made by a script, so real questions with unusual wording can be harder.
- English only. Questions are read up to 128 tokens.
About the maker
thinker-34M 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: his small language model, trained from scratch, that this model is built on.
- Shodhana-34M: Viveka trained further to correct lines misread by a handwriting reader.
- 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.
- router-34M: picks which of four offline models should answer a question; used next to this thinker.
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-SA 4.0 © 2026 Vrishvardhan Sharma.
- Downloads last month
- 28
Model tree for vrishv/thinker-34M
Base model
vrishv/Viveka-34M