Multi-model · DistilGPT-2 (87.02 MB q8 · Apache-2.0) → DeBERTa-v3 Zero-Shot (87.25 MB q8 · MIT) · ~174 MB total

Generated-Text Guardrail & Style Classifier: 2-Stage Browser Pipeline

Chain two independent on-device WASM Web Workers (~174 MB combined): Stage 1 generates live continuations with Xenova/distilgpt2 (84.91 MB ONNX / 87.02 MB total q8, Apache-2.0); Stage 2 reuses DeBERTa-v3 Zero-Shot (Xenova/nli-deberta-v3-xsmall, 87.25 MB q8 via ../../zero-shot-text/worker.js, MIT) to score style, topic, and guardrail risk from real NLI logits.

1. Workflow Models (~174 MB Combined · Two Isolated WASM Workers)

Stage 1 · DistilGPT-2 Continuation Generator (87.02 MB)

distilbert/distilgpt2 → Xenova/distilgpt2 · q8 WASM · Apache-2.0

Stage 2 · DeBERTa-v3 Style & Guardrail NLI (87.25 MB)

Reuses ../../zero-shot-text/worker.js · Xenova/nli-deberta-v3-xsmall · q8 WASM · MIT

2. Configure Continuation Prompt & Guardrail Labels

Pick a domain or stress preset:

Typically generates technical documentation prose scored cleanly by DeBERTa-v3.
Stage 1 (DistilGPT-2)–
Stage 2 (DeBERTa-v3)–
Combined time–
Top label–
Top score–
NaN check–

Stage 1 · DistilGPT-2 Continuation

Pending
Initialise Stage 1 above to stream a continuation.

Stage 2 · DeBERTa-v3 Style & Guardrail Scores

Pending

Run Stage 1 + Stage 2 to inspect ranked style/guardrail probabilities and raw NLI logits.

3. Inspect Stage 2 Reuse & Dynamic NLI Class Mapping

Show the code — distilgpt2.js ZeroShotStageClient reusing zero-shot-text/worker.js
Show the code — distilgpt2-core.mjs mapNliDistribution() dynamic res.classNames mapping