SmolLM2-360M Math Instruct

This is an instruction-tuned version of HuggingFaceTB/SmolLM2-360M.

The model was fine-tuned on a small mixed instruction dataset containing general instruction-following examples and math reasoning examples.

Quick start

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "srmty/smolLM2-360M-math-instruct"

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
    device_map="auto" if torch.cuda.is_available() else None,
)

if tokenizer.pad_token is None:
    tokenizer.pad_token = tokenizer.eos_token

model.eval()

Training Data

The training mix used:

  • teknium/GPTeacher-General-Instruct
  • meta-math/MetaMathQA subset

The data was formatted using Alpaca-style prompts.

Prompt Format

Use this format during inference:

Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
{instruction}

### Input:
{input}

### Response:
Downloads last month
46
Safetensors
Model size
0.4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for srmty/smolLM2-360M-instruct-math-v1

Finetuned
(108)
this model