← Back to Leaderboard
GIST-DASLab

IST-DASLab/GSQ

Gumbel-Softmax scalar quantization for low-bit LLMs on existing INT and GGUF stacks

Engineering Health (Methodology)
B · 51/100
Maintenance Activity
● Updated 4mo ago
Latest Release
Rolling commits (main)
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance12/35
Fork Adoption13/25
Release Cadence6/20
License Clarity20/20
GPUCLI
Total Stars
★ 160
24h Growth
+1
7d Growth
+5
Forks
21

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

IST-DASLab/GSQ Star History (2026-05-18 - 2026-12-04) ALL-TIME STAR HISTORY (2026-05 – 2026-12) +159 in 200d · avg +1/day 169 85 0 2026-05-18: ★ 12026-06-06: ★ 112026-06-20: ★ 132026-07-04: ★ 132026-07-18: ★ 142026-08-01: ★ 162026-08-15: ★ 192026-08-29: ★ 232026-09-12: ★ 472026-09-26: ★ 732026-10-10: ★ 922026-10-24: ★ 1152026-11-06: ★ 1302026-11-19: ★ 1462026-12-04: ★ 160 ★ 160 2026-05 2026-08 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

GSQ is a layer-wise PyTorch post-training quantizer, not an inference engine. main.py uses calibration activations to initialize each layer with GPTQ; round-to-nearest is available as an alternative. It then minimizes layer-output reconstruction error by learning a discrete grid assignment for each weight and a scale for each group. Gumbel-Softmax makes the assignments differentiable during refinement: temperature falls and logit scale rises before the final hard selection. The Lion optimizer runs with a cosine learning-rate schedule, and custom autograd replays the sampling RNG state in the backward pass.

Completed layers are serialized as .safetensors shards and moved to meta so they no longer occupy device memory. save_model.py assembles the shards into a Hugging Face-compatible checkpoint with compressed-tensors metadata for vLLM. Model-family wrappers handle dense and expert-parallel MoE variants. Strict YAML validation in src.config.load_config rejects unknown keys, while shell entrypoints expose the quantize, save, serve and evaluate stages separately.

Key Capabilities & Differentiators

The supplied recipes cover ternary, 2-bit and 3-bit weights. The default 2-bit grid uses four integer levels with a learned group scale; the ternary quantizer learns separate sign and mask logits. Model wrappers cover dense LLaMA, Qwen3 and Qwen3.5/3.6, and Gemma-4-35B, alongside Qwen and Kimi K2/K2.5 MoE variants. The GGUF path can refine a public K-Quant checkpoint and write it back in the same format for llama.cpp or Ollama.

At 2.13 bits per parameter, Llama-3.1-Instruct scored 68.55 for 8B and 75.57 for 70B on the zero-shot average across ARC-C/E, HellaSwag, PIQA and Winogrande; the FP16 scores were 73.71 and 78.99. In a separate Qwen3-8B GGUF experiment, the Q2_K average rose from 50.03 to 56.28 without changing the K-Quant format. These results measure quality at specific footprints; they do not establish serving latency or throughput.

Trade-offs & Limitations

GSQ is useful when a scalar checkpoint is a deployment requirement and initialization alone loses too much quality. In the Llama-3.1-70B comparison at 2.13 bpp, GSQ scored 75.57 versus 71.43 for EfficientQAT and 57.38 for GPTQ, but trailed vector-quantized QTIP at 77.25. The trade is additional calibration-driven optimization in exchange for better quality than those scalar baselines in this test, without adopting a vector codebook. Layer offloading reduces GPU residency; it does not eliminate optimization time, activation storage or checkpoint I/O.

A compatible weight format is not a guarantee that a fast kernel will run. On Ada, vLLM's compressed-tensors WNA16 fused MoE path lacks the needed Marlin kernel and falls back to a Triton path that crashes during profiling. An incompatible tensor-parallel shape can trigger that fallback as well. Qwen3.5-MoE requires transformers >= 5.3, which conflicts with the Kimi-K2.5 setup; plan separate environments if both are needed. Treat the benchmark figures as model- and evaluation-specific, not as a reason to skip workload validation.

Hardware & Deployment Guide

GSQ is an Apache-2.0 Python CLI project requiring Python 3.10 or later. scripts/setup_env.sh uses uv.lock to provision the environment, installs flash-attn on top by default and checks imports. The manifest pins PyTorch 2.11.0, torchvision 0.26.0 and vLLM 0.20.2; the default CUDA wheel target is cu128. Start with SMOKE_TEST=1 bash scripts/run.sh for a two-layer check. The scripts use torchrun for local multi-GPU runs. Quantization is self-hosted, but gated weights such as Kimi-K2.5 require Hugging Face access.

