Downloads · 30 days
20
15% of all-time downloads
srmty/smolLM2-360M-instruct-math-v1
smolLM2-360M-instruct-math-v1 is a text generation model from srmty. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This is an instruction-tuned version of HuggingFaceTB/SmolLM2-360M.
Downloads · 30 days
20
15% of all-time downloads
All-time downloads
136
Public
Parameters
362M
724 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors724 MB · 100%
From the Hugging Face model README
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.
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()
The training mix used:
teknium/GPTeacher-General-Instructmeta-math/MetaMathQA subsetThe data was formatted using Alpaca-style prompts.
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: