Catalog PyPI
Back to packageRELEASE DETAILS

0.0.1a0

PyPI

aggressor

Ultra-minimal autoregressive diffusion model for image generation

Published19 Sept 2024
Direct dependencies6
Transitive dependenciesNot calculated

README

Version 0.0.1a0 documentation

Aggressor: Ultra-minimal autoregressive diffusion model for image generation

A simplest possible implementation of Autoregressive Image Generation without Vector Quantization.

Key Features

  • Simple Architecture: A tiny transformer for autoregression and an MLP for diffusion.
  • Single-File Implementation: Entire model in one Python file.
  • Minimal Dependencies: Built from scratch using only basic MLX operations.

Components

  • Aggressor: Main model class combining transformer and diffusion.
  • Transformer: Multi-layer transformer with attention and MLP blocks.
  • Denoiser: MLP-based diffusion process with time embedding.
  • Scheduler: Handles forward and backward processes for diffusion.
  • Attention: Multi-head attention mechanism.
  • MLP: Basic multi-layer perceptron with SiLU activation.

Usage

python aggressor.py

Alt text

Alt text

(Training on 60000 images x 20 epochs takes approximately 7~8 minutes on 8GB M2 MacBook.)

Acknowledgements

Thanks to lucidrains' fantastic code that inspired this project. The official implementation is available here.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 6

Native requirements
6 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
datasets
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12.3",
  "evaluation": "NOT_EVALUATED"
}
datasets==3.0.0runtime
einops
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12.3",
  "evaluation": "NOT_EVALUATED"
}
einops==0.8.0runtime
mlx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12.3",
  "evaluation": "NOT_EVALUATED"
}
mlx==0.17.3runtime
numpy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12.3",
  "evaluation": "NOT_EVALUATED"
}
numpy==2.1.1runtime
pillow
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12.3",
  "evaluation": "NOT_EVALUATED"
}
pillow==10.4.0runtime
fire
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.12.3",
  "evaluation": "NOT_EVALUATED"
}
fire==0.6.0runtime

Distribution files

2 collected
aggressor-0.0.1a0-py3-none-any.whl

bdist_wheel · 5.61 KB · Python py3

Source file
aggressor-0.0.1a0.tar.gz

sdist · 5.49 KB · Python source

Source file

Repository

PENDING
josefalbers/aggressor

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:03 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:6079cfd3b10dbb046eeabfef0f76df7302a5eebc98a60f45c95421fb00a23153

Other collected versions

View all collected versions →