Instructions to use netprojects/h2o-lightning-4b-mlx-q8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use netprojects/h2o-lightning-4b-mlx-q8 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("netprojects/h2o-lightning-4b-mlx-q8") config = load_config("netprojects/h2o-lightning-4b-mlx-q8") # 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 netprojects/h2o-lightning-4b-mlx-q8 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/h2o-lightning-4b-mlx-q8"
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": "netprojects/h2o-lightning-4b-mlx-q8" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use netprojects/h2o-lightning-4b-mlx-q8 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 "netprojects/h2o-lightning-4b-mlx-q8"
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 netprojects/h2o-lightning-4b-mlx-q8
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use netprojects/h2o-lightning-4b-mlx-q8 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/h2o-lightning-4b-mlx-q8"
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 "netprojects/h2o-lightning-4b-mlx-q8" \ --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"
H2O-Lightning-4B — MLX 8-bit
An 8-bit MLX conversion (affine, group size 64; mlx-vlm 0.7.8) of h2oai/h2o-lightning-4b v1.4.0, for Apple Silicon. 4.8 GB. Supports H2O's two-way reading and Box questions.
Published by NetProjects (Internet Projects Ltd). Not affiliated with H2O.ai.
This is a decision model, not a chat model. It returns a probability for each answer option (or, for a Box question, a bounding box), not free text.
Serve it with the H2O shim, not with
mlx_lm.serveror a plainmlx_vlmgenerate call. The generic "Use this model" snippets Hugging Face shows for MLX models do not return the label probabilities this model is made for. The commands below set it up with H2O's official shim, unmodified, on top of h2o-lightning-mlx, which reads the label log-probabilities with a float32 head, as the original does on vLLM.
JevBench public (231, JevBench v1.2.1, --adapter typesafe) |
two-way | one-way |
|---|---|---|
| this checkpoint | 206 / 231 (48/48 · 72/72 · 86/111) | 202 / 231 |
| original weights on MLX (bf16) | 206 / 231 | 203 / 231 |
| H2O's model card (vLLM) | 206 / 231 | — |
| vs bf16 on MLX | 231 / 231 answers identical; probability drift mean 0.002, p95 0.012 | 230 / 231 identical |
The same score as H2O's own result, tier by tier; the recommended MLX build.
Two-way reading. H2O v1.3+ answers under two attention patterns, and two-way is its recommended default. This build serves both from one engine: a request picks "attention_mode": "two-way" or "one-way", and two-way is the default. Before its first two-way answer, H2O's shim checks the engine against the answers H2O recorded on the release weights; this build matches them to within 0.012 (tolerance 0.05).
Box questions (always on since v1.4.0): ask for a bounding box of a named object in an image and get box, a calibrated confidence, present and found. The facade answers H2O's guided box generation exactly as the shim requests it. On H2O's receipt example, the box for the total-amount line has confidence 0.96.
Speed (MacBook Pro M5 Max, 25 October 2026, through serve.sh, one request at a time): about 63 ms per JevBench item; a 2,000-token record in 0.45 s two-way and 0.39 s one-way; a 32K-token state in 14.5 s two-way and 7.7 s one-way. Two-way memory grows quickly with long inputs (MLX peak 55 GB at 32K tokens, against 8.9 GB one-way): for long inputs on a Mac with less than 64 GB, use one-way.
Images. Image input works through the unchanged shim. On H2O's own receipt example this build gives the same answers as the original weights. It is not a reproduction of H2O's image benchmark.
About v1.4.0 (from H2O's card): a new fine-tune with images in its training data, stronger than v1.3.2 on H2O's held-out decision skills, and weaker on retrieval (product-search relevance) and on choosing a function to call. If your work is mostly tool-call selection, compare with the v1.3.1 revision on your own data.
Limits (as for the original): mostly evaluated in English; works best with about 16 answer options or fewer; no explanations and no video input.
git clone https://github.com/internet-projects/h2o-lightning-mlx && cd h2o-lightning-mlx && ./setup.sh
hf download netprojects/h2o-lightning-4b-mlx-q8 --local-dir mlx-q8
MODEL=mlx-q8 ./serve.sh # http://127.0.0.1:8741/v1/systemone
Versions. main is H2O v1.4.0 (updated 25 October 2026). Earlier builds stay available: H2O v1.3.1 (two-way, 203 / 231) with --revision v1.3.1, and H2O v1.2.3 (one-way, 205 / 231) with --revision v1.2.3; use each with the matching tag in the GitHub repo (git checkout v1.3.1).
Full precision: use the original weights, h2oai/h2o-lightning-4b, with the same repo and shim. There is no separate bf16 copy here.
Credits: H2O.ai (H2O-Lightning-4B, Apache-2.0), Qwen team (Qwen3.5-4B, Apache-2.0). This conversion is not affiliated with H2O.ai.
- Downloads last month
- 466
8-bit