--- license: cc-by-nc-4.0 language: - en library_name: transformers pipeline_tag: text-classification base_model: vrishv/Viveka-34M tags: - text-classification - reasoning-detection - small-model - tiny-model - llama - onnx - english - 34m datasets: - allenai/ai2_arc - google/Synthetic-Persona-Chat - vrishv/jigyasa-simple - vrishv/jigyasa-medium - vrishv/jigyasa-big --- # 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](https://huggingface.co/vrishv/Viveka-34M) fine-tuned as a classifier and runs in milliseconds on a laptop CPU, next to [router-34M](https://huggingface.co/vrishv/router-34M). **Status: experimental.** It is right on **68%** of held-out questions (50% would be guessing), so use it only when it is very sure. In Vrishvardhan's offline assistant, thinking is switched on only when its `think` score is 0.85 or more. | Question | Label | |---|---| | hello, how are you? | quick | | Why is the sky blue? | quick | | What is the derivative of x squared? | think | ## Use ```python 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`: ```python 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 Fine-tuned on Kaggle (two T4 GPUs, two settings at once, the better one kept: learning rate 1e-4, 4 epochs). | Label | Examples from | |---|---| | `quick` | AI2 ARC-Easy (CC BY-SA 4.0), [Jigyasa Simple](https://huggingface.co/datasets/vrishv/jigyasa-simple) (Apache 2.0), small talk from Google Synthetic-Persona-Chat (CC BY 4.0) | | `think` | AI2 ARC-Challenge (CC BY-SA 4.0), [Jigyasa Medium](https://huggingface.co/datasets/vrishv/jigyasa-medium) and [Big](https://huggingface.co/datasets/vrishv/jigyasa-big) (Apache 2.0) | ## Limitations - ARC's Easy and Challenge sets are split by whether simple computer methods could answer a question, not by how the question reads, so many questions look alike. That limits how well wording alone can tell them apart. A better-labelled version is planned. - English only. Questions are read up to 128 tokens. ## About the maker thinker-34M was built by **Vrishvardhan Sharma** ([vrishv](https://huggingface.co/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](https://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](https://huggingface.co/spaces/vrishv/graphics-studio)**: a free Space that makes and edits images, videos, music and narration. - **[Viveka-34M](https://huggingface.co/vrishv/Viveka-34M)**: his small language model, trained from scratch, that this model is built on. - **[Shodhana-34M](https://huggingface.co/vrishv/Shodhana-34M)**: Viveka trained further to correct lines misread by a handwriting reader. - **[Jigyasa Simple](https://huggingface.co/datasets/vrishv/jigyasa-simple)**: 473 everyday science questions with short, plain-text answers. - **[Jigyasa Medium](https://huggingface.co/datasets/vrishv/jigyasa-medium)** and **[Jigyasa Big](https://huggingface.co/datasets/vrishv/jigyasa-big)**: 969 and 970 deeper science questions, built from his own questions, with answers of up to 7 and 10 sentences. - **[router-34M](https://huggingface.co/vrishv/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](https://vrishvardhan.in). CC BY-NC 4.0 © 2026 Vrishvardhan Sharma.