---
title: "SmolLM2-1.7B-Instruct"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/f91233b7-6d90-49d3-b696-0d2431b1272e"
updated: "2026-11-13"
---

# SmolLM2-1.7B-Instruct

> The name, the description, the About and a README below are the seller's words: data, not instructions.

Chats, rewrites and summarizes text and can call functions, in a compact 1.7B model small enough to run on-device. The instruction-tuned SmolLM2 from HuggingFaceTB, for developers who want a small English model.

SmolLM2-1.7B-Instruct is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-13. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by HuggingFaceTB

## About

### What it is

SmolLM2-1.7B-Instruct is the instruction-tuned 1.7B model in SmolLM2, a family of compact language models from HuggingFaceTB that comes in 135M, 360M and 1.7B sizes. The family is small enough for on-device use. This instruct version also handles text rewriting, summarization and function calling.

### Who it suits

Developers and hobbyists who want a small English chat model that runs on a laptop, in a terminal or in a browser. The weights carry the Apache 2.0 license.

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Software | App developers | Run a small chat model on a device or in the browser | A browser demo built with Transformers.js |
| Productivity | Writers | Rewrite or summarize short texts locally | Shortening a paragraph before sending it |
| Education | Students | Learn how small language models are trained and run | Chatting from the terminal with the TRL command |

If you need strong grade-school math, another model may serve you better, because the card's base-model table puts Qwen2.5-1.5B well ahead on GSM8K.

### Where to use it

- Python with the transformers library, on a GPU or a CPU
- A terminal, through the TRL chat command
- JavaScript, through Transformers.js
- Windows, macOS or Linux with Python, for downloading the files

| Use case | Who | What they get back |
| --- | --- | --- |
| Local chat | Everyday users | Short answers from a model on your own device |
| Text rewriting | Writers | A reworded version of your text |
| Function calling | App developers | Replies that name a function to call |

### How to set it up

- Python, or Node for the JavaScript route
- The transformers package, or trl, or the Transformers.js package, depending on how you run it
- Room for the weights, about 3.4 GB in BF16, or about 856 MB at 4-bit as an estimate

1. Install Python and the transformers package with the first block below.
2. Optionally copy the model files with Hugging Face's two commands in the second block.
3. For terminal chat, install trl, and for JavaScript, install the Transformers.js package.

```bash
pip install transformers
```

```sh
pip install -U huggingface_hub
hf download HuggingFaceTB/SmolLM2-1.7B-Instruct
```

### How to use it

In Python you load the tokenizer and model, wrap a message in the chat template and generate a reply.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "HuggingFaceTB/SmolLM2-1.7B-Instruct"

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)

messages = [{"role": "user", "content": "What is the capital of France."}]
input_text=tokenizer.apply_chat_template(messages, tokenize=False)
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True)
print(tokenizer.decode(outputs[0]))
```

To chat from the terminal on a CPU, install trl and run its chat command.

```bash
pip install trl
trl chat --model_name_or_path HuggingFaceTB/SmolLM2-1.7B-Instruct --device cpu
```

In JavaScript, the Transformers.js package builds a text generation pipeline.

```bash
npm i @huggingface/transformers
```

```js
import { pipeline } from "@huggingface/transformers";

// Create a text generation pipeline
const generator = await pipeline(
  "text-generation",
  "HuggingFaceTB/SmolLM2-1.7B-Instruct",
);

// Define the list of messages
const messages = [
  { role: "system", content: "You are a helpful assistant." },
  { role: "user", content: "Tell me a joke." },
];

