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
69
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
(17)
this model

Space using espetro/htlm-lfm2.5-350m 1

Evaluation results