Update README.md
Browse files
README.md
CHANGED
@@ -7,7 +7,7 @@ language:
|
|
7 |
|
8 |
# SmolLM2-1.7B Intermediate Checkpoints
|
9 |
|
10 |
-
We are releasing an intermediate checkpoint of SmolLM2 to enable further research on mechanistic interpretability and learning dynamics. This repo contains the checkpoint every
|
11 |
|
12 |
## How to Load a Checkpoint
|
13 |
```python
|
@@ -15,7 +15,7 @@ We are releasing an intermediate checkpoint of SmolLM2 to enable further researc
|
|
15 |
import torch
|
16 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
17 |
checkpoint = "HuggingFaceTB/SmolLM2-1.7B-intermediate-checkpoints"
|
18 |
-
revision = "step-
|
19 |
device = torch.device("cuda" if torch.cuda.is_available() else "mps" if hasattr(torch, 'mps') and torch.mps.is_available() else "cpu")
|
20 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint, revision=revision)
|
21 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, revision=revision).to(device)
|
|
|
7 |
|
8 |
# SmolLM2-1.7B Intermediate Checkpoints
|
9 |
|
10 |
+
We are releasing an intermediate checkpoint of SmolLM2 to enable further research on mechanistic interpretability and learning dynamics. This repo contains the checkpoint every 125000 steps which correspond to ~250B tokens.
|
11 |
|
12 |
## How to Load a Checkpoint
|
13 |
```python
|
|
|
15 |
import torch
|
16 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
17 |
checkpoint = "HuggingFaceTB/SmolLM2-1.7B-intermediate-checkpoints"
|
18 |
+
revision = "step-125000" # replace by the revision you want
|
19 |
device = torch.device("cuda" if torch.cuda.is_available() else "mps" if hasattr(torch, 'mps') and torch.mps.is_available() else "cpu")
|
20 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint, revision=revision)
|
21 |
model = AutoModelForCausalLM.from_pretrained(checkpoint, revision=revision).to(device)
|