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 13 |
+
- subatomic
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
<div align="center">
|
| 17 |
+
|
| 18 |
+
<img src="https://readme-typing-svg.demolab.com?font=Space+Grotesk&weight=700&size=27&duration=1800&pause=900&color=EC4899¢er=true&vCenter=true&width=900&lines=SubatomZephyr;21+Parameters.;The+Entire+Model+Fits+In+A+Sentence.;Physics+Would+Like+A+Word.;Somehow+Still+A+Transformer." />
|
| 19 |
+
|
| 20 |
+
<br>
|
| 21 |
+
|
| 22 |
+
<img src="https://img.shields.io/badge/Parameters-21-EC4899?style=for-the-badge">
|
| 23 |
+
<img src="https://img.shields.io/badge/Architecture-GPT--2-F472B6?style=for-the-badge">
|
| 24 |
+
<img src="https://img.shields.io/badge/Context-1_Token-F9A8D4?style=for-the-badge">
|
| 25 |
+
<img src="https://img.shields.io/badge/IQ-21-E879F9?style=for-the-badge">
|
| 26 |
+
|
| 27 |
+
<br><br>
|
| 28 |
+
|
| 29 |
+
<img src="https://capsule-render.vercel.app/api?type=transparent&height=200&text=SubatomZephyr&animation=scaleIn&fontColor=ffffff&fontSize=46&color=0:EC4899,100:8B5CF6"/>
|
| 30 |
+
|
| 31 |
+
<br>
|
| 32 |
+
|
| 33 |
+
<img src="https://raw.githubusercontent.com/Platane/snk/output/github-contribution-grid-snake-dark.svg" width="92%"/>
|
| 34 |
+
|
| 35 |
+
</div>
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
# The Idea
|
| 40 |
+
|
| 41 |
+
<div align="center">
|
| 42 |
+
|
| 43 |
+
<table width="92%">
|
| 44 |
+
|
| 45 |
+
<tr>
|
| 46 |
+
|
| 47 |
+
<td align="center">
|
| 48 |
+
|
| 49 |
+
## TinyZephyr wasn't tiny enough.
|
| 50 |
+
|
| 51 |
+
NanoZephyr wasn't tiny enough.
|
| 52 |
+
|
| 53 |
+
AtomZephyr still had **too many** parameters.
|
| 54 |
+
|
| 55 |
+
So we continued removing neurons until the model reached a point where modern physics politely asked us to stop.
|
| 56 |
+
|
| 57 |
+
We ignored them.
|
| 58 |
+
|
| 59 |
+
**SubatomZephyr** is the result.
|
| 60 |
+
|
| 61 |
+
</td>
|
| 62 |
+
|
| 63 |
+
</tr>
|
| 64 |
+
|
| 65 |
+
</table>
|
| 66 |
+
|
| 67 |
+
</div>
|
| 68 |
+
|
| 69 |
+
---
|
| 70 |
+
|
| 71 |
+
# Why?
|
| 72 |
+
|
| 73 |
+
Most research asks
|
| 74 |
+
|
| 75 |
+
> "How can we make models smarter?"
|
| 76 |
+
|
| 77 |
+
We asked
|
| 78 |
+
|
| 79 |
+
> **"How many parameters can we delete before Git starts feeling sorry for us?"**
|
| 80 |
+
|
| 81 |
+
This repository is the answer.
|
| 82 |
+
|
| 83 |
+
---
|
| 84 |
+
|
| 85 |
+
# Specifications
|
| 86 |
+
|
| 87 |
+
| Property | Value |
|
| 88 |
+
|-----------|-------|
|
| 89 |
+
| Parameters | **21** |
|
| 90 |
+
| Architecture | GPT-2 |
|
| 91 |
+
| Layers | 1 |
|
| 92 |
+
| Attention Heads | 1 |
|
| 93 |
+
| Embedding Size | 1 |
|
| 94 |
+
| Context Length | 1 |
|
| 95 |
+
| Vocabulary | 2 Tokens |
|
| 96 |
+
| Disk Size | <2 KB |
|
| 97 |
+
| Training Time | ~20 Seconds |
|
| 98 |
+
|
| 99 |
+
---
|
| 100 |
+
|
| 101 |
+
# Performance
|
| 102 |
+
|
| 103 |
+
| Task | Result |
|
| 104 |
+
|------|--------|
|
| 105 |
+
| Copy "a" | ✅ |
|
| 106 |
+
| Copy "b" | ✅ |
|
| 107 |
+
| Understand Humans | ❌ |
|
| 108 |
+
| Understand Itself | ❌ |
|
| 109 |
+
| Break Records | ✅ |
|
| 110 |
+
|
| 111 |
+
---
|
| 112 |
+
|
| 113 |
+
# Quick Start
|
| 114 |
+
|
| 115 |
+
```python
|
| 116 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 117 |
+
|
| 118 |
+
tokenizer = AutoTokenizer.from_pretrained("WhirlwindAI/SubatomZephyr")
|
| 119 |
+
model = AutoModelForCausalLM.from_pretrained("WhirlwindAI/SubatomZephyr")
|
| 120 |
+
|
| 121 |
+
prompt = "a"
|
| 122 |
+
|
| 123 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 124 |
+
|
| 125 |
+
outputs = model.generate(
|
| 126 |
+
**inputs,
|
| 127 |
+
max_length=2,
|
| 128 |
+
do_sample=True,
|
| 129 |
+
temperature=2.0
|
| 130 |
+
)
|
| 131 |
+
|
| 132 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
Output
|
| 136 |
+
|
| 137 |
+
```
|
| 138 |
+
a
|
| 139 |
+
```
|
| 140 |
+
|
| 141 |
+
Peak artificial intelligence.
|
| 142 |
+
|
| 143 |
+
---
|
| 144 |
+
|
| 145 |
+
# Example Conversation
|
| 146 |
+
|
| 147 |
+
**User**
|
| 148 |
+
|
| 149 |
+
> Tell me a story.
|
| 150 |
+
|
| 151 |
+
**SubatomZephyr**
|
| 152 |
+
|
| 153 |
+
```
|
| 154 |
+
a
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
Oscar-worthy.
|
| 158 |
+
|
| 159 |
+
---
|
| 160 |
+
|
| 161 |
+
# Scientific Explanation
|
| 162 |
+
|
| 163 |
+
SubatomZephyr doesn't generate language.
|
| 164 |
+
|
| 165 |
+
It doesn't reason.
|
| 166 |
+
|
| 167 |
+
It doesn't predict.
|
| 168 |
+
|
| 169 |
+
It doesn't even pretend anymore.
|
| 170 |
+
|
| 171 |
+
It has mastered exactly **one** skill:
|
| 172 |
+
|
| 173 |
+
```
|
| 174 |
+
Input:
|
| 175 |
+
|
| 176 |
+
a
|
| 177 |
+
|
| 178 |
+
Output:
|
| 179 |
+
|
| 180 |
+
a
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
100% accuracy.
|
| 184 |
+
|
| 185 |
+
Zero creativity.
|
| 186 |
+
|
| 187 |
+
Perfect confidence.
|
| 188 |
+
|
| 189 |
+
---
|
| 190 |
+
|
| 191 |
+
# World Records
|
| 192 |
+
|
| 193 |
+
🥇 Smallest Generative Transformer
|
| 194 |
+
|
| 195 |
+
🏆 Highest Accuracy On The Letter "a"
|
| 196 |
+
|
| 197 |
+
🥈 Lowest Grocery Bill (21 Parameters)
|
| 198 |
+
|
| 199 |
+
🥉 First Model Smaller Than Most README Files
|
| 200 |
+
|
| 201 |
+
🎖️ Certified Quantum Intelligence™
|
| 202 |
+
|
| 203 |
+
---
|
| 204 |
+
|
| 205 |
+
# Benchmarks
|
| 206 |
+
|
| 207 |
+
```
|
| 208 |
+
MMLU : 💀
|
| 209 |
+
|
| 210 |
+
HumanEval : 😂
|
| 211 |
+
|
| 212 |
+
TruthfulQA : 🤨
|
| 213 |
+
|
| 214 |
+
Binary Copy : 🏆 100%
|
| 215 |
+
|
| 216 |
+
Entertainment : ⭐⭐⭐⭐⭐
|
| 217 |
+
```
|
| 218 |
+
|
| 219 |
+
---
|
| 220 |
+
|
| 221 |
+
# Frequently Asked Questions
|
| 222 |
+
|
| 223 |
+
### Is this useful?
|
| 224 |
+
|
| 225 |
+
No.
|
| 226 |
+
|
| 227 |
+
### Is this funny?
|
| 228 |
+
|
| 229 |
+
Hopefully.
|
| 230 |
+
|
| 231 |
+
### Why does it exist?
|
| 232 |
+
|
| 233 |
+
Curiosity.
|
| 234 |
+
|
| 235 |
+
### Can it beat GPT-4?
|
| 236 |
+
|
| 237 |
+
Only if the task is copying the letter "a".
|
| 238 |
+
|
| 239 |
+
### What's next?
|
| 240 |
+
|
| 241 |
+
**QuarkZephyr.**
|
| 242 |
+
|
| 243 |
+
Probably.
|
| 244 |
+
|
| 245 |
+
---
|
| 246 |
+
|
| 247 |
+
# Fun Facts
|
| 248 |
+
|
| 249 |
+
- Smaller than many favicon files.
|
| 250 |
+
|
| 251 |
+
- Downloads before you click download.
|
| 252 |
+
|
| 253 |
+
- Has fewer parameters than this README has paragraphs.
|
| 254 |
+
|
| 255 |
+
- The tokenizer is more complicated than the model.
|
| 256 |
+
|
| 257 |
+
- Uses more electricity displaying this README than running inference.
|
| 258 |
+
|
| 259 |
+
---
|
| 260 |
+
|
| 261 |
+
# Limitations
|
| 262 |
+
|
| 263 |
+
SubatomZephyr should not be used for:
|
| 264 |
+
|
| 265 |
+
- Chatbots
|
| 266 |
+
|
| 267 |
+
- Coding
|
| 268 |
+
|
| 269 |
+
- Translation
|
| 270 |
+
|
| 271 |
+
- Math
|
| 272 |
+
|
| 273 |
+
- Science
|
| 274 |
+
|
| 275 |
+
- Existing in production
|
| 276 |
+
|
| 277 |
+
It excels primarily at making ML engineers laugh.
|
| 278 |
+
|
| 279 |
+
---
|
| 280 |
+
|
| 281 |
+
# License
|
| 282 |
+
|
| 283 |
+
MIT
|
| 284 |
+
|
| 285 |
+
If you somehow improve this model...
|
| 286 |
+
|
| 287 |
+
please tell us.
|
| 288 |
+
|
| 289 |
+
We're genuinely curious.
|
| 290 |
+
|
| 291 |
+
---
|
| 292 |
+
|
| 293 |
+
<div align="center">
|
| 294 |
+
|
| 295 |
+
## Built by WhirlwindAI
|
| 296 |
+
|
| 297 |
+
*"When there are no parameters left to remove... remove expectations instead."*
|
| 298 |
+
|
| 299 |
+
<br>
|
| 300 |
+
|
| 301 |
+
<img src="https://capsule-render.vercel.app/api?type=waving&height=130§ion=footer&color=0:EC4899,100:8B5CF6"/>
|
| 302 |
+
|
| 303 |
+
</div>
|