fastai 2.8.4


pip install fastai

  Latest version

Released: Aug 19, 2025

Project Links

Meta
Author: Jeremy Howard, Sylvain Gugger, and contributors
Requires Python: >=3.10

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

License
  • OSI Approved :: Apache Software License

Natural Language
  • English

Programming Language
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Welcome to fastai

CI PyPI Conda (channel only) docs

Installing

You can use fastai without any installation by using Google Colab. In fact, every page of this documentation is also available as an interactive notebook - click “Open in colab” at the top of any page to open it (be sure to change the Colab runtime to “GPU” to have it run fast!) See the fast.ai documentation on Using Colab for more information.

You can install fastai on your own machines with: pip install fastai.

If you plan to develop fastai yourself, or want to be on the cutting edge, you can use an editable install (if you do this, you should also use an editable install of fastcore to go with it.) First install PyTorch, and then:

git clone https://github.com/fastai/fastai
pip install -e "fastai[dev]"

Learning fastai

The best way to get started with fastai (and deep learning) is to read the book, and complete the free course.

To see what’s possible with fastai, take a look at the Quick Start, which shows how to use around 5 lines of code to build an image classifier, an image segmentation model, a text sentiment model, a recommendation system, and a tabular model. For each of the applications, the code is much the same.

Read through the Tutorials to learn how to train your own models on your own datasets. Use the navigation sidebar to look through the fastai documentation. Every class, function, and method is documented here.

To learn about the design and motivation of the library, read the peer reviewed paper.

About fastai

fastai is a deep learning library which provides practitioners with high-level components that can quickly and easily provide state-of-the-art results in standard deep learning domains, and provides researchers with low-level components that can be mixed and matched to build new approaches. It aims to do both things without substantial compromises in ease of use, flexibility, or performance. This is possible thanks to a carefully layered architecture, which expresses common underlying patterns of many deep learning and data processing techniques in terms of decoupled abstractions. These abstractions can be expressed concisely and clearly by leveraging the dynamism of the underlying Python language and the flexibility of the PyTorch library. fastai includes:

  • A new type dispatch system for Python along with a semantic type hierarchy for tensors
  • A GPU-optimized computer vision library which can be extended in pure Python
  • An optimizer which refactors out the common functionality of modern optimizers into two basic pieces, allowing optimization algorithms to be implemented in 4–5 lines of code
  • A novel 2-way callback system that can access any part of the data, model, or optimizer and change it at any point during training
  • A new data block API
  • And much more…

fastai is organized around two main design goals: to be approachable and rapidly productive, while also being deeply hackable and configurable. It is built on top of a hierarchy of lower-level APIs which provide composable building blocks. This way, a user wanting to rewrite part of the high-level API or add particular behavior to suit their needs does not have to learn how to use the lowest level.

Layered API

Migrating from other libraries

It’s very easy to migrate from plain PyTorch, Ignite, or any other PyTorch-based library, or even to use fastai in conjunction with other libraries. Generally, you’ll be able to use all your existing data processing code, but will be able to reduce the amount of code you require for training, and more easily take advantage of modern best practices. Here are migration guides from some popular libraries to help you on your way:

Windows Support

Due to python multiprocessing issues on Jupyter and Windows, num_workers of Dataloader is reset to 0 automatically to avoid Jupyter hanging. This makes tasks such as computer vision in Jupyter on Windows many times slower than on Linux. This limitation doesn’t exist if you use fastai from a script.

See this example to fully leverage the fastai API on Windows.

We recommend using Windows Subsystem for Linux (WSL) instead – if you do that, you can use the regular Linux installation approach, and you won’t have any issues with num_workers.

Tests

To run the tests in parallel, launch:

nbdev_test

For all the tests to pass, you’ll need to install the dependencies specified as part of dev_requirements in settings.ini

pip install -e .[dev]

Tests are written using nbdev, for example see the documentation for test_eq.

Contributing

After you clone this repository, make sure you have run nbdev_install_hooks in your terminal. This install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks.

After making changes in the repo, you should run nbdev_prepare and make additional and necessary changes in order to pass all the tests.

Docker Containers

For those interested in official docker containers for this project, they can be found here.

