Instructions to use HackNetAyush/smollm2-135M-instruct-gguf-q8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use HackNetAyush/smollm2-135M-instruct-gguf-q8 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="HackNetAyush/smollm2-135M-instruct-gguf-q8", filename="smollm2-135m-instruct-q8_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use HackNetAyush/smollm2-135M-instruct-gguf-q8 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0 # Run inference directly in the terminal: llama-cli -hf HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0 # Run inference directly in the terminal: llama-cli -hf HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0
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 HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0
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 HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0
Use Docker
docker model run hf.co/HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0
- LM Studio
- Jan
- vLLM
How to use HackNetAyush/smollm2-135M-instruct-gguf-q8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HackNetAyush/smollm2-135M-instruct-gguf-q8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HackNetAyush/smollm2-135M-instruct-gguf-q8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0
- Ollama
How to use HackNetAyush/smollm2-135M-instruct-gguf-q8 with Ollama:
ollama run hf.co/HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0
- Unsloth Studio
How to use HackNetAyush/smollm2-135M-instruct-gguf-q8 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 HackNetAyush/smollm2-135M-instruct-gguf-q8 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 HackNetAyush/smollm2-135M-instruct-gguf-q8 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for HackNetAyush/smollm2-135M-instruct-gguf-q8 to start chatting
- Docker Model Runner
How to use HackNetAyush/smollm2-135M-instruct-gguf-q8 with Docker Model Runner:
docker model run hf.co/HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0
- Lemonade
How to use HackNetAyush/smollm2-135M-instruct-gguf-q8 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0
Run and chat with the model
lemonade run user.smollm2-135M-instruct-gguf-q8-Q8_0
List all available models
lemonade list
SmolLM2 135M Instruct (Quantized Q8_0, GGUF)
A tiny yet powerful instruction-tuned language model optimized for CPU inference. With only 135 million parameters and a file size of 138 MB, this model delivers impressive performance even on modest hardware.
π Key Features
- Tiny Footprint: Only 138 MB in size
- CPU-Friendly: Runs efficiently without a GPU
- Low Resource Requirements: Works on systems with just 1-2 GB RAM
- Fast Inference: Responsive even on older CPUs
- Instruction-Tuned: Optimized for chat and instruction-following tasks
- Long Context: Supports up to 8,192 tokens
π¦ Model Details
- Architecture: LLaMA-like transformer
- Parameters: 135M
- Format: GGUF (compatible with llama.cpp ecosystem)
- Quantization: Q8_0 (8-bit linear quantization)
- Type: Instruction-tuned chat model
ποΈ Repository Contents
smollm2-135m-instruct-q8_0.gguf- Main model file (Q8_0 quantized)tokenizer.json- Model tokenizer fileconfig.json- HuggingFace compatibility configurationLICENSE- Apache 2.0 license fileREADME.md- This documentation
π Quick Start Guide
Prerequisites
# Install llama-cpp-python
pip install llama-cpp-python
Using llama.cpp CLI
# Basic usage
./main -m smollm2-135m-instruct-q8_0.gguf -p "Who are you?"
# With custom parameters
./main -m smollm2-135m-instruct-q8_0.gguf --ctx-size 2048 --threads 4 -p "Write a story."
Using Python with llama-cpp-python
from llama_cpp import Llama
# Initialize the model
llm = Llama(
model_path="smollm2-135m-instruct-q8_0.gguf",
n_ctx=2048, # Context window
n_threads=4, # CPU threads to use
n_batch=512 # Batch size for prompt processing
)
# Generate a response
output = llm("What is the capital of France?",
max_tokens=128,
temperature=0.7,
top_p=0.95)
print(output)
π¬ Prompt Format
This is a chat-style instruction-tuned model. Use the following message format for best results:
[
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "Tell me a joke."}
]
Example Interaction
User: What is your name?
Luna: My name is Luna, and I'm your tiny but capable AI assistant, ready to help with anything you need!
π§ Compatible Software
- llama.cpp
- text-generation-webui
- LM Studio
- KoboldCPP
- llama-cpp-python
πͺ Why Choose This Model?
- β¨ Runs Offline: No internet connection needed
- π± Tiny Footprint: Just 138 MB on disk
- β‘ Fast Inference: Optimized for CPU performance
- π Open Source: Apache 2.0 licensed
- π οΈ Versatile: Perfect for edge devices, embedded systems, hobby projects, and learning
π₯² Limitations
SmolLM2 models primarily understand and generate content in English. They can produce text on a variety of topics, but the generated content may not always be factually accurate, logically consistent, or free from biases present in the training data. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content.
π License
π Credits
- Quantized and packaged by Ayush Swami (HackNetAyush)
- Based on HuggingFaceTB's SmolLM2-135M-Instruct model
π» Hardware Requirements
- CPU: Any modern CPU
- RAM: 1-2 GB minimum
- GPU: Not required
- Disk Space: ~140 MB
Feel free to Like β€οΈ the repository if you find this model useful!
- Downloads last month
- 181
8-bit
Model tree for HackNetAyush/smollm2-135M-instruct-gguf-q8
Base model
HuggingFaceTB/SmolLM2-135M
docker model run hf.co/HackNetAyush/smollm2-135M-instruct-gguf-q8:Q8_0