1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! # Laya
//!
//! Laya (`convaiinnovations/laya`, Apache-2.0), an open decision model: a
//! state and typed questions in (a choice among named options, a level on a
//! scale, a yes/no probability), calibrated probabilities over each
//! question's options out, in one forward pass. A [`LayaModel`], built from a
//! [`LayaConfig`], is upstream's `DecisionModel`: a
//! [`ModernBertModel`](crate::kits::text::encoders::modernbert::ModernBertModel)
//! encoder, the question kind's type embedding, two `PyTorch`-layout encoder
//! layers, and a scorer over each option's `[MASK]` marker; and an act head.
//!
//! - [`blocks`]: the model, built from a [`LayaConfig`].
//! - [`LayaAgentConfig`]: `rl_agent_config.json`, the head's geometry, the
//! prompt budgets, and the temperatures that calibrate each question's logits
//! by its kind and option count.
//! - [`LayaQuestion`] and [`LayaAnswer`]: a typed question (its kind, what is
//! asked, its options), and its answer (each option's calibrated probability,
//! the most probable, its confidence).
//! - [`build_prompt`]: a question's prompt over a state, as upstream's
//! `build_sequence` lays it out and cuts it to its budgets, the specials
//! ([`LayaSpecials`]) from the checkpoint's `tokenizer_config.json`.
//! - [`LayaModel::decide`]: questions about a state answered, in one padded
//! batch.
//! - [`LayaConstruct`]: a model with its head's config and its checkpoint's
//! tokenizer files, unread.
//! - [`pretrained`] (features `store` and `cache`): the named checkpoints,
//! `laya/laya` the default, and the factory that loads one.
//! - [`weights`] (feature `store`): loading a checkpoint's `model.safetensors`
//! (the encoder under `encoder.`, the fused projections split), and the
//! config from its two files.
//!
//! The tokenizer is a [`Tokenizer`](crate::kits::support::tokens::Tokenizer)
//! the caller brings: `BunsenTokenizer` (feature `tokenizer`) reads a
//! checkpoint's `tokenizer.json`.
pub use *;
pub use *;
pub use *;
pub use *;