VoidOSS commited on
Commit
3a869aa
·
verified ·
1 Parent(s): 23253ec

Upload README.md for GStack v4.1 PythonCode comeback release

Browse files
Files changed (1) hide show
  1. README.md +85 -0
README.md ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - custom-architecture
5
+ - gstack
6
+ - voidnet
7
+ - linear-attention
8
+ - hybrid-architecture
9
+ - python-code
10
+ - character-level
11
+ - from-scratch
12
+ library_name: pytorch
13
+ ---
14
+
15
+ # `GStack v4.1` — Python Code (`VoidOSS/GStack-v4.1-PythonCode`)
16
+
17
+ > **Second Comeback Release from `VoidOSS`** — A **9,410,614-parameter (`9.41M`)** hybrid sequence architecture built from scratch on a single **8 GB consumer RTX 4060 Ti (`$0.00` cloud spend)** that achieves **`1.54×` higher data efficiency** than a modern `10.70M` **FlashAttention + RoPE + SwiGLU Transformer** on real unseen Python source code while cutting KV-cache memory by **67% (`1/3` the attention layers)**.
18
+
19
+ ![GStack v4.1 vs FlashRoPE-TF Real Python Code](assets/gstack_v4_1_code.png)
20
+
21
+ ---
22
+
23
+ ## Architecture Highlights (`GStack v4.1`)
24
+
25
+ | Component | Normal Transformer | **`GStack v4.1`** |
26
+ | :--- | :--- | :--- |
27
+ | **Long-Range Memory (67% of layers)** | 100% quadratic `T × T` attention | **`Neural Context`:** 5 fixed power-of-2 `O(n)` linear memory horizons (`128, 256, 512, 1024, 2048`) |
28
+ | **Active Working Memory (67% of layers)** | None | **`Associative Neural Attention`:** 4 self-cleaning working-memory concept slots (`24 × 48` key-value state) with differentiable soft eviction |
29
+ | **Verbatim Recall (33% of layers)** | All 6/6 layers | **2× `UltraFlashAttention` Sniper Layers** (Layers 3 & 6) with **QK-RMSNorm + RoPE** (`1/3` KV cache!) |
30
+ | **Feed-Forward Weights** | Static frozen FFN matrices | **Per-Layer `Gweight` (Galaxyweights):** Dedicated BF16 SwiGLU Core + 4 low-rank specialist Orbits dynamically dialed per token by `Neural Attention` |
31
+ | **Input Stream** | Shift-invariant tokens | Shift-invariant raw Python characters + multi-scale causal char-glue (`k=3 + k=7`) |
32
+
33
+ ---
34
+
35
+ ## Verified Benchmarks (Strict Zero-Leakage Causality QA: `past_diff = 0.00e+00`)
36
+
37
+ Evaluated on **`2,584` train / `287` completely unseen validation `.py` files** (`39.80M` train chars / `5.28M` unseen val chars, strict file-level split):
38
+
39
+ | Model | Exact Params | KV Cache | Data Seen | Unseen `.py` `val_BPC` |
40
+ | :--- | :---: | :---: | :---: | :---: |
41
+ | `FlashRoPE-TF` (modern Transformer baseline, 2.0m) | `10.70M` | `100%` (6/6) | `14.8M` chars | `1.2796 BPC` |
42
+ | **`GStack v4.1` (3-Min Benchmark)** | **`9.41M` (`−1.29M`)** | **`33%` (2/6)** | **`14.4M` chars** | **`1.0802 BPC`** *(48b: `1.1107` — **`1.54×` higher data efficiency!**)* |
43
+ | **`GStack v4.1` (This 5.0-Min Published Release)** | **`9.41M`** | **`33%` (2/6)** | **`24.5M` chars (`1,494` steps)** | **`0.9602 BPC`** |
44
+
45
+ ### Flat `O(n)` Long-Context Scaling Proof (`2K → 32K` on 8 GB VRAM)
46
+ ![VoidNet-G O(n) Scaling](assets/voidnet_g_3min.png)
47
+
48
+ ---
49
+
50
+ ## Quick Start (`from_pretrained`)
51
+
52
+ ```python
53
+ from huggingface_hub import hf_hub_download
54
+ import importlib.util
55
+
56
+ # Load standalone modeling_gstack.py directly from this repo
57
+ mod_path = hf_hub_download("VoidOSS/GStack-v4.1-PythonCode", "modeling_gstack.py")
58
+ spec = importlib.util.spec_from_file_location("modeling_gstack", mod_path)
59
+ mod = importlib.util.module_from_spec(spec)
60
+ spec.loader.exec_module(mod)
61
+
62
+ model = mod.GStackModel.from_pretrained("VoidOSS/GStack-v4.1-PythonCode")
63
+ print(model.generate("def parse_config(filepath, default_timeout=30):\n ", max_chars=240))
64
+ ```
65
+
66
+ ### Sample Unseen Python Completion (This Release)
67
+ ```python
68
+ def parse_config(filepath, default_timeout=30):
69
+ """Load key-value settings from a config file."""
70
+ if filepath is None:
71
+ filepath = filepath.size() * size
72
+ elif filepath is None:
73
+ filepath = filepath.size()
74
+ with warnings.catch_warnings(filepath, default_timeout=30):
75
+ filepath = filepath.size()
76
+ filepath = filep
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Training Details
82
+ - **Hardware:** Single NVIDIA GeForce RTX 4060 Ti (8 GB VRAM)
83
+ - **Cloud Cost:** `$0.00`
84
+ - **Training Time:** `5.02` minutes (`1,494` steps, `24.5M` chars, WSD cosine LR schedule)
85
+ - **Strict Causality QA:** Passed (`past_diff = 0.00e+00`)