Instructions to use GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF", filename="Qwen3-Code-Reasoning-4B.Q3_K_M.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 GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf GetSoloTech/Qwen3-Code-Reasoning-4B-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 GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf GetSoloTech/Qwen3-Code-Reasoning-4B-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 GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf GetSoloTech/Qwen3-Code-Reasoning-4B-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 GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GetSoloTech/Qwen3-Code-Reasoning-4B-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": "GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M
- Ollama
How to use GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF with Ollama:
ollama run hf.co/GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M
- Unsloth Studio new
How to use GetSoloTech/Qwen3-Code-Reasoning-4B-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 GetSoloTech/Qwen3-Code-Reasoning-4B-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 GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF to start chatting
- Pi new
How to use GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF with Docker Model Runner:
docker model run hf.co/GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M
- Lemonade
How to use GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3-Code-Reasoning-4B-GGUF-Q4_K_M
List all available models
lemonade list
GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF
This is the GGUF quantized version of the Qwen3-Code-Reasoning-4B model, specifically optimized for competitive programming and code reasoning tasks. This model has been trained on the high-quality Code-Reasoning dataset to enhance its capabilities in solving complex programming problems with detailed reasoning.
🚀 Key Features
- Enhanced Code Reasoning: Specifically trained on competitive programming problems
- Thinking Capabilities: Inherits the advanced reasoning capabilities from the base model
- High-Quality Solutions: Trained on solutions with ≥85% test case pass rates
- Structured Output: Optimized for generating well-reasoned programming solutions
- Efficient Inference: GGUF format enables fast inference on CPU and GPU
- Multiple Quantization Levels: Available in various precision levels for different hardware requirements
Dataset Statistics
- Split: Python
- Source: High-quality competitive programming problems from TACO, APPS, CodeContests, and Codeforces
- Quality Filter: Only correctly solved problems with ≥85% test case pass rates
🔧 Usage
Using with llama.cpp
# Download the model (choose your preferred quantization)
wget https://huggingface.co/GetSoloTech/Qwen3-Code-Reasoning-4B-GGUF/resolve/main/qwen3-code-reasoning-4b.Q4_K_M.gguf
# Run inference
./llama.cpp -m qwen3-code-reasoning-4b.Q4_K_M.gguf -n 4096 --repeat_penalty 1.1 -p "You are an expert competitive programmer. Read the problem and produce a correct, efficient solution. Include reasoning if helpful.\n\nProblem: Your programming problem here..."
Using with Python (llama-cpp-python)
from llama_cpp import Llama
# Load the model
llm = Llama(
model_path="./qwen3-code-reasoning-4b.Q4_K_M.gguf",
n_ctx=4096,
n_threads=4
)
# Prepare input for competitive programming problem
prompt = """You are an expert competitive programmer. Read the problem and produce a correct, efficient solution. Include reasoning if helpful.
Problem: Your programming problem here..."""
# Generate solution
output = llm(
prompt,
max_tokens=4096,
temperature=0.7,
top_p=0.8,
top_k=20,
repeat_penalty=1.1
)
print(output['choices'][0]['text'])
Using with Ollama
# Create a Modelfile
cat > Modelfile << EOF
FROM ./qwen3-code-reasoning-4b.Q4_K_M.gguf
TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}{{ if .Prompt }}<|im_start|>user
{{ .Prompt }}<|im_end|>
{{ end }}<|im_start|>assistant
"""
PARAMETER temperature 0.7
PARAMETER top_p 0.8
PARAMETER top_k 20
PARAMETER repeat_penalty 1.1
EOF
# Create and run the model
ollama create qwen3-code-reasoning -f Modelfile
ollama run qwen3-code-reasoning "Solve this competitive programming problem: [your problem here]"
📊 Available Quantizations
| Quantization | Size | Memory Usage | Quality | Use Case |
|---|---|---|---|---|
| Q3_K_M | 2.08 GB | ~3 GB | Good | CPU inference, limited memory |
| Q4_K_M | 2.5 GB | ~4 GB | Better | Balanced performance/memory |
| Q5_K_M | 2.89 GB | ~5 GB | Very Good | High quality, moderate memory |
| Q6_K | 3.31 GB | ~6 GB | Excellent | High quality, more memory |
| Q8_0 | 4.28 GB | ~8 GB | Best | Maximum quality, high memory |
| F16 | 8.05 GB | ~16 GB | Original | Maximum quality, GPU recommended |
📈 Performance Expectations
This GGUF quantized model maintains the performance characteristics of the original finetuned model:
- Competitive Programming Problems: Better understanding of problem constraints and requirements
- Code Generation: More accurate and efficient solutions
- Reasoning Quality: Enhanced step-by-step reasoning for complex problems
- Solution Completeness: More comprehensive solutions with proper edge case handling
🎛️ Recommended Settings
For Code Generation
- Temperature: 0.7
- Top-p: 0.8
- Top-k: 20
- Max New Tokens: 4096 (adjust based on problem complexity)
- Repeat Penalty: 1.1
For Reasoning Tasks
- Temperature: 0.6
- Top-p: 0.95
- Top-k: 20
- Max New Tokens: 8192 (for complex reasoning)
- Repeat Penalty: 1.1
🛠️ Hardware Requirements
Minimum Requirements
- RAM: 4 GB (for Q3_K_M quantization)
- Storage: 2.5 GB free space
- CPU: Multi-core processor recommended
Recommended Requirements
- RAM: 8 GB or more
- Storage: 5 GB free space
- GPU: NVIDIA GPU with 4GB+ VRAM (optional, for faster inference)
🤝 Contributing
This GGUF model was converted from the original LoRA-finetuned model. For questions about:
- The original model: GetSoloTech/Qwen3-Code-Reasoning-4B
- The base model: Qwen3 GitHub
- The training dataset: Code-Reasoning Repository
- The training framework: Unsloth Documentation
📄 License
This model follows the same license as the base model (Apache 2.0). Please refer to the base model license for details.
🙏 Acknowledgments
- Qwen Team for the excellent base model
- Unsloth Team for the efficient training framework
- NVIDIA Research for the original OpenCodeReasoning-2 dataset
- llama.cpp community for the GGUF format and tools
📞 Contact
For questions about this GGUF model, please open an issue in the repository.
Note: This model is specifically optimized for competitive programming and code reasoning tasks. The GGUF format enables efficient inference on various hardware configurations while maintaining the model's reasoning capabilities.
- Downloads last month
- 143
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit