# Examples · 示例 Every example follows the same recipe in [`../USAGE.md`](../USAGE.md): prepend the target-language token, run the encoder, greedy-decode the merged decoder (KV cache), decode. 所有示例都遵循同一套 [`../USAGE.md`](../USAGE.md) 流程。 | Platform | Runtime + tokenizer | File | Status | |---|---|---|---| | **Python** | optimum / onnxruntime + `tokenizers` | [`python/translate.py`](python/translate.py) | ✅ runnable | | **transformers.js** | `@huggingface/transformers` v3 | [`transformers-js/translate.mjs`](transformers-js/translate.mjs) | ✅ runnable (Node) | | **Flutter** | `onnxruntime` (Dart) + bundled pure-Dart BPE tokenizer | [`flutter/small100_translator.dart`](flutter/small100_translator.dart) | ✅ runnable, shipped in production | | **Android** | onnxruntime-android + DJL `tokenizers` | [`android/Small100Translator.kt`](android/Small100Translator.kt) | 📝 reference | | **iOS** | onnxruntime-swift + swift-transformers | [`ios/Small100Translator.swift`](ios/Small100Translator.swift) | 📝 reference | Python, transformers.js, and Flutter are fully runnable and verified — the Flutter one is the actual translator class from a shipped Android/iOS S2S translator app (real devices, not a simulator). It also ships [`flutter/bpe_tokenizer.dart`](flutter/bpe_tokenizer.dart): a small pure-Dart SentencePiece-BPE tokenizer reading this repo's `tokenizer.json` directly, since Dart has no off-the-shelf HuggingFace-tokenizers binding the way DJL (Android) or swift-transformers (iOS) provide. The Android/iOS files are **reference implementations** of the same algorithm (the encoder/greedy-decode loop with KV cache is written out); wire them to your asset loading and pin the dependency versions in the file headers. Android/iOS 为参考实现,算法完整,接入时按文件头的依赖版本对齐即可。 The tokenizer (`tokenizer.json`) and the language-token map (`lang_tokens.json`) are identical across all platforms — that is the point of this repo.