Skip to content

10. Interview Prep Guide

2-minute script

"I built an IndicTrans2 ONNX export factory for browser translation. Optimum couldn't export the custom model, so I wrote wrappers and a three-graph encoder–decoder export, then optimized bundles with tied-weight sharing so WASM downloads shrink. Fast tokenizers remap SentencePiece IDs to Fairseq dicts. Everything passes a 99% token-exact parity gate on thousands of fixtures before fp16/int8/q4f16 variants go to Hugging Face for the browser demo and local-voice-chat."

5-minute outline

  1. Problem: browser NMT needs ONNX, not PyTorch
  2. Why Optimum failed
  3. Graph layout + KV past
  4. Size optimization story
  5. Tokenizer pitfalls
  6. Quantization tradeoffs (200M vs 1B)
  7. Consumers: demo + voice chat
  8. Gaps: no export CI, some README drift

Likely questions

Q Angle
Why not Optimum? Custom architecture rejection
How validate? Token-exact parity vs PyTorch
Why shared sidecar? Browser download size
Q4 vs int8? Size vs accuracy tables
1B differences? Config-driven dims, protobuf limits

Weak spots

No automated CI for parity; README references missing files; quant quality uneven on small models.

Proud of

Turning a research PyTorch checkpoint into a reproducible, size-aware, browser-consumable artifact pipeline with honest benchmarks.