Text Generation
MLX
Safetensors
bailing_hybrid
ling
Mixture of Experts
apple-silicon
conversational
custom_code
4-bit precision
Instructions to use rapid-mlx/Ling-3.0-tiny-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use rapid-mlx/Ling-3.0-tiny-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("rapid-mlx/Ling-3.0-tiny-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 rapid-mlx/Ling-3.0-tiny-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 "rapid-mlx/Ling-3.0-tiny-MLX-4bit"
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": "rapid-mlx/Ling-3.0-tiny-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use rapid-mlx/Ling-3.0-tiny-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 "rapid-mlx/Ling-3.0-tiny-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 "rapid-mlx/Ling-3.0-tiny-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"
- MLX LM
How to use rapid-mlx/Ling-3.0-tiny-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 "rapid-mlx/Ling-3.0-tiny-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "rapid-mlx/Ling-3.0-tiny-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": "rapid-mlx/Ling-3.0-tiny-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use rapid-mlx/Ling-3.0-tiny-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 "rapid-mlx/Ling-3.0-tiny-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 rapid-mlx/Ling-3.0-tiny-MLX-4bit
Run Hermes
hermes
| license: mit | |
| base_model: inclusionAI/Ling-3.0-tiny | |
| library_name: mlx | |
| tags: | |
| - mlx | |
| - ling | |
| - bailing_hybrid | |
| - moe | |
| - apple-silicon | |
| pipeline_tag: text-generation | |
| # Ling-3.0-tiny β MLX 4-bit | |
| The first MLX conversion of [inclusionAI/Ling-3.0-tiny](https://huggingface.co/inclusionAI/Ling-3.0-tiny): | |
| a 7.9B-total / **1.3B-active** sparse-MoE reasoner (128 experts, top-8 + 1 shared) | |
| with a KDA + MLA hybrid attention stack and 131K context, MIT licensed. | |
| **4.2 GB at 4.507 bits/weight** β it fits and runs on an 8 GB Apple Silicon Mac. | |
| | | | | |
| |---|---| | |
| | Quantization | 4-bit, group size 64 (router kept 8-bit, short-conv weights fp) | | |
| | Size on disk | 4.2 GB | | |
| | Context | 131,072 tokens | | |
| | Active parameters | 1.3B per token | | |
| | License | MIT (inherited from the base model) | | |
| ## Serve it | |
| The `bailing_hybrid` architecture is not in upstream `mlx-lm` yet β this | |
| checkpoint is served by [rapid-mlx](https://rapidmlx.com), which ships a | |
| verified native implementation (reference parity 1.5e-6 against the | |
| official modeling code): | |
| ```bash | |
| pip install -U rapid-mlx # 0.12.10 or newer | |
| rapid-mlx serve ling-3.0-tiny-4bit | |
| ``` | |
| You get an OpenAI-compatible server on `localhost:8000` with reasoning | |
| (`reasoning_content`) and tool calling parsed natively β thinking is | |
| controlled with `chat_template_kwargs: {"enable_thinking": true}` or the | |
| model's `detailed thinking on/off` system-prompt switch. | |
| Once `mlx-lm` gains native `bailing_hybrid` support, this checkpoint will | |
| load there unchanged. | |
| ## Conversion provenance | |
| Converted with `mlx_lm.convert` (quantize=True, q_bits=4, q_group_size=64) | |
| running rapid-mlx's vendored `bailing_hybrid` implementation | |
| ([PR #1817](https://github.com/raullenchai/Rapid-MLX/pull/1817)), which was | |
| verified against the official `modeling_bailing_moe_v3.py` on identical | |
| random weights to a max logits deviation of 1.5e-6 (full prefill) / | |
| 1.9e-6 (token-by-token incremental) before conversion. End-to-end | |
| chat / reasoning / tool-call behaviour validated on an M2 Pro Mac mini. | |