RthItalia commited on
Commit
ddaa4ab
Β·
verified Β·
1 Parent(s): d994435

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +64 -121
README.md CHANGED
@@ -1,161 +1,104 @@
1
  ---
 
2
  license: cc-by-nc-4.0
3
- language:
4
- - en
5
- - it
6
- - py
7
- - js
8
- - cpp
9
  tags:
10
- - non-transformer
 
11
  - tcn
12
  - fractal
13
- - lora
14
- - genome
15
- - rth-code
16
- - zetagrid
17
- pipeline_tag: text-generation
18
  ---
19
 
20
- # πŸ’» RTH-Code 25B β€” Code Specialist Soul
21
-
22
- > **"L'intelligenza Γ¨ nell'architettura, non nelle GPU."**
23
- > Questa Γ¨ la **Soul Specialista per il Codice** dell'ecosistema RTH-LM (V4 Architecture).
24
- > Stesso Genome (7B) di base, ma con una "anima" addestrata per programmare (basata su V4 Expanded).
25
-
26
- ⚠️ **PROOF OF CONCEPT** ⚠️
27
- Questa Γ¨ una versione **BASE** creata per dimostrare l'efficienza scalare dell'architettura RTH-LM.
28
- - **Tempo di Training:** Solo **8 ore** su singola A40.
29
- - **Dataset:** Solo **5GB** di codice misto (Python, JS, C++, Go).
30
- - **Obiettivo:** Dimostrare che un Genome congelato puΓ² apprendere skills verticali complesse in tempi record.
31
-
32
- ---
33
 
34
- ## ⚑ Che cos'è?
 
 
 
 
 
 
 
35
 
36
- **RTH-Code 25B** non è un modello a sé stante. È una **Soul intercambiabile**.
37
- Invece di scaricare un modello da 30GB per ogni task, mantieni il **Genome congelato (7B)** e cambi solo la Soul (**~3.8GB**).
38
 
39
- Questa Soul Γ¨ stata addestrata specificamente su:
40
- - **Python** (Data Science, Backend, Torch)
41
- - **JavaScript/TypeScript** (React, Node)
42
- - **C/C++** (Systems programming)
43
- - **Rust/Go**
44
-
45
- ```mermaid
46
- graph TD
47
- G["Genome 7B<br/>(Frozen Core)"]
48
- G --> SC["πŸ”Ή Soul CODE<br/>Specialista V4 (25B)"]
49
- G --> SG["Soul Generalista<br/>Chat & Knowledge V4"]
50
- G --> SL["Soul Legal/Medical<br/>(Future)"]
51
- ```
52
-
53
- Basta **swappare** i file `.pt` (o usare il GGUF unificato) e il tuo modello passa da "filosofo" a "senior engineer" in millisecondi.
54
 
55
  ---
56
 
57
- ## πŸ“Š Specifiche Tecniche
58
 
59
- | **Feature** | **Dettaglio** |
60
- |---|---|
61
- | **Architettura** | Fractal Gated Causal TCN (No Attention) - **V4 Enhanced** |
62
- | **Parametri Totali** | **25B** (Genome + Soul V4 Expanded) |
63
- | **Dimensione Soul** | **~3.8GB** (LoRA Rank 512, ~950M params) |
64
- | **Dataset Training** | **5GB** (Misto: Python, JS, C++, Go) |
65
- | **Tempo Training** | **8 ORE** (Singola Epoch) ⏱️ |
66
- | **Contesto** | 2048+ (Teoricamente infinito grazie a TCN) |
67
- | **Loss Finale** | **1.20** βœ… |
68
- | **Hardware** | Addestrato su singola NVIDIA A40 (48GB) |
69
 
70
  ---
71
 
72
- ## πŸ› οΈ Quickstart
73
 
74
- ### Opzione 1: GGUF (Consigliata per Ollama/llama.cpp)
75
- Scarica `rth_lm_25b_code.gguf` da questo repo.
76
 
77
  ```bash
78
- # Esegui con llama.cpp
79
- ./llama-cli -m rth_lm_25b_code.gguf -p "def fibonacci(n):" -n 200
80
-
81
- # Oppure con Ollama (crea Modelfile)
82
- # FROM ./rth_lm_25b_code.gguf
83
- # SYSTEM "You are an expert coding assistant."
84
  ```
