commaVQ Challenge: Lossless Compression of 5,000 Minutes of Driving Video
GitHub Repo
MIT
August 2, 2026 at 08:22 PM
0 views

commaVQ Challenge: Lossless Compression of 5,000 Minutes of Driving Video

@commaaiProject Author

commaVQ Challenge: A Deep Dive into Lossless Compression and World Modeling for Driving Video

Introduction

The commaVQ project is a bold exploration at the intersection of neural compression, world modeling, and self-driving technology. Born out of comma.ai’s drive to understand and optimally compress complex driving scenes, the project combines a high-capacity world model with a heavy-duty, neural compression scheme. The essence is simple in words, but powerful in practice: can we represent hours of driving video with a minimal, lossless representation that still preserves the full fidelity of the original footage? The answer, so far, is a careful blend of neural vector quantization (VQ), transformer-based world modeling, and clever data handling that scales to millions of minutes of driving.

What is commaVQ? At its core, commaVQ uses a neural variational approach to compress each video frame into a compact set of discrete tokens. Specifically:

  • A VQ-VAE compresses every video frame into 128 tokens, each token encoded with 10 bits of information.
  • Each data entry is a “segment” representing 1 minute of driving video, captured at 20 frames per second.
  • The per-frame token grid is 8 by 16, which together with 1200 frames per minute yields a data structure of shape 1200 × 8 × 16, saved as int16. This design makes the large-scale dataset manageable while preserving the essential visual content for downstream tasks.
  • The dataset comprises 100,000 minutes of compressed driving videos, with a world model trained on an even larger corpus: 3,000,000 minutes of driving footage.
  • The world model is a Generative Pre-trained Transformer (GPT)-style architecture that learns to predict the next token given a sequence of past tokens. In effect, it learns the dynamics of driving scenes and can imagine plausible future frames based on historical context and actions.

Visualizing the pipeline helps. A frame is transformed into a 2D grid of 128 tokens. Across a minute of driving (1200 frames), you accumulate a long sequence of tokens that a GPT-style model can learn to predict step by step. The result is a world model that can imagine future frames, which is essential for planning and control in self-driving systems. While the compression is loseless with respect to the original bitstream (the aim is to recover the original video without loss), the real novelty lies in using a compact, token-based representation that can be smoothly predicted and manipulated by a powerful sequence model.

Key technical highlights

  • Tokenization and fidelity: Each frame yields 128 tokens, each holding 10 bits of information. The tokens are arranged in a 1200 × 8 × 16 tensor per minute, with the 1200 representing frames, and the 8 × 16 grid representing the spatial token layout per frame.
  • World modeling: A transformer-based predictor learns to forecast the next token given the preceding token sequence. This enables not only forward prediction of future scenes but also the potential for generative imagination of driving scenarios.
  • Dataset scale: The combination of 3,000,000 minutes for training the world model and 100,000 minutes of compressed video data provides a robust foundation for learning long-horizon temporal structure in driving environments.
  • Encoders and decoders: The compression/decompression tools rely on encoder/decoder architectures designed to heavily compress driving scenes while preserving critical information needed for accurate reconstruction.

Examples and practical tools

To help researchers and developers work with the data, several example notebooks and scripts are provided:

  • encode.ipynb and decode.ipynb: These notebooks illustrate how to visualize and manipulate the compressed data. They show how to move from raw video frames to token sequences and back, enabling a practical understanding of the compression process.
  • gpt.ipynb: An example demonstrating how to use the world model to imagine future frames. This notebook showcases the predictive power of the transformer-based model when fed with a context of past tokens.
  • compression/compress.py: A practical script illustrating how to compress tokens using an LZMA-based approach, providing a tangible workflow for lossless compression of the token streams.

Getting the data: how to access and download

  • Hugging Face Datasets: The primary route to access the dataset is via Hugging Face’s datasets hub. A typical setup involves loading the train shard (for example, data-0000.tar.gz) from the commaai/commavq dataset, and then extracting tokens and poses from the loaded samples.
  • Manual download: If you prefer, you can directly download from the Hugging Face datasets repository: https://huggingface.co/datasets/commaai/commavq. The data is organized in a way that makes it straightforward to extract token.npy and pose.npy arrays for analysis and experimentation.
  • Practical example (Python):
  • Import numpy and the datasets package.
  • Load the first shard as a training set.
  • Access the token.npy array for the token sequence and pose.npy for pose information. This streamlined approach enables researchers to begin experimentation immediately, whether you’re validating reconstruction quality, probing the world model’s predictive power, or developing new compression techniques.

