How to use from
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
Quick Links

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

https://github.com/espetro/HTLM

Downloads last month
86
GGUF
Model size
0.4B params
Architecture
lfm2
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for espetro/htlm-lfm2.5-350m

Adapter
(27)
this model

Evaluation results