Instructions to use HuggingFaceTB/SmolLM2-360M-intermediate-checkpoints with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceTB/SmolLM2-360M-intermediate-checkpoints with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("HuggingFaceTB/SmolLM2-360M-intermediate-checkpoints", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -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-360M-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)
|
|
|
|
| 15 |
import torch
|
| 16 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 17 |
checkpoint = "HuggingFaceTB/SmolLM2-360M-intermediate-checkpoints"
|
| 18 |
+
revision = "step-160000" # 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)
|