Gogs
commited on
Commit
Β·
123571d
1
Parent(s):
679c77e
Fix: add metrics for Hugging Face YAML validation
Browse files
README.md
CHANGED
|
@@ -1,223 +1,331 @@
|
|
| 1 |
-
---
|
| 2 |
language:
|
| 3 |
-
|
|
|
|
| 4 |
license: apache-2.0
|
| 5 |
tags:
|
| 6 |
-
|
| 7 |
-
-
|
| 8 |
-
|
| 9 |
-
-
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
datasets:
|
| 13 |
-
|
|
|
|
| 14 |
metrics:
|
| 15 |
-
|
|
|
|
| 16 |
model-index:
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
---
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
> **β οΈ WORK IN PROGRESS** - Currently training on mobile CPU (Day 3/42)
|
| 29 |
|
| 30 |
-
## π― The Mission
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
-
### The Setup
|
| 41 |
Hardware: Snapdragon 685 (8-core ARM CPU)
|
| 42 |
RAM: 6GB
|
| 43 |
Storage: 128GB
|
| 44 |
NPU: Hexagon 686 (1 TOPS)
|
| 45 |
GPU: Adreno 610 (243 GFLOPS) - NOT USED for training
|
| 46 |
Cost: $0 in compute
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
| 60 |
Step 0: Loss 3.35 (baseline)
|
| 61 |
Step 500: Loss 2.50 β -25%
|
| 62 |
Step 1000: Loss 2.00 β -40%
|
| 63 |
Step 1265: Loss 1.83 β -45%
|
| 64 |
Step 1292: Loss 1.71 β -49% β RECORD
|
| 65 |
Step 1417: Loss 2.23 (current, oscillating 1.7-2.3)
|
| 66 |
-
|
|
|
|
| 67 |
|
| 68 |
Due to alphabetically-ordered dataset:
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
module Main where (x, f) in a
|
| 83 |
-
|
| 84 |
-
open import Cubical.Sigma
|
| 85 |
-
open import Cubical.Sigma.Core
|
| 86 |
-
open import Cubical.Foundations.H
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
[
|
| 114 |
-
|
| 115 |
-
[
|
| 116 |
-
|
| 117 |
-
[
|
| 118 |
-
|
| 119 |
-
[
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
Follow the journey of training an LLM with $0 budget. One step at a time. πΈ
|
|
|
|
|
|
|
| 1 |
language:
|
| 2 |
+
|
| 3 |
+
code
|
| 4 |
license: apache-2.0
|
| 5 |
tags:
|
| 6 |
+
|
| 7 |
+
code-generation
|
| 8 |
+
|
| 9 |
+
mobile-training
|
| 10 |
+
|
| 11 |
+
pytorch
|
| 12 |
+
|
| 13 |
+
transformers
|
| 14 |
+
|
| 15 |
+
distilgpt2
|
| 16 |
+
|
| 17 |
+
zero-budget-ai
|
| 18 |
datasets:
|
| 19 |
+
|
| 20 |
+
bigcode/the-stack-smol-xl
|
| 21 |
metrics:
|
| 22 |
+
|
| 23 |
+
perplexity
|
| 24 |
model-index:
|
| 25 |
+
|
| 26 |
+
name: Yuuki v0.1
|
| 27 |
+
results:
|
| 28 |
+
|
| 29 |
+
task:
|
| 30 |
+
type: text-generation
|
| 31 |
+
dataset:
|
| 32 |
+
name: The Stack
|
| 33 |
+
type: bigcode/the-stack-smol-xl
|
| 34 |
+
metrics:
|
| 35 |
+
|
| 36 |
+
name: perplexity
|
| 37 |
+
type: perplexity
|
| 38 |
+
value: 5.50
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
|
| 44 |
---
|
| 45 |
|
| 46 |
+
πΈ Yuuki v0.1 - The $0 Code LLM
|
| 47 |
+
|
| 48 |
+
> β οΈ WORK IN PROGRESS - Currently training on mobile CPU (Day 3/42)
|
| 49 |
|
|
|
|
| 50 |
|
|
|
|
| 51 |
|
| 52 |
+
π― The Mission
|
| 53 |
|
| 54 |
+
Prove that you DON'T need expensive GPUs to train LLMs.
|
| 55 |
+
|
| 56 |
+
Yuuki is a code generation model trained entirely on a $150 Android phone with:
|
| 57 |
+
|
| 58 |
+
β No cloud compute
|
| 59 |
+
|
| 60 |
+
β No GPU
|
| 61 |
+
|
| 62 |
+
β No data center
|
| 63 |
+
|
| 64 |
+
β
Just determination and time
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
The Setup
|
| 68 |
|
|
|
|
| 69 |
Hardware: Snapdragon 685 (8-core ARM CPU)
|
| 70 |
RAM: 6GB
|
| 71 |
Storage: 128GB
|
| 72 |
NPU: Hexagon 686 (1 TOPS)
|
| 73 |
GPU: Adreno 610 (243 GFLOPS) - NOT USED for training
|
| 74 |
Cost: $0 in compute
|
| 75 |
+
|
| 76 |
+
π Current Status
|
| 77 |
+
|
| 78 |
+
Metric Value
|
| 79 |
+
|
| 80 |
+
Progress 1,417 / 37,500 steps (3.78%)
|
| 81 |
+
Epoch 0.08 / 2.0
|
| 82 |
+
Current Loss ~1.70 - 2.23
|
| 83 |
+
Best Loss 1.7053 β
|
| 84 |
+
Training Time ~3 days
|
| 85 |
+
ETA ~39 days remaining
|
| 86 |
+
Speed ~100 sec/step
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
Loss Progression
|
| 90 |
+
|
| 91 |
Step 0: Loss 3.35 (baseline)
|
| 92 |
Step 500: Loss 2.50 β -25%
|
| 93 |
Step 1000: Loss 2.00 β -40%
|
| 94 |
Step 1265: Loss 1.83 β -45%
|
| 95 |
Step 1292: Loss 1.71 β -49% β RECORD
|
| 96 |
Step 1417: Loss 2.23 (current, oscillating 1.7-2.3)
|
| 97 |
+
|
| 98 |
+
π What Yuuki Knows (So Far)
|
| 99 |
|
| 100 |
Due to alphabetically-ordered dataset:
|
| 101 |
|
| 102 |
+
Language Exposure Quality Status
|
| 103 |
+
|
| 104 |
+
Agda High 85/100 β
Excellent
|
| 105 |
+
C Starting 30/100 β³ Learning
|
| 106 |
+
Assembly Low 5/100 π± Minimal
|
| 107 |
+
Python None 0/100 β Not reached yet
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
Example Output (Step 1,300)
|
| 111 |
+
|
| 112 |
+
Agda prompt: module Main where
|
| 113 |
+
|
| 114 |
+
module Main where (x, f) in a
|
| 115 |
+
|
| 116 |
+
open import Cubical.Sigma
|
| 117 |
+
open import Cubical.Sigma.Core
|
| 118 |
+
open import Cubical.Foundations.H
|
| 119 |
+
|
| 120 |
+
β
Real Agda libraries! The model learned actual Cubical type theory modules.
|
| 121 |
+
|
| 122 |
+
π οΈ Training Configuration
|
| 123 |
+
Model: DistilGPT-2 (82M parameters)
|
| 124 |
+
Dataset: The Stack (75,000 examples)
|
| 125 |
+
Batch size: 1
|
| 126 |
+
Gradient accumulation: 4
|
| 127 |
+
Effective batch: 4
|
| 128 |
+
Learning rate: 5e-5
|
| 129 |
+
Max length: 256 tokens
|
| 130 |
+
Optimizer: AdamW
|
| 131 |
+
Epochs: 2
|
| 132 |
+
Total tokens: ~30M (2 epochs)
|
| 133 |
+
|
| 134 |
+
Why so slow?
|
| 135 |
+
100 seconds/step Γ 37,500 steps = 3,750,000 seconds
|
| 136 |
+
= 1,042 hours
|
| 137 |
+
= 43.4 days
|
| 138 |
+
= ~6 weeks of continuous training
|
| 139 |
+
No GPU acceleration. Pure CPU grinding. πͺ
|
| 140 |
+
|
| 141 |
+
π Roadmap
|
| 142 |
+
|
| 143 |
+
v0.1 (Current - Proof of Concept)
|
| 144 |
+
|
| 145 |
+
[x] Setup training pipeline
|
| 146 |
+
|
| 147 |
+
[x] Start training (Step 0)
|
| 148 |
+
|
| 149 |
+
[x] Reach Step 1,000
|
| 150 |
+
|
| 151 |
+
[x] Break loss 2.0 barrier
|
| 152 |
+
|
| 153 |
+
[x] Break loss 1.8 barrier β
|
| 154 |
+
|
| 155 |
+
[ ] Checkpoint 2,500 (7%)
|
| 156 |
+
|
| 157 |
+
[ ] Checkpoint 5,000 (13%)
|
| 158 |
+
|
| 159 |
+
[ ] Checkpoint 10,000 (27%)
|
| 160 |
+
|
| 161 |
+
[ ] Checkpoint 18,750 (50% - Epoch 1 complete)
|
| 162 |
+
|
| 163 |
+
[ ] Checkpoint 37,500 (100% - DONE)
|
| 164 |
+
|
| 165 |
+
[ ] Quantize to INT8
|
| 166 |
+
|
| 167 |
+
[ ] Convert to ONNX
|
| 168 |
+
|
| 169 |
+
[ ] Publish final model
|
| 170 |
+
|
| 171 |
+
ETA: Mid-March 2026
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
v0.2 (The Full Dataset)
|
| 175 |
+
|
| 176 |
+
Dataset: 786,387 examples (full Stack)
|
| 177 |
+
|
| 178 |
+
Duration: 418 days (~14 months)
|
| 179 |
+
|
| 180 |
+
Epochs: 2.0
|
| 181 |
+
|
| 182 |
+
Total tokens: ~314M
|
| 183 |
+
|
| 184 |
+
Dataset fix: SHUFFLED (not alphabetical)
|
| 185 |
+
|
| 186 |
+
Languages: All 80+ languages balanced
|
| 187 |
+
|
| 188 |
+
Start: March 2026
|
| 189 |
+
|
| 190 |
+
End: May 2027
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
v0.3+ (PC Era)
|
| 194 |
+
|
| 195 |
+
Hardware upgrade: RTX 4060/4070
|
| 196 |
+
|
| 197 |
+
Larger models: 350M-1B parameters
|
| 198 |
+
|
| 199 |
+
Faster training: ~30x speedup
|
| 200 |
+
|
| 201 |
+
Advanced techniques: LoRA, QLoRA, etc.
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
|
| 205 |
+
π‘ Philosophy
|
| 206 |
+
"The barrier to AI isn't money. It's mindset."
|
| 207 |
+
This project demonstrates: β
You CAN train LLMs without GPUs
|
| 208 |
+
β
Patience > Hardware
|
| 209 |
+
β
$0 budget is enough to start
|
| 210 |
+
β
Limited resources inspire creativity
|
| 211 |
+
β
Anyone can contribute to AI
|
| 212 |
+
|
| 213 |
+
π Usage (After Training Completes)
|
| 214 |
+
|
| 215 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 216 |
+
|
| 217 |
+
# Load model
|
| 218 |
+
model = AutoModelForCausalLM.from_pretrained("OpceanAI/Yuuki")
|
| 219 |
+
tokenizer = AutoTokenizer.from_pretrained("OpceanAI/Yuuki")
|
| 220 |
+
|
| 221 |
+
# Generate code
|
| 222 |
+
prompt = "def fibonacci(n):"
|
| 223 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 224 |
+
outputs = model.generate(**inputs, max_length=100)
|
| 225 |
+
code = tokenizer.decode(outputs[0])
|
| 226 |
+
print(code)
|
| 227 |
+
|
| 228 |
+
Quantized (4x faster, 4x smaller)
|
| 229 |
+
|
| 230 |
+
Coming after training completes
|
| 231 |
+
|
| 232 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 233 |
+
"OpceanAI/Yuuki",
|
| 234 |
+
subfolder="yuuki-v0.1-int8"
|
| 235 |
+
)
|
| 236 |
+
|
| 237 |
+
β οΈ Known Limitations
|
| 238 |
+
|
| 239 |
+
Dataset order: Alphabetical (not shuffled) - learns early languages best
|
| 240 |
+
|
| 241 |
+
Token count: Only ~30M tokens (vs GPT-2's 40B)
|
| 242 |
+
|
| 243 |
+
Training speed: Very slow (~100 sec/step)
|
| 244 |
+
|
| 245 |
+
Model size: Small (82M params)
|
| 246 |
+
|
| 247 |
+
Language coverage: Incomplete due to alphabetical ordering
|
| 248 |
+
These will be addressed in v0.2 with shuffled dataset.
|
| 249 |
+
|
| 250 |
+
|
| 251 |
+
π¬ Technical Details
|
| 252 |
+
|
| 253 |
+
CPU Training (100 sec/step):
|
| 254 |
+
|
| 255 |
+
Forward pass: 40 sec
|
| 256 |
+
|
| 257 |
+
Backward pass: 40 sec
|
| 258 |
+
|
| 259 |
+
Optimizer: 20 sec
|
| 260 |
+
|
| 261 |
+
Total: ~100 sec
|
| 262 |
+
|
| 263 |
+
|
| 264 |
+
vs GPU Training (0.5 sec/step):
|
| 265 |
+
|
| 266 |
+
200x faster
|
| 267 |
+
|
| 268 |
+
But costs $0.50-$2.00/hour
|
| 269 |
+
|
| 270 |
+
42 days = $500-$2,000
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
Mobile: FREE but SLOW
|
| 274 |
+
|
| 275 |
+
GPU: FAST but EXPENSIVE
|
| 276 |
+
|
| 277 |
+
For proof of concept: Mobile wins. π
|
| 278 |
+
|
| 279 |
+
|
| 280 |
+
π Benchmarks (Post-Training)
|
| 281 |
+
|
| 282 |
+
Coming soon after training completes (~March 2026).
|
| 283 |
+
Expected performance:
|
| 284 |
+
|
| 285 |
+
Agda: 85-95/100 (primary language)
|
| 286 |
+
|
| 287 |
+
C: 85-92/100 (secondary language)
|
| 288 |
+
|
| 289 |
+
Assembly: 75-85/100 (tertiary)
|
| 290 |
+
|
| 291 |
+
Python: 10-20/100 (barely seen due to alphabet order)
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
|
| 295 |
+
π Acknowledgments
|
| 296 |
+
|
| 297 |
+
HuggingFace: Infrastructure and transformers library
|
| 298 |
+
|
| 299 |
+
BigCode: The Stack dataset
|
| 300 |
+
|
| 301 |
+
The ML community: For saying "you need GPUs" - best motivation π
|
| 302 |
+
|
| 303 |
+
|
| 304 |
+
π License
|
| 305 |
+
|
| 306 |
+
Apache 2.0 - See LICENSE file. You can use Yuuki commercially, modify it, distribute it. Just give credit. β
|
| 307 |
+
|
| 308 |
+
|
| 309 |
+
π Links
|
| 310 |
+
|
| 311 |
+
GitHub: (https://github.com/aguitauwu)
|
| 312 |
+
|
| 313 |
+
Discord: (https://discord.gg/j8zV2u8k)
|
| 314 |
+
|
| 315 |
+
Progress updates: Check this model card
|
| 316 |
+
|
| 317 |
+
|
| 318 |
+
π
Updates
|
| 319 |
+
|
| 320 |
+
2026-01-29: Training started
|
| 321 |
+
|
| 322 |
+
2026-01-29: Step 1,000 reached - Loss 2.00
|
| 323 |
+
|
| 324 |
+
2026-01-29: Step 1,292 - NEW RECORD Loss 1.7053
|
| 325 |
+
|
| 326 |
+
2026-01-29: Repository created on HuggingFace
|
| 327 |
+
|
| 328 |
+
Last updated: 2026-01-29
|
| 329 |
+
|
| 330 |
+
|
| 331 |
Follow the journey of training an LLM with $0 budget. One step at a time. πΈ
|