text-classification · 25.73 MB WASM q8 · 2,271 IAB Labels · Apache-2.0

ZLM v1 IAB Classify Edge

zgpu-ai/zlm-v1-iab-classify-edge is a 24.1M-parameter fine-tuned MiniLM encoder (all-MiniLM-L6-v2) with two independent multi-label heads producing 704 IAB Content Taxonomy 3.0 categories and 1,567 IAB Audience Taxonomy 1.1 segments in a single 25.73 MB int8 WASM pass.

1. Interactive 2,271-Label IAB Taxonomy Tagger

Choose an editorial sample, edit the copy below, paste from clipboard, or load a text file:

Decoded with independent per-label sigmoid 1 / (1 + e−z) over all 2,271 logits (never softmax), stripping fixed-128 [PAD] tokens for production parity.

Drop a .txt or .md file here, paste anywhere, or choose a local file.

0.50
6
Top Content 3.0–
Top Audience 1.1–
Active Tags (C / A)–
Brand Safety–
Latency · Backend–
Tokens · NaN Check–

IAB Content Taxonomy 3.0

704 labels · indices 0–703

Download or initialise the local model above, then classify text to inspect Content 3.0 tags.

IAB Audience Taxonomy 1.1

1,567 labels · Interest · Purchase Intent · Demographic

Audience segments and full taxonomy hierarchy paths appear here after classification.

Model ID zgpu-ai/zlm-v1-iab-classify-edge
Task & Decoding text-classification · multi-label sigmoid
Download & Quant 25.73 MB (24.76 MB q8) · WASM
Output Shape [1, 2271] · 704 Content + 1,567 Audience
Backbone & Window MiniLM-L6 (24.1M) · 128 tok prod / 512 max
License Apache-2.0

2. See Inside — 2,271-Logit Sigmoid Distribution & Token Window

Unlike single-label softmax classifiers that force scores to sum to 100%, multi-label sigmoid scores each of the 2,271 IAB categories independently. Almost all labels sit near 0.0 while a sparse cluster of matching categories rises above the active threshold (τ).

Log-Scaled Probability Distribution

10 bins · log₁₀ count

WordPiece Token Window

Uncased BERT · 30,522 vocab

Run classification to inspect the exact uncased WordPiece tokens fed into ONNX Runtime.

3. Why On-Device IAB Taxonomy Matters

Use-Case Ladder

4. How the API Works & Code Inspection

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

const repo = "zgpu-ai/zlm-v1-iab-classify-edge";
const tokenizer = await AutoTokenizer.from_pretrained(repo);
const model = await AutoModelForSequenceClassification.from_pretrained(repo, { device: "wasm", dtype: "q8" });

// Unpadded single-text encoding preserving closing [SEP] within the 128-token serving window
const enc = tokenizer(text, { padding: false, truncation: false });
let ids = Array.from(enc.input_ids.data, Number).filter((id) => id !== 0);
if (ids.length > 128) ids = [...ids.slice(0, 127), 102];
const toInt64 = (a) => new Tensor("int64", BigInt64Array.from(a, BigInt), [1, a.length]);

const { logits } = await model({
  input_ids: toInt64(ids),
  attention_mask: toInt64(ids.map(() => 1)),
  token_type_ids: toInt64(ids.map(() => 0)),
});
// Multi-label sigmoid (never softmax) across 704 Content + 1,567 Audience logits
const probs = Array.from(logits.data, (z) => 1 / (1 + Math.exp(-z)));
Show the code · worker.js — unpadded encodeText() with [SEP] preservation
Show the code · iab-core.mjs — decodeIabLogits() multi-label sigmoid decoder

5. References