Downloads · 30 days
2
100% of all-time downloads
sweatSmile/HF-SmolLM3-3B-Math-Formulas-4bit
HF-SmolLM3-3B-Math-Formulas-4bit is a machine learning model from sweatSmile. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
SmolLM3-3B-Math-Formulas-4bit is a fine-tuned version of HuggingFaceTB/SmolLM3-3B specialized for mathematical formula understanding and generation. The model has been optimized using 4-bit quantization (NF4) with LoR…
Downloads · 30 days
2
100% of all-time downloads
All-time downloads
2
Public
Parameters
3.1B
12.3 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors12.3 GB · 100%
From the Hugging Face model README
SmolLM3-3B-Math-Formulas-4bit is a fine-tuned version of HuggingFaceTB/SmolLM3-3B specialized for mathematical formula understanding and generation. The model has been optimized using 4-bit quantization (NF4) with LoRA adapters for efficient training and inference.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Load the model and tokenizer
model_name = "sweatSmile/HF-SmolLM3-3B-Math-Formulas-4bit"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto"
)
# Generate mathematical content
prompt = "Explain this mathematical formula:"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=150,
temperature=0.7,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Based on SmolLM3-3B with the following modifications:
If you use this model, please cite:
@model{smollm3-math-formulas-4bit,
title={SmolLM3-3B-Math-Formulas-4bit},
author={sweatSmile},
year={2025},
base_model={HuggingFaceTB/SmolLM3-3B},
dataset={ddrg/math_formulas},
method={QLoRA fine-tuning with 4-bit quantization}
}
This model inherits the license from the base SmolLM3-3B model. Please refer to the original model's license for usage terms.