Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| SmolLM-1.7B-Instruct.Q2_K.gguf | Q2_K | 0.63GB |
| SmolLM-1.7B-Instruct.IQ3_XS.gguf | IQ3_XS | 0.69GB |
| SmolLM-1.7B-Instruct.IQ3_S.gguf | IQ3_S | 0.72GB |
| SmolLM-1.7B-Instruct.Q3_K_S.gguf | Q3_K_S | 0.72GB |
| SmolLM-1.7B-Instruct.IQ3_M.gguf | IQ3_M | 0.75GB |
| SmolLM-1.7B-Instruct.Q3_K.gguf | Q3_K | 0.8GB |
| SmolLM-1.7B-Instruct.Q3_K_M.gguf | Q3_K_M | 0.8GB |
| SmolLM-1.7B-Instruct.Q3_K_L.gguf | Q3_K_L | 0.87GB |
| SmolLM-1.7B-Instruct.IQ4_XS.gguf | IQ4_XS | 0.88GB |
| SmolLM-1.7B-Instruct.Q4_0.gguf | Q4_0 | 0.92GB |
| SmolLM-1.7B-Instruct.IQ4_NL.gguf | IQ4_NL | 0.93GB |
| SmolLM-1.7B-Instruct.Q4_K_S.gguf | Q4_K_S | 0.93GB |
| SmolLM-1.7B-Instruct.Q4_K.gguf | Q4_K | 0.98GB |
| SmolLM-1.7B-Instruct.Q4_K_M.gguf | Q4_K_M | 0.98GB |
| SmolLM-1.7B-Instruct.Q4_1.gguf | Q4_1 | 1.02GB |
| SmolLM-1.7B-Instruct.Q5_0.gguf | Q5_0 | 1.11GB |
| SmolLM-1.7B-Instruct.Q5_K_S.gguf | Q5_K_S | 1.11GB |
| SmolLM-1.7B-Instruct.Q5_K.gguf | Q5_K | 1.14GB |
| SmolLM-1.7B-Instruct.Q5_K_M.gguf | Q5_K_M | 1.14GB |
| SmolLM-1.7B-Instruct.Q5_1.gguf | Q5_1 | 1.2GB |
| SmolLM-1.7B-Instruct.Q6_K.gguf | Q6_K | 1.31GB |
| SmolLM-1.7B-Instruct.Q8_0.gguf | Q8_0 | 1.7GB |

| Release | Description |
|---|---|
| v0.1 | Initial release of SmolLM-Instruct. We finetune on the permissive subset of the WebInstructSub dataset, combined with StarCoder2-Self-OSS-Instruct. Then, we perform DPO (Direct Preference Optimization) for one epoch on HelpSteer for the 135M and 1.7B models, and argilla/dpo-mix-7k for the 360M model. |
| v0.2 | We changed the finetuning mix to datasets more suitable for smol models. We train on a new dataset of 2k simple everyday conversations we generated by llama3.1-70B everyday-conversations-llama3.1-2k, Magpie-Pro-300K-Filtered, StarCoder2-Self-OSS-Instruct, and a small subset of OpenHermes-2.5 |
revision="v0.1" in the transformers code:model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM-1.7B-Instruct", revision="v0.1")q016 for MLC and ONNX/Transformers.js checkpoints for the WebGPU demos. We also suggest using temperature 0.2 and top-p 0.9.pip install transformers1# pip install transformers
2from transformers import AutoModelForCausalLM, AutoTokenizer
3checkpoint = "HuggingFaceTB/SmolLM-1.7B-Instruct"
4
5device = "cuda" # for GPU usage or "cpu" for CPU usage
6tokenizer = AutoTokenizer.from_pretrained(checkpoint)
7# for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")`
8model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
9
10messages = [{"role": "user", "content": "What is the capital of France."}]
11input_text=tokenizer.apply_chat_template(messages, tokenize=False)
12print(input_text)
13inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
14outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True)
15print(tokenizer.decode(outputs[0]))1pip install trl
2trl chat --model_name_or_path HuggingFaceTB/SmolLM-1.7B-Instruct --device cpu1@misc{allal2024SmolLM,
2 title={SmolLM - blazingly fast and remarkably powerful},
3 author={Loubna Ben Allal and Anton Lozhkov and Elie Bakouch and Leandro von Werra and Thomas Wolf},
4 year={2024},
5}