Views
No views yet
| SmolLM2-135M-Instruct | SmolLM2-135M-Humanized |
|---|---|
| I'm doing great! I'm a helpful assistant that lives inside users PC. I'm here to help you with any questions or problems you might have. | I'm doing great! I'm a bit of a tech whiz, and I love learning about new gadgets and tech trends. What's on your mind? Want to chat about something cool or something that's been on your mind lately? |
pip install transformers1from transformers import AutoModelForCausalLM, AutoTokenizer
2checkpoint = "AssistantsLab/SmolLM2-135M-humanized"
3
4device = "cuda" # for GPU usage or "cpu" for CPU usage
5tokenizer = AutoTokenizer.from_pretrained(checkpoint)
6# for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")`
7model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
8
9messages = [{"role": "user", "content": "What is gravity?"}]
10input_text=tokenizer.apply_chat_template(messages, tokenize=False)
11print(input_text)
12inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
13outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True)
14print(tokenizer.decode(outputs[0]))1pip install trl
2trl chat --model_name_or_path AssistantsLab/SmolLM2-135M-humanized --device cpu| Metric | SmolLM2-135M-Instruct | SmolLM2-135M-Humanized | Difference |
|---|---|---|---|
| MMLU | 23.1 | 23.0 | -0.1 |
| ARC (Easy) | 54.3 | 55.0 | +0.7 |
| ARC (Challenge) | 26.1 | 25.5 | -0.6 |
| HellaSwag | 43.0 | 42.4 | -0.6 |
| PIQA | 67.2 | 67.0 | -0.2 |
| WinoGrande | 52.5 | 52.1 | -0.4 |
| TriviaQA | 0.3 | 0.2 | -0.1 |
| GSM8K | 0.2 | 0.8 | +0.6 |
| OpenBookQA | 32.6 | 33.0 | +0.4 |
| QuAC (F1) | 14.1 | 13.2 | -0.9 |
1@misc{allal2024SmolLM2,
2 title={SmolLM2 - with great data, comes great performance},
3 author={Loubna Ben Allal and Anton Lozhkov and Elie Bakouch and Gabriel Martín Blázquez and Lewis Tunstall and Agustín Piqueres and Andres Marafioti and Cyril Zakka and Leandro von Werra and Thomas Wolf},
4 year={2024},
5}1@misc{çalık2025enhancinghumanlikeresponseslarge,
2 title={Enhancing Human-Like Responses in Large Language Models},
3 author={Ethem Yağız Çalık and Talha Rüzgar Akkuş},
4 year={2025},
5 eprint={2501.05032},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2501.05032},
9}1@misc{cui2023ultrafeedback,
2 title={UltraFeedback: Boosting Language Models with High-quality Feedback},
3 author={Ganqu Cui and Lifan Yuan and Ning Ding and Guanming Yao and Wei Zhu and Yuan Ni and Guotong Xie and Zhiyuan Liu and Maosong Sun},
4 year={2023},
5 eprint={2310.01377},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}