Instructions to use mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit
Built with mlx-optiq, the MLX-native toolkit to quantize, fine-tune, and serve LLMs locally on Apple Silicon, no PyTorch and no cloud. All OptiQ quants 路 Docs
NVIDIA's Mamba-attention hybrid MoE, running locally on a Mac. This is an OptiQ mixed-precision quant of nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16. 22.8 GB on disk, down from 65.8 GB.
Lightning is a nemotron_h hybrid: Mamba2 state-space blocks with a handful of attention layers, and a 128-expert MoE with 6 experts active per token. The routed experts carry most of the weight, so that is where the bits come from.
What it is
| Property | Value |
|---|---|
| Base | nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16 (~30B total, ~3B active) |
| Method | OptiQ mixed-precision, sensitivity-driven (uniform-4-bit reference) |
| Precision | per-layer 4/8-bit: 36 layers at 4-bit, 127 at 8-bit |
| Experts | 46 fused expert tensors: 36 at 4-bit, 10 at 8-bit |
| On disk | 22.8 GB |
| Speculative decoding | MTP head preserved in optiq/mtp.safetensors |
All 164 quantizable projections were measured. Every 4-bit assignment in the model is an expert tensor: the 128-expert stack is where the size is, and the sweep found it is also where the precision is least needed.
Following llama.cpp's naming for mixed quants, the "4bit" label denotes the family, not the weighted average.
Capability Score
Six-metric mean (the standard OptiQ text eval). Strong code generation; long-context multi-hop retrieval is the weak spot, which is what a hybrid with few attention layers would predict.
| Metric | Score |
|---|---|
| MMLU (5-shot, 969 samples) | 78.9% |
| GSM8K (1000 samples) | 85.5% |
| IFEval (full set, strict) | 68.4% |
| BFCL-V3 simple (200 calls) | 83.0% |
| HumanEval (164 problems, pass@1) | 87.8% |
| HashHop (long-context retrieval) | 40.0% |
| Capability Score (mean of 6) | 73.94 |
Run it
pip install "mlx-optiq>=0.4.20"
import optiq # registers the nemotron_h MoE + MTP sidecar
from mlx_lm import load, generate
model, tok = load("mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit")
msgs = [{"role": "user", "content": "Explain why the sky is blue."}]
prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
print(generate(model, tok, prompt=prompt, max_tokens=600))
It is a reasoning model and emits a <think> block before its answer, so give it room and read the text after </think>.
Serve it on a smaller Mac
At 22.8 GB this does not fit resident on a 24 GB machine. It is a 128-expert MoE, so stream the experts from SSD instead:
optiq serve --model mlx-community/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-OptiQ-4bit --stream-experts
Measured on a 26 GB M4 Pro: 4.2 GB resident, 6.0 GB load peak, against a resident load that runs out of memory. The same policy is available from the library API via OptiqEngine(path, stream_experts="auto"), and from optiq eval --stream-experts for benchmarking.
Links
- Project website: mlx-optiq.com
- Family guide: mlx-optiq.com/docs/nemotron3
- All OptiQ quants: mlx-optiq.com/models
- Base model: nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16
- Downloads last month
- 2,046
4-bit