85
 
86
- ### Opzione 2: Python (Original PyTorch)
87
- Se hai giΓ  il repo [ZetaGrid](https://github.com/rthgit/ZetaGrid):
88
 
89
  ```python
90
- from ZETAGRID_INFERENCE import ZetaGrid25B
91
-
92
- # Carica il Genome base
93
- model = ZetaGrid25B("zetagrid_25b_production.npy")
94
 
95
- # Inserisci la Soul del Codice
96
- model.load_soul("zeta25b_code_FINAL.pt")
97
 
98
- print(model.generate("def quicksort(arr):"))
 
 
99
  ```
100
 
101
- ---
102
-
103
- ## πŸ§ͺ Performance & Capability
104
-
105
- RTH-Code eccelle in:
106
- 1. **Code Completion**: Autocompletamento intelligente di funzioni e classi.
107
- 2. **Refactoring**: Riscrittura di codice legacy in clean code.
108
- 3. **Docstrings**: Generazione automatica di documentazione.
109
- 4. **Unit Tests**: Scrittura di test `pytest`/`unittest`.
110
 
111
- *Nota: Essendo un'architettura No-Attention (TCN), ha un overhead di inferenza bassissimo e scala linearmente O(N) con la lunghezza del contesto.*
 
 
112
 
113
  ---
114
 
115
- ## πŸ“œ Licenza & Uso Commerciale ⚠️
116
-
117
- > **ATTENZIONE: QUESTO MODELLO NON È OPEN SOURCE COMPLETO.**
118
- > È rilasciato sotto licenza **CC BY-NC 4.0 (Creative Commons Non-Commercial)**.
119
 
120
- ### βœ… Cosa PUOI fare (Gratis):
121
- - Ricerca accademica e personale.
122
- - Test e valutazione locale.
123
- - Uso hobbyistico e no-profit.
124
- - Condividere i risultati citando l'autore.
125
-
126
- ### ❌ Cosa NON PUOI fare (Senza Licenza Commerciale):
127
- - **Usare il modello in azienda** per qualsiasi scopo (interno o esterno).
128
- - Integrare il modello in prodotti o servizi a pagamento.
129
- - Offrire API o servizi cloud basati su questo modello.
130
- - Qualsiasi attivitΓ  che generi revenue diretta o indiretta.
131
-
132
- πŸ“ž **PER USO COMMERCIALE (Enterprise / Startup):**
133
- Devi ottenere una licenza commerciale da **RTH Italia**.
134
- Contatto diretto: [**info@rthitalia.com**](mailto:info@rthitalia.com)
135
 
136
  ---
137
 
138
- ## πŸ“„ Citazione
139
-
140
- Prodotto da **RTH Italia** (Research & Technology Hub).
141
- Autore: *Christian Quintino De Luca*.
142
 
143
- Per citare il paper originale:
144
- πŸ“– **[RTH-LM: A Fractal Temporal Convolutional Language Model](https://zenodo.org/records/18622610)**
145
-
146
- ```bibtex
147
- @techreport{deluca2026rthlm,
148
- author = {De Luca, Christian Quintino},
149
- title = {RTH-LM: A Fractal Temporal Convolutional Language Model},
150
- institution = {RTH Italia (Research & Technology Hub)},
151
- year = {2026},
152
- url = {https://github.com/rthgit/ZetaGrid},
153
- doi = {10.5281/zenodo.18622610},
154
- note = {Non-commercial license. Contact RTH Italia for commercial use.}
155
- }
156
- ```
157
 
158
  ---
159
 
160
- *Costruito per dimostrare che l'efficienza batte la forza bruta.*
161
- **RTH Italia**
 
 
 
1
  ---
2
+ language: en
3
  license: cc-by-nc-4.0
 
 
 
 
 
 
4
  tags:
5
+ - zetagrid
6
+ - cpu-da
7
  - tcn
8
  - fractal
9
+ - 25b
10
+ datasets:
11
+ - custom
12
+ metrics:
13
+ - loss
14
  ---
15
 
16
+ # πŸ“‡ Model Card: RTH-LM (25B)
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ ## Model Details
19
+ - **Name:** RTH-LM (25B)
20
+ - **Architecture:** Fractal Gated Causal TCN (Temporal Convolutional Network)
21
+ - **Parameters:** 7B (Physical) / 25B (Effective Fractal Capacity)
22
+ - **Author:** Christian Quintino De Luca (RTH Italia)
23
+ - **Release Date:** February 2026
24
+ - **License:** CC BY-NC 4.0 (Research) / Commercial (Enterprise)
25
+ - **Paper (Figshare):** https://doi.org/10.6084/m9.figshare.31376560
26
 
27
+ RTH-LM (25B) is a **Fractal TCN (Temporal Convolutional Network)** Language Model, designed for high-efficiency inference on CPU/Consumer Hardware and massive scalability on GPUs.
 
28
 
29
+ Unlike Traditional Transformers, ZetaGrid uses a **Gated Causal TCN backbone** with **Fractal Scaling**, allowing it to model long-range dependencies with significantly lower memory overhead during inference.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  ---
32
 
33
+ ## πŸ“Š Model Specs
34
 
35
+ | Feature | Specification |
36
+ | :--- | :--- |
37
+ | **Parameters** | 25 Billion (25B) |
38
+ | **Architecture** | Fractal Gated TCN (Non-Transformer) |
39
+ | **Layers** | 32 (Phase 2) |
40
+ | **Context Window** | 256 - 1024 (Fractal Expansion Capable) |
41
+ | **Training Data** | 1.48 GB Cleaned Text (Wiki/Books) |
42
+ | **Final Loss** | **1.0675** (Phase 2) |
43
+ | **Quantization** | QULP 2-bit (Supported) |
 
44
 
45
  ---
46
 
47
+ ## πŸš€ Usage (Inference)
48
 
49
+ ### Prerequisites
50
+ You need the `cpu_da` framework or the Python inference script.
51
 
52
  ```bash
53
+ # Clone the repo
54
+ git clone https://github.com/rth-italia/cpu-da
55
+ cd cpu-da
 
 
 
56
  ```
57
 
58
+ ### Running the Model (Python)
59
+ Ensure you have `zeta25b_step15000.pt` (Weights) and `zetagrid_25b_production.npy` (Genome).
60
 
61
  ```python
62
+ import torch
63
+ from ZETAGRID_INFERENCE import load_model, generate
 
 
64
 
65
+ # Load 25B Model
66
+ model = load_model("zeta25b_step15000.pt", genome="zetagrid_25b_production.npy")
67
 
68
+ # Generate
69
+ text = generate(model, "The future of AI is")
70
+ print(text)
71
  ```
72
 
73
+ ### QULP 2-bit Inference (Ultra-Low Memory)
74
+ To run on consumer CPUs with <2GB RAM:
 
 
 
 
 
 
 
75
 
76
+ ```bash
77
+ python QULP_INFERENCE.py --model zeta25b_2bit.qulp
78
+ ```
79
 
80
  ---
81
 
82
+ ## 🧬 Architecture: The "Fractal Soul"
 
 
 
83
 
84
+ ZetaGrid is **NOT** a Transformer. It is a TCN-based organism.
85
+ - **Genome:** A fixed 7GB "DNA" bank of weights (`zetagrid_25b_production.npy`).
86
+ - **Phenotype:** The model layers are "grown" from this genome on the fly.
87
+ - **Training:** Only the "Soul" (LoRA Adapters + Norms) is trained (~300MB), making the model extremely portable.
88
+ - **Fractal Scaling:** The 25B model can be fractally expanded to 50B, 100B+ by duplicating layers and adding self-linear noise.
 
 
 
 
 
 
 
 
 
 
89
 
90
  ---
91
 
92
+ ## πŸ“ˆ Performance
 
 
 
93
 
94
+ - **Phase 1 (Evolution):** 200 Generations of Genome Optimization.
95
+ - **Phase 2 (Gradient):** 15,000 Steps of TCN+LoRA Fine-Tuning.
96
+ - **Convergence:** Beat target loss of 1.5, achieving **1.0675**.
97
+ - **Capabilities:** Narrative coherence, English syntax mastery, abstract reasoning.
 
 
 
 
 
 
 
 
 
 
98
 
99
  ---
100
 
101
+ ## πŸ“œ License
102
+ CC BY-NC 4.0 (Creative Commons Non-Commercial) for Research.
103
+ **Commercial Use:** Requires a license from **RTH Italia** (Cpu-DA Project).
104
+ For inquiries: info@rthitalia.com