Instructions to use Hakureirm/rwkv7-sglang-w4gptq-7.2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- RWKV
How to use Hakureirm/rwkv7-sglang-w4gptq-7.2b with RWKV:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
File size: 1,703 Bytes
86415f2 6edb39d 86415f2 6edb39d 86415f2 6edb39d 86415f2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ---
license: apache-2.0
base_model: BlinkDL/rwkv7-g1
pipeline_tag: text-generation
tags:
- rwkv
- rwkv7
- int4
- gptq
- quantized
---
# RWKV-7 G1 7.2B — int4 GPTQ for rwkv-sglang (fits a 16 GB card)
Hand-written **weight-only int4** (GPTQ-calibrated, symmetric, group 64) quantization of
BlinkDL's RWKV-7 "Goose" G1 7.2B, for the
[rwkv-sglang](https://github.com/Hakureirm/rwkv-sglang) serving overlay.
- **Accuracy: near-lossless at this size.** MATH500 avg@64 (500 problems × 64 rollouts):
**61.08% vs fp16's 64.18% (−3.1pt)** — the same symmetric GPTQ scheme that loses 25.6pt at
1.5B costs three points at 7.2B; bigger models quantize better, measured not assumed.
Greedy decoding is **token-for-token EXACT** on the oracle fixture (8/8); 192/192
projections GPTQ-quantized (streamed Hessian calibration, no RTN fallback).
- **Runs a 7.2B model on a 16 GB GPU:** checkpoint **4.6 GB** (vs 14.4 GB fp16); the int4 path
serves 7.2B in well under 16 GB total. On a real T4 (16 GB) the sibling RTN build measured
greedy 8/8 EXACT, 32.9 tok/s bsz1, peak 6.7 GB.
- **Speed:** int4 decode faster than fp16 at small batch on every tested arch.
## Format & loading (important)
Not a drop-in HuggingFace checkpoint. Group-wise (GROUP=64) symmetric int4
(`.qweight` + `.scale`); loads **only** through the rwkv-sglang overlay:
```bash
bash scripts/deploy.sh # from github.com/Hakureirm/rwkv-sglang, onto sglang v0.5.10.post1
RWKV_W4=1 python -m sglang.launch_server --model-path <this-dir> --dtype float16 \
--trust-remote-code --disable-radix-cache --mem-fraction-static 0.8
```
LoRA/norm/embedding/head stay full precision. Base model © BlinkDL (Bo Peng), Apache-2.0.
|