Instructions to use nativ-community/LFM3-VL-2B-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nativ-community/LFM3-VL-2B-4bit 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("nativ-community/LFM3-VL-2B-4bit") config = load_config("nativ-community/LFM3-VL-2B-4bit") # 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 nativ-community/LFM3-VL-2B-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 "nativ-community/LFM3-VL-2B-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": "nativ-community/LFM3-VL-2B-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use nativ-community/LFM3-VL-2B-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 "nativ-community/LFM3-VL-2B-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 nativ-community/LFM3-VL-2B-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use nativ-community/LFM3-VL-2B-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 "nativ-community/LFM3-VL-2B-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 "nativ-community/LFM3-VL-2B-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"
LFM3-VL-2B · 4bit
Native MLX text and image/video generation.
Converted from lq-preview/LFM3-VL-2B at 6a5dd2481695581b7838c7e66164b72d792f6bac.
Conversion implementation: 5d5ff5af600ec99ce01a833697a4aa1417844ce3 (recorded in conversion.json).
Public inference code: Blaizzy/mlx-vlm.
Weights: affine 4-bit, group size 64. Multimodal towers/projectors remain BF16. Activations and KV caches are not quantized.
Usage
Install the pinned public implementation:
pip install 'mlx-vlm @ git+https://github.com/Blaizzy/mlx-vlm.git@3070dcc31948f48f9d8639b606af7bc019494fac'
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
model, processor = load("nativ-community/LFM3-VL-2B-4bit", trust_remote_code=False)
prompt = apply_chat_template(processor, model.config, "What is 17 + 25?", enable_thinking=False)
print(generate(model, processor, prompt, max_tokens=128, temperature=0).text)
prompt = apply_chat_template(processor, model.config, "What is in this image?", num_images=1, enable_thinking=False)
print(generate(model, processor, prompt, image=["image.png"], max_tokens=128, temperature=0).text)
Validation
Strict native reload on Apple M3 Ultra, MLX 0.32.4; no remote Python code is executed. These are short capability smoke checks, not a general quality benchmark. Exact inputs, outputs, expectations and BF16 comparisons are in validation.json.
| Check | Result |
|---|---|
| finite_logits | completed; expected result matched |
| arithmetic | 42 |
| capital | The capital of Australia is Canberra. |
| image_ocr | 5739 |
| video_ocr | 5739 |
Fixture mismatches: none on these fixtures. The recorded results are retained even when a quantized answer differs.
The native helper defaults to thinking off; pass enable_thinking=True to use the checkpoint template's thinking behavior. Low-bit quantization can change reasoning and tool-use quality. These short checks do not establish long-context or broader benchmark parity.
The source revision, implementation commit, precision, and tensor audit are in conversion.json; SHA256SUMS covers the release files. The original checkpoint terms apply: see LICENSE and ORIGINAL_MODEL_CARD.md. No new weight license is assigned.
- Downloads last month
- 19
4-bit
Model tree for nativ-community/LFM3-VL-2B-4bit
Base model
lq-preview/LFM3-VL-2B