The challenge: a lossless compression contest

The Lossless compression challenge invites participants to compress 5,000 minutes of driving video “tokens” with maximal efficiency. Here are the core details:

  • Objective: Losslessly compress 5,000 minutes of driving video tokens.
  • Prize: The highest compression rate on 5,000 minutes (approximately 915 MB), with a $500 prize pool.
  • Duration: The challenge ended on July 1, 2024, at 11:59 pm AOE.
  • Submission: Participants submit a single zip file containing the compressed data plus a Python script to decompress it back to its original form. Submissions are made via a specified Google Form, and top solutions are showcased on comma.ai’s official leaderboard.

The leaderboard: highlights and notable approaches

The competition attracted a range of approaches, from traditional arithmetic coding to self-compressing neural networks and modern transformer-based schemes. Here are the leading entries and their approaches, presented in a narrative format rather than as a table:

  • Top score: 4.0 by pmazumder3927, GitHub handle, with the method “arithmetic coding with commavq-gpt2m.” This entry demonstrates a high-rate, traditional coding technique augmented by the commavq token stream and a GPT-style predictor.
  • Close on the heels: 3.7 by mune-io, using arithmetic coding with commavq-gpt2m. This approach emphasizes efficient probability modeling and entropy coding for the token stream.
  • A strong contender: 3.4 by szabolcs-cs, employing a self-compressing neural network. This method relies on an integrated neural architecture that learns to compress and decompress its outputs, potentially leveraging context within the data for better efficiency.
  • 3.0 by SAT-oO, using arithmetic coding with GPT. This approach pairs traditional entropy coding with a powerful GPT-based model for token probabilities.
  • 2.9 by BradyWynn, using arithmetic coding with GPT. Similar in spirit to the top entries, this solution emphasizes precise probability estimation and robust decoding.
  • 2.7 entries include ylevental and ksd3, both employing arithmetic coding with GPT. These demonstrate consistent performance improvements via transformer-based context modeling.
  • 2.6 by pkourouklidis (noted with a crown emoji 👑 in the listing), using arithmetic coding with GPT. This entry highlights the continued relevance of high-quality probability estimations in a GPT-informed coding scheme.
  • 2.3 entries include anonymous (zpaq) and rostislav (zpaq), showcasing the use of ZPAQ-based lossless compression approaches with a focus on historical, robust codecs.
  • A series of 2.2 entries (anonymous, 0x41head, tillinf, ylevental, nuniesmith) demonstrate the effectiveness of ZPAQ and related frameworks across multiple participants.
  • The baseline 1.6 entry uses LZMA as a straightforward, well-known compression technique to establish a reference point for performance.

These results paint a picture of a field where the best-performing solutions combine tight probabilistic modeling with efficient coding, often leveraging the tokenized representation produced by the VQ-VAE. The variety in methods—from arithmetic coding with transformer-informed probabilities to neural self-compression and traditional codecs—reflects both the richness of the data and the creativity of the participants.

The dataset and model in context: why this matters

  • A world model that can predict the next token from a sequence of past tokens is more than a curiosity. It provides a blueprint for how autonomous systems can anticipate future states, adapt to evolving scenes, and operate with reduced reliance on raw perceptual input. In driving scenarios, this translates to more robust planning, better scene understanding, and the potential for improved safety margins.
  • The heavy compression into a token stream enables researchers to work with large-scale data without the overhead of uncompressed video. This efficiency is crucial for training large, context-rich models like GPT-style transformers that require long-range dependencies and substantial compute to learn long-horizon dynamics.
  • The combination of 3,000,000 minutes of driving data for world modeling and 100,000 minutes of compressed video data creates a resource that is both deep and diverse, spanning a wide range of road types, weather conditions, and driving strategies. This breadth supports the training of models that generalize well beyond the most common scenarios.

Notebooks and practical usage: what you can explore

  • encode.ipynb and decode.ipynb: Use these to visualize how raw driving video maps to token sequences and how to reconstruct frames from tokens. They provide concrete demonstrations of the bidirectional translation between pixels and tokens.
  • gpt.ipynb: Explore how the world model imagines future frames given a context. This notebook shows the predictive power of a transformer-based world model when projecting a few seconds or even longer into the future.
  • compression/compress.py: A practical example of how to apply an LZMA-based scheme to compress the token streams, offering a straightforward workflow for lossless compression.

