Instructions to use nativ-community/LFM3-1.7B-5bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nativ-community/LFM3-1.7B-5bit 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("nativ-community/LFM3-1.7B-5bit") 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 nativ-community/LFM3-1.7B-5bit 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-1.7B-5bit"
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-1.7B-5bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use nativ-community/LFM3-1.7B-5bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "nativ-community/LFM3-1.7B-5bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "nativ-community/LFM3-1.7B-5bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nativ-community/LFM3-1.7B-5bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use nativ-community/LFM3-1.7B-5bit 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-1.7B-5bit"
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-1.7B-5bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use nativ-community/LFM3-1.7B-5bit 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-1.7B-5bit"
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-1.7B-5bit" \ --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-1.7B ยท 5bit
Native MLX text generation.
Converted from lq-preview/LFM3-1.7B at c74a294117b6c4e0371af0d74be7d9cc0e90bfe9.
Conversion implementation: 5d5ff5af600ec99ce01a833697a4aa1417844ce3 (recorded in conversion.json).
Public inference code: Blaizzy/mlx-vlm.
Weights: affine 5-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-1.7B-5bit", 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)
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 | 17 + 25 = 42 42 |
| capital | The capital of Australia is Canberra. |
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
- 176
5-bit
Model tree for nativ-community/LFM3-1.7B-5bit
Base model
lq-preview/LFM3-1.7B