Expand description
The text the model reads for a question, before tokenizing.
Only the compat family is here for now. It reproduces what Laya 0.3.7 feeds its tokenizer
(build_sequence, render_options, render_criterion and serialize_state in
laya/common.py, and Agent._to_internal), because a single differing space changes the ids.
The native family renders differently (spec/06-input.md) and arrives with the native models.
Structs§
- Compat
Text - The three pieces of text for one compat question. Every piece has had the tokenizer’s mask literal replaced by a space, so user text cannot forge a marker.
Constants§
- NOUL_
FALSE - The default noul descriptions Laya uses when a side is missing or empty.
- NOUL_
TRUE - See
NOUL_FALSE.
Functions§
- compat_
options - Laya’s
render_options, without the leading space and mask replacement. - compat_
question - Renders a question the way Laya does.
maskis the tokenizer’s mask literal,[MASK]for ModernBERT and<mask>for mmBERT. - compat_
state - Laya’s
serialize_statefollowed by the mask replacement. - criterion
- Laya’s
render_criterion: strings as they are, anything else as JSON with raw Unicode.