Instructions to use majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M", filename="Qwen3.5-27B-RotorQuant-Q5_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 majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M # Run inference directly in the terminal: llama-cli -hf majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M # Run inference directly in the terminal: llama-cli -hf majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_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 majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_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 majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M
Use Docker
docker model run hf.co/majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M
- LM Studio
- Jan
- vLLM
How to use majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M
- Ollama
How to use majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M with Ollama:
ollama run hf.co/majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M
- Unsloth Studio
How to use majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M 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 majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M 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 majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M to start chatting
- Pi
How to use majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_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": "majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_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 majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M
Run Hermes
hermes
- Docker Model Runner
How to use majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M with Docker Model Runner:
docker model run hf.co/majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M
- Lemonade
How to use majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M:Q5_K_M
Run and chat with the model
lemonade run user.Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M-Q5_K_M
List all available models
lemonade list
Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M
GGUF Q5_K_M weight-quantized variant of Qwen/Qwen3.5-27B optimised for use with RotorQuant KV cache compression via a dedicated llama.cpp fork.
Important: RotorQuant KV cache types (
planar3,iso3) are not available in upstream llama.cpp, standard Ollama, or LM Studio. They require a specific llama.cpp fork. The GGUF file itself is a standard GGUF and works with any llama.cpp-compatible runtime using normal KV cache types (f16, q8_0, q4_0, etc.).
Hardware compatibility
| Device | VRAM / RAM | Recommendation |
|---|---|---|
| CPU host with ≥21 GB RAM | ~20.9 GB | works via llama.cpp; slower than GPU but no accelerator required |
| Apple Silicon (Metal) | ~22.8 GB | llama.cpp Metal backend; fast on M-series unified memory |
| NVIDIA GPU (partial offload) | split between GPU + RAM | offload as many layers as VRAM allows; rest on CPU |
Overview
This model combines two independent compression techniques:
| Technique | What it does | Requirement |
|---|---|---|
| GGUF Q5_K_M weight quantization | Reduces model size from ~56 GB (BF16) to ~19.0 GB | Any llama.cpp-compatible runtime |
RotorQuant KV cache compression — block-diagonal Clifford-algebra rotors for 3-bit KV cache (--cache-type-k iso3 --cache-type-v iso3) |
Block-diagonal rotations / random rotation for compressed KV cache | llama-cpp-turboquant fork only |
Quickstart
Option A — With RotorQuant KV cache (fork required)
You must build from the RotorQuant-enabled llama.cpp fork:
# Clone and build the fork
git clone https://github.com/johndpope/llama-cpp-turboquant.git
cd llama-cpp-turboquant && git checkout feature/planarquant-kv-cache
# CUDA (Windows/Linux)
cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build -j
# Metal (Apple Silicon)
cmake -B build -DGGML_METAL=ON -DGGML_METAL_EMBED_LIBRARY=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build -j
# Run with RotorQuant KV cache
./build/bin/llama-cli -m Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M.gguf \
--cache-type-k iso3 --cache-type-v iso3 \
-ngl 99 -fa \
-p "Explain quantum computing"
# Or run as a server
./build/bin/llama-server -m Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M.gguf \
--cache-type-k iso3 --cache-type-v iso3 \
-ngl 99 -fa --jinja
Option B — With standard llama.cpp / LM Studio / Ollama
The GGUF works as a normal quantised model. You won't get RotorQuant-specific KV cache benefits, but standard KV cache quantization (q8_0, q4_0) still reduces VRAM significantly.
llama.cpp (upstream)
llama-cli -m Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M.gguf \
--cache-type-k q8_0 --cache-type-v q8_0 \
-ngl 99 -fa \
-p "Explain quantum computing"
LM Studio
- Download the GGUF file and load in LM Studio.
- Enable Developer Mode (Settings → Developer).
- In the model loader's advanced settings, set Flash Attention to ON.
- Set K Cache Quantization and V Cache Quantization to
q8_0(orq4_0for more aggressive VRAM savings). - Note: LM Studio does not currently support RotorQuant's
iso3cache types. Track this feature request for updates.
Ollama
# Standard Ollama does not support RotorQuant cache types.
# Use with default or q8_0 KV cache via OLLAMA_KV_CACHE_TYPE=q8_0
OLLAMA_KV_CACHE_TYPE=q8_0 OLLAMA_FLASH_ATTENTION=1 ollama run majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M
Specifications
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen3.5-27B |
| Architecture | Dense (Gated DeltaNet + Gated Attention hybrid, 3:1 ratio) |
| Parameters | 27.8B (all active — not MoE) |
| Context Length | 262K native (extensible to 1M) |
| Weight Quantization | GGUF Q5_K_M (high quality, balanced 5-bit) |
| Original Size (BF16) | ~56 GB |
| Quantized File Size | ~19.0 GB |
| KV Cache (RotorQuant) | 3-bit via --cache-type-k iso3 --cache-type-v iso3 (fork only) |
| KV Cache (standard) | q8_0, q4_0, f16, etc. (any llama.cpp runtime) |
| License | apache-2.0 |
| Modalities | Text + Image + Video (native early-fusion) |
| Compatible Runtimes | llama.cpp, LM Studio, Ollama, koboldcpp |
What is RotorQuant?
RotorQuant is a KV cache compression method based on Clifford algebra (Cl(3,0)) rotors. It was developed as a faster, more parameter-efficient alternative to Google's TurboQuant (ICLR 2026).
Instead of applying a dense d×d random orthogonal rotation matrix (as TurboQuant does), RotorQuant uses lightweight block-diagonal rotations — independent 2D/4D rotations per pair/quartet — achieving O(d) complexity instead of O(d log d), fully parallelisable with no inter-element dependencies.
Benchmarks from the RotorQuant repository (Llama 3.1 8B, RTX 5090 — results will vary by model and hardware):
| Metric | RotorQuant (iso3) | TurboQuant | Standard q4_0 |
|---|---|---|---|
| Prefill Speed | 3,822 tok/s | 722 tok/s | — |
| Decode Speed | 119 tok/s | 93 tok/s | — |
| Perplexity (PPL) | 6.91 | 7.07 | — |
| KV Compression | ~5× vs FP16 | ~5× vs FP16 | ~4× vs FP16 |
| Rotation Parameters | 4 per rotor | 16,384 per matrix | N/A |
Note: These benchmarks are from the RotorQuant repository using Llama 3.1 8B on an RTX 5090. Performance on Qwen3.5-27B will differ. Independent benchmarks for this specific model are welcome — please open a discussion if you have results to share.
Current Status of RotorQuant in the Ecosystem
| Runtime | RotorQuant Support | Standard KV Quant |
|---|---|---|
| llama.cpp (upstream) | ❌ Not merged | ✅ q8_0, q4_0, q4_1, iq4_nl, q5_0, q5_1 |
| llama-cpp-turboquant fork | ✅ planar3, iso3 | ✅ All standard types |
| LM Studio | ❌ Requested | ✅ Via advanced settings |
| Ollama | ❌ Not supported | ✅ Via OLLAMA_KV_CACHE_TYPE |
| koboldcpp | ❌ Not supported | ✅ Standard types |
Recommended Settings
For VRAM-constrained setups, standard q8_0 KV cache quantization already halves KV cache memory with negligible quality impact. Flash Attention should always be enabled — it is required for V cache quantization and improves memory efficiency regardless.
| VRAM | Suggested Configuration |
|---|---|
| 24 GB (RTX 4090) | Q5_K_M + q8_0 KV cache + Flash Attention, 8K–16K context |
| 16 GB | Q5_K_M + q4_0 KV cache + Flash Attention, 4K–8K context |
| 48+ GB | Q5_K_M + f16 KV cache, full 32K+ context |
See Also
- RotorQuant GitHub
- llama-cpp-turboquant fork
- TurboQuant llama.cpp discussion
- TurboQuant paper (arXiv: 2504.19874)
- Base model: Qwen/Qwen3.5-27B
- Qwen3.5-27B announcement
Quant trade-off (GGUF lane)
| Quant | Approx size | Use case | Recommendation |
|---|---|---|---|
| Q2_K | ~15 GB | Lossy, low-RAM CPU/edge | Resource-constrained inference |
| Q3_K_M | ~17 GB | Smaller-than-Q4, modest quality drop | Edge devices with ~16 GB RAM |
| IQ4_XS | ~15 GB | Importance-quant 4-bit, smaller than Q4_K_M | Best size/quality at 4-bit |
| Q4_K_M | ~21 GB | Balanced default | Recommended for most users |
| Q5_K_M | ~22 GB | Higher fidelity than Q4 | Quality-sensitive applications |
| Q6_K | ~25 GB | Approaching FP16 quality | High-fidelity CPU/edge |
| Q8_0 | ~29 GB | Near-lossless reference | Fidelity-critical work |
| MXFP4_MOE | ~15 GB | Microscaling FP4 (MoE-aware) | vLLM / transformers users |
(Current variant — Q5_K_M — is bolded.)
Variants in this family
(Showing 16 sibling variants under majentik/qwen3.5-27b-*. The current variant — RotorQuant-GGUF-Q5_K_M — is bolded.)
| Variant | Runtime | Approx size | Use case |
|---|---|---|---|
| RotorQuant | runtime modifier | n/a | KV-cache root (weight-agnostic) |
| RotorQuant-2bit | transformers | n/a | Standalone 2-bit weights |
| RotorQuant-GGUF-IQ4_XS | llama.cpp | ~23 GB | Lossy 4-bit, low-RAM CPU/edge |
| RotorQuant-GGUF-Q2_K | llama.cpp | ~16 GB | Lossy, low-RAM CPU/edge |
| RotorQuant-GGUF-Q3_K_M | llama.cpp | ~21 GB | Smaller 3-bit, CPU-friendly |
| RotorQuant-GGUF-Q4_K_M | llama.cpp | ~30 GB | Balanced default |
| RotorQuant-GGUF-Q5_K_M | llama.cpp | ~36 GB | Higher fidelity, more RAM |
| RotorQuant-GGUF-Q8_0 | llama.cpp | ~57 GB | Near-lossless reference |
| RotorQuant-MLX-2bit | mlx-lm | ~8.6 GB | Apple Silicon, smallest |
| RotorQuant-MLX-4bit | mlx-lm | ~17 GB | Apple Silicon balanced |
| RotorQuant-MLX-8bit | mlx-lm | ~32 GB | Apple Silicon reference |
| TurboQuant | runtime modifier | n/a | KV-cache root (weight-agnostic) |
| TurboQuant-2bit | transformers | n/a | Standalone 2-bit weights |
| TurboQuant-MLX-2bit | mlx-lm | ~8.6 GB | Apple Silicon, smallest |
| TurboQuant-MLX-4bit | mlx-lm | ~17 GB | Apple Silicon balanced |
| TurboQuant-MLX-8bit | mlx-lm | ~32 GB | Apple Silicon reference |
- Downloads last month
- 175
5-bit
Model tree for majentik/Qwen3.5-27B-RotorQuant-GGUF-Q5_K_M
Base model
Qwen/Qwen3.5-27B