โ† All models

text-classification (regression) ยท text ยท WASM ยท ~110 MB

Educational-quality scorer โ€” how much does this text teach?

Paste a passage and the model rates its educational value on a 0โ€“5 scale โ€” not whether it's positive or on-topic, but how much it teaches. It's the FineWeb-Edu classifier HuggingFace built to filter a trillion-token pre-training corpus down to the genuinely educational parts. It all runs on your device โ€” the text never leaves the tab.

At a glance

Modelonnx-community/fineweb-edu-classifier-ONNX (ONNX build of HuggingFaceFW/fineweb-edu-classifier)
Tasktext-classification with a regression head (0โ€“5 score)
Outputa single educational-quality score, clamped to 0โ€“5
ArchitectureBERT (Snowflake arctic-embed) encoder + a linear regression head
Quantizationq8 (8-bit) ONNX
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~110 MB, cached after first load
LicenseApache-2.0

Run it

Type or paste a passage. It's scored a moment after you stop typing โ€” or load a sample below.

Why it matters

The quality of an LLM depends on the quality of its training text, and "educational value" turned out to be a strong filter: HuggingFace scored the web with this model and kept the high-scoring pages to build FineWeb-Edu, which trains markedly better models. Running the same scorer on-device lets you judge or rank text without sending it anywhere.

The score is a regression estimate, not a fact: it rewards clear, on-topic, informative prose and marks down promotional, chatty, or incoherent text โ€” but it judges style of usefulness, not correctness, and it was trained mostly on English web text. Treat it as a fast signal, not a verdict. The raw value can dip slightly below 0 or above 5; it's clamped to the 0โ€“5 band.

How the API works

It's a regression head โ€” one score per passage โ€” so we read the raw output directly:

import { AutoModel, AutoTokenizer } from "@huggingface/transformers";

const tok = await AutoTokenizer.from_pretrained("onnx-community/fineweb-edu-classifier-ONNX");
const model = await AutoModel.from_pretrained("onnx-community/fineweb-edu-classifier-ONNX");
const { logits } = await model(await tok(text, { truncation: true }));
const score = Math.max(0, Math.min(5, logits.data[0])); // 0โ€“5 educational value

It runs the encoder + regression head in a Web Worker so typing stays smooth. We use AutoModel rather than the text-classification pipeline because the head is a regressor, not a classifier.

References