Instructions to use sankalphs/noir-verdict-nemotron-4b-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sankalphs/noir-verdict-nemotron-4b-merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sankalphs/noir-verdict-nemotron-4b-merged", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sankalphs/noir-verdict-nemotron-4b-merged", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("sankalphs/noir-verdict-nemotron-4b-merged", trust_remote_code=True) 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sankalphs/noir-verdict-nemotron-4b-merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sankalphs/noir-verdict-nemotron-4b-merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sankalphs/noir-verdict-nemotron-4b-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sankalphs/noir-verdict-nemotron-4b-merged
- SGLang
How to use sankalphs/noir-verdict-nemotron-4b-merged 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 "sankalphs/noir-verdict-nemotron-4b-merged" \ --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": "sankalphs/noir-verdict-nemotron-4b-merged", "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 "sankalphs/noir-verdict-nemotron-4b-merged" \ --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": "sankalphs/noir-verdict-nemotron-4b-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use sankalphs/noir-verdict-nemotron-4b-merged with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for sankalphs/noir-verdict-nemotron-4b-merged to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for sankalphs/noir-verdict-nemotron-4b-merged to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for sankalphs/noir-verdict-nemotron-4b-merged to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="sankalphs/noir-verdict-nemotron-4b-merged", max_seq_length=2048, ) - Docker Model Runner
How to use sankalphs/noir-verdict-nemotron-4b-merged with Docker Model Runner:
docker model run hf.co/sankalphs/noir-verdict-nemotron-4b-merged
Use Docker
docker model run hf.co/sankalphs/noir-verdict-nemotron-4b-mergednoir-verdict-nemotron-4b-merged
How to use
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "sankalphs/noir-verdict-nemotron-4b-merged"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo, torch_dtype=torch.bfloat16, trust_remote_code=True,
).cuda().eval()
Chat template
The chat template is the Nemotron 3 chat template, with
enable_thinking=False baked in. The system prompt for an active
interrogation is built by engine/prompts.py:build_system_prompt(...).
messages = [
{"role": "system", "content": "You are Greta Lindholm, junior continuity writer at WJBK. ..."},
{"role": "user", "content": "Where were you at the time of the theft?"},
]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
Inference tips
n_ctx≥ 4096temperature0.6–0.7,top_p0.9–0.95max_new_tokens180–280 per turn- Stop on
<|im_end|>
How it was trained
- Image:
nvidia/cuda:12.8.1-devel-ubuntu22.04+ Python 3.13 - Pip deps:
torch>=2.8.0,triton>=3.4.0,unsloth_zoo[base] @ git+https://github.com/unslothai/unsloth-zoo,unsloth[base] @ git+https://github.com/unslothai/unsloth,--torch-backend=cu128 - Native:
causal-conv1d==1.6.2.post1andmamba-ssm==2.3.2.post1compiled from source with--no-build-isolation,CC=gcc,CXX=g++(no prebuilt cu128 + Py3.13 wheel exists) - Trainer: TRL
SFTTrainer, packing, bf16, Unsloth LoRA (r=16, alpha=32, lr=2e-4 cosine, bs=2 grad_accum=8, 240 steps) - Orchestrator:
train/modal_finetune.py
5-case smoke results (A10G, --n-gpu-layers 99)
| case | suspect | personality | truth_mode | failure_flags |
|---|---|---|---|---|
| 0 | Greta Lindholm | nervous | lie | none |
| 37 | (37, 1) | helpful | partial_truth | none |
| 113 | (113, 2) | arrogant | truth | none |
| 241 | (241, 3) | evasive | deflect | none |
| 497 | Greta Lindholm | nervous | lie | none |
Pace: ~125 tokens/sec on A10G. No role-token leaks, no leaked <think> blocks, no overlong generations.
Companion artifacts
- LoRA: sankalphs/noir-verdict-nemotron-4b-lora
- Merged BF16: sankalphs/noir-verdict-nemotron-4b-merged (7.95 GB)
- Q4_K_M GGUF: sankalphs/noir-verdict-nemotron-4b-gguf (2.84 GB)
- Traces: sankalphs/noir-verdict-traces
- App: build-small-hackathon/noir-verdict
License
Apache-2.0. The base Nemotron 3 Nano weights are governed by NVIDIA's model license; the adapter and training code in this repo are Apache-2.0.
- Downloads last month
- 18
Model tree for sankalphs/noir-verdict-nemotron-4b-merged
Base model
nvidia/NVIDIA-Nemotron-Nano-12B-v2-Base
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "sankalphs/noir-verdict-nemotron-4b-merged"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sankalphs/noir-verdict-nemotron-4b-merged", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'