Instructions to use Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR", dtype="auto") - llama-cpp-python
How to use Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR", filename="unsloth.F16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M
Use Docker
docker model run hf.co/Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR with Ollama:
ollama run hf.co/Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M
- Unsloth Studio new
How to use Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR to start chatting
- Docker Model Runner
How to use Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR with Docker Model Runner:
docker model run hf.co/Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M
- Lemonade
How to use Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR:Q4_K_M
Run and chat with the model
lemonade run user.SmolLM2-1.7B-Instruct-NuminaMath-TIR-Q4_K_M
List all available models
lemonade list
Uploaded model
- Developed by: Qurtana
- License: apache-2.0
- Finetuned from model : unsloth/SmolLM2-1.7B-Instruct-bnb-4bit
This model was trained 2x faster with Unsloth and Huggingface's TRL library.
Trained using rank-stablized QLoRA with r = 64 and alpha = 5 for one epoch using the "ChatML" data prep.
The following heads were targeted: "q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj", "embed_tokens", and "lm_head".
I strongly believe that this should achieve better performance than the original, particularly in math and reasoning. Hopefully the MUSR and MATH Lvl 5 evaluations reflect this.
This is what I used to load the model using AutoClasses:
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
# Define the revision you want to use
revision = "main" # or any other valid revision/branch name
# Load the config, model, and tokenizer with the specified revision
config = AutoConfig.from_pretrained("Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR", revision=revision)
# Use AutoModelForCausalLM instead of AutoModel for this model
model = AutoModelForCausalLM.from_pretrained("Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR",
revision=revision,
config=config,
ignore_mismatched_sizes=True) # Add this line to ignore mismatched sizes
tokenizer = AutoTokenizer.from_pretrained("Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR", revision=revision)
Dataset Citation: @misc{numina_math_datasets, author = {Jia LI, Edward Beeching, Lewis Tunstall, Ben Lipkin, Roman Soletskyi, Shengyi Costa Huang, Kashif Rasul, Longhui Yu, Albert Jiang, Ziju Shen, Zihan Qin, Bin Dong, Li Zhou, Yann Fleureau, Guillaume Lample, and Stanislas Polu}, title = {NuminaMath TIR}, year = {2024}, publisher = {Numina}, journal = {Hugging Face repository}, howpublished = {\url{https://huggingface.co/AI-MO/NuminaMath-TIR}} }
- Downloads last month
- 118
Model tree for Qurtana/SmolLM2-1.7B-Instruct-NuminaMath-TIR
Base model
HuggingFaceTB/SmolLM2-1.7B