2.8.4 Aug 19, 2025
2.8.3 Aug 07, 2025
2.8.2 May 24, 2025
2.8.1 Apr 18, 2025
2.8.0 Mar 18, 2025
2.7.19 Mar 12, 2025
2.7.18 Oct 19, 2024
2.7.17 Aug 27, 2024
2.7.16 Jul 30, 2024
2.7.15 Apr 27, 2024
2.7.14 Feb 01, 2024
2.7.13 Oct 15, 2023
2.7.12 Mar 28, 2023
2.7.11 Feb 15, 2023
2.7.10 Nov 02, 2022
2.7.9 Aug 03, 2022
2.7.8 Aug 02, 2022
2.7.7 Jul 14, 2022
2.7.6 Jul 07, 2022
2.7.5 Jul 04, 2022
2.7.4 Jun 28, 2022
2.7.3 Jun 19, 2022
2.7.2 Jun 19, 2022
2.7.1 Jun 19, 2022
2.7.0 Jun 19, 2022
2.6.3 May 01, 2022
2.6.2 Apr 30, 2022
2.6.1 Apr 30, 2022
2.6.0 Apr 24, 2022
2.5.6 Apr 02, 2022
2.5.5 Mar 25, 2022
2.5.4 Mar 25, 2022
2.5.3 Oct 23, 2021
2.5.2 Aug 21, 2021
2.5.1 Aug 11, 2021
2.5.0 Aug 06, 2021
2.4.1 Jul 14, 2021
2.4 Jun 16, 2021
2.3.1 May 04, 2021
2.3.0 Mar 31, 2021
2.2.7 Feb 22, 2021
2.2.6 Feb 21, 2021
2.2.5 Jan 13, 2021
2.2.4 Jan 13, 2021
2.2.3 Jan 12, 2021
2.2.2 Jan 07, 2021
2.2.1 Jan 06, 2021
2.2.0 Jan 06, 2021
2.1.10 Dec 22, 2020
2.1.9 Dec 13, 2020
2.1.8 Nov 30, 2020
2.1.7 Nov 23, 2020
2.1.6 Nov 22, 2020
2.1.5 Nov 09, 2020
2.1.4 Nov 04, 2020
2.1.3 Nov 02, 2020
2.1.2 Oct 30, 2020
2.1.1 Oct 30, 2020
2.1.0 Oct 30, 2020
2.0.19 Nov 01, 2020
2.0.18 Oct 30, 2020
2.0.17 Oct 29, 2020
2.0.16 Oct 09, 2020
2.0.15 Sep 29, 2020
2.0.14 Sep 29, 2020
2.0.13 Sep 17, 2020
2.0.12 Sep 15, 2020
2.0.11 Sep 14, 2020
2.0.10 Sep 08, 2020
2.0.9 Sep 06, 2020
2.0.8 Sep 03, 2020
2.0.7 Sep 02, 2020
2.0.6 Aug 30, 2020
2.0.5 Aug 30, 2020
2.0.4 Aug 30, 2020
2.0.3 Aug 30, 2020
2.0.2 Aug 30, 2020
2.0.0 Aug 21, 2020
1.0.61 May 01, 2020
1.0.60 Dec 28, 2019
1.0.59 Oct 26, 2019
1.0.58 Sep 29, 2019
1.0.57 Aug 09, 2019
1.0.55 Jul 11, 2019
1.0.54 Jun 19, 2019
1.0.53.post3 Jun 17, 2019
1.0.53.post2 Jun 11, 2019
1.0.53.post1 Jun 11, 2019
1.0.53 Jun 10, 2019
1.0.52 Apr 26, 2019
1.0.51 Apr 01, 2019
1.0.50.post1 Mar 19, 2019
1.0.50 Mar 19, 2019
1.0.49 Mar 15, 2019
1.0.48 Mar 09, 2019
1.0.47.post1 Mar 07, 2019
1.0.47 Mar 06, 2019
1.0.46 Feb 25, 2019
1.0.44 Feb 26, 2019
1.0.43.post1 Feb 12, 2019
1.0.42 Jan 24, 2019
1.0.41 Jan 22, 2019
1.0.40 Jan 17, 2019
1.0.39 Dec 28, 2018
1.0.38 Dec 19, 2018
1.0.37 Dec 13, 2018
1.0.36.post1 Dec 09, 2018
1.0.36 Dec 09, 2018
1.0.35 Dec 08, 2018
1.0.34 Dec 06, 2018
1.0.33 Dec 05, 2018
1.0.32 Dec 02, 2018
1.0.31 Dec 01, 2018
1.0.30 Nov 28, 2018
1.0.29 Nov 27, 2018
1.0.28 Nov 19, 2018
1.0.27 Nov 17, 2018
1.0.26 Nov 17, 2018
1.0.25 Nov 16, 2018
1.0.24 Nov 14, 2018
1.0.22 Nov 10, 2018
1.0.21 Nov 09, 2018
1.0.20 Nov 07, 2018
1.0.19 Nov 03, 2018
1.0.18 Oct 30, 2018
1.0.17 Oct 30, 2018
1.0.16 Oct 30, 2018
1.0.15 Oct 28, 2018
1.0.14 Oct 26, 2018
1.0.13 Oct 24, 2018
1.0.12 Oct 23, 2018
1.0.11 Oct 20, 2018
1.0.10 Oct 20, 2018
1.0.9 Oct 20, 2018
1.0.7 Oct 19, 2018
1.0.6 Oct 17, 2018
1.0.5 Oct 06, 2018
1.0.4 Oct 05, 2018
1.0.3 Oct 02, 2018
1.0.2 Oct 01, 2018
1.0.1 Oct 01, 2018
1.0.0 Oct 01, 2018
1.0.0b8 Oct 01, 2018
1.0.0b7 Sep 30, 2018
0.7.0 May 13, 2018
0.6 Nov 29, 2017

Wheel compatibility matrix

Platform Python 3
any

Files in release