Views
No views yet
"How small can we make a Transformer before it becomes completely ridiculous?"
| Property | Value |
|---|---|
| Parameters | 372 |
| Architecture | GPT-2 Style |
| Layers | 1 |
| Attention Heads | 1 |
| Embedding Size | 4 |
| Feed Forward | 8 |
| Vocabulary | 32 Tokens |
| Context Length | 16 |
| Model Size | ~15 KB |
| Training | CPU |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained(
4 "WhirlwindAI/NanoZephyr"
5)
6
7model = AutoModelForCausalLM.from_pretrained(
8 "WhirlwindAI/NanoZephyr"
9)
10
11prompt = "The future of AI"
12
13inputs = tokenizer(prompt, return_tensors="pt")
14
15outputs = model.generate(
16 **inputs,
17 max_length=16,
18 do_sample=True,
19 temperature=2.0
20)
21
22print(tokenizer.decode(outputs[0], skip_special_tokens=True))The future of AI vxbzq rpfm lo...1┌───────────────────────────────┐
2│ NanoZephyr Boot Sequence │
3├───────────────────────────────┤
4│ Parameters : 372 │
5│ GPU Usage : Basically none │
6│ Intelligence : █░░░░░░░░ 3% │
7│ Confidence : ██████████ 100%│
8│ Randomness : ██████████ MAX │
9│ Status : ONLINE │
10└───────────────────────────────┘| Benchmark | Result |
|---|---|
| Common Sense | 0.01 |
| Mathematics | 0.00 |
| Philosophy | ??? |
| Gibberish | 100.00 |
| Comedy | ∞ |
1Input:
2hello
3
4Output:
5helloclvtdzng o1Input:
2ROMEO:
3
4Output:
5ufbgdyo zia1Input:
2Once upon a time...
3
4Output:
5qxwwbbvh zjv