File size: 3,055 Bytes
b9e6a80 f2fa49e b9e6a80 f2fa49e b9e6a80 ba114a8 b9e6a80 f2fa49e b9e6a80 f2fa49e b9e6a80 f2fa49e b9e6a80 f2fa49e b9e6a80 f2fa49e b9e6a80 f2fa49e b9e6a80 f2fa49e b9e6a80 880d348 fcfc71c 880d348 b9e6a80 f2fa49e b9e6a80 f2fa49e b9e6a80 f2fa49e b9e6a80 f2fa49e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
---
license: apache-2.0
datasets:
- allenai/tulu-3-sft-mixture
- allenai/llama-3.1-tulu-3-8b-preference-mixture
language:
- en
base_model:
- HuggingFaceTB/SmolLM2-1.7B
library_name: transformers
tags:
- Tulu3
- Smollm
- SLMs
- Small
- Huggingface
- Allenai
pipeline_tag: text-generation
---
# SmolLM2 1.7b Instruction Tuned & DPO Aligned through Tulu 3!
![SmolTulu Banner](smoltulubannerv0.png)
SmolTulu-v0 is the first model in a series of models meant to leverage [AllenAI's Tulu 3 post-training pipeline](https://allenai.org/blog/tulu-3-technical) to tune the [base version of Huggingface's SmolLM2-1.7b](https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B)! The post training pipeline AllenAI came up with seemed like something perfect to apply here.
This model scores the highest current score in IFEval while maintaining the extremely low contamination levels in Tulu 3 and SmolLM2! I've listed the datasets used to do both the SFT (supervised finetuning) and DPO (direct preference optimization) stages.
## Why v0?
There's a few reasons on why I called this model v0:
1. The model still lags behind the instruction tuned version of SmolLM2 in many other metrics.
2. This model has only undergone SFT and DPO, the RLVR (reinforcement learning with verifiable rewards) stage was too computationally expensive to run on a model that could be better.
3. Initial hyperparameter choice was naive, through some napkin math I've been able to find a much better learning rate that scales the one found in the Tulu 3 paper according to my computational resources better.
# Evaluation
I ran these evaluations using [SmolLM2's evaluation code](https://github.com/huggingface/smollm/tree/main/evaluation) for a more fair comparison.
| Metric | SmolTulu-1.7b-it-v0 | SmolLM2-1.7B-Instruct | Llama-1B-Instruct | Qwen2.5-1.5B-Instruct | SmolLM1-1.7B-Instruct |
|:----------------------------|:---------------------:|:---------------------:|:---------------------:|:---------------------:|:---------------------:|
| IFEval (Average prompt/inst) | **67.7** | 56.7 | 53.5 | 47.4 | 23.1 |
| GSM8K (5-shot) | **51.6** | 48.2 | 26.8 | 42.8 | 4.6 |
| ARC (Average) | 51.5 | **51.7** | 41.6 | 46.2 | 43.7 |
| HellaSwag | 61.1 | **66.1** | 56.1 | 60.9 | 55.5 |
| MMLU-Pro (MCF) | 17.4 | 19.3 | 12.7 | **24.2** | 11.7 |
# Usage
Just like any Huggingface model, just run it using the transformers library:
```python
# pip install transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "SultanR/SmolTulu-v0"
device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
# for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")`
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
inputs = tokenizer.encode("Gravity is", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
```
I will be uploading the model to Ollama and providing GGUF versions very soon. |