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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// The paths that name `core` or `alloc` where those hold the item, so the
// `std::` paths left are the uses the `no_std` work has to gate.
//! # bunsen
//!
//! A "batteries included" community standard library for the
//! [burn](https://burn.dev) tensor framework: reusable modules, tensor
//! operations, shape contracts, pretrained-model machinery, and the
//! module-lifecycle utilities that fall outside burn's core.
//!
//! These API docs are the reference for every item. The
//! [bunsen book](https://zspacelabs.ai/bunsen/book/) explains how the crate is
//! organized, the systems that cut across modules, and how bunsen is
//! developed.
//!
//! ## Organization
//!
//! The crate is layered: a module builds on the layers below it, never on
//! those above.
//!
//! ```text
//! kits, sims whole models; simulations
//! blocks torch.nn-like components: module roots and tree parts
//! ops operations; Module/Config only to hold cached tables or state
//! foundation burner, contracts, errors, rust_ext, support, zspace
//! ───────────────────────────────────────────────────────────────────────
//! burn
//!
//! beside the stack: data (kits load through it), audit
//! ```
//!
//! The `ops` / `blocks` split is a rule, stated in [`ops`](ops#ops-and-blocks).
//!
//! ### Components
//!
//! * [`kits`]: complete models: image models, language models, speech, and the
//! token seam the speech kits share.
//! * [`sims`]: simulations written as tensor programs: Conway's Game of Life
//! and a lattice-Boltzmann fluid.
//! * [`blocks`]: reusable [`Module`](burn::module::Module) components: conv
//! blocks, image layers, recurrent cells, transformer parts.
//! * [`ops`]: tensor operations, including the signal-processing front ends,
//! attention ops, and the KV cache.
//!
//! ### Foundation
//!
//! * [`burner`]: extensions to burn's module machinery: the config lifecycle
//! ([`ModuleInit`](burner::module::ModuleInit),
//! [`ToStructureConfig`](burner::module::ToStructureConfig)), module
//! [`reflection`](burner::module::reflection), grouped optimizers
//! ([`optim`](burner::optim)), and `Tensor` extension traits
//! ([`tensor`](burner::tensor)).
//! * [`contracts`]: runtime tensor-shape contracts.
//! * [`errors`]: `BunsenError`, `BunsenResult`, and the `try_x` / `x`
//! convention.
//! * [`rust_ext`]: Rust-language extensions with no tensor or burn dependency:
//! [`CloneBox`](rust_ext::CloneBox) / [`CloneRef`](rust_ext::CloneRef), array
//! and range helpers, and
//! [`LocationDesc`](rust_ext::reflection::LocationDesc), a serializable
//! source location.
//! * [`support`]: shared utilities, including the test backends and devices
//! (`support::testing`, feature `testing`).
//! * [`zspace`]: integer-lattice index and shape helpers.
//!
//! ### Beside the stack
//!
//! * [`data`]: the disk cache, pretrained-model loading, and dataset shard
//! sets.
//! and verify another run (on another backend, or against a stored
//! baseline) against it.
//!
//! ### Entry points
//!
//! * [`prelude`]: the traits most code needs in scope, for one glob import.
//! * [`public`]: re-exports of public dependencies (`burn`), so downstream code
//! uses the same versions.
//!
//! ### Sibling crates
//!
//! `bunsen-firehose` and `bunsen-firehose-image` (a data-processing pipeline),
//! `bunsen-arrow-dataloaders` (preview: Parquet shards to training batches),
//! `bunsen-fetch` (the fetching the cache shares with the build scripts that
//! fetch the validation crates' assets), and `bunsen-contracts-macros` (the
//! proc macro behind [`contracts`]). The book's
//! [workspace](https://zspacelabs.ai/bunsen/book/organization/workspace.html)
//! page maps them.
//!
//! ## Crate Features
// Without `std`, `alloc` brings `vec!` and `format!`, which `std`'s
// prelude has.
extern crate alloc;
extern crate core;
// Make the macro targets public.
// TODO: re-examine contracts publication.
pub use shape_contract as __proc_shape_contract;
/// Re-exports public dependencies.