Multi-model · Google T5-Small (78.07 MB q8 · Apache-2.0) → Multilingual MiniLM-L12-v2 (118.31 MB q8 · Apache-2.0)
Summarize → Translate → Fidelity Audit: Two-Step T5 + 384-d Meaning Check
Stage 1 (Xenova/t5-small, 78.07 MB WASM q8,
Apache-2.0 ) runs a live two-step pass — first condensing an English
document with summarize: , then translating that summary into French, German,
and Romanian. Stage 2
(Xenova/paraphrase-multilingual-MiniLM-L12-v2, 118.31 MB WASM q8,
Apache-2.0 ) embeds the original document, English summary, and translated
summaries in one 384-d cross-lingual space (~196 MB total, 100% local).
1. Two Independent On-Device Models (~196 MB Combined)
Stage 1 · Google T5-Small (78.07 MB WASM q8)
Xenova/t5-small · text2text-generation · Summarize → FR/DE/RO · Apache-2.0
Stage 2 · Multilingual MiniLM-L12-v2 (118.31 MB WASM q8)
Xenova/paraphrase-multilingual-MiniLM-L12-v2 · feature-extraction · 384-d · Apache-2.0
2. Configure Document, Translation Targets & Fidelity Pipeline
Summarizes a technical brief into English first, translates the summary into FR/DE/RO, then audits cross-lingual semantic fidelity.
English source document (Stage 1 summarizes, then translates into selected languages)
Run Full Pipeline (Stage 1 → Stage 2)
Run Stage 1 Only (Summarize + Translate)
Run Stage 2 Only (Cosine Audit)
Export Audit CSV
Export Audit JSON
Summary retention cos –
Mean translation cos –
Best target –
Stage 1 / Stage 2 ms –
NaN check –
3. Two-Step T5 Output & Cross-Lingual Semantic Preservation
Step 1A · T5-Small English Summary (summarize: )
Pending
Run Stage 1 above to generate the condensed English summary.
Step 1B translated summaries and Stage 2 cross-lingual cosine fidelity vs English document and summary
Target
Step 1B · T5 Translated Summary
cos(Doc, Target)
cos(Summary, Target)
Fidelity Meter
Assessment
Step 1B ms
Initialise both models above and run the pipeline to audit cross-lingual fidelity.
4. Inspect Two-Step T5 & MiniLM Fidelity Code
Show the code — worker.js summarizeAndTranslate() two-step T5 pass
Show the code — embed-worker.js scoreFidelity() 384-d cross-lingual embeddings