Instructions to use OsaurusAI/LFM3-VL-2B-JANG_6M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OsaurusAI/LFM3-VL-2B-JANG_6M with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("OsaurusAI/LFM3-VL-2B-JANG_6M") config = load_config("OsaurusAI/LFM3-VL-2B-JANG_6M") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use OsaurusAI/LFM3-VL-2B-JANG_6M with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "OsaurusAI/LFM3-VL-2B-JANG_6M"
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": "OsaurusAI/LFM3-VL-2B-JANG_6M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use OsaurusAI/LFM3-VL-2B-JANG_6M 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 "OsaurusAI/LFM3-VL-2B-JANG_6M"
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 OsaurusAI/LFM3-VL-2B-JANG_6M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use OsaurusAI/LFM3-VL-2B-JANG_6M with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "OsaurusAI/LFM3-VL-2B-JANG_6M"
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 "OsaurusAI/LFM3-VL-2B-JANG_6M" \ --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"
OsaurusAI/LFM3-VL-2B-JANG_6M
JANG_6M build of LiquidAI/LFM3-VL-2B for Apple Silicon. LFM3-VL 2B: the LFM3 trunk with a 14-layer conv/attention vision tower; thinking on by default.
8-bit token mixers, 6-bit FFN, and every quantized matrix calibrated with GPTQ on the exact storage grid plus activation-aware scaling, using calibration data weighted toward tool calls, terminal agents, reasoning and code.
Bundle
| Modalities | text, images, video |
| On-disk size | 1.90 GiB (one shard), float16 |
| Attention q/k/v/o, short-conv in/out projections | 8-bit affine, group 32, GPTQ |
| FFN w1 / w3 / w2 | 6-bit affine, group 32, AWQ + GPTQ |
| Tied embedding / lm_head | 8-bit affine, group 32 (it is the output head) |
| Kept at full precision | attention output gate, depthwise conv kernels, all norms, vision tower and projector |
| GPTQ | 142/142 tensors: fixed min-max grid (byte-identical layout to mx.quantize), act-order, Hessians accumulated over every calibration token, w2 Hessian rebuilt through the already-quantized w1/w3, best-of-RTN guard; mean calibration reconstruction error -52.9% vs round-to-nearest |
| AWQ | channel scales (alpha 0.25, clip 0.5-2) folded into ffn_norm and w3 rows; function-preserving, no runtime cost |
Calibration (634,978 tokens)
Every sample is rendered through the model's own chat template: structured tools, assistant
tool calls in LFM3's <tool_call><function=...> form, tool results as tool turns, and agent
thoughts inside <think>. Part of the set is the model's own answers (card sampling) to
reasoning, tool, terminal and coding prompts, so its serving distribution is in calibration.
| domain | tokens |
|---|---|
| tool calling (Hermes, native XML calls) | 166,403 |
| terminal / SWE agent trajectories | 175,686 |
| reasoning (long traces) | 106,871 |
| coding and agentic text | 66,629 |
| general, science, systems, security, multilingual, long context | 37,598 |
| images (photos, screenshots, documents) | 81,791 |
Measured against the bf16 source
69 held-out sequences never seen in calibration (15,021 scored positions: tool calls, terminal and SWE agents, reasoning, code, general text, images). KL divergence in nats per position (lower is better); top-1 is argmax agreement with bf16.
| build | size | KL median | KL mean | KL p95 | top-1 |
|---|---|---|---|---|---|
| this bundle | 1.90 GiB | 0.00012 | 0.00197 | 0.0069 | 98.67% |
| same layout, round-to-nearest | 1.90 GiB | 0.00018 | 0.00281 | 0.0092 | 98.44% |
| uniform 6-bit gs64 (mlx-vlm default recipe) | 1.66 GiB | 0.00045 | 0.00665 | 0.0242 | 97.54% |
Use
- Runtimes with LFM3 support: vMLX / Osaurus (vmlx-swift with LFM3, Osaurus with LFM3 media support), and mlx-vlm with the LFM3 port.
- Thinking: on by default (
enable_thinking). Tool calls: XML function format. Sampling defaults: temperature 0.1, top_k 50, repetition_penalty 1.1. - License: LFM Open License v1.0 (see
LICENSE), same as the base model.
- Downloads last month
- 3
6-bit
