text-classification (regression) ยท text ยท WASM ยท ~110 MB
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.
| Model | onnx-community/fineweb-edu-classifier-ONNX (ONNX build of HuggingFaceFW/fineweb-edu-classifier) |
|---|---|
| Task | text-classification with a regression head (0โ5 score) |
| Output | a single educational-quality score, clamped to 0โ5 |
| Architecture | BERT (Snowflake arctic-embed) encoder + a linear regression head |
| Quantization | q8 (8-bit) ONNX |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~110 MB, cached after first load |
| License | Apache-2.0 |
Type or paste a passage. It's scored a moment after you stop typing โ or load a sample below.
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.
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.