GGUFGuy commited on
Commit
4fa9f93
·
verified ·
1 Parent(s): 70f4acf

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +342 -0
README.md ADDED
@@ -0,0 +1,342 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: transformers
5
+ pipeline_tag: text-generation
6
+ license: apache-2.0
7
+ tags:
8
+ - novi-ai
9
+ - language-model
10
+ - pretrained-model
11
+ - preview
12
+ - small-language-model
13
+ - bananamind-2-style
14
+ - causal-lm
15
+ - base-model
16
+ - pretrained-from-scratch
17
+ - project-kairo
18
+ - triton
19
+ datasets:
20
+ - HuggingFaceTB/smollm-corpus
21
+ - mlfoundations/dclm-baseline-1.0
22
+ - HuggingFaceTB/finemath
23
+ - nvidia/OpenMathInstruct-2
24
+ - HuggingFaceTB/smoltalk
25
+ ---
26
+
27
+ # Novi Mini Base Preview 2
28
+
29
+ **A second preview of Novi Mini Base by Novi AI.**
30
+
31
+ Novi Mini Base is a compact language model pretraining project featuring a **BananaMind 2-style architecture**, using a downscaled Cagliostro v3 design as its architectural basis.
32
+
33
+ This repository contains an intermediate checkpoint from the ongoing pretraining run.
34
+
35
+ ## Model Information
36
+
37
+ | Property | Details |
38
+ |---|---|
39
+ | Model name | Novi Mini Base (Preview 2) |
40
+ | Organization | Novi AI |
41
+ | Model type | Causal Language Model |
42
+ | Architecture style | BananaMind 2-style |
43
+ | Architectural basis | Downscaled Cagliostro v3 |
44
+ | Parameters | **9,968,128 (~9.97M)** |
45
+ | Hidden size | 256 |
46
+ | Transformer layers | 10 |
47
+ | Attention heads | 4 |
48
+ | Key/value heads | 2 |
49
+ | Head dimension | 64 |
50
+ | Intermediate size | 768 |
51
+ | Tokenizer | Byte-level BPE |
52
+ | Vocabulary size | 8,192 |
53
+ | Context length | 2,048 tokens during training |
54
+ | Training objective | Causal next-token prediction |
55
+ | Training token target | 15 billion |
56
+ | Training schedule | Warmup + stable phase + cosine cooldown |
57
+ | Model class | `ProjectKairoMiniForCausalLM` |
58
+
59
+ ## Training Progress
60
+
61
+ This preview corresponds to checkpoint **321000**.
62
+
63
+ | Metric | Value |
64
+ |---|---:|
65
+ | Current checkpoint | **321,000** |
66
+ | Total planned steps | **457,764** |
67
+ | Overall progress | **70.12%** |
68
+ | Stable-phase progress | **82.50%** |
69
+ | Target training tokens | **15,000,000,000** |
70
+ | Stable phase | 85% |
71
+ | Cosine cooldown | 15% |
72
+
73
+ Training is ongoing. The final model may differ from this preview.
74
+
75
+ ## Architecture
76
+
77
+ Novi Mini Base follows a **BananaMind 2-style decoder-only Transformer architecture**.
78
+
79
+ Its architectural basis is a scaled-down Cagliostro v3 design, adapted for a compact configuration.
80
+
81
+ ### Architecture Components
82
+
83
+ | Component | Implementation |
84
+ |---|---|
85
+ | Attention | Grouped-Query Attention (GQA) |
86
+ | Position encoding | Rotary Position Embeddings (RoPE) |
87
+ | Query normalization | RMSNorm |
88
+ | Key normalization | RMSNorm |
89
+ | Main normalization | RMSNorm |
90
+ | Feed-forward network | SwiGLU |
91
+ | Attention implementation | PyTorch Scaled Dot Product Attention |
92
+ | Input embeddings | Learned token embeddings |
93
+ | Output projection | Language-model head |
94
+ | Embedding weights | Tied input/output embeddings |
95
+
96
+ ### Model Dimensions
97
+
98
+ | Configuration | Value |
99
+ |---|---:|
100
+ | Vocabulary size | 8,192 |
101
+ | Hidden size | 256 |
102
+ | Transformer layers | 10 |
103
+ | Query heads | 4 |
104
+ | KV heads | 2 |
105
+ | Head dimension | 64 |
106
+ | Intermediate dimension | 768 |
107
+ | RoPE theta | 100,000 |
108
+ | RMSNorm epsilon | 0.000001 |
109
+
110
+ ## Triton Acceleration
111
+
112
+ The training script includes optional custom Triton kernels for selected operations.
113
+
114
+ The accelerated operations include:
115
+
116
+ - **RMSNorm:** Fused normalization forward and backward operations.
117
+ - **SwiGLU:** Fused activation and multiplication forward and backward operations.
118
+ - **RoPE:** Rotary position embedding forward and backward operations.
119
+
120
+ Attention continues to use PyTorch SDPA, while linear projections use the model's existing PyTorch layers.
121
+
122
+ Triton is optional. If it is unavailable or disabled, the model falls back to its PyTorch implementations.
123
+
124
+ Set `NOVI_DISABLE_TRITON=1` to explicitly disable the Triton kernels.
125
+
126
+ ## Training
127
+
128
+ Novi Mini Base is pretrained from scratch using **BananaAll**.
129
+
130
+ The training script configures a total target of **15 billion tokens**, divided into two training phases.
131
+
132
+ ### Training Configuration
133
+
134
+ | Setting | Value |
135
+ |---|---:|
136
+ | Training framework | BananaAll |
137
+ | Training mode | Pretraining |
138
+ | Training objective | Next-token prediction |
139
+ | Target tokens | **15 billion** |
140
+ | Sequence length | 2,048 |
141
+ | Per-device batch size | 2 |
142
+ | Gradient accumulation | 8 |
143
+ | Effective batch size | 16 sequences on one GPU |
144
+ | Learning rate | **0.003** |
145
+ | Warmup steps | 2,000 |
146
+ | Stable phase | 85% |
147
+ | Cooldown phase | 15% |
148
+ | Scheduler | Custom warmup-stable-cosine cooldown |
149
+ | Weight decay | 0.01 |
150
+ | Adam beta 1 | 0.9 |
151
+ | Adam beta 2 | 0.95 |
152
+ | Maximum gradient norm | 1.0 |
153
+ | Precision | Automatic |
154
+ | Torch compilation | Enabled, with fallback |
155
+ | Random seed | 1337 |
156
+ | Logging interval | 100 steps |
157
+ | Checkpoint interval | 500 steps |
158
+
159
+ The configured 457,764 optimizer steps assume the single-GPU batch configuration used for this run. The script calculates the planned step count from the token quotas, sequence length, batch size, and gradient accumulation.
160
+
161
+ ### Learning-Rate Schedule
162
+
163
+ The training schedule has three stages:
164
+
165
+ 1. **Warmup:** The learning rate increases over the first 2,000 optimizer steps.
166
+ 2. **Stable:** The learning rate remains at its configured maximum through the stable training phase.
167
+ 3. **Cosine cooldown:** The learning rate gradually decreases during the final 15% of training.
168
+
169
+ The stable phase and cooldown phase each have their own dataset mixture.
170
+
171
+ ## Training Data
172
+
173
+ The training configuration uses five Hugging Face dataset repositories, with multiple configurations from some repositories.
174
+
175
+ ### Dataset Sources
176
+
177
+ | Dataset | Configuration |
178
+ |---|---|
179
+ | `HuggingFaceTB/smollm-corpus` | `fineweb-edu-dedup` |
180
+ | `HuggingFaceTB/smollm-corpus` | `cosmopedia-v2` |
181
+ | `mlfoundations/dclm-baseline-1.0` | Default |
182
+ | `HuggingFaceTB/finemath` | `finemath-3plus` |
183
+ | `HuggingFaceTB/finemath` | `infiwebmath-3plus` |
184
+ | `nvidia/OpenMathInstruct-2` | Default |
185
+ | `HuggingFaceTB/smoltalk` | `all` |
186
+
187
+ All configured sources use their `train` split.
188
+
189
+ ### Stable Phase Dataset Weights
190
+
191
+ | Dataset configuration | Weight |
192
+ |---|---:|
193
+ | SmolLM Corpus — FineWeb-Edu Dedup | 43.7% |
194
+ | DCLM Baseline 1.0 | 28.3% |
195
+ | SmolLM Corpus — Cosmopedia v2 | 16.0% |
196
+ | FineMath — FineMath 3+ | 5.0% |
197
+ | OpenMathInstruct 2 | 3.0% |
198
+ | FineMath — InfiWebMath 3+ | 2.0% |
199
+ | SmolTalk | 2.0% |
200
+ | **Total** | **100%** |
201
+
202
+ ### Cosine Cooldown Dataset Weights
203
+
204
+ | Dataset configuration | Weight |
205
+ |---|---:|
206
+ | SmolLM Corpus — FineWeb-Edu Dedup | 37.0% |
207
+ | DCLM Baseline 1.0 | 5.0% |
208
+ | SmolLM Corpus — Cosmopedia v2 | 25.0% |
209
+ | FineMath — FineMath 3+ | 15.0% |
210
+ | OpenMathInstruct 2 | 13.0% |
211
+ | SmolTalk | 5.0% |
212
+ | **Total** | **100%** |
213
+
214
+ The training worker streams dataset rows and samples from the configured mixture. Each phase receives its own token allocation, with the dataset weights determining the relative token quotas.
215
+
216
+ The training script also records the resolved dataset token allocations in `dataset_tokens.json` when the run completes.
217
+
218
+ ## Tokenizer
219
+
220
+ Novi Mini Base uses a byte-level BPE tokenizer trained from the configured pretraining dataset mixture.
221
+
222
+ | Property | Value |
223
+ |---|---|
224
+ | Tokenizer algorithm | BPE |
225
+ | Pre-tokenizer | ByteLevel |
226
+ | Decoder | ByteLevel |
227
+ | Vocabulary size | 8,192 |
228
+ | Minimum token frequency | 2 |
229
+ | Special tokens | `[PAD]`, `[BOS]`, `[EOS]`, `[UNK]` |
230
+ | Tokenizer training samples | 10,000 |
231
+
232
+ The tokenizer is trained separately before model initialization. The model vocabulary is then configured to match the tokenizer.
233
+
234
+ ## Checkpoints
235
+
236
+ The training script automatically uploads checkpoints to Hugging Face every 500 optimizer steps.
237
+
238
+ It also supports automatic recovery by locating the newest complete remote checkpoint and resuming training from its saved state.
239
+
240
+ A complete recovery checkpoint includes model weights, optimizer state, scheduler state, trainer state, and random-number-generator state.
241
+
242
+ **Checkpoint repository:**
243
+
244
+ https://huggingface.co/Novi-AI/Novi-Mini-Base-Checkpoints
245
+
246
+ ## Loading the Model
247
+
248
+ Novi Mini Base uses a custom Transformers architecture.
249
+
250
+ The model repository includes custom configuration and modeling files. Loading may require `trust_remote_code=True`.
251
+
252
+ Only enable remote model code after reviewing and trusting the repository's implementation.
253
+
254
+ ```python
255
+ import torch
256
+ from transformers import AutoModelForCausalLM, AutoTokenizer
257
+
258
+ model_id = "Novi-AI/Novi-Mini-Base-Preview-2"
259
+
260
+ tokenizer = AutoTokenizer.from_pretrained(
261
+ model_id,
262
+ trust_remote_code=True,
263
+ )
264
+
265
+ model = AutoModelForCausalLM.from_pretrained(
266
+ model_id,
267
+ trust_remote_code=True,
268
+ )
269
+
270
+ model.eval()
271
+
272
+ prompt = "The future of small language models is"
273
+
274
+ inputs = tokenizer(prompt, return_tensors="pt")
275
+
276
+ with torch.no_grad():
277
+ outputs = model.generate(
278
+ **inputs,
279
+ max_new_tokens=100,
280
+ do_sample=True,
281
+ temperature=0.8,
282
+ top_p=0.9,
283
+ pad_token_id=tokenizer.pad_token_id,
284
+ eos_token_id=tokenizer.eos_token_id,
285
+ )
286
+
287
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
288
+ ```
289
+
290
+ This is a basic text-continuation example. Novi Mini Base is a pretrained base model, not an instruction-tuned chatbot.
291
+
292
+ ## Intended Use
293
+
294
+ This is an experimental pretrained model intended for:
295
+
296
+ - Language-model experimentation.
297
+ - Fine-tuning experiments.
298
+ - Small-model research.
299
+ - Architecture evaluation.
300
+ - Testing lightweight language models.
301
+ - Studying compact autoregressive pretraining.
302
+
303
+ This preview is not intended to be treated as a finished production model.
304
+
305
+ ## Limitations
306
+
307
+ Novi Mini Base has approximately 9.97 million parameters, making it considerably smaller than most general-purpose language models.
308
+
309
+ It may:
310
+
311
+ - Produce repetitive or incoherent text.
312
+ - Generate inaccurate or fabricated information.
313
+ - Struggle with complex reasoning.
314
+ - Have limited factual knowledge.
315
+ - Fail to maintain consistency over longer sequences.
316
+ - Perform poorly on instruction-following tasks.
317
+
318
+ The model is a base pretrained checkpoint, so it is not specifically optimized for conversational instruction following.
319
+
320
+ ## Evaluation
321
+
322
+ No independent benchmark results are included in this preview.
323
+
324
+ Training progress and loss measurements should not be interpreted as benchmark scores or proof of model quality.
325
+
326
+ ## Project
327
+
328
+ Developed by **Novi AI** as part of **Project Kairo**.
329
+
330
+ - Preview model: `Novi-AI/Novi-Mini-Base-Preview-2`
331
+ - Main model: `Novi-AI/Novi-Mini-Base`
332
+ - Checkpoints: `Novi-AI/Novi-Mini-Base-Checkpoints`
333
+
334
+ ## Disclaimer
335
+
336
+ This repository contains an intermediate training preview. Performance, capabilities, and output quality are not representative of the final model.
337
+
338
+ The model is experimental and may produce inaccurate, incomplete, or nonsensical outputs.
339
+
340
+ ---
341
+
342
+ *Novi AI 2026 — Project Kairo*