# Make your ZeroGPU Spaces go brrr with ahead-of-time compilation

DevFeed: [Make your ZeroGPU Spaces go brrr with ahead-of-time compilation](<https://devfeed.tech/articles/make-your-zerogpu-spaces-go-brrr-with-ahead-of-time-compilation-7575.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/zerogpu-aoti>)

Author: Charles Bensimon; Sayak Paul; Linoy Tsaban; Apolinário from multimodal AI art

Published: 2025-09-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Hugging Face - Blog](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [RAPIDS](<https://devfeed.tech/topics/rapids.md>), [GPU](<https://devfeed.tech/topics/gpu.md>), [fly](<https://devfeed.tech/topics/fly.md>), [PyTorch](<https://devfeed.tech/topics/pytorch.md>), [quantization](<https://devfeed.tech/topics/quantization.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [compilation](<https://devfeed.tech/tags/compilation.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [guide](<https://devfeed.tech/tags/guide.md>), [hugging-face](<https://devfeed.tech/tags/hugging-face.md>), [image-to-image](<https://devfeed.tech/tags/image-to-image.md>), [image-to-video](<https://devfeed.tech/tags/image-to-video.md>), [inference](<https://devfeed.tech/tags/inference.md>), [latency](<https://devfeed.tech/tags/latency.md>), [models](<https://devfeed.tech/tags/models.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [python](<https://devfeed.tech/tags/python.md>), [pytorch](<https://devfeed.tech/tags/pytorch.md>), [quantization](<https://devfeed.tech/tags/quantization.md>), [spaces](<https://devfeed.tech/tags/spaces.md>), [text-to-image](<https://devfeed.tech/tags/text-to-image.md>), [zerogpu](<https://devfeed.tech/tags/zerogpu.md>)

## AI overview

This tutorial explains how to use PyTorch ahead-of-time compilation in ZeroGPU Spaces. It covers faster model startup and inference, FP8 quantization, dynamic shapes, and the process-based GPU allocation model used by ZeroGPU, with reported speedups of 1.3x-1.8x on Flux, Wan, and LTX models.

## Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.