Skip to content

05. Data Model & Storage

What is stored

Store Contents
HF Hub ONNX graphs, .onnx.data sidecars, tokenizer JSON, meta
Cache Storage indictrans2-onnx-cache Fetched responses for repeat loads
JS memory ORT sessions, tokenizers, generation config

No IndexedDB, LocalStorage schema, or server DB.

Model variants

Precision suffix on repo id: none (fp32), -fp16, -int8, -q4f16. Collections linked in README for 200M/320M and 1B.

Lifecycle

graph TD
  classDef default fill:#1e293b,stroke:#38bdf8,stroke-width:2px,color:#f8fafc
  classDef highlight fill:#065f46,stroke:#34d399,stroke-width:2px,color:#f0fdf4

  HF["HF resolve/main"] --> Cache["Cache Storage"]:::highlight
  Cache --> Mem["ORT sessions in RAM"]:::highlight
  Mem --> Out["Translated text"]
  Unload["unloadModel"] --> Mem

  linkStyle default stroke:#64748b,stroke-width:2px

Unload does not purge Cache Storage (Confirmed).

Interview Q&A

Q: How big are downloads?
A: UI estimates range from hundreds of MB (quant small) to multi-GB (1B fp32) — see MODEL_SIZES in app.js.