Pegasus logo
Aman SachanMiddleOut Lattice demo
Live demo

Compressed model store, exact round-trip

This demo shows the working flow: store files in compressed form, skip blocks that should stay raw, and reconstruct the original bytes exactly.

Lossless Per-file codec choice Per-block fallback

1. File selection

The engine reads a model repository as files. For the Qwen template, that includes JSON metadata, tokenizer files, and vocab assets.

config.json
generation_config.json
merges.txt
tokenizer.json
tokenizer_config.json
vocab.json

2. Codec choice

Each file or block gets candidate encodings. The best one wins only if it is actually smaller; otherwise the file stays raw.

Example: tokenizer_config.json
Best ratio in template data: 5.4758x

3. Manifest and metadata

The store records the chosen codec, raw size, stored size, and SHA-256 for each block. That is what makes exact reconstruction boring and reliable.

{
  "mode": "archive",
  "codec": "zlib",
  "sha256": "...",
  "stored_bytes": 1320
}

4. Rebuild and verify

During load, the archive is decoded back to the original file bytes and checked against the stored checksum. If anything changes, it fails loudly.

compressed -> decode -> hash check -> original bytes

Benchmark snapshot

The project page carries the generated benchmark artefacts and chart.

DataQwen template

Results table

File-level codec comparison with exact round-trip checks.

ChartPNG + SVG

Visual comparison

Simple bars for ratios across the model files tested.

Paper links

Connect the demo to the manuscript and the landing page.