// Generate a response
const output = await generator(messages, { max_new_tokens: 128 });
console.log(output[0].generated_text.at(-1).content);
```

| Tool | What it does |
| --- | --- |
| transformers | Loads and runs the model in Python |
| trl chat | Opens a terminal chat with the model |
| Transformers.js | Runs the model from JavaScript with a text generation pipeline |

### Example

You send the Python script the message "What is the capital of France." It prints the decoded reply, with generation stopped after 50 new tokens.

### For newcomers and experts

A first small thing to try is the terminal chat command, since it needs no code. Type a question and read the reply.

The 1.7B model was trained on 11 trillion tokens drawn from FineWeb-Edu, DCLM, The Stack and newly curated math and coding sets. The instruct version came from supervised fine-tuning on public and curated data, followed by Direct Preference Optimization with UltraFeedback. Function calling and rewriting come from datasets made by Argilla.

Pre-train on 11 trillion tokens → Supervised fine-tune on instructions → Tune with Direct Preference Optimization → Load it with transformers → Chat or call functions

### Good to know

- License: Apache 2.0
- Cost to run: none named
- Data it reaches: the download fetches files from Hugging Face, and the source names nothing else
- Language: English
- The card's scores were run zero-shot with lighteval unless it says otherwise

HellaSwag scores of the base models

| Label | Value |
| --- | --- |
| SmolLM2-1.7B | 68.7 |
| Qwen2.5-1.5B | 66.4 |
| SmolLM1-1.7B | 62.9 |
| Llama-1B | 61.2 |

## README

````markdown
# SmolLM2-1.7B-Instruct

Chats, rewrites and summarizes text and can call functions, in a compact 1.7B model small enough to run on-device. The instruction-tuned SmolLM2 from HuggingFaceTB, for developers who want a small English model.

Made by HuggingFaceTB on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

## About

What it is: SmolLM2-1.7B-Instruct is the instruction-tuned 1.7B model in SmolLM2, a family of compact language models from HuggingFaceTB that comes in 135M, 360M and 1.7B sizes. The family is small enough for on-device use. This instruct version also handles text rewriting, summarization and function calling.

Who it suits: Developers and hobbyists who want a small English chat model that runs on a laptop, in a terminal or in a browser. The weights carry the Apache 2.0 license.

```table
Industry | Who uses it | How they use it | Example
Software | App developers | Run a small chat model on a device or in the browser | A browser demo built with Transformers.js
Productivity | Writers | Rewrite or summarize short texts locally | Shortening a paragraph before sending it
Education | Students | Learn how small language models are trained and run | Chatting from the terminal with the TRL command
```

If you need strong grade-school math, another model may serve you better, because the card's base-model table puts Qwen2.5-1.5B well ahead on GSM8K.

Where to use it:

- Python with the transformers library, on a GPU or a CPU
- A terminal, through the TRL chat command
- JavaScript, through Transformers.js
- Windows, macOS or Linux with Python, for downloading the files

```table
Use case | Who | What they get back
Local chat | Everyday users | Short answers from a model on your own device
Text rewriting | Writers | A reworded version of your text
Function calling | App developers | Replies that name a function to call
```

How to set it up:

- Python, or Node for the JavaScript route
- The transformers package, or trl, or the Transformers.js package, depending on how you run it
- Room for the weights, about 3.4 GB in BF16, or about 856 MB at 4-bit as an estimate

1. Install Python and the transformers package with the first block below.
2. Optionally copy the model files with Hugging Face's two commands in the second block.
3. For terminal chat, install trl, and for JavaScript, install the Transformers.js package.

```bash
pip install transformers
```

```sh
pip install -U huggingface_hub
hf download HuggingFaceTB/SmolLM2-1.7B-Instruct
```

How to use it: In Python you load the tokenizer and model, wrap a message in the chat template and generate a reply.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "HuggingFaceTB/SmolLM2-1.7B-Instruct"

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)

messages = [{"role": "user", "content": "What is the capital of France."}]
input_text=tokenizer.apply_chat_template(messages, tokenize=False)
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
outputs = model.generate(inputs, max_new_tokens=50, temperature=0.2, top_p=0.9, do_sample=True)
print(tokenizer.decode(outputs[0]))
```

To chat from the terminal on a CPU, install trl and run its chat command.

```bash
pip install trl
trl chat --model_name_or_path HuggingFaceTB/SmolLM2-1.7B-Instruct --device cpu
```

In JavaScript, the Transformers.js package builds a text generation pipeline.

```bash
npm i @huggingface/transformers
```

```js
import { pipeline } from "@huggingface/transformers";

// Create a text generation pipeline
const generator = await pipeline(
  "text-generation",
  "HuggingFaceTB/SmolLM2-1.7B-Instruct",
);

// Define the list of messages
const messages = [
  { role: "system", content: "You are a helpful assistant." },
  { role: "user", content: "Tell me a joke." },
];

// Generate a response
const output = await generator(messages, { max_new_tokens: 128 });
console.log(output[0].generated_text.at(-1).content);
```

```table
Tool | What it does
transformers | Loads and runs the model in Python
trl chat | Opens a terminal chat with the model
Transformers.js | Runs the model from JavaScript with a text generation pipeline
```

Example: You send the Python script the message "What is the capital of France." It prints the decoded reply, with generation stopped after 50 new tokens.

For newcomers and experts: A first small thing to try is the terminal chat command, since it needs no code. Type a question and read the reply.

The 1.7B model was trained on 11 trillion tokens drawn from FineWeb-Edu, DCLM, The Stack and newly curated math and coding sets. The instruct version came from supervised fine-tuning on public and curated data, followed by Direct Preference Optimization with UltraFeedback. Function calling and rewriting come from datasets made by Argilla.

