Multi-model · Arctic Embed XS (22.97 MB q8 · Apache-2.0) → DeBERTa-v3-XSmall Zero-Shot (95.9 MB q8 · MIT)

2-Stage Semantic Shortlist & Zero-Shot NLI Filter (118.9 MB Total)

Running cross-encoder NLI over 24 classes takes 24 forward passes. Instead, Stage 1 (Snowflake/snowflake-arctic-embed-xs, reusing ../../snowflake-arctic-embed-xs/worker.js) embeds all 24 categories once in 384-d CLS space and shortlists Top-K in milliseconds; Stage 2 (MoritzLaurer/deberta-v3-xsmall-zeroshot-v1.1-all-33) verifies only those K candidates with 2-class entailment / not_entailment NLI.

1. Two independent on-device models (118.9 MB total)

Stage 1 · Snowflake Arctic Embed XS (22.97 MB)

Reuses ../../snowflake-arctic-embed-xs/worker.js — WASM q8 384-d CLS-pooled bi-encoder for fast Top-K taxonomy shortlisting.

Stage 2 · DeBERTa-v3-XSmall Zero-Shot (95.9 MB)

Uses ../worker.js — WASM q8 2-class cross-encoder NLI verifier on the Stage 1 shortlist.

2. Incoming dispatch → semantic shortlist → NLI filter

Initialise both stages above to run the 2-stage semantic embed + zero-shot NLI pipeline.

Stage 1 Top-1 (Cosine)–
Stage 2 Top-1 (NLI)–
Pass reduction4.8× (5 vs 24)
Stage 1 / Stage 2 ms–
NaN count (S1 / S2)–

Stage 1 · Arctic Cosine vs Stage 2 DeBERTa NLI

24-Category Enterprise Taxonomy (Highlighted = Shortlist)

Shortlisted categories comparing Stage 1 Arctic Embed cosine rank against Stage 2 DeBERTa-v3-XSmall NLI rank and 2-class probabilities
Shortlisted category Stage 1 rank & cosine Stage 2 rank & score Rank shift (Δ) 2-class Entail / Not-entail Logit Δ
Run Stage 1 + Stage 2 above to inspect semantic shortlisting and NLI reranking.

3. Inspect reused Stage 1 & shortlist helpers

Show the code · deberta-zs.js — ArcticEmbedStageClient (reusing ../../snowflake-arctic-embed-xs/worker.js)
Show the code · deberta-zs-core.mjs — rankTaxonomyByCosine()
Show the code · deberta-zs-core.mjs — compareShortlistVsNli()

References