Instructions to use Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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("Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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 Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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 "Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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": "Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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 "Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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 "Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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 Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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 "Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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 "Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-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"
Nanbeige4.2-3B-CE v1.0 — MLX 4-bit
Native MLX 4-bit release of Nanbeige4.2-3B-CE v1.0, a Computer Engineering and systems-focused fine-tune of Nanbeige/Nanbeige4.2-3B.
Canonical merged BF16 release:
Irfanuruchi/Nanbeige4.2-3B-CE-v1.0
Quantization
- Format: MLX
- Quantization: 4-bit affine
- Group size: 64
- Effective quantization reported by MLX-LM: 4.500 bits per weight
- Approximate release size: 2.2 GB
The converted config preserves the native Nanbeige architecture, including:
model_type = nanbeigenum_loops = 2skip_loop_final_norm = false- 22 hidden layers
- hidden size 3072
- intermediate size 10752
- 48 attention heads
- 8 KV heads
- configured context length 262144
- vocabulary size 166144
Conversion provenance
Converted from the frozen canonical v1.0 source:
- Source repo:
Irfanuruchi/Nanbeige4.2-3B-CE-v1.0 - Source revision:
v1.0 - Source commit:
171d26c743c6f1f5e3fd49f88c0454448a28c39e - MLX-LM commit:
6d21ce4b065a2e163fa6de76a9936c61aeb5784a - MLX-LM version:
0.32.0 - MLX version:
0.32.2 - Python:
3.12.14 - Validation platform: Apple Silicon arm64
The original Transformers auto_map metadata and copied Nanbeige Python implementation files were removed after conversion because this release uses MLX-LM's native mlx_lm.models.nanbeige implementation. The MLX model weights were verified unchanged by that cleanup.
Runtime validation
Validated locally on Apple Silicon with native MLX-LM loading:
- Model class:
mlx_lm.models.nanbeige.Model - Inner model class:
mlx_lm.models.nanbeige.NanbeigeModel num_loops = 2skip_loop_final_norm = false- Tokenizer:
LlamaTokenizer
A deterministic runtime smoke test with thinking disabled generated:
Docker 127.0.0.11 is the Docker embedded DNS resolver. On a user-defined Docker network, containers can query it for Docker-internal DNS names.
Observed on the validation machine:
- Generation: about 32.5 tokens/s
- Peak memory: about 2.6 GB
These numbers are validation observations from one Apple Silicon system, not general performance guarantees.
Current Transformers may emit a warning that it is loading a nanbeige config into an unregistered Transformers model type. In the validated MLX-LM stack this is a tokenizer/config warning; MLX-LM still selects and runs its native Nanbeige implementation.
Usage
Install a version of MLX-LM with native Nanbeige support, then run:
mlx_lm.generate \
--model Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-4bit \
--prompt "What is Docker 127.0.0.11 on a user-defined network?" \
--max-tokens 96 \
--temp 0 \
--chat-template-config '{"enable_thinking": false}'
SHA-256
See SHA256SUMS for hashes of the complete release package.
Frozen MLX weight SHA-256:
f2366b73171c0ce3dc6606c804c2b8c2b37d609eac0d4e1721abc0cd8106ab29
Validation and limitations
This is a deployment conversion of the frozen Nanbeige4.2-3B-CE v1.0 model. Quantization does not create a new training checkpoint or a new factual-quality release gate.
The source v1.0 checkpoint is the best validated release checkpoint selected during development, but it is not claimed to be perfect. Some known precision/factual weaknesses remain in difficult systems questions. Refer to the canonical BF16 model card for the primary validation notes and limitations.
License
Apache-2.0. See LICENSE.
Base model: Nanbeige/Nanbeige4.2-3B.
- Downloads last month
- 30
4-bit
Model tree for Irfanuruchi/Nanbeige4.2-3B-CE-v1.0-MLX-4bit
Base model
Nanbeige/Nanbeige4.2-3B-Base