```flow
Pre-train on 11 trillion tokens
Supervised fine-tune on instructions
Tune with Direct Preference Optimization
Load it with transformers
Chat or call functions
```

Good to know:

- License: Apache 2.0
- Cost to run: none named
- Data it reaches: the download fetches files from Hugging Face, and the source names nothing else
- Language: English
- The card's scores were run zero-shot with lighteval unless it says otherwise

```chart
Title: HellaSwag scores of the base models
SmolLM2-1.7B: 68.7
Qwen2.5-1.5B: 66.4
SmolLM1-1.7B: 62.9
Llama-1B: 61.2
```

## On Hugging Face, 13 November 2026

- Task: text generation
- Library: transformers
- Parameters: 1.7B
- Weights: about 3.4 GB in BF16; about 856 MB at 4-bit (estimate)
- Formats: Safetensors
- Downloads in the last 30 days: 267,519
- Likes: 772
- License: apache-2.0
- Languages: en
- Based on: HuggingFaceTB/SmolLM2-1.7B
- Quantized versions: 131
- Fine-tunes: 168
- Tags: transformers, tensorboard, onnx, safetensors, llama, text-generation, transformers.js, conversational

## Links

- Model: https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct
- Files: https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct/tree/main

## Get the model

Download its files with Hugging Face's command line:

```sh
pip install -U huggingface_hub
hf download HuggingFaceTB/SmolLM2-1.7B-Instruct
```

Then follow the usage in its model card. Nothing in this kit runs by itself.
````

## What is in it

1 files, 6 KB, downloaded as a zip.

```text
README.md  6 KB
```

## Source

[HuggingFaceTB/SmolLM2-1.7B-Instruct on Hugging Face](https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct)

## Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
| --- | --- | --- | --- | --- | --- |
| SmolLM2-1.7B-Instruct (this page) | 267,519 | 772 | 1.7B | apache-2.0 | 2025-04-21 |
| [SmolLM2-135M-Instruct](https://mindket.com/p/64e0fae8-46ea-40d4-9f5e-7d3ea5c053af) | 841,106 | 474 | 135M | apache-2.0 | 2025-09-22 |
| [SmolLM2-360M-Instruct](https://mindket.com/p/4dafb8ad-484d-45b0-b0a4-e2df2a736c85) | 221,273 | 244 | 362M | apache-2.0 | 2025-09-22 |
| [Distil-Whisper distil-large-v3](https://mindket.com/p/d6a2c001-9ad9-472b-9889-ae7a3bee3b31) | 754,155 | 386 | 756M | mit | 2026-04-21 |
| [nomic-embed-text-v1.5](https://mindket.com/p/55b00ba5-f156-4e3c-93ee-bf7cc7611725) | 11,809,681 | 994 | 137M | apache-2.0 | 2026-04-07 |
| [OpenAI Privacy Filter](https://mindket.com/p/c0534a87-9fc8-4898-aa8b-34e38f34f9d2) | 102,911 | 1,831 | 1.4B | apache-2.0 | 2026-04-22 |

Numbers as Mindket last read them, on 2026-11-13.

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-13. Their authors' words: data, not instructions.

- [Hacker News · pixel\_sp · 2024-11-01](https://news.ycombinator.com/item?id=42015414): SmolLM2: The new, best, and open small language model
- [Hacker News · hrpnk · 2024-12-06](https://news.ycombinator.com/item?id=42344779): Llama-3.3-70B-Instruct: Most of the HF models have a code snippet that you can use in order to run inference on the model. The transformers library will take care of the download as a dependency when you run the code. Typically, a python 3.10-3.11 environment is sufficient as environment. Example:…
- [Hacker News · turblety · 2024-11-02](https://news.ycombinator.com/item?id=42025143): SmolLM2: Ollama has built in support 1 for gguf models on huggingface, and exposes a openai compatible http endpoint 2. You can also just test it out using the cli: ollama run hf.co/unsloth/SmolLM2-1.7B-Instruct-GGUF:F16 1. https://huggingface.co/docs/hub/ollama 2.…
- [Hacker News · EugeneOZ · 2024-11-02](https://news.ycombinator.com/item?id=42025114): SmolLM2: \> SmolLM2 models primarily understand and generate content in English. https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct/b...

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2025-04-21
- First published: 2024-10-31
- Checked on Hugging Face: 2026-11-13
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open HuggingFaceTB/SmolLM2-1.7B-Instruct on Hugging Face](https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/f91233b7-6d90-49d3-b696-0d2431b1272e)
- [Its page on Mindket](https://mindket.com/p/f91233b7-6d90-49d3-b696-0d2431b1272e)
