secryst

API reference

The crystal family

Three implementations, one contract, one behavior. Choose the language your process runs in; the model ids, artifacts, and outputs are identical. All crystals read SECRYST_INDEX / SECRYST_CACHE.

reference

Python 0.1.1 · live

The reference crystal: it generates the golden sets the others are diffed against and owns numerical adjudication. Pure stdlib plus yaml/requests; inference needs onnxruntime.

install

pip install secryst

usage

from secryst import Model

model = Model.load("khm-latn-1.0")   # resolve -> download -> verify -> cache
model.translate("ភាសា")               # -> "pheasaea"

Low-level surfaces: secryst.encode/decode (the byte tokenizer), verify_and_read(zip) (IMF loading), resolve(id) (index + cache). Errors: ModelFormatError, RegistryError. Source: secryst/secryst-py.

the original

Ruby v1 line · in review

Secryst was born Ruby in 2020 — a seq2seq transformer gem. The v1 line runs ByT5-family models in pure Ruby over ONNX (via secryst/onnxruntime), with no libtorch and no native compilation of the model itself.

install

gem 'secryst'

usage

require 'secryst'

translator = Secryst::Translator.new(model_file: 'khm-latn-byt5.zip')
translator.translate('ភាសា')   # => "pheasaea"

Index-based loading (models.yaml resolution with Secryst::IMF) ships on the v1 line, currently open as PR #47. Source: secryst/secryst.

the embeddable

TypeScript 0.1.0 · publish pending

Node crystal for the interscript-js ecosystem and any TypeScript runtime. onnxruntime-node is an optional peer — registry and index consumers can use this package with zero native dependencies.

install

npm install secryst onnxruntime-node

usage

import { load } from "secryst";

const model = await load("khm-latn-1.0");
await model.translate("ភាសា");   // "pheasaea"

Mirrors the Python API: loadIndex, resolve, verifyAndRead, encode/decode. Source: secryst/secryst-ts.

Release status

CrystalPackageStatus
Pythonsecryst (PyPI)0.1.1 · live
Rubysecryst (RubyGems)v1 in review (PR #47)
TypeScriptsecryst (npm)0.1.0 · live
Index manifest@secryst/models (npm)v0.0.1 · with PR #14

Artifacts are built and tested; the two registry publishes wait on credentials, the gem on golden-parity CI landing with PR #47. This table is the honest state of the world and will be updated as each ships.