Instructions to use AxisMeru/nyaya-element-judge-4b-v6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AxisMeru/nyaya-element-judge-4b-v6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AxisMeru/nyaya-element-judge-4b-v6") 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/nyaya-element-judge-4b-v6") model = AutoModelForCausalLM.from_pretrained("AxisMeru/nyaya-element-judge-4b-v6", 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/nyaya-element-judge-4b-v6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AxisMeru/nyaya-element-judge-4b-v6" # 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/nyaya-element-judge-4b-v6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AxisMeru/nyaya-element-judge-4b-v6
- SGLang
How to use AxisMeru/nyaya-element-judge-4b-v6 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/nyaya-element-judge-4b-v6" \ --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/nyaya-element-judge-4b-v6", "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/nyaya-element-judge-4b-v6" \ --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/nyaya-element-judge-4b-v6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AxisMeru/nyaya-element-judge-4b-v6 with Docker Model Runner:
docker model run hf.co/AxisMeru/nyaya-element-judge-4b-v6
nyaya-element-judge-4b-v6 (full fine-tune)
Part of Prabhฤsa-Nyฤya, our own trained Indian-legal models behind the Pravrudhi-Nyaya product. This version is not the one the product serves.
Status: Not promoted. Not for use. This model was trained but not promoted, and it does not replace the production judges. A check of its training data found text that is also in the training split of a non-commercial benchmark. That overlap has not been cleared. This model is published for inspection and kept here as a record only. The training rows are not published. It is not a released or promoted model, and no performance claim is made on this card.
Label: v6. A full fine-tune continuing the earlier 4B element judge.
Training data: real court-derived rows plus constructed rows. The real rows were extracted from court judgments by a pipeline with two model readers and no human review; the labels are therefore pipeline-measured, not human-reviewed.
Some of the not-established training rows carry a generic or weak supporting quote. Every label comes from two model readers that agreed; no human reviewed them. The checker that admits training rows is being changed to test that a quote speaks to its element; this model was trained before that change.
In plain words: a model could learn that rows from one source tend to carry one label, and this was not controlled.
Known uncontrolled shortcut channel: source-correlated label rate (gate A2 T2 not binding for mixed-source TRAINs per D-GATE-A2-MIXED rev2); reported descriptively; safety rests on the post-training stops.
Licence and attribution
Licence: Apache License 2.0, the licence of the base model Qwen/Qwen3-4B (its card and LICENSE read on 17 October 2026). This is a modified (fully fine-tuned) copy of the base model and is released under the same licence; see LICENSE and NOTICE.
Credit: some of the training examples are built from the Indian High Court Judgments data set (Dattam Labs, licensed CC BY 4.0, https://registry.opendata.aws/indian-high-court-judgments), selected and annotated by us.
Files: LICENSE, NOTICE, model.safetensors, config.json, generation_config.json, tokenizer files, chat_template.jinja, training_args.bin, FINAL_SHAS.txt (per-file sha256 of the trainer's output; verify with sha256sum -c FINAL_SHAS.txt).
Training setup (recipe): full fine-tune, bf16, 8-bit AdamW, learning rate 2e-6 cosine, effective batch 16 (micro-batch 2 x accumulation 8), max length 2048, one epoch, seed 42, one run, final step only. Trained on a single H100 80GB pod (not the 5090).
Dev-stack, local; exploratory; no promotion and no improvement claim.
Not legal advice; a lawyer decides.
- Downloads last month
- 895