Skip to main content

Shifter Quantization — Massive Speedups for Local Inference with Hardware-Native Kernels

We built Shifter to run quantized language models on local GPUs and serve them through an OpenAI-compatible chat API. We designed SQ and SHI to keep weights compact in GPU memory and use native integer matrix operations for inference. Shifter supports single-GPU, text-only serving on Linux with NVIDIA CUDA.

Read the paper

Performance highlights

On one RTX 5090, we measured 32,039 prompt tokens/s for Qwen3.6-35B-A3B SQ4 with a 7,680-token prompt and 784 output tokens/s on single-request structured MTP3 decode. With eight requests decoding concurrently, we measured 1,721.5 aggregate output tokens/s versus 1,380.7 for NInfer groupwise integer in the report's concurrent MTP3 benchmark.

For Qwen3.8-27B, we use 4,096-token prompts in the 2-bit and 8-bit comparisons and the 7,680-token prompt from the NInfer repository in the 4-bit comparison. We compare SHI2 against Bartowski's Q2_K checkpoint in llama.cpp, SQ4 against NInfer's groupwise INT checkpoint, and SQ8 against vLLM online FP8.

Shifter format │ Shifter prefill (tok/s) Baseline prefill (tok/s) Prefill vs. baseline │ Shifter WikiText-2 KL Baseline WikiText-2 KL Baseline / Shifter KL
2-bit SHI2
 
│
│
11,662.4
 
3,090.7
(llama.cpp)
3.77×
 
│
│
0.15537
 
0.16627
(llama.cpp)
1.07×
 
4-bit SQ4
 
│
│
8,221.9
 
3,331.9
(NInfer)
2.47×
 
│
│
0.01970
 
0.03256
(NInfer)
1.65×
 
8-bit SQ8
 
│
│
9,206.3
 
7,226.8
(vLLM)
+27.4%
 
│
│
0.00211
 
0.00774
(vLLM)
3.67×
 

Quickstart

Activate your Python environment, then install Shifter and start the server.

pip install shifter-engine
shifter serve hif1000/Qwen3.8-27B-SQ4-GGUF

Your first launch downloads the model. Once the server is ready, send a test request from another terminal.

curl -sS http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "hif1000/Qwen3.8-27B-SQ4-GGUF",
    "messages": [{"role": "user", "content": "What is the capital of France?"}],
    "chat_template_kwargs": {"enable_thinking": false},
    "max_tokens": 48,
    "temperature": 0
  }'

A successful response contains “Paris” in choices[0].message.content. See the serving flags for context size, concurrency, and MTP.

Build from source

Check the system requirements and clone the repository with your Python environment active.

git clone https://github.com/yufenghuang/shifter.git
cd shifter

For RTX 50-series GPUs, use the optimized Blackwell build.

pip install . -Ccmake.define.CMAKE_CUDA_ARCHITECTURES=120a

For other supported NVIDIA GPUs, use the default build.

pip install .

Requirements and supported models

Requirement Supported configuration
Host Linux x86-64 or AArch64
GPU One NVIDIA GPU with compute capability 8.0 or later and a driver compatible with the CUDA Toolkit
Python 3.10 or later
Source build C and C++20 compilers, CMake 3.28 or later, and CUDA Toolkit 13.2 or later in the 13.x series
GPU memory Enough VRAM for the model weights and request state at your chosen context size and concurrency

See the installation guide for GPU-specific builds and troubleshooting.

We support text generation with compatible Shifter GGUF checkpoints for Qwen3.5 dense and MoE architectures. Serve a model by its Hugging Face ID or a local GGUF path.

These GGUF checkpoints contain SQ and SHI tensor formats that require a compatible reader.

Hugging Face repository WikiText-2 KL ↓ RTX 5090 prefill (tok/s) RTX 5090 structured MTP3 (tok/s) RTX A6000 structured MTP3 (tok/s)
hif1000/Qwen3.8-27B-SQ2-GGUF 0.15322 8,378.4 — 109.7
hif1000/Qwen3.8-27B-SHI2-GGUF 0.15537 11,662.4 — 108.5
hif1000/Qwen3.8-27B-SQ4-GGUF 0.01970 8,221.9 242.6 95.7
hif1000/Qwen3.8-27B-SHI4-GGUF 0.01373 10,252.3 212.1 87.3
hif1000/Qwen3.8-27B-SQ8-GGUF 0.00211 9,206.3 — 59.8
hif1000/Qwen3.6-35B-A3B-SQ4-GGUF 0.01828 32,039.0 784.0 337.8

