← Back to Leaderboard
RIST-DASLab

IST-DASLab/RCO

Riemannian search for LLM quantization and MoE pruning under exact budgets

View on GitHub ↗
Engineering Health (Methodology)
B · 52/100
Maintenance Activity
● Updated 5mo 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 Adoption14/25
Release Cadence6/20
License Clarity20/20
CLI
Total Stars
★ 91
24h Growth
+0
7d Growth
+3
Forks
13

GitHub Star History

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

IST-DASLab/RCO Star History (2026-06-07 - 2026-12-04) ALL-TIME STAR HISTORY (2026-06 – 2026-12) +90 in 180d · avg +1/day 96 48 0 2026-06-07: ★ 12026-06-20: ★ 22026-07-04: ★ 22026-07-18: ★ 32026-08-01: ★ 42026-08-15: ★ 42026-08-29: ★ 52026-09-12: ★ 172026-09-26: ★ 322026-10-10: ★ 502026-10-24: ★ 582026-11-04: ★ 662026-11-15: ★ 782026-11-26: ★ 842026-12-04: ★ 91 ★ 91 06-07 09-05 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

RCO separates compression into candidate preparation, constrained search, and checkpoint export. For quantization, run_quantize.py builds a per-layer GPTQ database; src/search/quant.py uses its dequantized candidates to evaluate model loss. The pruning path in src/search/prune.py applies straight-through survival masks to MoE routing weights and does not require that database. Both paths feed into run_build_checkpoint.py.

The optimizer in src/manifold.py represents each group's choices as softmax logits. It projects the loss gradient onto the tangent space of the weighted expected-cost constraint, retracts the Adam update back to the budget surface by binary search, and reprojects momentum. Separately, the forward pass uses annealed Gumbel perturbations and exact multiple-choice knapsack DP to select a feasible assignment; the backward pass uses a straight-through softmax surrogate. Python CLIs drive the PyTorch and Transformers stack. The optional vLLM patch is a serving integration, not a search dependency.

Key Capabilities & Differentiators

Mixed-precision search assigns 2–8 bits to linear layers and weights each choice by that layer's parameter count. For a target such as the Qwen3-8B example's 2.5-bit average, the budget applies to the searched weights, not every byte in the final artifact. run_split_checkpoint.py can populate one bit-width slot from an existing compressed-tensors checkpoint. Export supports dense bf16 fake quantization or packed weights rebuilt from integer codes, scales, zero points, and other metadata in _qparams.pt sidecars.

MoE pruning searches an exact expert-count budget and writes a keep/prune mask; the OLMoE example uses a 25% prune target. Export can zero experts and router rows without changing tensor shapes, or remove the experts and shrink the router. Calibration accepts plain-text sources such as FineWeb-Edu and chat data such as Evol-CodeAlpaca and Tulu Math, with assistant-token masks for chat. Pruning also supports equal-sample mixtures of calibration sources.

Trade-offs & Limitations

Unlike a dynamic program that optimizes a fixed per-layer proxy, RCO uses end-to-end model loss to update the search logits and uses DP for the budget-feasible discrete choices. Unlike a penalty method, feasibility does not depend on tuning a penalty coefficient. That does not make the assignment globally optimal: gradients come from a straight-through surrogate, and the stated discrete solver complexity is O(N*K*B) in the number of groups, options, and solver budget. Compared with evolutionary baselines EvoPress and EvoESAP, this is a gradient-driven research workflow; validate its quality and search cost under your own calibration setup.

The main operational cost is preparing and storing candidates, then exporting a checkpoint that the target runtime can actually serve. Fixed-bit quantization is simpler when precision is already decided. The default fake-quant and zero-pruning exports support compatibility testing but do not save weight storage. Packed or physically pruned exports warrant a loader and kernel check before inferring throughput gains. The code is Apache-2.0; base-model and dataset terms are separate.

Hardware & Deployment Guide

Run the top-level Python entry points from the repository root without an editable install, or use the wrappers in scripts/. The pinned stack includes torch==2.11.0+cu126, transformers==5.7.0, accelerate==1.13.0, and datasets==4.8.5. Ensure the PyTorch build and CUDA driver are compatible for the GPU workflow. compressed-tensors==0.15.0.1 is needed for packed checkpoint import or export, not for the core search. The workflow runs locally against model and calibration artifacts; no hosted compression API is required.

The documented GPTQ command uses eight torchrun workers. Establish GPU memory and scratch-space requirements for your own model and calibration settings before a full run. For deployment, test the exported checkpoint on the target loader: heterogeneous physical pruning needs per-layer expert-count support, and the supplied vLLM patch targets Qwen3-Next specifically. There is no published GitHub release listed; record the exact repository revision and dependency set used to produce each artifact.

Budget control: A scalar retraction corrects expected-cost drift after Adam updates; multiple-choice knapsack DP enforces the discrete budget during the forward pass.
Candidate database: run_quantize.py writes dequantized GPTQ weights and integer quantization sidecars; run_split_checkpoint.py imports one bit-width slot from a compressed-tensors checkpoint.
Cost models: Mixed precision weights 2–8-bit choices by layer parameter count; MoE pruning budgets the number of removed experts.
Calibration: Text and chat datasets are supported, with assistant-token masks for chat loss and equal-sample dataset mixtures in pruning search.
Export semantics: Packed quantization and physical expert removal change what is stored; default bf16 fake quantization and zero-mode pruning do not shrink weights on disk.
Serving boundary: Uniform expert removal can use stock Hugging Face or vLLM loaders; heterogeneous removal records per_layer_num_experts, with an optional Qwen3-Next-targeted vLLM patch.
Best For

LLM compression research and offline checkpoint preparation when you need to compare layer bit widths or expert allocations under a fixed budget and can validate the exported artifact on the intended runtime.

Skip If

A fixed-bit checkpoint already meets your quality target, you need a turnkey inference server, or your target runtime cannot load the packed format or heterogeneous expert layout you need.

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

Quick Start & Installation

CLI
pip install -r requirements.txt

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
RCO ★91+3PythonApache-2.0Riemannian search for LLM quantization and MoE pruning under exact budgets
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/RCO.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/RCO Star History on RepoForAI

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

Frequently Asked Questions about RCO

What connects the search stage to the exported checkpoint?

Quantization search writes assignment.json, which maps layers to bit widths. The builder uses the matching candidate weights for bf16 fake-quant output or the matching _qparams.pt sidecars for packed output. Pruning search instead writes mask.pt, which the builder uses to zero experts or remove them from the checkpoint.

How should I size GPU memory and storage for a first run?

There is no fixed VRAM figure. Size the compression job from the base model, calibration sequence length and batching, and the selected GPU configuration. The documented torchrun example uses eight processes; it is not a stated minimum. Budget disk separately for the database: each candidate bit width retains both a dequantized weight tensor and a quantization sidecar.

Can I self-host RCO for commercial work and redistribute the output?

The repository is Apache-2.0 and runs as a local CLI, so there is no required hosted compression API. That license does not grant rights to the base model or calibration data. Review their terms separately before commercial use, and check the base-model terms before redistributing a compressed checkpoint.

When should I choose RCO over evolutionary search or uniform quantization?

EvoPress and EvoESAP are the evolutionary comparison points for quantization and pruning. RCO instead uses model-loss gradients to update assignment logits and a dynamic program to enforce the discrete budget. If you already know which uniform bit width meets your quality target, direct quantization avoids the mixed-precision search and multi-bit candidate database. If the allocation is the open question, compare methods on the same calibration data, quality metric, and budget.

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/RCO? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature IST-DASLab/RCO 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