Instructions to use Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV 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 Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV # Run inference directly in the terminal: llama cli -hf Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV # Run inference directly in the terminal: llama cli -hf Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
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 Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV # Run inference directly in the terminal: ./llama-cli -hf Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
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 Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV # Run inference directly in the terminal: ./build/bin/llama-cli -hf Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
Use Docker
docker model run hf.co/Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
- LM Studio
- Jan
- vLLM
How to use Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
- Ollama
How to use Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV with Ollama:
ollama run hf.co/Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
- Unsloth Desktop
- Pi
How to use Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV with Docker Model Runner:
docker model run hf.co/Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
- Lemonade
How to use Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
Run and chat with the model
lemonade run user.OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
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 Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV
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 "Zhongzhu/OSCAR-LLAMACPP-Qwen3-4B-Thinking-2507-INT2-KV" \ --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"
Qwen3 4B Thinking 2507 - OSCAR INT2 KV cache (GGUF)
Qwen3-4B-Thinking-2507 in GGUF, packaged for the OSCAR ~2-bit (INT2) KV cache fork of llama.cpp.
This repository contains a rotation-baked GGUF plus the raw calibrated rotation matrices. The model is intended for OSCAR INT2 KV-cache inference: the per-layer rotation is already embedded in the GGUF, so the KV cache can be quantized to 2 bits while retaining near-f16 quality.
Files
| file | contents | size | what it is for |
|---|---|---|---|
qwen3-4b-rot-kv.gguf |
Qwen3 4B Thinking GGUF with OSCAR rotation baked in | 2.3 GB | Main model for OSCAR INT2 KV-cache inference. |
k_rotation_qqt_r_h_pbr.pt |
raw calibrated K rotation | 2.3 MB | Use with a compatible base GGUF if you want to bake the rotation yourself. |
v_rotation_sst_r_h_pbr.pt |
raw calibrated V rotation | 2.3 MB | Use with a compatible base GGUF if you want to bake the rotation yourself. |
"OSCAR rotation" is an in-graph, post-RoPE orthogonal transform applied to K and V so that the KV cache quantizes well at 2-bit. The
-rot-kvGGUF already contains the rotation tensors; no runtime rotation file is needed for normal inference.
Run
Use the OSCAR llama.cpp fork built with the backend you need (for example Metal on Apple Silicon).
LLAMA_KV_FUSED_FA=1 LLAMA_KV_NO_HADAMARD=1 LLAMA_KV_CLIP_RATIO=0.96 \
LLAMA_KV_HP_SINK=512 LLAMA_KV_HP_RECENT=2048 \
./build/bin/llama-server -m qwen3-4b-rot-kv.gguf \
-fa on -ngl 99 -c 16384 \
--cache-type-k q2_0 --cache-type-v q2_0 \
--host 127.0.0.1 --port 8080
| env var | meaning | value |
|---|---|---|
LLAMA_KV_FUSED_FA |
fused INT2+f16 flash-attention kernels, fast path when available | 1 |
LLAMA_KV_NO_HADAMARD |
rotation is in-graph, so skip the in-quant Hadamard | 1 |
LLAMA_KV_CLIP_RATIO |
per-row outlier clip before quant | 0.96 |
LLAMA_KV_HP_SINK / LLAMA_KV_HP_RECENT |
tokens kept high-precision (first/last) | 512 / 2048 |
--cache-type-v f16 keeps V high-precision, which may improve quality at the cost of more memory.
Bake your own rotation
If you have a compatible base Qwen3-4B-Thinking-2507 GGUF, you can bake the included rotation matrices into it with the OSCAR export script:
python3 oscar-rotation/export_rot_kv_gguf.py \
--base qwen3-4b-base.gguf \
--rot-dir . \
--out qwen3-4b-rot-kv.gguf
- Downloads last month
- 11
We're not able to determine the quantization variants.