openai/gsm8k
Benchmark โข Updated โข 17.6k โข 980k โข 2.01k
How to use moekotb12345/SmolLM3-3B-GSM8K-QLoRA with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="moekotb12345/SmolLM3-3B-GSM8K-QLoRA") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("moekotb12345/SmolLM3-3B-GSM8K-QLoRA")
model = AutoModelForCausalLM.from_pretrained("moekotb12345/SmolLM3-3B-GSM8K-QLoRA", device_map="auto")How to use moekotb12345/SmolLM3-3B-GSM8K-QLoRA with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "moekotb12345/SmolLM3-3B-GSM8K-QLoRA"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "moekotb12345/SmolLM3-3B-GSM8K-QLoRA",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/moekotb12345/SmolLM3-3B-GSM8K-QLoRA
How to use moekotb12345/SmolLM3-3B-GSM8K-QLoRA with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "moekotb12345/SmolLM3-3B-GSM8K-QLoRA" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "moekotb12345/SmolLM3-3B-GSM8K-QLoRA",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "moekotb12345/SmolLM3-3B-GSM8K-QLoRA" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "moekotb12345/SmolLM3-3B-GSM8K-QLoRA",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use moekotb12345/SmolLM3-3B-GSM8K-QLoRA with Docker Model Runner:
docker model run hf.co/moekotb12345/SmolLM3-3B-GSM8K-QLoRA
Unit 1 project for the Hugging Face smol course. HuggingFaceTB/SmolLM3-3B-Base fine-tuned with QLoRA (TRL SFT)
on step-by-step GSM8K solutions,
formatted exactly like the lighteval|gsm8k|0|0 prompt (Question: ...\nAnswer:), ending with
The final answer is N. so answers fit in the eval's 256-token budget. LoRA adapter merged into bf16 weights.
| Model | Accuracy |
|---|---|
| HuggingFaceTB/SmolLM3-3B-Base | 3.5% |
| This model | 70.0% |
Official leaderboard number: see the lighteval results dataset moekotb12345/details_moekotb12345__SmolLM3-3B-GSM8K-QLoRA_private.
from transformers import pipeline
pipe = pipeline("text-generation", model="moekotb12345/SmolLM3-3B-GSM8K-QLoRA")
print(pipe("Question: A pen costs $3 and a notebook costs twice as much. How much for 2 of each?\nAnswer:",
max_new_tokens=256, stop_strings=["Question:"], tokenizer=pipe.tokenizer)[0]["generated_text"])
Base model
HuggingFaceTB/SmolLM3-3B-Base