Instructions to use espetro/htlm-lfm2.5-350m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use espetro/htlm-lfm2.5-350m 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("espetro/htlm-lfm2.5-350m") 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) - llama-cpp-python
How to use espetro/htlm-lfm2.5-350m with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="espetro/htlm-lfm2.5-350m", filename="lfm2.5-350m-mlx-q8.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use espetro/htlm-lfm2.5-350m 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 espetro/htlm-lfm2.5-350m # Run inference directly in the terminal: llama cli -hf espetro/htlm-lfm2.5-350m
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf espetro/htlm-lfm2.5-350m # Run inference directly in the terminal: llama cli -hf espetro/htlm-lfm2.5-350m
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf espetro/htlm-lfm2.5-350m # Run inference directly in the terminal: ./llama-cli -hf espetro/htlm-lfm2.5-350m
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf espetro/htlm-lfm2.5-350m # Run inference directly in the terminal: ./build/bin/llama-cli -hf espetro/htlm-lfm2.5-350m
Use Docker
docker model run hf.co/espetro/htlm-lfm2.5-350m
- LM Studio
- Jan
- vLLM
How to use espetro/htlm-lfm2.5-350m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "espetro/htlm-lfm2.5-350m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "espetro/htlm-lfm2.5-350m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/espetro/htlm-lfm2.5-350m
- Ollama
How to use espetro/htlm-lfm2.5-350m with Ollama:
ollama run hf.co/espetro/htlm-lfm2.5-350m
- Unsloth Studio
How to use espetro/htlm-lfm2.5-350m with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for espetro/htlm-lfm2.5-350m to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for espetro/htlm-lfm2.5-350m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for espetro/htlm-lfm2.5-350m to start chatting
- Pi
How to use espetro/htlm-lfm2.5-350m with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "espetro/htlm-lfm2.5-350m"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "espetro/htlm-lfm2.5-350m" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use espetro/htlm-lfm2.5-350m 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 "espetro/htlm-lfm2.5-350m"
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 espetro/htlm-lfm2.5-350m
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use espetro/htlm-lfm2.5-350m with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "espetro/htlm-lfm2.5-350m"
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 "espetro/htlm-lfm2.5-350m" \ --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"
- MLX LM
How to use espetro/htlm-lfm2.5-350m with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "espetro/htlm-lfm2.5-350m"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "espetro/htlm-lfm2.5-350m" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "espetro/htlm-lfm2.5-350m", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use espetro/htlm-lfm2.5-350m with Docker Model Runner:
docker model run hf.co/espetro/htlm-lfm2.5-350m
- Lemonade
How to use espetro/htlm-lfm2.5-350m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull espetro/htlm-lfm2.5-350m
Run and chat with the model
lemonade run user.htlm-lfm2.5-350m-{{QUANT_TAG}}List all available models
lemonade list
HTLM โ Browser-Agent Fine-Tune of LFM2.5-350M
HTLM (HyperText Language Model) is a fine-tuned LFM2.5-350M that predicts web UI actions โ click, type, select โ on an indexed element list, entirely in-browser via wllama WebAssembly.
Benchmark Results
| Metric | Value |
|---|---|
| Strict action accuracy | 91.2% |
| Action type accuracy | 92.2% |
| Element index accuracy | 99.8% |
| Parse failure rate | 0.0% |
| p95 latency (browser WASM) | 1245 ms |
| Model size (Q8 GGUF) | 362 MB |
| Base model (no fine-tune) | 0.2% |
Evaluated on 408 held-out tasks from Mind2Web. Full evaluation details: docs/go-no-go-checklist.md.
How It Works
HTLM takes a structured page representation (element list with role/tag/text) and an instruction, and predicts {type, index, [value]}. The element index refers to the candidate list derived from the page HTML.
HTML โ element list โ HTLM โ {type, index, value?}
Usage
Browser (wllama)
import { Wllama } from '@wllama/wllama';
const wllama = new Wllama({ default: './wllama.wasm' });
await wllama.loadModelFromHF({
repo: 'espetro/htlm-lfm2.5-350m',
file: 'htlm-350m-q8.gguf',
});
const result = await wllama.createCompletion({
prompt: JSON.stringify({
instruction: "Click the submit button",
page: { elements: [{role:"button",tag:"button",text:"Submit"}] },
}),
max_tokens: 128,
});
llama.cpp CLI
llama-cli -m htlm-350m-q8.gguf -p "[INPUT JSON]" -n 128 --temp 0
mlx-lm (Apple Silicon)
from mlx_lm import load, generate
model, tokenizer = load('espetro/htlm-lfm2.5-350m')
# LoRA merge required first โ see GitHub repo
Training
Fine-tuned via LoRA (rank 16) on Mind2Web using the mlx-lm / Unsloth-compatible API on Apple Silicon. Full pipeline, hyperparameters, and reproducibility steps: docs/pipeline.md.
Repository
- Downloads last month
- 69
We're not able to determine the quantization variants.
Model tree for espetro/htlm-lfm2.5-350m
Space using espetro/htlm-lfm2.5-350m 1
Evaluation results
- strict-action-accuracy on Mind2Webself-reported0.912
- p95-latency-ms on Mind2Webself-reported1245.000