Run this model with HF Jobs
Run HuggingFaceTB/SmolLM2-360M-intermediate-checkpoints on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/HuggingFaceTB/SmolLM2-360M-intermediate-checkpoints. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/HuggingFaceTB/SmolLM2-360M-intermediate-checkpoints on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("HuggingFaceTB/SmolLM2-360M-intermediate-checkpoints", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354---library_name: transformerslicense: apache-2.0language:- en---
# SmolLM2-360M Intermediate Checkpoints
We are releasing an intermediate checkpoint of SmolLM2 to enable further research on mechanistic interpretability and learning dynamics. This repo contains the checkpoint every 320000 steps which correspond to ~500B tokens.
## How to Load a Checkpoint```python# pip install transformersimport torchfrom transformers import AutoModelForCausalLM, AutoTokenizercheckpoint = "HuggingFaceTB/SmolLM2-360M-intermediate-checkpoints"revision = "step-320000" # replace by the revision you wantdevice = torch.device("cuda" if torch.cuda.is_available() else "mps" if hasattr(torch, 'mps') and torch.mps.is_available() else "cpu")tokenizer = AutoTokenizer.from_pretrained(checkpoint, revision=revision)model = AutoModelForCausalLM.from_pretrained(checkpoint, revision=revision).to(device)inputs = tokenizer.encode("Gravity is", return_tensors="pt").to(device)outputs = model.generate(inputs)print(tokenizer.decode(outputs[0]))```
## Training DetailsFor comprehensive information about SmolLM2 training methodology, please refer to:- Our [model page](https://huggingface.co/HuggingFaceTB/SmolLM2-360M)- Our [GitHub repository](https://github.com/huggingface/smollm)- Our [paper](https://huggingface.co/papers/2502.02737)
## Checkpoint DetailsThe GBS (Global Batch Size) in token of SmolLM2-360M is 1 572 864. To get the number of tokens knowing the step you need to do:```nb_tokens = nb_step * GBS```
## License
[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
## Citation```bash@misc{allal2025smollm2smolgoesbig, title={SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Model}, author={Loubna Ben Allal and Anton Lozhkov and Elie Bakouch and Gabriel Martín Blázquez and Guilherme Penedo and Lewis Tunstall and Andrés Marafioti and Hynek Kydlíček and Agustín Piqueres Lajarín and Vaibhav Srivastav and Joshua Lochner and Caleb Fahlgren and Xuan-Son Nguyen and Clémentine Fourrier and Ben Burtenshaw and Hugo Larcher and Haojun Zhao and Cyril Zakka and Mathieu Morlon and Colin Raffel and Leandro von Werra and Thomas Wolf}, year={2025}, eprint={2502.02737}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2502.02737}, }```README.mdAdded+54