rdiehlmartinez
commited on
Commit
β’
8ec16ff
1
Parent(s):
e948f36
Updating README
Browse files
README.md
CHANGED
@@ -1,52 +1,136 @@
|
|
1 |
---
|
2 |
title: README
|
3 |
-
emoji:
|
4 |
colorFrom: red
|
5 |
colorTo: yellow
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
---
|
9 |
|
10 |
-
#
|
11 |
|
12 |
-
Pico
|
|
|
|
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
- **Educational Focus**: Well-documented code with clear references to academic papers
|
18 |
-
- **Research Ready**: Built-in tools for analyzing model learning dynamics
|
19 |
-
- **Efficient Training**: Pre-tokenized dataset and optimized training loop
|
20 |
-
- **Modern Stack**: Built with PyTorch Lightning, Wandb, and HuggingFace integrations
|
21 |
|
22 |
-
|
23 |
|
24 |
-
-
|
25 |
-
|
26 |
-
- **
|
27 |
-
- **
|
28 |
-
- **
|
|
|
|
|
29 |
|
30 |
-
|
|
|
|
|
|
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
-
|
35 |
-
-
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
- Improving documentation
|
42 |
-
- Fixing bugs
|
43 |
-
- Sharing experimental results
|
44 |
|
45 |
-
|
|
|
|
|
46 |
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
## π« Contact
|
50 |
|
|
|
51 |
- GitHub: [rdiehlmartinez/pico](https://github.com/rdiehlmartinez/pico)
|
52 |
-
- Author: Richard Diehl Martinez
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
title: README
|
3 |
+
emoji: π
|
4 |
colorFrom: red
|
5 |
colorTo: yellow
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
---
|
9 |
|
10 |
+
# π Pico: Tiny Language Models for Learning Dynamics Research
|
11 |
|
12 |
+
Pico consists of two key components:
|
13 |
+
1. **Pre-trained Model Suite** (hosted here on HuggingFace)
|
14 |
+
2. **Training Framework** (available on [GitHub](https://github.com/rdiehlmartinez/pico))
|
15 |
|
16 |
+
This HuggingFace organization hosts our pre-trained models and datasets, while the GitHub repository provides the infrastructure to train your own model suites from scratch.
|
17 |
|
18 |
+
## π€ HuggingFace Resources (You Are Here)
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
> π§ **Coming Soon!** Our complete suite of pre-trained models (1M to 1B parameters) is currently being trained and will be released here in January 2025. Watch this space or star our [GitHub repository](https://github.com/rdiehlmartinez/pico) for updates!
|
21 |
|
22 |
+
### Pre-trained Model Suite (Releasing January 2025)
|
23 |
+
Our complete suite of models from 1M to 1B parameters:
|
24 |
+
- **pico-tiny** (1M parameters)
|
25 |
+
- **pico-small** (10M parameters)
|
26 |
+
- **pico-medium** (100M parameters)
|
27 |
+
- **pico-large** (500M parameters)
|
28 |
+
- **pico-xl** (1B parameters)
|
29 |
|
30 |
+
Each model includes:
|
31 |
+
- Complete training checkpoints
|
32 |
+
- Saved activations and gradients
|
33 |
+
- Pre-computed evaluation perplexity scores
|
34 |
|
35 |
+
### Available Datasets
|
36 |
+
1. **[pretokenized-dolma](https://huggingface.co/datasets/pico-lm/pretokenized-dolma)**
|
37 |
+
- 420B tokens of pre-processed text
|
38 |
+
- Cleaned and shuffled DOLMA corpus
|
39 |
|
40 |
+
2. **[pretokenized-dolma-tiny](https://huggingface.co/datasets/pico-lm/pretokenized-dolma-tiny)**
|
41 |
+
- Smaller version for quick experiments
|
42 |
+
|
43 |
+
3. **[pretokenized-eval-batch](https://huggingface.co/datasets/pico-lm/pretokenized-eval-batch)**
|
44 |
+
- Batch of eval data for generating model activations
|
45 |
+
|
46 |
+
## π§ GitHub Training Framework
|
47 |
+
|
48 |
+
Want to train your own suite of models? Visit our [GitHub repository](https://github.com/rdiehlmartinez/pico) to:
|
49 |
+
- Train models with custom architectures
|
50 |
+
- Experiment with different training regimes
|
51 |
+
- Modify checkpoint saving behavior
|
52 |
+
- Implement custom evaluation metrics
|
53 |
+
|
54 |
+
The training framework makes it easy to:
|
55 |
+
1. Train multiple models of different sizes
|
56 |
+
2. Ensure consistent training across all models
|
57 |
+
3. Save rich checkpoint data for learning dynamics analysis
|
58 |
+
4. Compare learning dynamics across scales
|
59 |
+
|
60 |
+
## π οΈ Using the Resources
|
61 |
+
|
62 |
+
### Using Pre-trained Models (HuggingFace)
|
63 |
+
```python
|
64 |
+
from transformers import AutoModelForCausalLM
|
65 |
+
|
66 |
+
# Load our pre-trained model
|
67 |
+
model = AutoModelForCausalLM.from_pretrained("pico-lm/pico-small")
|
68 |
+
|
69 |
+
# Access specific checkpoint
|
70 |
+
model = AutoModelForCausalLM.from_pretrained(
|
71 |
+
"pico-lm/pico-small",
|
72 |
+
revision="step-xyz"
|
73 |
+
)
|
74 |
+
```
|
75 |
+
|
76 |
+
### Training Your Own Suite (GitHub)
|
77 |
+
```bash
|
78 |
+
# Clone the repository
|
79 |
+
git clone https://github.com/rdiehlmartinez/pico.git
|
80 |
|
81 |
+
# Configure your model suite
|
82 |
+
# Edit configs/train.yaml to specify model sizes and training parameters
|
|
|
|
|
|
|
83 |
|
84 |
+
# Train your suite
|
85 |
+
python train.py --config configs/train.yaml
|
86 |
+
```
|
87 |
|
88 |
+
## π Model Details
|
89 |
+
|
90 |
+
### Architecture
|
91 |
+
All models (both pre-trained and self-trained) use:
|
92 |
+
- LLAMA-style transformer
|
93 |
+
- RMSNorm for normalization
|
94 |
+
- RoPE positional embeddings
|
95 |
+
- Multi-head attention with KV-cache
|
96 |
+
- SwiGLU activation function
|
97 |
+
|
98 |
+
### Training Configuration
|
99 |
+
Standard configuration (customizable in GitHub training):
|
100 |
+
- Batch size: 1024
|
101 |
+
- Learning rate: 1e-3
|
102 |
+
- Weight decay: 0.1
|
103 |
+
- Gradient clipping: 1.0
|
104 |
+
- Mixed precision training
|
105 |
+
|
106 |
+
## π¬ Research Applications
|
107 |
+
|
108 |
+
Perfect for researchers studying:
|
109 |
+
- Learning dynamics across model scales
|
110 |
+
- Mechanistic interpretability
|
111 |
+
- Architecture and training effects
|
112 |
+
- Emergent model behaviors
|
113 |
+
|
114 |
+
Whether using our pre-trained models or training your own suite, Pico provides the tools needed for in-depth learning dynamics research.
|
115 |
+
|
116 |
+
## π€ Contributing
|
117 |
+
|
118 |
+
Contributions welcome on both platforms:
|
119 |
+
- **HuggingFace**: Model weights, datasets, and evaluation results
|
120 |
+
- **GitHub**: Training framework improvements, analysis tools, and documentation
|
121 |
|
122 |
## π« Contact
|
123 |
|
124 |
+
- HuggingFace: [pico-lm](https://huggingface.co/pico-lm)
|
125 |
- GitHub: [rdiehlmartinez/pico](https://github.com/rdiehlmartinez/pico)
|
126 |
+
- Author: Richard Diehl Martinez
|
127 |
+
|
128 |
+
## π Citation
|
129 |
+
|
130 |
+
```bibtex
|
131 |
+
@software{pico2024,
|
132 |
+
author = {Martinez, Richard Diehl},
|
133 |
+
title = {Pico: Framework for Training Tiny Language Models},
|
134 |
+
year = {2024},
|
135 |
+
}
|
136 |
+
```
|