Instructions to use JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L 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("JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L") 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 JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L"
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": "JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L 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 "JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L"
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 JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L
Run Hermes
hermes
- OpenClaw new
How to use JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L"
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 "JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L" \ --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 JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L", "messages": [ {"role": "user", "content": "Hello"} ] }'
MLX Studio — the only app that natively supports JANG models with reasoning
397B intelligence on a 128 GB Mac. This model fits in 112 GB — the first 397B quantization that runs on M4 Pro/Max 128 GB machines. Uses reasoning mode for 86.5% MMLU accuracy.
LM Studio, Ollama, oMLX do NOT support JANG format. Use MLX Studio or
pip install "jang[mlx]>=2.1.5".
Qwen3.5-397B-A17B — JANG_1L (2.1-bit, 8-bit attention) — Reasoning + VLM
JANG — Jang Adaptive N-bit Grading | The GGUF Equivalent for MLX
JANG is fully open-source. Quantization engine, research, and full commit history: github.com/jjang-ai/jangq. Created by Jinho Jang.
Key Features
- 86.5% MMLU (200 questions, reasoning mode) — 397B on 128 GB Macs
- 36.1 tok/s generation, 96 tok/s prefill
- 112 GB on disk, 110 GB GPU RAM (peak 120 GB)
- Reasoning mode:
<think>...</think>step-by-step problem solving - Vision (VLM): 333 vision tensors, 31.6 tok/s image processing
- bfloat16 compute: auto-detected for 512-expert models
Results: JANG_1L vs MLX 4-bit (200-question MMLU)
Per-subject comparison across all modes. Both JANG and MLX 4-bit tested with and without reasoning.
| Subject | JANG No-Think | JANG Reasoning | MLX 4-bit No-Think | MLX 4-bit Reasoning |
|---|---|---|---|---|
| Abstract Algebra | 8/20 | 10/20 | 10/20 | 17/20 |
| Anatomy | 17/20 | 19/20 | 18/20 | 19/20 |
| Astronomy | 20/20 | 20/20 | 19/20 | 19/20 |
| College CS | 17/20 | 18/20 | 15/20 | 18/20 |
| College Physics | 17/20 | 18/20 | 15/20 | 19/20 |
| HS Biology | 19/20 | 20/20 | 19/20 | 19/20 |
| HS Chemistry | 17/20 | 18/20 | 17/20 | 19/20 |
| HS Mathematics | 8/20 | 10/20 | 12/20 | 19/20 |
| Logical Fallacies | 20/20 | 20/20 | 19/20 | 20/20 |
| World Religions | 19/20 | 20/20 | 19/20 | 19/20 |
| Total | 162/200 (81.0%) | 173/200 (86.5%) | 163/200 (81.5%) | 188/200 (94.0%) |
Summary
| JANG_1L | JANG_2L | MLX 4-bit | MLX 2/3-bit | |
|---|---|---|---|---|
| MMLU (no-think) | 81.0% | 79.5% | 81.5% | NaN -- cannot run |
| MMLU (reasoning) | 86.5% | 92.0% | 94.0% | NaN -- cannot run |
| Size | 112 GB | 187 GB | 209 GB | N/A |
| GPU RAM | 110 GB | 184 GB | ~210 GB | N/A |
| Speed | 36.1 tok/s | 36.0 tok/s | ~36 tok/s | N/A |
| Fits 128 GB? | YES | No | No | N/A |
JANG_1L is 97 GB smaller than MLX 4-bit and fits on 128 GB Macs where MLX 4-bit (209 GB) cannot run. MLX 2-bit and 3-bit produce NaN -- cannot run (float16 overflow on 512-expert models). JANG solves this with bfloat16.
Specs
| Metric | Value |
|---|---|
| Source | Qwen3.5-397B-A17B |
| Architecture | Hybrid MoE + SSM (GatedDeltaNet + Full Attention) |
| Experts | 512 per layer, top-10 active (17B active params) |
| Profile | JANG_1L (CRITICAL=8, IMPORTANT=8, COMPRESS=2) |
| Average bits | 2.13 bpw |
| Disk size | 112 GB |
| GPU RAM | 110 GB (peak 120 GB) |
| Speed | 36.1 tok/s generation, 96 tok/s prefill |
| Compute | bfloat16 (auto-detected) |
| VLM | 333 vision tensors, 31.6 tok/s |
Requirements
- Apple Silicon Mac with 128+ GB unified memory
- MLX Studio (recommended) or
pip install "jang[mlx]>=2.1.5"
Quick Start
pip install "jang[mlx]>=2.1.5"
from jang_tools.loader import load_jang_model
from mlx_lm import generate
model, tokenizer = load_jang_model("JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L")
# With reasoning
messages = [{"role": "user", "content": "Prove that sqrt(2) is irrational."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False,
add_generation_prompt=True, enable_thinking=True)
result = generate(model, tokenizer, prompt=prompt, max_tokens=2048)
# Without reasoning (faster)
prompt = tokenizer.apply_chat_template(messages, tokenize=False,
add_generation_prompt=True, enable_thinking=False)
result = generate(model, tokenizer, prompt=prompt, max_tokens=100)
VLM Usage
from jang_tools.loader import load_jang_vlm_model
from mlx_vlm import generate as vlm_generate
model, processor = load_jang_vlm_model("JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L")
messages = [{"role": "user", "content": [
{"type": "image"},
{"type": "text", "text": "Describe this image."},
]}]
prompt = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
result = vlm_generate(model, processor, prompt=prompt, image=["photo.jpg"], max_tokens=200)
Technical Notes
- bfloat16: 512-expert models overflow float16 (max 65,504) at the shared expert down_proj. JANG auto-detects and uses bfloat16 (max 3.4x10^38). Zero quality impact.
- JANG_1L profile: 8-bit for all attention + routers + embeddings, 2-bit for expert MLP. On MoE models, expert MLP is 97.9% of params — so 2-bit covers almost everything while critical components get maximum precision.
JANG — Created by Jinho Jang (eric@jangq.ai) · @dealignai
GitHub · PyPI · HuggingFace
한국어
JANG_1L은 Qwen3.5-397B를 128 GB Mac에서 실행할 수 있는 최초의 양자화입니다. 112 GB, 36 tok/s, 86.5% MMLU.
pip install "jang[mlx]>=2.1.5"
- Downloads last month
- 122
Quantized
Model tree for JANGQ-AI/Qwen3.5-397B-A17B-JANG_1L
Base model
Qwen/Qwen3.5-397B-A17B
