Instructions to use leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx 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("leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx") 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 leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx"
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 "leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx" \ --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 LM
How to use leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx 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 "leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx"
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 leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx
Run Hermes
hermes
- Atomic Chat
Nemotron-3.5-Lightning-30B-A3B — 6-bit XL (MLX)
MLX 6/8-bit BaseQuant_XL quantization of nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16 for Apple Silicon inference.
About XL Quantization
BaseQuant_XL is a data-agnostic static mixed-precision recipe — no calibration data, no iMatrix, no activation-weighted sampling. It allocates precision by layer importance using a simple heuristic: routing-critical layers stay at full precision, every-token layers get 8-bit (near-lossless), and sparse MoE experts get 6-bit (natural redundancy from 128 experts, only 6 active per token). This contrasts with data-dependent methods (iMatrix, AWQ, GPTQ, oQ, oQ4e) that can skew representation toward well-represented domains.
Quantization Recipe (BaseQuant_XL 6/8)
| Precision | Layers | Rationale |
|---|---|---|
| bf16 | lm_head, shared expert |
Routing/output-critical — errors here are qualitatively different |
| 8-bit | embeddings, attention (q/k/v/o_proj), Mamba2 (in_proj, out_proj, conv1d) | Every-token layers — 8-bit is near-lossless |
| 6-bit | routed experts (128 experts × 23 MoE layers + MTP MoE) | Bulk parameters — natural redundancy tolerates lower precision |
The MoE router gate (gate.weight, e_score_correction_bias) is kept in full precision as bare arrays (not quantizable layers).
- 6.834 bits per weight, ~25 GB (6 shards)
- Group size: 64
Model Architecture
Nemotron-H — hybrid Mamba2 + Transformer + MoE architecture:
- 52 layers: 23 Mamba2 (SSM), 6 Attention, 23 MoE
- 1 NextN (MTP) prediction layer: [attention, moe] — Multi-Token Prediction for speculative decoding
- 30B total parameters, ~3B active per token (6 of 128 experts active)
- 1 shared expert with
shared_expert_overlap: true mlp_hidden_act: relu2,routed_scaling_factor: 2.5tie_word_embeddings: false- Context length: 262,144 tokens
- ChatML-style template with
<think>reasoning and tool-call support
What Makes Lightning Different
- Mamba-2 hybrid architecture — interleaves SSM layers with MoE/Attention for higher throughput and lower memory than pure Transformer
- Multi-Token Prediction (MTP) — trained with MTP layers that predict multiple future tokens, enabling self-speculative decoding
- 3B active / 30B total — efficient for single-device deployment
Inference Parameters
temperature: 1.0
top_p: 0.95
top_k: 40
min_p: 0.01
repeat_penalty: 1.05
reasoning_parser: nemotron_v3
tool_call_parser: qwen3_coder
Thinking mode is controlled via the chat template kwarg enable_thinking (default: true).
Usage
from mlx_lm import load, generate
model, tokenizer = load("leonsarmiento/Nemotron-3.5-Lightning-30B-A3B-6bit-XL-mlx")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "Explain quantum entanglement."}],
add_generation_prompt=True,
)
response = generate(model, tokenizer, prompt=prompt, max_tokens=512)
print(response)
Also compatible with LM Studio and oMLX — point it at the model directory.
- Downloads last month
- 289
6-bit