docs(hf): add 33_Genesis_Format_Spec/README.md matching whitepaper standard
Browse files- 33_Genesis_Format_Spec/README.md +121 -0
33_Genesis_Format_Spec/README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: LicenseRef-Zymatica-Covenant-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- genesis
|
| 5 |
+
- binary-format
|
| 6 |
+
- svd-compression
|
| 7 |
+
- low-rank-factorization
|
| 8 |
+
- spectral-decomposition
|
| 9 |
+
- zero-ram
|
| 10 |
+
- cuda-kernels
|
| 11 |
+
- edge-ai
|
| 12 |
+
- language-u
|
| 13 |
+
language:
|
| 14 |
+
- en
|
| 15 |
+
pipeline_tag: text-generation
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
<p align="center">
|
| 19 |
+
<img src="language_u_logo.jpg" width="95%" />
|
| 20 |
+
</p>
|
| 21 |
+
|
| 22 |
+
# The `.genesis` Binary Format Specification
|
| 23 |
+
## Dynamic Low-Rank SVD and Spectral Projection Registry
|
| 24 |
+
### Watermark: `ip zymatica.space | astronautshe.com | devsone.com`
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
## π DOWNLOAD DEDICATED SPECIFICATION WHITEPAPER (PDF)
|
| 29 |
+
π **[Click Here to Download the Dedicated `.genesis` Format Whitepaper PDF](GENESIS_FORMAT_WHITEPAPER.pdf)**
|
| 30 |
+
*This is the official PDF whitepaper dedicated strictly to the `.genesis` binary specification and low-rank JIT compilation runtime.*
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## π READ DEDICATED WHITEPAPER IN MARKDOWN
|
| 35 |
+
π **[Read the Dedicated `.genesis` Format Whitepaper (Markdown)](GENESIS_FORMAT_WHITEPAPER.md)**
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## π DOWNLOAD SUMERIAN GENERAL WHITEPAPER (PDF)
|
| 40 |
+
π **[Click Here to Download the Sumerian `.genesis` Protocol Technical Whitepaper PDF](gemma-4-sumerian-whitepaper-v3.pdf)**
|
| 41 |
+
*Warning: This document contains advanced details on sub-atomic weight factorization and Zero-RAM meta compilation.*
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## 1. Executive Abstract & Context
|
| 46 |
+
|
| 47 |
+
For decades, the weight files of neural language networks have been stored as massive, dense, unstructured float arrays (e.g., `.safetensors`, `.bin`, `.pth`). While suitable for high-bandwidth servers, this layout is completely incompatible with extreme-constrained edge hardware.
|
| 48 |
+
|
| 49 |
+
The **`.genesis` file format** represents a new paradigm in structural neural compression. Rather than storing flat weights, a `.genesis` file acts as an **uncompressed structural registry** of low-rank factored manifolds. By factorizing large projection weights into Singular Value Decomposition (SVD) components and keeping only the low-frequency spectral coefficients via Discrete Cosine Transforms (DCT-II), the raw weight matrices are represented at the micro-byte level.
|
| 50 |
+
|
| 51 |
+
Upon boot, the receiver-side JIT execution runtime compiles the layer graph directly from the SVD/DCT factors without allocating dense memory matrices, reducing process memory from **35 GB down to under 230 MB** (Zero-RAM Meta).
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## 2. `.genesis` Binary Layout & File Structure
|
| 56 |
+
|
| 57 |
+
The `.genesis` format is a strict, low-overhead binary layout designed for fast seeking, parsing, and JIT dynamic loading:
|
| 58 |
+
|
| 59 |
+
```
|
| 60 |
+
+-----------------------------------------------------------------+
|
| 61 |
+
| Magic Marker: [0x47, 0x45, 0x4E, 0x45] ('GENE') or ('PERF') | -> 4 Bytes
|
| 62 |
+
+-----------------------------------------------------------------+
|
| 63 |
+
| Major Version (1 Byte) | Minor Version (1 Byte) | -> 2 Bytes
|
| 64 |
+
+-----------------------------------------------------------------+
|
| 65 |
+
| Model Metadata Segment Offset (Big-Endian uint32) | -> 4 Bytes
|
| 66 |
+
+-----------------------------------------------------------------+
|
| 67 |
+
| Layer Configuration Segment Offset (Big-Endian uint32) | -> 4 Bytes
|
| 68 |
+
+-----------------------------------------------------------------+
|
| 69 |
+
| Weights Payload Segment Offset (Big-Endian uint32) | -> 4 Bytes
|
| 70 |
+
+-----------------------------------------------------------------+
|
| 71 |
+
| Layer Norm / Non-linear Arrays (Embeddings, RMSNorms) | -> Raw Tensors
|
| 72 |
+
+-----------------------------------------------------------------+
|
| 73 |
+
| Quantized Low-Rank Projections (U_q, V_q, scale_u, scale_v) | -> SVD Factors
|
| 74 |
+
+-----------------------------------------------------------------+
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
### 2.1 Low-Rank Approximation Mechanics
|
| 78 |
+
For each transformer block projection matrix $W \in \mathbb{R}^{M imes N}$, the `.genesis` registry records SVD rank-factors $U_q \in \mathbb{Z}^{M imes R}$ and $V_q \in \mathbb{Z}^{N imes R}$ quantized to Q8 (int8) or 3-bit vectorized matrices alongside 32-bit float scale coefficients:
|
| 79 |
+
|
| 80 |
+
$$W pprox \left(U_q imes s_u
|
| 81 |
+
ight) imes \left(V_q imes s_v
|
| 82 |
+
ight)^T$$
|
| 83 |
+
|
| 84 |
+
where:
|
| 85 |
+
* **Attention Layers (`q_proj`, `k_proj`, `v_proj`, `o_proj`):** Truncated to rank $R = 64$.
|
| 86 |
+
* **MLP Layers (`gate_proj`, `up_proj`, `down_proj`):** Truncated to rank $R = 128$.
|
| 87 |
+
|
| 88 |
+
---
|
| 89 |
+
|
| 90 |
+
## 3. The Compilers, Quantizers, and Decoders
|
| 91 |
+
|
| 92 |
+
This repository contains the complete specification and reference implementation files for reading, writing, and compiling `.genesis` files:
|
| 93 |
+
|
| 94 |
+
### 3.1 Raw Matrix compilers
|
| 95 |
+
* **`safetensors_to_genesis.py`**: Compiles dense sharded `.safetensors` files into a single, structured `.genesis` low-rank SVD output.
|
| 96 |
+
* **`quantize_perfect_genesis.py`**: Compiles full-precision SVD matrices into integer-scaled arrays.
|
| 97 |
+
|
| 98 |
+
### 3.2 Dynamic Quantization Suites
|
| 99 |
+
* **`quantize_genesis_int8_to_3bit.py`**: Compresses 8-bit singular vectors into a vectorized 3-bit coordinate space mapping values in the range `[-3, 3]`.
|
| 100 |
+
* **`quantize_genesis_3bit_to_dct.py`** & **`quantize_genesis_dct_to_grad.py`**: Applies Discrete Cosine Transform (DCT-II) spectral filtering over the weights, repacking values into ultra-compact symbol classes (Gradient Atoms).
|
| 101 |
+
|
| 102 |
+
### 3.3 Dynamic Decoders & Execution Proofs
|
| 103 |
+
* **`decode_gemma4.py`**: Reads `.genesis` files and JIT-reconstructs the dense weight matrices for Google Gemma-4 model shards.
|
| 104 |
+
* **`decode_procedural.py`** & **`decode_tinyqwen.py`**: Implements matching pursuit dictionary decoders to regenerate neural weights procedurally.
|
| 105 |
+
* **`ZERO_RAM_META_SPEC.md`**: Outlines the memory-addressing constraints to execute `.genesis` models under 230 MB of RAM.
|
| 106 |
+
|
| 107 |
+
---
|
| 108 |
+
|
| 109 |
+
## 4. Academic Citation & Intellectual Property
|
| 110 |
+
The `.genesis` binary specification and low-rank JIT execution code are protected under the proprietary licenses of **zymatica.space**.
|
| 111 |
+
|
| 112 |
+
* **Zymatica.space:** Core compression framework and binary layout specifications.
|
| 113 |
+
* **astronautshe.com:** Low-overhead edge execution runtimes and FFI pointer systems.
|
| 114 |
+
* **Devs One:** Core compiler development, SFT healing routines, and automated verification loops.
|
| 115 |
+
* **The AI Collective:** Global publisher.
|
| 116 |
+
|
| 117 |
+
*Watermark: ip zymatica.space | astronautshe.com | devsone.com β We Are TheAiCollective.art*
|
| 118 |
+
|
| 119 |
+
<p align="center">
|
| 120 |
+
<img src="Logo.jpg" width="60%" />
|
| 121 |
+
</p>
|