Laya multilingual โ€” ONNX export (unofficial)

An unofficial ONNX export of the multilingual/ checkpoint of convaiinnovations/laya (Apache-2.0), which is Laya's decision head on top of jhu-clsp/mmBERT-base (768 hidden, 22 layers, 256k vocabulary; max_len 1024, head_max_len 256). It is laid out like the English bundle in receptron/laya-onnx, so @receptron/laya loads it from Node.js:

import { Laya } from "@receptron/laya";
const laya = await Laya.load({ repo: "duration465/laya-onnx", subfolder: "multilingual", revision: "<commit>" });

Pin revision to a commit hash of this repo; main can change.

File (under multilingual/) Contents
laya.onnx / laya.onnx.data graph + fp32 weights (1.29 GB in total)
laya_config.json max_len, head_max_len, temperatures from the checkpoint's rl_agent_config.json (see below)
tokenizer/ mmBERT tokenizer, with four special tokens renamed (see below)

Inputs and outputs are those of the English bundle: input_ids, attention_mask, marker_pos, marker_mask, qtype -> logits, act_probs.

How it was made and checked

  • Weights: convaiinnovations/laya, subfolder multilingual/, revision 7b928d828b7b0e022f929d9bd2e44165aa270148.
  • Export: export/export_onnx.py of receptron/laya (commit 60d5ee6ef8e731646e8ca9ac0139d25fcf4fa295, MIT), unmodified. torch 2.14.1 (CPU), transformers 5.20.2, onnxruntime 1.31.0. The script writes one file; the weights were then moved to laya.onnx.data with onnx.save_model(..., save_as_external_data=True) to match the English bundle.
  • Parity with the PyTorch model (random token ids, batch 1-3, lengths 16 to 900, padded rows, unmasked slots): max |logit difference| 8.5e-6. The export script's own check (length 40) reports 4.9e-5.
  • Tokenization: the tokenizer's special tokens <bos>, <eos>, <mask>, <pad> (ids 2, 1, 4, 0) are renamed [CLS], [SEP], [MASK], [PAD], because @receptron/laya looks them up by those names. No id changed; the sequences built by @receptron/laya are identical to the Python reference (rl_common.build_sequence) on the cases checked (German with umlauts, CJK, a 700-word text).

Calibration

The checkpoint ships temperature = [1, 1, 1] and no per-cardinality temperatures, so the probabilities are not calibrated the way the English checkpoint's are. Measure a confidence threshold on your own data before relying on one.

Credits and licence

Model weights and decision head: Convai Innovations, convaiinnovations/laya, Apache-2.0. Encoder: jhu-clsp/mmBERT-base. Export script and runtime: receptron/laya, MIT. This export is not affiliated with or endorsed by any of them. The weights stay under Apache-2.0.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for duration465/laya-onnx

Quantized
(80)
this model