Treat quantization and serving as separate hardware checks: H100 is the tested platform, L40S has been used for quantization, and the vLLM serving path targets Hopper or Ampere. MoE tensor parallelism must satisfy attention-head divisibility, KV-head divisibility for GQA, and Marlin alignment of the sharded expert width. At group size 128, the listed valid TP maxima on eight GPUs are 2 for Qwen3-30B-A3B, 4 for Qwen3-235B-A22B and 8 for Kimi K2/K2.5. The serving script clamps TP to a valid value by default. The package manifest is version 0.1.0, with no GitHub release listed.

Optimization: GPTQ initialization followed by Gumbel-Softmax refinement of per-weight assignments and per-group scales.
Precision: Ternary, 2-bit and 3-bit recipes; the default 2-bit codebook is {-2, -1, 0, 1} multiplied by a learned group scale.
Memory management: Completed layers are written to .safetensors and offloaded to meta before checkpoint assembly.
Model coverage: Dense LLaMA, Qwen and Gemma wrappers, plus distributed expert-parallel wrappers for supported Qwen and Kimi MoE models.
Export paths: Hugging Face-compatible compressed-tensors checkpoints for vLLM and in-format GGUF K-Quant refinement for llama.cpp or Ollama.
Serving guardrail: scripts/serve_model.sh adjusts the requested MoE tensor-parallel size to satisfy attention-head and Marlin shape constraints.
Best For

Teams evaluating 2–3-bit or ternary LLM weights on CUDA GPUs that can budget for calibration and refinement and need to retain an INT scalar or GGUF K-Quant deployment format.

Skip If

A ready-made checkpoint or GPTQ alone already meets your quality target, you need CPU-only quantization, or Ada-based vLLM fused MoE serving is a hard requirement.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

GPUCLI
curl -LsSf https://astral.sh/uv/install.sh | sh

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
GSQ ★160+5PythonApache-2.0Gumbel-Softmax scalar quantization for low-bit LLMs on existing INT and GGUF sta
minimind75.4k+3.1kPythonApache-2.0Native PyTorch dense and MoE models for end-to-end LLM training on local GPUs
autoresearch101k+342Python—Single-GPU nanochat harness for agent-led, five-minute training experiments
LlamaFactory76.4k+86PythonApache-2.0A unified Python framework for LLM and VLM fine-tuning with pluggable inference

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/IST-DASLab/GSQ.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

IST-DASLab/GSQ Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about GSQ

How do I get a GSQ-optimized model into an inference engine?

For vLLM, run quantization through main.py, then use save_model.py to assemble the per-layer .safetensors shards into a Hugging Face-compatible checkpoint with compressed-tensors metadata. The GGUF workflow is distinct: GSQ refines an existing K-Quant checkpoint and projects the result back into the same format, so llama.cpp or Ollama can load it without a GSQ-specific runtime.

How should I size GPUs and storage for a run?

Size quantization and serving separately. The Llama-3.1-8B recipe lists one 80 GB H100 or A100, while the 70B recipe lists four 80 GB H100s; these are approximate recipe configurations, not minimum VRAM guarantees. Layer offloading reduces device residency during quantization, but calibration, refinement and shard storage still need resources. For serving, check kernel compatibility and valid tensor-parallel sizes before estimating capacity from checkpoint size; also budget for the KV cache at the intended context length and concurrency.

Can we use GSQ commercially and run it on our own infrastructure?

The GSQ code is Apache-2.0 licensed and can be self-hosted or used commercially subject to that license's terms. The code license does not grant rights to model weights or calibration datasets: check their terms for commercial use and checkpoint redistribution. Setup needs access to package artifacts, and gated Hugging Face models require account access; local inference does not require a hosted GSQ service.

When should I choose GSQ over GPTQ or a vector quantizer such as QTIP?

Use GPTQ alone as the simpler baseline when its quality at the target footprint is already acceptable. Add GSQ when low-bit quality matters enough to justify per-layer optimization but the serving stack needs scalar weights. At 2.13 bpp on the published Llama-3.1-70B zero-shot average, GSQ scored 75.57 versus 57.38 for GPTQ and 77.25 for QTIP. That is a quality comparison, not a throughput or total-cost comparison.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining IST-DASLab/GSQ? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature IST-DASLab/GSQ on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare