CoolFace
Modelpublic

LuRenJiasWorld/RWKV-v7-0.1B-G1-GGUF

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
1likes235downloads
Model Card

RWKV-v7-0.1B-G1-GGUF

GGUF-quantized RWKV v7 0.1B model files for use with **rwkz** — an LLM-powered lossless text compressor.

These are the same weights as BlinkDL/rwkv7-g1, converted to GGUF format with llama.cpp tooling. No fine-tuning or modification — just quantization for smaller download and faster load.

Intended Use: Lossless Text Compression

This model powers rwkz, a reimplementation of Fabrice Bellard's ts_zip. The RWKV v7 model predicts the next token in a text, and an arithmetic coder uses those predictions to compress the actual tokens. The better the model predicts, the fewer bits it takes.

Text → Tokenizer → RWKV v7 (predict) → Arithmetic Coder → .rkz compressed file

These are not chat / instruct models. They are base RWKV v7 language models, suitable only for next-token prediction. For chat, use BlinkDL/rwkv7-g1 directly.

Available Quantization Levels

All generated from the same F16 source using llama.cpp's llama-quantize. Weights are dequantized to F32 at load time for fast CPU inference.

LevelFileSizebpb (2KB)Status
Q2_Krwkv7-0.1b-g1-q2_k.gguf96 MB4.12Minimum viable
Q3KSrwkv7-0.1b-g1-q3_k_s.gguf110 MB3.38Size-conscious
Q3KMrwkv7-0.1b-g1-q3_k_m.gguf110 MB3.38Size-conscious
Q4_0rwkv7-0.1b-g1-q4_0.gguf127 MB3.10Legacy baseline
Q4_1rwkv7-0.1b-g1-q4_1.gguf135 MB3.24Legacy
Q4_K_Mrwkv7-0.1b-g1-q4_k_m.gguf127 MB3.02⭐ Recommended
Q5_0rwkv7-0.1b-g1-q5_0.gguf143 MB3.04Legacy
Q5_1rwkv7-0.1b-g1-q5_1.gguf151 MB3.02Legacy
Q5KMrwkv7-0.1b-g1-q5_k_m.gguf143 MB3.06Quality-focused
Q6_Krwkv7-0.1b-g1-q6_k.gguf160 MB3.01High quality
Q8_0rwkv7-0.1b-g1-q8_0.gguf203 MB3.05High quality
F16rwkv7-0.1b-g1-f16.gguf369 MB3.04Reference

Which Level Should I Use?

bpb (lower = better compression)
4.2 ┤ Q2_K ●  (96 MB)
3.6 ┤
3.4 ┤ Q3_K ●  (110 MB)   ← 15% smaller model, 13% worse bpb than 4-bit
3.2 ┤ Q4_1 ●  (135 MB)
     │ Q4_0 ●  (127 MB)
3.0 ┤ ● ● ● ● ● ●          ← Q4_K_M through F16: all ~3.01–3.06 bpb
     └────────────────────────────────────
         96   110  127  143  203  369 MB

Q4_K_M is the sweet spot — same size as Q4_0 (127 MB) but achieves 3.02 bpb vs 3.10. Going to higher bit-widths buys almost nothing. Below 4-bit, compression quality degrades noticeably.

K-Quant vs Legacy

At comparable sizes, K-quant types consistently outperform legacy types:

Same sizeBetter choiceWhy
Both 127 MBQ4KM over Q4_03.02 vs 3.10 bpb
Both 143 MBQ5KM over Q5_03.06 vs 3.04 bpb

Always prefer K-quant when available.

Compression Performance vs Traditional Tools

Tested on alice29.txt (152 KB, English prose, i7-7700K CPU).

20 KB sample

ToolSizebpbTime
bzip2 -68,061 B3.220.01 s
brotli -68,886 B3.550.01 s
rwkz Q8_06,776 B2.71337 s

rwkz achieves 16% better compression than bzip2 at 20 KB — at the cost of being ~30,000× slower.

Full file (152 KB, traditional compressors only)

ToolSizebpb
bzip2 -643,202 B2.27
xz -648,500 B2.55
brotli -651,967 B2.73
zstd -653,112 B2.79
gzip -654,423 B2.86
lz4 -664,055 B3.37
rwkz hasn't been run on the full 152 KB file (estimated ~51 min on this CPU). With larger RWKV models (1.5B+), bpb is expected to drop below bzip2.

Reproducing Quantization

This repository includes everything needed to reproduce all quantization levels from the F16 source:

bash
# Download the generation script
wget https://huggingface.co/LuRenJiasWorld/RWKV-v7-0.1B-G1-GGUF/resolve/main/scripts/generate_quants.sh

# Run with llama.cpp tools in PATH
LLAMA_CPP_BIN_DIR=/path/to/llama.cpp/build/bin ./generate_quants.sh

What's included:

  • —`imatrix/rwkv7-0.1b-g1.imatrix` — Pre-computed importance matrix (WikiText calibration, ~500KB)
  • —`calibration/calibration.txt` — Calibration data used (WikiText excerpt)
  • —`scripts/generate_quants.sh` — One-shot script to regenerate all quantization levels

Model Details

PropertyValue
ArchitectureRWKV v7 (base variant, no DeepEmbed)
Parameters191 M
Hidden size768
Layers12
Head size64
FFN size3,072
Vocab size65,536
Context length1,048,576
TokenizerRWKV BPE (rwkv_vocab_v20230424.json)

Using with rwkz

bash
# Compress (model auto-downloads if not cached locally)
rwkz compress input.txt output.rkz --q Q4_K_M

# Decompress (fingerprint-matched automatically)
rwkz decompress output.rkz restored.txt

rwkz automatically selects the best available quantization level. Pass --model to use a specific GGUF file directly.

License

Model weights: Apache 2.0 (same as BlinkDL/rwkv7-g1).

The rwkz compressor: Apache 2.0 License.

Acknowledgments