@verbx/localize-offline
v0.2.0
Published
VerbX Localize — offline ONNX translation: Unigram tokenizer + encoder/decoder generation, no network.
Readme
@verbx/localize-offline
On-device translation for VerbX Localize — no network, no text
leaving the machine. This is the mode for regulated environments: healthcare, banking, government.
It is what privacyMode: "offline" has always meant.
npm install @verbx/localize-offline⚠️ Honest status. The tokenizer is tested against the real vocabulary and the generation loop is tested against scripted inference, but this path has not yet been run against a real model end to end on a device. Talk to us before depending on it.
How it fits
It plugs into VerbXProviderConfig.service — the same seam the Electron SDK uses — so the engine
needs no changes: batching, caching, dedupe, the discovery filter and interpolation behave exactly
as they do against the cloud.
import { OnnxTranslationService } from "@verbx/localize-offline";
const service = new OnnxTranslationService({
packs: [{ source: "en", target: "hi", encoder, decoder, tokenizer }],
tensors: { int64: (data, dims) => /* host's tensor factory */ },
});
// <VerbXProvider config={{ projectKey, privacyMode: "offline", service }}>What is and isn't in the box
- In: the Unigram tokenizer and the encoder/decoder generation loop — identical on every host.
- Out, deliberately: any
onnxruntimeimport.-node,-react-nativeand-webare three packages with three binaries; importing one would break the other two hosts. You supply the ONNX runtime sessions and a tensor factory. - A pack is a downloaded language pair, not bundled into your app — a complete
en→hidirection is roughly 111 MiB (int8 OPUS-MT).verifyPackchecks a pack's SHA-256 before use, andassertUsablerefuses a pack whose licence forbids commercial use.
Docs
Full guide and the offline/on-prem notes: localize.verbxeco.com — the Docs section is readable without an account.
License
Proprietary. See LICENSE.md and the VerbX terms of service.
