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
//! # Pretrained nanochat models
//!
//! From a model's name to a loaded
//! [`NanoChatConstruct`](super::NanoChatConstruct), through the data layer's
//! pretrained machinery ([`data::pretrained`](crate::data::pretrained)). The
//! whole module needs the `store` and `cache` features.
//!
//! # The index
//!
//! [`default_nanochat_factory`] is the index a caller holds, over the
//! catalog rows, the built-in catalog's builds of
//! [`NANOCHAT_CATALOG_CONTRACT`], whose geometries are
//! [`NanoChatGptContractConfig`](crate::kits::language::nanochat::NanoChatGptContractConfig)'s
//! prefabs'. There are no official nanochat
//! releases; each row is a community upload of upstream's own checkpoint files,
//! unconverted: a `model_<step>.pt` (about 2 GB), its `meta_<step>.json`, and
//! the tokenizer (`tokenizer.pkl`, `token_bytes.pt`).
//!
//! - `nanochat-students/rl-d20` (`nanochat-d20-rl`): the default, a d20 (561M)
//! of upstream's 2025 model after its RL stage.
//! - `nanochat-students/base-d20`, `nanochat-students/mid-d20`
//! (`nanochat-d20-base`, `nanochat-d20-mid`): the same run after pretraining
//! and after midtraining.
//! - `nitishpandey04/nanochat-d18-base`, `nitishpandey04/nanochat-d18-sft`
//! (`nanochat-d18-base`, `nanochat-d18-sft`): a d18 of upstream's 2026 model,
//! after pretraining and after SFT.
//!
//! Every file is pinned to its digest and fetched from a fixed revision of
//! its Hugging Face repo. nanochat repos follow no one layout (the file
//! names carry the training step; some keep the checkpoint in a
//! subdirectory), so there is no `hf:` provider.
//!
//! # Loading
//!
//! [`load_construct`](crate::data::builds::BuildFactory::load_construct)
//! resolves a name to a deferred model carrying [`NanoChatConstructConfig`],
//! brings every file local through the cache, and reads the checkpoint through
//! [`load_pt_checkpoint`](super::weights::load_pt_checkpoint): the meta's
//! geometry, which of upstream's models the state dict is, and the weights.
//! The tokenizer files are handed back as paths, unread: the kit's model is
//! ids in and logits out.
pub use *;
pub use *;