Images and visuals to illuminate the concepts

  • Image placeholders (conceptual visuals, not embedded here): A diagram illustrating the VQ-VAE compression of a driving frame into 128 tokens, including the 10-bit token values and the 1200-frame minute.
  • Image placeholders for the world model: A schematic showing a GPT-style transformer predicting the next token in a sequence of tokens, with attention mechanisms highlighting how past context informs future predictions.
  • Image placeholders of the Taco Bell drive-by example: A narrative image showing a real-world driving scenario that the dataset could capture, underscoring the relevance of the tasks to everyday driving.

How to use this material in research or development

  • Build on the token-based representation: Use the 128-token per frame encoding as a stable substrate for experiments in predictive modeling, planning, and control. The token-level abstraction reduces data bandwidth and enables long-range sequence modeling.
  • Experiment with compression strategies: Start with the provided notebooks and scripts to understand baseline performance. Then experiment with alternative entropy models, different tokenization schemes, or more advanced neural compression architectures to push the boundaries of lossless compression.
  • Leverage the world model for planning tasks: The GPT-style world model can serve as a core component for planning in simulated environments, enabling agents to forecast the consequences of actions in driving scenarios and to select safer, more efficient maneuvers.

A note on data access and open science

  • The dataset and related tools are designed to be accessible to researchers and developers, with clear pathways to download and experiment locally or in the cloud.
  • The use of Hugging Face Datasets and open notebooks provides a transparent, reproducible workflow that enables the community to validate results, compare methods, and propose improvements.

References and contextual background

The commaVQ project stands on a foundation of established research in neural discrete representations and world modeling:

  • Van Den Oord, Aaron, and Oriol Vinyals. Neural discrete representation learning. Advances in Neural Information Processing Systems 30 (2017).
  • Esser, Patrick, Robin Rombach, and Bjorn Ommer. Taming transformers for high-resolution image synthesis. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021.
  • World models and their philosophy: https://worldmodels.github.io/
  • Vaswani, Ashish, et al. Attention is all you need. Advances in Neural Information Processing Systems 30 (2017).
  • Micheli, Vincent, Eloi Alonso, and François Fleuret. Transformers are Sample-Efficient World Models. The Eleventh International Conference on Learning Representations. 2022.

Practical takeaways

  • The commaVQ ecosystem demonstrates a compelling approach to processing, storing, and leveraging massive streams of driving data. By representing frames as tokens and forecasting future tokens with a world model, researchers can explore long-horizon dynamics with heightened efficiency.
  • The lossless compression challenge underscores the community’s appetite for robust, high-fidelity data representations and effective coding strategies. The spectrum of approaches—from arithmetic coding to neural self-compression and even classic zpaq/LZMA methods—highlights the richness of the problem space and the value of diverse perspectives.
  • For practitioners, the project provides concrete tools and templates: notebooks for encoding/decoding and imagination, scripts for compression, and a scalable data framework that makes large-scale experiments feasible.

Closing thoughts

The commaVQ initiative represents a powerful glimpse into how advanced compression and world modeling can converge to advance autonomous driving research. By turning continuous video into a structured, discrete token sequence, and by teaching a transformer to predict the future states of those tokens, researchers gain a clearer, more manipulable understanding of driving scenes. The dataset’s scale—millions of minutes of driving, hundreds of thousands of minutes of compressed data—creates a fertile ground for experimentation, where breakthroughs in compression, representation learning, and predictive modeling can reinforce one another.

If you’re curious to dive in, explore the notebooks, engage with the Hugging Face dataset, and examine the leaderboard to see how others are pushing the envelope. There is no single “green light” solution here; rather, a nuanced blend of probabilistic modeling, neural compression, and transformer-based prediction that points toward more efficient, capable, and safe autonomous systems.

Images from the Input

  • Note: The original input did not include embedded images. The post above references conceptual visuals that would accompany the text, such as:
  • A diagram of a frame being encoded into 128 tokens and the token grid per frame.
  • A schematic of the transformer-based world model predicting the next token.
  • A visualization of a 1-minute driving segment represented as a sequence of tokens.
  • A sample workflow showing encode, decode, and gpt notebooks in action.
  • An illustration of the Taco Bell driving example linked in the text. If you have specific images you’d like inserted, share them, and I can weave them into the narrative with precise captions.

Enjoying this project?

Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.

Project
commavq-challenge
Created
August 2
Last Updated
August 2, 2026 at 08:22 PM

Find more projects like this

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.