SNAPKITTYWEST commited on
Commit
729eb92
Β·
verified Β·
1 Parent(s): ab48644

Add HF model card metadata for discoverability

Browse files
Files changed (1) hide show
  1. README.md +178 -160
README.md CHANGED
@@ -1,160 +1,178 @@
1
- # Hilbert
2
-
3
- [![License: Tri-License](https://img.shields.io/badge/License-BSL%201.1%20%7C%20AGPL%203.0%20%7C%20MPL%202.0-blue.svg)](LICENSE.tri)
4
- [![CUDA](https://img.shields.io/badge/CUDA-Hopper%20%7C%20Ampere-76B900?logo=nvidia)](kernels/)
5
- [![Architecture](https://img.shields.io/badge/Params-~4B-orange.svg)](config/architecture.json)
6
- [![Data](https://img.shields.io/badge/Training%20Data-Public%20Only-green.svg)](training/pretrain_config.yaml)
7
- [![Status](https://img.shields.io/badge/Status-Pre--Training-yellow.svg)](#status)
8
- [![Built From Scratch](https://img.shields.io/badge/Built-From%20Scratch-black.svg)](#why)
9
-
10
- ---
11
-
12
- > **WARNING: This model has NOT been trained yet.** This repository contains the complete architecture specification, production CUDA kernels, GGUF export pipeline, and training configuration. Weights do not exist. Do not attempt to load or deploy β€” there is no checkpoint to load. Training requires 8x H100 GPUs (or equivalent compute).
13
-
14
- ---
15
-
16
- Sovereign language model built from scratch. No fine-tune. No LoRA. No dependency on NVIDIA, Meta, Mistral, or any other lab's weights.
17
-
18
- Named after David Hilbert β€” the mathematician who attempted to formalize all of mathematics.
19
-
20
- ## What This Is
21
-
22
- A complete, from-scratch transformer trained exclusively on public internet data. Every component is original:
23
-
24
- - **Architecture**: Standard decoder-only transformer (GQA + SwiGLU + RMSNorm + RoPE)
25
- - **CUDA Kernels**: Hand-written for H100/A100 tensor cores
26
- - **Training Data**: Public domain + permissive-licensed sources only
27
- - **GGUF Export**: Direct deployment via llama.cpp without any vendor lock-in
28
-
29
- ## Why
30
-
31
- Fine-tuning is a lease. You modify someone else's weights, you carry their name, you depend on their license, and you can't clearly say what's yours. If NVIDIA changes their license tomorrow, your "fine-tune" is gone.
32
-
33
- Hilbert is built from the ground up so the weights are ours. The name is ours. The architecture is public knowledge that no one can patent. The training data is public. The result is sovereign.
34
-
35
- ## Architecture
36
-
37
- | Parameter | Value |
38
- |-----------|-------|
39
- | Parameters | ~4B |
40
- | Hidden Dim | 2048 |
41
- | Layers | 24 |
42
- | Attention Heads | 16 (GQA: 4 KV heads) |
43
- | MLP Dim | 5504 (SwiGLU) |
44
- | Context | 8192 tokens |
45
- | Vocab | 32K BPE |
46
- | Position | RoPE (theta=10000, full head rotation) |
47
- | Norm | RMSNorm (eps=1e-5) |
48
- | Training | BF16, AdamW, cosine LR |
49
- | Deployment | Q4_K_M via GGUF/llama.cpp |
50
-
51
- ## Structure
52
-
53
- ```
54
- hilbert/
55
- β”œβ”€β”€ config/
56
- β”‚ └── architecture.json # Full structural specification
57
- β”œβ”€β”€ kernels/
58
- β”‚ β”œβ”€β”€ rmsnorm.cu # Warp-shuffle RMSNorm
59
- β”‚ β”œβ”€β”€ attention_gqa.cu # FlashAttention-2 GQA
60
- β”‚ β”œβ”€β”€ mlp_swiglu.cu # Fused Gate+Up GEMM with SwiGLU epilogue
61
- β”‚ └── rope.cu # Rotary Position Embedding
62
- β”œβ”€β”€ gguf/
63
- β”‚ └── export_gguf.py # PyTorch β†’ GGUFv3 conversion
64
- β”œβ”€β”€ training/
65
- β”‚ └── pretrain_config.yaml # Full training specification
66
- └── LICENSE.tri
67
- ```
68
-
69
- ## CUDA Kernels
70
-
71
- All kernels target NVIDIA Hopper (H100) and Ampere (A100) tensor cores:
72
-
73
- | Kernel | Technique | Key Feature |
74
- |--------|-----------|-------------|
75
- | `rmsnorm.cu` | Warp-shuffle cooperative reduction | FP32 accumulation, single-pass |
76
- | `attention_gqa.cu` | FlashAttention-2 tiling | Online softmax, GQA head sharing |
77
- | `mlp_swiglu.cu` | Fused dual-GEMM | Gate+Up computed simultaneously, SiLU in epilogue |
78
- | `rope.cu` | Per-pair rotation | Supports partial rotation, KV-cache continuation |
79
-
80
- ## Training Data
81
-
82
- Public sources only. No proprietary datasets. No scraped content behind ToS walls.
83
-
84
- | Source | Weight | License |
85
- |--------|--------|---------|
86
- | RedPajama v2 (CC dedupe) | 40% | Public domain |
87
- | arXiv (math/physics/cs) | 15% | CC-BY |
88
- | GitHub (permissive only) | 15% | MIT/Apache/BSD |
89
- | Stack Exchange | 10% | CC-BY-SA |
90
- | Wikipedia (all langs) | 10% | CC-BY-SA |
91
- | Public domain books | 5% | Pre-1928 |
92
- | Formal proofs (Lean4/Agda/Coq) | 5% | Permissive OSS |
93
-
94
- ## Deployment
95
-
96
- ```bash
97
- # Export trained checkpoint to GGUF
98
- python gguf/export_gguf.py \
99
- --checkpoint checkpoints/hilbert-4b-final.pt \
100
- --config config/architecture.json \
101
- --output hilbert-4b-q4km.gguf
102
-
103
- # Run via llama.cpp
104
- ./llama-server -m hilbert-4b-q4km.gguf -c 8192 --port 8080
105
- ```
106
-
107
- ## Legal Clarity
108
-
109
- - Architecture: Standard transformer (public knowledge, no patents applicable)
110
- - Kernels: Original implementation (written by us)
111
- - Training data: All public domain or permissive-licensed
112
- - Weights: Trained from random initialization (no one else's weights)
113
- - Name: Hilbert (no trademark conflict)
114
-
115
- This model belongs to us. Not as a legal argument β€” as a mathematical fact.
116
-
117
- ## Status
118
-
119
- | Phase | Status | Notes |
120
- |-------|--------|-------|
121
- | Architecture Design | COMPLETE | Fully specified, all tensor shapes defined |
122
- | CUDA Kernels | COMPLETE | RMSNorm, FlashAttn-2 GQA, fused SwiGLU, RoPE |
123
- | GGUF Pipeline | COMPLETE | Export script ready for trained checkpoint |
124
- | Training Config | COMPLETE | Data mix, hyperparameters, hardware plan |
125
- | Tokenizer Training | NOT STARTED | BPE on RedPajama subset |
126
- | Pre-Training | NOT STARTED | Requires 8x H100 compute |
127
- | Evaluation | NOT STARTED | Benchmarks TBD post-training |
128
- | GGUF Release | NOT STARTED | Q4_K_M quantized model for llama.cpp |
129
-
130
- ---
131
-
132
- ## Disclosure
133
-
134
- This is an independent research project. Hilbert is not affiliated with, endorsed by, or derived from any existing model or lab.
135
-
136
- **IP Provenance:**
137
- - The transformer architecture (attention + FFN + residual) is published academic work (Vaswani et al., 2017) β€” no entity owns it
138
- - Grouped-Query Attention is published (Ainslie et al., 2023) β€” no patent encumbrance
139
- - SwiGLU is published (Shazeer, 2020) β€” standard practice
140
- - RoPE is published (Su et al., 2021) β€” open technique
141
- - FlashAttention tiling is published (Dao, 2022; Dao, 2023) β€” algorithm only, our implementation is original
142
- - All CUDA kernel code in this repository is original work
143
- - No weights, activations, distillation outputs, or training artifacts from any existing model are used
144
- - Training data consists exclusively of public domain and permissive-licensed sources
145
-
146
- **What this is NOT:**
147
- - NOT a fine-tune of Nemotron, LLaMA, Mistral, or any other model
148
- - NOT a quantized/pruned/distilled version of an existing model
149
- - NOT using any proprietary training data
150
- - NOT dependent on any vendor SDK beyond the CUDA compiler
151
-
152
- **Naming:** "Hilbert" refers to David Hilbert (1862-1943), mathematician. No trademark conflict exists with any AI product or service.
153
-
154
- ---
155
-
156
- ## License
157
-
158
- Tri-licensed: BSL-1.1 + AGPL-3.0 + MPL-2.0. See [LICENSE.tri](LICENSE.tri).
159
-
160
- Copyright (C) 2026 Jessica L. Williams / SNAPKITTYWEST
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: agpl-3.0
3
+ library_name: transformers
4
+ tags:
5
+ - cuda
6
+ - kernels
7
+ - flash-attention
8
+ - sovereign-ai
9
+ - from-scratch
10
+ - ampere
11
+ language:
12
+ - en
13
+ pipeline_tag: text-generation
14
+ model-index:
15
+ - name: hilbert-4b
16
+ results: []
17
+ ---
18
+
19
+ # Hilbert
20
+
21
+ [![License: Tri-License](https://img.shields.io/badge/License-BSL%201.1%20%7C%20AGPL%203.0%20%7C%20MPL%202.0-blue.svg)](LICENSE.tri)
22
+ [![CUDA](https://img.shields.io/badge/CUDA-Hopper%20%7C%20Ampere-76B900?logo=nvidia)](kernels/)
23
+ [![Architecture](https://img.shields.io/badge/Params-~4B-orange.svg)](config/architecture.json)
24
+ [![Data](https://img.shields.io/badge/Training%20Data-Public%20Only-green.svg)](training/pretrain_config.yaml)
25
+ [![Status](https://img.shields.io/badge/Status-Pre--Training-yellow.svg)](#status)
26
+ [![Built From Scratch](https://img.shields.io/badge/Built-From%20Scratch-black.svg)](#why)
27
+
28
+ ---
29
+
30
+ > **WARNING: This model has NOT been trained yet.** This repository contains the complete architecture specification, production CUDA kernels, GGUF export pipeline, and training configuration. Weights do not exist. Do not attempt to load or deploy β€” there is no checkpoint to load. Training requires 8x H100 GPUs (or equivalent compute).
31
+
32
+ ---
33
+
34
+ Sovereign language model built from scratch. No fine-tune. No LoRA. No dependency on NVIDIA, Meta, Mistral, or any other lab's weights.
35
+
36
+ Named after David Hilbert β€” the mathematician who attempted to formalize all of mathematics.
37
+
38
+ ## What This Is
39
+
40
+ A complete, from-scratch transformer trained exclusively on public internet data. Every component is original:
41
+
42
+ - **Architecture**: Standard decoder-only transformer (GQA + SwiGLU + RMSNorm + RoPE)
43
+ - **CUDA Kernels**: Hand-written for H100/A100 tensor cores
44
+ - **Training Data**: Public domain + permissive-licensed sources only
45
+ - **GGUF Export**: Direct deployment via llama.cpp without any vendor lock-in
46
+
47
+ ## Why
48
+
49
+ Fine-tuning is a lease. You modify someone else's weights, you carry their name, you depend on their license, and you can't clearly say what's yours. If NVIDIA changes their license tomorrow, your "fine-tune" is gone.
50
+
51
+ Hilbert is built from the ground up so the weights are ours. The name is ours. The architecture is public knowledge that no one can patent. The training data is public. The result is sovereign.
52
+
53
+ ## Architecture
54
+
55
+ | Parameter | Value |
56
+ |-----------|-------|
57
+ | Parameters | ~4B |
58
+ | Hidden Dim | 2048 |
59
+ | Layers | 24 |
60
+ | Attention Heads | 16 (GQA: 4 KV heads) |
61
+ | MLP Dim | 5504 (SwiGLU) |
62
+ | Context | 8192 tokens |
63
+ | Vocab | 32K BPE |
64
+ | Position | RoPE (theta=10000, full head rotation) |
65
+ | Norm | RMSNorm (eps=1e-5) |
66
+ | Training | BF16, AdamW, cosine LR |
67
+ | Deployment | Q4_K_M via GGUF/llama.cpp |
68
+
69
+ ## Structure
70
+
71
+ ```
72
+ hilbert/
73
+ β”œβ”€β”€ config/
74
+ β”‚ └── architecture.json # Full structural specification
75
+ β”œβ”€β”€ kernels/
76
+ β”‚ β”œβ”€β”€ rmsnorm.cu # Warp-shuffle RMSNorm
77
+ β”‚ β”œβ”€β”€ attention_gqa.cu # FlashAttention-2 GQA
78
+ β”‚ β”œβ”€β”€ mlp_swiglu.cu # Fused Gate+Up GEMM with SwiGLU epilogue
79
+ β”‚ └── rope.cu # Rotary Position Embedding
80
+ β”œοΏ½οΏ½οΏ½β”€ gguf/
81
+ β”‚ └── export_gguf.py # PyTorch β†’ GGUFv3 conversion
82
+ β”œβ”€β”€ training/
83
+ β”‚ └── pretrain_config.yaml # Full training specification
84
+ └── LICENSE.tri
85
+ ```
86
+
87
+ ## CUDA Kernels
88
+
89
+ All kernels target NVIDIA Hopper (H100) and Ampere (A100) tensor cores:
90
+
91
+ | Kernel | Technique | Key Feature |
92
+ |--------|-----------|-------------|
93
+ | `rmsnorm.cu` | Warp-shuffle cooperative reduction | FP32 accumulation, single-pass |
94
+ | `attention_gqa.cu` | FlashAttention-2 tiling | Online softmax, GQA head sharing |
95
+ | `mlp_swiglu.cu` | Fused dual-GEMM | Gate+Up computed simultaneously, SiLU in epilogue |
96
+ | `rope.cu` | Per-pair rotation | Supports partial rotation, KV-cache continuation |
97
+
98
+ ## Training Data
99
+
100
+ Public sources only. No proprietary datasets. No scraped content behind ToS walls.
101
+
102
+ | Source | Weight | License |
103
+ |--------|--------|---------|
104
+ | RedPajama v2 (CC dedupe) | 40% | Public domain |
105
+ | arXiv (math/physics/cs) | 15% | CC-BY |
106
+ | GitHub (permissive only) | 15% | MIT/Apache/BSD |
107
+ | Stack Exchange | 10% | CC-BY-SA |
108
+ | Wikipedia (all langs) | 10% | CC-BY-SA |
109
+ | Public domain books | 5% | Pre-1928 |
110
+ | Formal proofs (Lean4/Agda/Coq) | 5% | Permissive OSS |
111
+
112
+ ## Deployment
113
+
114
+ ```bash
115
+ # Export trained checkpoint to GGUF
116
+ python gguf/export_gguf.py \
117
+ --checkpoint checkpoints/hilbert-4b-final.pt \
118
+ --config config/architecture.json \
119
+ --output hilbert-4b-q4km.gguf
120
+
121
+ # Run via llama.cpp
122
+ ./llama-server -m hilbert-4b-q4km.gguf -c 8192 --port 8080
123
+ ```
124
+
125
+ ## Legal Clarity
126
+
127
+ - Architecture: Standard transformer (public knowledge, no patents applicable)
128
+ - Kernels: Original implementation (written by us)
129
+ - Training data: All public domain or permissive-licensed
130
+ - Weights: Trained from random initialization (no one else's weights)
131
+ - Name: Hilbert (no trademark conflict)
132
+
133
+ This model belongs to us. Not as a legal argument β€” as a mathematical fact.
134
+
135
+ ## Status
136
+
137
+ | Phase | Status | Notes |
138
+ |-------|--------|-------|
139
+ | Architecture Design | COMPLETE | Fully specified, all tensor shapes defined |
140
+ | CUDA Kernels | COMPLETE | RMSNorm, FlashAttn-2 GQA, fused SwiGLU, RoPE |
141
+ | GGUF Pipeline | COMPLETE | Export script ready for trained checkpoint |
142
+ | Training Config | COMPLETE | Data mix, hyperparameters, hardware plan |
143
+ | Tokenizer Training | NOT STARTED | BPE on RedPajama subset |
144
+ | Pre-Training | NOT STARTED | Requires 8x H100 compute |
145
+ | Evaluation | NOT STARTED | Benchmarks TBD post-training |
146
+ | GGUF Release | NOT STARTED | Q4_K_M quantized model for llama.cpp |
147
+
148
+ ---
149
+
150
+ ## Disclosure
151
+
152
+ This is an independent research project. Hilbert is not affiliated with, endorsed by, or derived from any existing model or lab.
153
+
154
+ **IP Provenance:**
155
+ - The transformer architecture (attention + FFN + residual) is published academic work (Vaswani et al., 2017) β€” no entity owns it
156
+ - Grouped-Query Attention is published (Ainslie et al., 2023) β€” no patent encumbrance
157
+ - SwiGLU is published (Shazeer, 2020) β€” standard practice
158
+ - RoPE is published (Su et al., 2021) β€” open technique
159
+ - FlashAttention tiling is published (Dao, 2022; Dao, 2023) β€” algorithm only, our implementation is original
160
+ - All CUDA kernel code in this repository is original work
161
+ - No weights, activations, distillation outputs, or training artifacts from any existing model are used
162
+ - Training data consists exclusively of public domain and permissive-licensed sources
163
+
164
+ **What this is NOT:**
165
+ - NOT a fine-tune of Nemotron, LLaMA, Mistral, or any other model
166
+ - NOT a quantized/pruned/distilled version of an existing model
167
+ - NOT using any proprietary training data
168
+ - NOT dependent on any vendor SDK beyond the CUDA compiler
169
+
170
+ **Naming:** "Hilbert" refers to David Hilbert (1862-1943), mathematician. No trademark conflict exists with any AI product or service.
171
+
172
+ ---
173
+
174
+ ## License
175
+
176
+ Tri-licensed: BSL-1.1 + AGPL-3.0 + MPL-2.0. See [LICENSE.tri](LICENSE.tri).
177
+
178
+ Copyright (C) 2026 Jessica L. Williams / SNAPKITTYWEST