Instructions to use lm-kit/h2o-lightning-4b-lmk with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use lm-kit/h2o-lightning-4b-lmk with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf lm-kit/h2o-lightning-4b-lmk:Q4_K_M # Run inference directly in the terminal: llama cli -hf lm-kit/h2o-lightning-4b-lmk:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf lm-kit/h2o-lightning-4b-lmk:Q4_K_M # Run inference directly in the terminal: llama cli -hf lm-kit/h2o-lightning-4b-lmk:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf lm-kit/h2o-lightning-4b-lmk:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf lm-kit/h2o-lightning-4b-lmk:Q4_K_M
Use Docker
docker model run hf.co/lm-kit/h2o-lightning-4b-lmk:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use lm-kit/h2o-lightning-4b-lmk with Ollama:
ollama run hf.co/lm-kit/h2o-lightning-4b-lmk:Q4_K_M
- Unsloth Desktop
- Pi
How to use lm-kit/h2o-lightning-4b-lmk with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lm-kit/h2o-lightning-4b-lmk:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "lm-kit/h2o-lightning-4b-lmk:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use lm-kit/h2o-lightning-4b-lmk with Docker Model Runner:
docker model run hf.co/lm-kit/h2o-lightning-4b-lmk:Q4_K_M
- Lemonade
How to use lm-kit/h2o-lightning-4b-lmk with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lm-kit/h2o-lightning-4b-lmk:Q4_K_M
Run and chat with the model
lemonade run user.h2o-lightning-4b-lmk-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use lm-kit/h2o-lightning-4b-lmk with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lm-kit/h2o-lightning-4b-lmk:Q4_K_M
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:9931/v1 hermes config set model.default lm-kit/h2o-lightning-4b-lmk:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use lm-kit/h2o-lightning-4b-lmk with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lm-kit/h2o-lightning-4b-lmk:Q4_K_M
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:9931/v1 \ --custom-model-id "lm-kit/h2o-lightning-4b-lmk:Q4_K_M" \ --custom-provider-id llama-cpp \ --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 for LM-Kit
This repository holds H2O-Lightning-4B packaged for LM-Kit.NET, LM-Kit's on-device AI SDK for .NET, and for LM-Kit One.
| File | Content |
|---|---|
h2o-lightning-4b-Q4_K_M.lmk |
The model and its vision projector in one archive. This is the file LM-Kit downloads. |
h2o-lightning-4b-Q4_K_M.gguf |
The decision model, Q4_K_M. |
mmproj-lightning-f16.gguf |
Its vision projector at full precision (F16). |
The GGUF files are the ones published in h2oai/h2o-lightning-4b-gguf, unchanged: the archive packs the same bytes.
About H2O-Lightning-4B
H2O-Lightning-4B is a 4B decision model from H2O.ai, built on Qwen3.5 4B. In the LM-Kit catalog it is the general decision model with the widest language coverage: text, JSON and images.
A decision model does not write: you give it a content and typed questions (one option among several, a level on an ordered scale, yes or no) and it returns the probability of every answer in one forward pass. The answer is always one of your options, with a number a rule can act on.
LM-Kit model ID: h2o-lightning:4b.
Usage
using LMKit.Classification.Decisions;
using LMKit.Model;
using LM model = LM.LoadFromModelID("h2o-lightning:4b");
var engine = new DecisionEngine(model);
var request = new DecisionRequest("I was charged twice for order 7731 this morning. Can you refund one of the two charges?")
.AddQuestion("team", DecisionQuestion.Choice(
"Which team should handle this ticket?",
new Dictionary<string, string>
{
["billing"] = "charges, refunds, invoices and payment methods",
["shipping"] = "deliveries, tracking and returns",
["technical"] = "bugs, errors and things that do not work",
}))
.AddQuestion("urgency", DecisionQuestion.Score("How urgent is this ticket?", "can wait", "this week", "today", "right now"))
.AddQuestion("person", DecisionQuestion.YesNo("Must a person handle this ticket?"));
DecisionResult result = engine.Decide(request);
Console.WriteLine(result.Answers["team"].Choice); // the option picked
Console.WriteLine(result.Answers["team"].Confidence); // its probability
Console.WriteLine(result.Answers["urgency"].Score); // the expected level
Console.WriteLine(result.Answers["person"].Probability); // the probability of yes
The model also answers about images. Add them to the request; the engine sizes each one the way the model's own processor does:
using LMKit.Media.Image;
using ImageBuffer photo = ImageBuffer.LoadAsRGB("delivery.jpg");
DecisionResult onPhoto = engine.Decide(
new DecisionRequest("A photo sent with a delivery complaint.")
.AddQuestion("damaged", DecisionQuestion.YesNo("Does the photo show a damaged parcel?"))
.AddImage(photo));
In LM-Kit One the same model answers POST /v1/systemone, the decide tool of agents and workflows, and the Decide playground.
License
The model weights are released by H2O.ai under the Apache License 2.0. See the original model card for training details and the authors' evaluation.
- Downloads last month
- -
4-bit