Run this model with HF Jobs
Run AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16") model = AutoModelForCausalLM.from_pretrained("AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16
- SGLang
How to use AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16 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 "AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16 with Docker Model Runner:
docker model run hf.co/AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16
prabhasa-nyaya 3B — order + volume + 16 confusable negatives (arm_c_ordervol_discrim16)
The best configuration as of 2026-09-22. It adds 16 "looks like section X but isn't" training cases, which bring false proofs under the 2% ceiling.
| Measure | Result |
|---|---|
| Proofs accepted by the Lean checker | 108 / 377 (28.65%) |
| False proofs on cases that should not apply | 4 / 389 (1.03%): under the 2% ceiling |
| Correct refusals | 7 / 389 (1.8%): far below the 90% target |
195 of the 263 malformed outputs declare ELEMENT elN GUNA where NODE elN GUNA belongs. No training row does this; the error arises during training.
How it was trained
- Base:
Qwen/Qwen2.5-3B(the pretrained base, not Instruct), with full-parameter supervised fine-tuning on the local RTX 5090 (about 14 min, ~24 GB peak). - Prompts: raw text, not a chat template. The model was trained on the raw prompt format rendered by
render_prompt()inprabhasa_nyaya/p2b_preflight.py; chat-formatted prompts are off-distribution. - Data: the P2b training tiers of
AxisMeru/prabhasa-nyaya(private): 344 teacher-written, Lean-verified proof/omission examples over 14 Indian statute readings (IPC 405/415/416/182, BNS 46/47/69/85), plus abstain and statute-identification rows. The abstain tier was downsampled from 5,255 to 1,000 rows and trained before the proofs ("order + volume"), which fixed an earlier collapse onto a single repeated template. - Output: a line-by-line structured proof (the "wire" format: NODE / CLAIM / PRATIJNA / HETU / UDAHARANA / UPANAYA / NIGAMANA / HETVABHASA / CITE / ABSTAIN / ANSWER) that a compiled Lean 4 checker (sha-pinned
9bff8f30) accepts or rejects.
How it was evaluated
Grammar-constrained decoding (WireGrammarLogitsProcessor, repetition_penalty 1.15) on the frozen P2b evaluation set: 377 cases where a section applies and 389 where it should not. Figures are single runs, one seed.
Limits — read before use
- Research artifact, not legal advice. Covers 14 statute readings only; no case law.
- Correct refusal is not solved: most "should not apply" cases produce malformed output rather than a clean abstention.
- Scores are meaningful only with the constrained decoder and the Lean checker. Unconstrained free generation is much worse.
- Licence: a derivative of Qwen2.5-3B under the Qwen Research Licence (included). Non-commercial research use; commercial use requires permission from Alibaba Cloud. Built with Qwen.
Part of the Prabhāsa-Nyāya programme (AxisMeru). Training metrics are in training_metrics.json; the evaluation summary is in eval_summary.json.
- Downloads last month
- 24
Model tree for AxisMeru/prabhasa-nyaya-step2-sft-arm-c-discrim16
Base model
Qwen/Qwen2.5-3B