Instructions to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/Llama-3.2-3B-Overthinker-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/Llama-3.2-3B-Overthinker-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/Llama-3.2-3B-Overthinker-GGUF", filename="Llama-3.2-3B-Overthinker.Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF: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 QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF: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 QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/Llama-3.2-3B-Overthinker-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/Llama-3.2-3B-Overthinker-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M
- SGLang
How to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "QuantFactory/Llama-3.2-3B-Overthinker-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/Llama-3.2-3B-Overthinker-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "QuantFactory/Llama-3.2-3B-Overthinker-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/Llama-3.2-3B-Overthinker-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF with Ollama:
ollama run hf.co/QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF 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 QuantFactory/Llama-3.2-3B-Overthinker-GGUF 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 QuantFactory/Llama-3.2-3B-Overthinker-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/Llama-3.2-3B-Overthinker-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/Llama-3.2-3B-Overthinker-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Llama-3.2-3B-Overthinker-GGUF-Q4_K_M
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF:# Run inference directly in the terminal:
llama-cli -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF: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 QuantFactory/Llama-3.2-3B-Overthinker-GGUF:# Run inference directly in the terminal:
./llama-cli -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF: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 QuantFactory/Llama-3.2-3B-Overthinker-GGUF:# Run inference directly in the terminal:
./build/bin/llama-cli -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF:Use Docker
docker model run hf.co/QuantFactory/Llama-3.2-3B-Overthinker-GGUF:QuantFactory/Llama-3.2-3B-Overthinker-GGUF
This is quantized version of Lyte/Llama-3.2-3B-Overthinker created using llama.cpp
Original Model Card
Model Overview:
Training Data: This model was trained on a dataset with columns for initial reasoning, step-by-step thinking, verifications after each step, and final answers based on full context. Is it better than the original base model? Hard to say without proper evaluations, and I don’t have the resources to run them manually.
Context Handling: The model benefits from larger contexts (minimum 4k up to 16k tokens, though it was trained on 32k tokens). It tends to "overthink," so providing a longer context helps it perform better.
Performance: Based on my very few manual tests, the model seems to excel in conversational settings—especially for mental health, creative tasks and explaining stuff. However, I encourage you to try it out yourself using this Colab Notebook.
Dataset Note: The publicly available dataset is only a partial version. The full dataset was originally designed for a custom Mixture of Experts (MoE) architecture, but I couldn't afford to run the full experiment.
Acknowledgment: Special thanks to KingNish for reigniting my passion to revisit this project. I almost abandoned it after my first attempt a month ago. Enjoy this experimental model!
Inference Code:
- Feel free to make the steps and verifications collapsable and the initial reasoning too, you can show only the final answer to get an o1 feel(i don't know)
- Note: A feature we have here is the ability to control how many steps and verifications you want.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Lyte/Llama-3.2-3B-Overthinker"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
def generate_response(prompt, max_tokens=16384, temperature=0.8, top_p=0.95, repeat_penalty=1.1, num_steps=3):
messages = [{"role": "user", "content": prompt}]
# Generate reasoning
reasoning_template = tokenizer.apply_chat_template(messages, tokenize=False, add_reasoning_prompt=True)
reasoning_inputs = tokenizer(reasoning_template, return_tensors="pt").to(model.device)
reasoning_ids = model.generate(
**reasoning_inputs,
max_new_tokens=max_tokens // 3,
temperature=temperature,
top_p=top_p,
repetition_penalty=repeat_penalty
)
reasoning_output = tokenizer.decode(reasoning_ids[0, reasoning_inputs.input_ids.shape[1]:], skip_special_tokens=True)
# Generate thinking (step-by-step and verifications)
messages.append({"role": "reasoning", "content": reasoning_output})
thinking_template = tokenizer.apply_chat_template(messages, tokenize=False, add_thinking_prompt=True, num_steps=num_steps)
thinking_inputs = tokenizer(thinking_template, return_tensors="pt").to(model.device)
thinking_ids = model.generate(
**thinking_inputs,
max_new_tokens=max_tokens // 3,
temperature=temperature,
top_p=top_p,
repetition_penalty=repeat_penalty
)
thinking_output = tokenizer.decode(thinking_ids[0, thinking_inputs.input_ids.shape[1]:], skip_special_tokens=True)
# Generate final answer
messages.append({"role": "thinking", "content": thinking_output})
answer_template = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
answer_inputs = tokenizer(answer_template, return_tensors="pt").to(model.device)
answer_ids = model.generate(
**answer_inputs,
max_new_tokens=max_tokens // 3,
temperature=temperature,
top_p=top_p,
repetition_penalty=repeat_penalty
)
answer_output = tokenizer.decode(answer_ids[0, answer_inputs.input_ids.shape[1]:], skip_special_tokens=True)
return reasoning_output, thinking_output, answer_output
# Example usage:
prompt = "Explain the process of photosynthesis."
response = generate_response(prompt, num_steps=5)
print("Response:", response)
Uploaded model
- Developed by: Lyte
- License: apache-2.0
- Finetuned from model : unsloth/llama-3.2-3b-instruct-bnb-4bit
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 97
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit

Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF:# Run inference directly in the terminal: llama-cli -hf QuantFactory/Llama-3.2-3B-Overthinker-GGUF: