← All models

text-generation Β· instruction-tuned LLM Β· WASM Β· ~140 MB

LaMini-Neo β€” instructions in, answers out, 125M parameters

LaMini-Neo-125M is a tiny GPT-Neo that MBZUAI fine-tuned on 2.6 million instruction-response pairs. It follows simple instructions β€” explain, summarize, rewrite, draft β€” with a fraction of the weights of a modern chat model, and it runs on a plain CPU in your browser.

At a glance

ModelXenova/LaMini-Neo-125M (ONNX) Β· original MBZUAI/LaMini-Neo-125M
Tasktext-generation (instruction following via the LaMini prompt format)
ArchitectureGPT-Neo β€” EleutherAI's 125M decoder, instruction-tuned on ~2.6M pairs (GPT4All/Alpaca-style)
Params / dtype125M Β· int8 (8-bit quantized ONNX)
BackendWebAssembly (CPU) β€” no GPU required
Download~140 MB, cached after first load
LicenseCC-BY-NC-4.0 β€” non-commercial weights (see note below)
Web APIsWeb Workers, Cache Storage (via Transformers.js), WebAssembly
License: CC-BY-NC-4.0 β€” non-commercial. The LaMini-Neo-125M weights are released under a Creative Commons Non-Commercial license. This demo is for personal and educational evaluation; commercial use of the weights requires a separate license. Model credit: MBZUAI (LaMini fine-tune), EleutherAI (GPT-Neo base), Xenova (ONNX conversion). See the model card.

Run it

The model's answer will stream here.

Generated token IDs include special tokens and exclude the prompt; average tok/s includes prefill.

See inside β€” the LaMini prompt format

Instruction-tuned models don't chat β€” they complete a template. LaMini's format is ### Instruction: … followed by ### Response:, and the model continues from there. The panel below shows the exact template built for your last instruction.

Why it matters

Most instruction models need billions of parameters. LaMini shows that 125M parameters tuned on good instruction data can follow simple requests β€” which makes private, offline instruction following feasible on phones and low-end devices.

Use cases

Basics

Follow the instruction β€” the fundamental instruction-tuned move, streamed.

Practical

Rewriter's desk: reword, tighten, and re-tone the same sentence three ways.

Wild

Instruction roulette β€” rapid-fire silly prompts, each answered by a 125M model taking them seriously.

How the API works

The friendly one-liner is the text-generation pipeline:

import { pipeline } from "@huggingface/transformers";

const gen = await pipeline("text-generation", "Xenova/LaMini-Neo-125M", { dtype: "int8" });
const prompt = "### Instruction:\\nExplain photosynthesis simply.\\n\\n### Response:\\n";
const out = await gen(prompt, { max_new_tokens: 96, do_sample: true, temperature: 0.7 });
// out[0].generated_text β†’ the response after the ### Response: marker

The demo streams tokens through a TextStreamer inside a Web Worker, so the page never blocks β€” the chips above show decoded text chunks as words become available; the readout counts generated token IDs.

References