Instructions to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF", filename="Qwen3-4B-Instruct-2507-MX-3.0bpw.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 sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF # Run inference directly in the terminal: llama cli -hf sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF # Run inference directly in the terminal: llama cli -hf sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-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 sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF # Run inference directly in the terminal: ./llama-cli -hf sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-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 sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
Use Docker
docker model run hf.co/sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
- LM Studio
- Jan
- vLLM
How to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-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": "sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
- Ollama
How to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with Ollama:
ollama run hf.co/sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
- Unsloth Studio
How to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-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 sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-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 sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF to start chatting
- Pi
How to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
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": "sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
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 sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with Docker Model Runner:
docker model run hf.co/sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
- Lemonade
How to use sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
Run and chat with the model
lemonade run user.Qwen3-4B-Instruct-2507-BitClass-GGUF-{{QUANT_TAG}}List all available models
lemonade list
Qwen3-4B-Instruct-2507 โ BitClass Mixed-Precision GGUF
Mixed-precision GGUF quantizations of Qwen3-4B-Instruct-2507 using learned per-tensor quantization profiles. Each tensor group receives the precision level that minimizes quality loss for its importance โ more bits where they matter, fewer where they don't.
Seven precision levels from ultra-compact (3.0 bpw) to high quality (4.5 bpw). Low-BPW models use IQ types for better quality-per-bit; higher levels use KQ types for faster inference.
Models
| File | Target BPW | Size | PPL โ | Family |
|---|---|---|---|---|
| Qwen3-4B-Instruct-2507-MX-3.0bpw.gguf | 3.0 | 1.72 GB | 3.073 | IQ |
| Qwen3-4B-Instruct-2507-MX-3.2bpw.gguf | 3.2 | 1.79 GB | 3.034 | IQ |
| Qwen3-4B-Instruct-2507-MX-3.4bpw.gguf | 3.4 | 1.88 GB | 2.971 | IQ |
| Qwen3-4B-Instruct-2507-MX-3.6bpw.gguf | 3.6 | 2.02 GB | 2.936 | KQ |
| Qwen3-4B-Instruct-2507-MX-3.8bpw.gguf | 3.8 | 2.03 GB | 2.951 | KQ |
| Qwen3-4B-Instruct-2507-MX-4.0bpw.gguf | 4.0 | 2.01 GB | 2.928 | KQ |
| Qwen3-4B-Instruct-2507-MX-4.5bpw.gguf | 4.5 | 2.47 GB | 2.932 | KQ |
Target BPW is the planner's per-tensor bit budget (and the filename label). The actual whole-file BPW runs ~0.3โ0.4 higher, because output/embedding tensors are kept at higher precision and GGUF carries metadata overhead โ see the Size column for the real footprint.
Recommended: MX-3.4bpw for the best quality-to-size ratio. MX-3.0bpw for maximum compression. MX-4.0bpw for the highest quality in this ladder.
How It Compares
| Model | BPW | Size | PPL โ | Source |
|---|---|---|---|---|
| ByteShape KQ 3.34 | 3.34 | 1.69 GB | 3.121 | byteshape |
| โ Ours MX-3.0 | 3.0 | 1.72 GB | 3.073 | This repo |
| โ Ours MX-3.2 | 3.2 | 1.79 GB | 3.034 | This repo |
| Unsloth Q3_K_S | 3.75 | 1.75 GB | 3.007 | unsloth |
| โ Ours MX-3.4 | 3.4 | 1.88 GB | 2.971 | This repo |
| โ Ours MX-3.6 | 3.6 | 2.02 GB | 2.936 | This repo |
| โ Ours MX-4.0 | 4.0 | 2.01 GB | 2.928 | This repo |
| Unsloth Q4_K_M | 4.97 | 2.32 GB | 2.956 | unsloth |
| โ Ours MX-4.5 | 4.5 | 2.47 GB | 2.932 | This repo |
All models benchmarked in the same session on identical hardware (NVIDIA GB10 ATOM, GPU) for fair comparison.
Key Results
- Lower perplexity than ByteShape KQ 3.34: MX-3.0 (PPL 3.073) vs 3.121 โ 1.5% better, at comparable size (1.72 vs 1.69 GB)
- Lower perplexity than Unsloth Q3_K_S: MX-3.4 (PPL 2.971) vs 3.007 โ 1.2% better, at 1.88 vs 1.75 GB
- Lower perplexity than Unsloth Q4_K_M: MX-4.5 (PPL 2.932) vs 2.956 โ 0.8% better, at 2.47 vs 2.32 GB
Running with Ollama
# Pick any precision level
ollama run hf.co/sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF:Qwen3-4B-Instruct-2507-MX-3.4bpw.gguf
Running with llama.cpp
# Chat
llama-cli -m Qwen3-4B-Instruct-2507-MX-3.4bpw.gguf -cnv
# Server (OpenAI-compatible API)
llama-server -m Qwen3-4B-Instruct-2507-MX-3.4bpw.gguf --port 8080
# Benchmark
llama-perplexity -m Qwen3-4B-Instruct-2507-MX-3.4bpw.gguf -f your_eval_data.txt
Benchmarking Details
All benchmarks run with llama.cpp (commit 406f4e3) on NVIDIA GB10 ATOM GPU with full offload (-ngl 999). Perplexity measured via llama-perplexity on a held-out evaluation set (20 chunks, 512 context). Throughput via llama-bench (512 prompt / 128 generation tokens). All models โ ours, Unsloth, ByteShape โ benchmarked in the same session.
Disclaimer
Independent project. Not affiliated with or endorsed by Qwen, Unsloth, ByteShape, Bartowski, or llama.cpp. Competitor figures are from our own benchmark harness and may differ from those projects' self-reported numbers; competitor file sizes reflect the revision we tested and may since have changed.
License
Apache 2.0, inherited from Qwen3-4B-Instruct-2507.
Acknowledgments
- Downloads last month
- 842
We're not able to determine the quantization variants.
Model tree for sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF
Base model
Qwen/Qwen3-4B-Instruct-2507
docker model run hf.co/sh111111111111111/Qwen3-4B-Instruct-2507-BitClass-GGUF