We report WikiText-2 KL and RTX 5090 throughput from the paper. The RTX 5090 prefill runs use 4,096-token prompts for 2-bit and 8-bit models and 7,680-token prompts for 4-bit models. A dash indicates that the paper has no RTX 5090 structured MTP3 result for that model. We measured the RTX A6000 throughput separately. Benchmark paper.

SQ4 throughput across GPUs

We use NInfer's 7,680-token needle-retrieval prompt for prefill and its JSONL, CSV, and SQL prompts for single-request structured MTP3 decode. On a 7,680-token prompt, Shifter SQ4 on an RTX 4090 prefills 30–83% faster than NInfer groupwise INT on an RTX 5090. The table below shows the measured prefill and decode rates in tokens/s.

GPU Qwen3.8-27B prefill Qwen3.8-27B decode Qwen3.6-35B-A3B prefill Qwen3.6-35B-A3B decode
RTX A6000 (Shifter SQ4) 2,723.8 97.0 10,828.8 331.0
RTX 3090 (Shifter SQ4) 2,915.7 111.5 11,354.8 391.9
RTX 5090 (NInfer groupwise INT) 3,331.9 214.7 17,705.4 779.6
RTX 4090 (Shifter SQ4) 6,098.7 148.9 23,093.3 532.3
RTX 5090 (Shifter SQ4) 8,221.9 242.6 32,039.0 784.0

Across the four GPUs we tested with Shifter, prefill throughput tracks peak dense INT8 TOPS (R² = 0.987–0.992), and structured MTP3 decode throughput tracks memory bandwidth (R² = 0.939–0.970). The dashed lines show linear fits.

Four SQ4 scaling plots for 27B and 35B-A3B, with prefill against dense INT8 TOPS and structured MTP3 decode against memory bandwidth

We describe our benchmark methods and report the full results in Shifter Quantization: Compact Representations for Native Integer Computation.

Learn more

We release Shifter under the Apache License 2.0.

Metadata

Release files for shifter-engine 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for shifter-engine 0.1.0
File Actions
shifter_engine-0.1.0-cp315-cp315-manylinux_2_39_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.39+ x86-64 Details for shifter_engine-0.1.0-cp315-cp315-manylinux_2_39_x86_64.whl
shifter_engine-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.39+ x86-64 Details for shifter_engine-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl
shifter_engine-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.39+ x86-64 Details for shifter_engine-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl
shifter_engine-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details for shifter_engine-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl
shifter_engine-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.39+ x86-64 Details for shifter_engine-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl

Total release size: 501.3 MB

Release files / shifter_engine-0.1.0-cp315-cp315-manylinux_2_39_x86_64.whl

Download URL shifter_engine-0.1.0-cp315-cp315-manylinux_2_39_x86_64.whl
Size 100.3 MB
Tags CPython 3.15 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
a1ffa0df4ba9d0cccee2af5c9412cdfa5fb8b90fee2174f24820f1bd54340732
BLAKE2b-256 checksum
How to use checksums
7d0361d0dc35e713ec6869ccb1782804de51326bcf3a3835bb2ec7f12766bf5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / shifter_engine-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl

Download URL shifter_engine-0.1.0-cp314-cp314-manylinux_2_39_x86_64.whl
Size 100.3 MB
Tags CPython 3.14 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
5265b99aa2e5b39f403aa9492b2dbcf6c4908b05d4d47eeeeac4060481112aa6
BLAKE2b-256 checksum
How to use checksums
188bf58bebf738f403f104381cad9bc00e8a72ca8c7ff61ab25ba8032ce9938f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / shifter_engine-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl

Download URL shifter_engine-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl
Size 100.3 MB
Tags CPython 3.13 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
1a08417f1527b5960166a54a6e12c89c4d3ba99ba21d6b65227fd9940deae79f
BLAKE2b-256 checksum
How to use checksums
49c836a5afea1caa464046bf61979ffde895b5cb6f7040b96da24fb1363bf9a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / shifter_engine-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL shifter_engine-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl
Size 100.3 MB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
aab2609d1dfa28a8204ed6f2d759e8540f1358a5d8d01e18644b7ad5183c645f
BLAKE2b-256 checksum
How to use checksums
2a0fe9abc3635dd4a31dabc369b2d75212de558496047c9687e9fa6d7d935376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / shifter_engine-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl

Download URL shifter_engine-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl
Size 100.3 MB
Tags CPython 3.11 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
b2ad6f4ac40afb8b2f273cc48989940062accf1bfc8a510642b9c8db99638025
BLAKE2b-256 checksum
How to use checksums
8f1d9592990465a944fe1c80b86d3b396940e31f5c84dcd944a52b193c1905b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for shifter-engine 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

5 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page