Project Info
Inspiration
Scaling laws have reshaped AI. Models grow deeper, wider, and more expressive. But they're also heavier, slower, and increasingly incompatible with embedded hardware. A Raspberry Pi cannot casually host frontier-scale intelligence. Edge deployment demands a different philosophy: task precision over generality, efficiency over excess, compression without compromise. Chom, Nom! exists to close that gap, transforming oversized PyTorch models into lean, deployable systems without rewriting architectures or sacrificing performance.
What it does
Compress any machine learning model to 1/4 the size with a single click! Chom, Nom! gets any 50M parameter ready to deploy on a Raspberry Pi in <20s. Under the hood, Chom, Nom! is like a little AI Researcher. Chom, Nom! orchestrates a multi-agent pipeline to perform per-layer quantization ablations, leaving the choice of compression intensity as one that an intelligence can decide to balance footprint reduction and performance. The automated pipeline looks like this: Per-layer sensitivity analysis A Scanner agent inspects every layer's weight distribution, fitting a Beta distribution to estimate quantization sensitivity. Layers with heavy-tailed or high-kurtosis distributions are flagged as fragile; sparse, well-behaved layers are marked as robust. LLM-guided mixed-precision strategy A Strategist agent (backed by an LLM) reads the sensitivity table and proposes 3-5 quantization configurations -- including mixed-precision plans that assign FP32, FP16, or INT8 per layer according to each layer's sensitivity score. A Critic agent then reviews and refines these proposals before any quantization is applied. Automated quantization and evaluation An Executor agent applies each approved configuration via post-training quantization (dynamic INT8, static INT8 with calibration data, FP16, or mixed precision), then measures accuracy, model size, and inference latency. Static INT8 uses representative calibration batches to estimate per-layer activation ranges and zero-points. Pareto-optimal selection An Analyst agent computes the Pareto frontier across all experiment results -- balancing accuracy, size, and speed -- and recommends the best configuration. If coverage gaps exist, additional experiments are proposed iteratively. Guaranteed footprint reduction The final model can be up to 4x smaller (INT8) or even 8x smaller (INT4), enabling cheaper and more private inference while maintaining stable accuracy through sensitivity-aware layer protection. We put a lot of energy into making the user experience is ruthlessly minimal: Upload, Click to Compress, and Deploy.
How we built it
We built the system on top of PyTorch's native quantization APIs and a pluggable quantizer registry to unify: Per-layer weight distribution analysis (Beta distribution fitting) Sensitivity-aware precision assignment (FP32 / FP16 / INT8 / INT4 per layer) Post-training quantization with optional calibration Multi-agent strategy, critique, and Pareto-optimal selection Architecture Agnostic Design The compression pipeline was designed to remain architecture-agnostic, meaning it does not assume convolutional, transformer, or custom module structure. Instead, the Scanner iterates over all named modules and parameter tensors, fitting statistical distributions to each layer's weights to assess quantization sensitivity. This allows it to generalize across bespoke research models, or your very own custom creations.
Challenges we ran into
We tried a number of supplementary approaches to model compression including: Agentic self-distillation Structural pruning Low-rank factorization All required modifying the model’s architecture or training loop — pruning channels, changing ranks, or rewriting optimization logic. Automating these decisions meant letting agents redesign core structural components. Current AI systems can apply local edits, but they are unreliable at global architectural reasoning. The result was instability, silent accuracy degradation, and excessive debugging overhead. We ultimately prioritized graph-preserving methods like quantization, which compress models without requiring architectural redesign. In addition, we built custom Web GPU Kernels for on-device quantization through a web interface. However, we found this platform to be too limiting in the end.
Accomplishments we're proud of
Accuracy preservation at 1/4 the precision Balance of accuracy and footprint reduction using agentic loops, evaluating per layer structure A stable, agentic loop to act as a mini AI-researcher The cutie patootie on the GUI
What we learned
There's still a gap in agentic ability for sequential ML research (e.g. reacting to distillation attempts and refining experiments). However, this is rapidly progressing!
What's next
Online container for asynchronous execution on more capable hardware Completion of autonomous self-distillation procedure
Chom, Nom!
Shrink the size of any PyTorch model in a single click!

Project Goal
This project aims to build a one-click universal model compression tool designed to shrink PyTorch models for real-time edge deployment on hardware like the Raspberry Pi 4. While the Pi 4 can hold 100–500MB models in its 2–8GB RAM, we target a post-compression footprint of 50MB or less to guarantee low-latency inference.
We are prioritizing a pipeline that balances aggressive size reduction with performance stability, starting with INT8 Quantization as our primary lever.
The Four Levels of Compression
- Quantization (INT8): Our starting point. We utilize Quantization-Aware Training (QAT) on a provided dataset to secure massive size reductions while preserving accuracy by simulating quantization errors during fine-tuning.
- Structural Pruning: Unlike unstructured methods, this physically removes network blocks (entire filters or channels). This is the only pruning strategy that genuinely reduces RAM usage and compute operations on ARM architectures.
- Low-Rank Factorization: This stage uses the best Rank-R Approximation in the Frobenius norm to decompose large weight matrices into smaller, more efficient products.
- Logit Distillation: As a final safety measure, we use KL Divergence to align the compressed student model's logits with the original teacher model, recovering accuracy lost during the previous three stages.
Technical Constraints & Hardware Notes
- Target Hardware: Raspberry Pi 4 / ARM Cortex-A72.
- Inference Footprint: < 50MB for real-time performance.
- Agnostic Design: The goal is to build a process compatible with any model architecture, including bespoke ones, without requiring external libraries.
Built by:
- Christina Lee
- Danny Lin
- Albert Astrom
- Hector Astrom
for treehacks 2026
Analysis
View
Metric
- 11
- 9
- 1
- 1
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- Hugging FaceIn code
- OpenAIIn code
- PythonIn code
- PyTorchIn code
5 of 5 appear in the indexed code.
AI coding agents
- CursorCommits
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
293 KB
Source files
40
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
hectorastrom/chom-nom
63 files · 11.3 MB · @ bf57293
Structure
Interface
9 files · 14%Screens, components and styles rendered to the user.
Application logic
30 files · 48%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python97%
- Markdown3%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
agent/requirements.txt
pypi · 11- anthropic
- bitsandbytes
- matplotlib
- numpy
- openai
- pyyaml
- rich
- scipy
- torch
- torchvision
- transformers
pyproject.toml
pypi · 7- executorch
- huggingface-hub
- PyQt6
- torch
- torchao
- torchvision
- ultralytics
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.