How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="lazos/lfm2.5-230m-frontend-agent")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("lazos/lfm2.5-230m-frontend-agent")
model = AutoModelForCausalLM.from_pretrained("lazos/lfm2.5-230m-frontend-agent", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

frontend-agent - LFM2.5-230M (v1.3.0, bounded)

A generic English web/front-end agent fine-tuned from LiquidAI/LFM2.5-230M, small enough to run entirely in the browser (edge / wllama, no server-side model).

Sibling model: for more headroom, see the 350M variant - lazos/lfm2.5-350m-frontend-agent (~1.5x the footprint). The 230M is the smallest and fastest; pick per device budget.

Bounded context

A stateless, context-bounded agent. It grounds every turn in a compact context block C the host app injects: the current VIEW (items on screen, with ids + prices), the CART, and any relevant KNOWLEDGE. The model reads and acts on exactly what it is given - add/remove by the shown id, answer prices from the view, resolve references like "the second one", list what's actually there - and does not invent items. The app re-injects C each turn (the model holds no state).

Pair it with the npm library frontend-agent, whose ContextManager renders C in the exact format the model was trained on (a shared, versioned contract).

What's new in v1.3.0

  • Beyond-view resolution. For an item not on screen, the model now searches by name first (list_items / get_item) before acting, instead of grabbing a look-alike id already in view - fixes both beyond-view add and beyond-view price lookups.
  • Filtering with a view present. "under $30" / category constraints populate the advertised list_items filters even when items are already on screen.
  • Off-scope steering + small talk. Genuinely off-topic asks get a brief decline plus a nudge to what the agent can do; social small talk gets a short in-character reply - both learned as a pattern (never a fixed anti-topic list), so they generalize to unseen inputs.
  • Quantity / unit disambiguation. A number embedded in a title ("18g Basket") is no longer misread as a quantity.
  • Open-license training data. Synthetic data distilled from Apache-2.0 / MIT teachers (Qwen2.5-7B + Qwen3-30B-A3B, via OpenRouter) - no proprietary-model output in the dataset.

Usage

Serve a GGUF in-browser via wllama; each turn, build the system prompt from the library's ContextManager (persona + VIEW/CART/KNOWLEDGE) and advertise your tool schemas. See the project repo for the runtime wiring. Or fine-tune further from the transformers checkpoint (model.safetensors).

Files

File Format Size
model.safetensors bf16 (transformers, resumable) ~438 MB
*-Q8_0.gguf GGUF (near-lossless) ~235 MB
*-Q6_K.gguf GGUF ~182 MB
*-Q4_K_M.gguf GGUF (smallest, browser default) ~146 MB

Trained on the lazos/frontend-agent-sft dataset (v1.3.0).

License

Fine-tune of LFM2.5-230M; inherits the LFM Open License 1.0 (see LICENSE/NOTICE). Training data is fully synthetic (open-license teachers).

Downloads last month
312
Safetensors
Model size
0.2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for lazos/lfm2.5-230m-frontend-agent

Finetuned
(45)
this model