# thinc

> A refreshing functional take on deep learning, compatible with your favorite libraries

- **URL**: https://www.freshcrate.ai/projects/thinc
- **Author**: Explosion
- **Category**: RAG & Memory
- **Latest version**: `9.1.1` (2026-04-21)
- **License**: MIT
- **Source**: https://github.com/explosion/thinc
- **Language**: Python
- **GitHub**: 2,891 stars, 295 forks
- **Registry**: pypi (`thinc`)
- **Tags**: `pypi`

## Description

<a href="https://explosion.ai"><img src="https://explosion.ai/assets/img/logo.svg" width="125" height="125" align="right" /></a>

# Thinc: A refreshing functional take on deep learning, compatible with your favorite libraries

### From the makers of [spaCy](https://spacy.io) and [Prodigy](https://prodi.gy)

[Thinc](https://thinc.ai) is a **lightweight deep learning library** that offers
an elegant, type-checked, functional-programming API for **composing models**,
with support for layers defined in other frameworks such as **PyTorch,
TensorFlow and MXNet**. You can use Thinc as an interface layer, a standalone
toolkit or a flexible way to develop new models. Previous versions of Thinc have
been running quietly in production in thousands of companies, via both
[spaCy](https://spacy.io) and [Prodigy](https://prodi.gy). We wrote the new
version to let users **compose, configure and deploy custom models** built with
their favorite framework.

[![tests](https://github.com/explosion/thinc/actions/workflows/tests.yml/badge.svg)](https://github.com/explosion/thinc/actions/workflows/tests.yml)
[![Current Release Version](https://img.shields.io/github/v/release/explosion/thinc.svg?include_prereleases&sort=semver&style=flat-square&logo=github)](https://github.com/explosion/thinc/releases)
[![PyPi Version](https://img.shields.io/pypi/v/thinc.svg?include_prereleases&sort=semver&style=flat-square&logo=pypi&logoColor=white)](https://pypi.python.org/pypi/thinc)
[![conda Version](https://img.shields.io/conda/vn/conda-forge/thinc.svg?style=flat-square&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/thinc)
[![Python wheels](https://img.shields.io/badge/wheels-%E2%9C%93-4c1.svg?longCache=true&style=flat-square&logo=python&logoColor=white)](https://github.com/explosion/wheelwright/releases)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/ambv/black)
[![Open demo in Colab][colab]][intro_to_thinc_colab]

## 🔥 Features

- **Type-check** your model definitions with custom types and
  [`mypy`](https://mypy.readthedocs.io/en/latest/) plugin.
- Wrap **PyTorch**, **TensorFlow** and **MXNet** models for use in your network.
- Concise **functional-programming** approach to model definition, using
  composition rather than inheritance.
- Optional custom infix notation via **operator overloading**.
- Integrated **config system** to describe trees of objects and hyperparameters.
- Choice of **extensible backends**.
- **[Read more &rarr;](https://thinc.ai/docs)**

## 🚀 Quickstart

Thinc is compatible with **Python 3.6+** and runs on **Linux**, **macOS** and
**Windows**. The latest releases with binary wheels are available from
[pip](https://pypi.python.org/pypi/thinc). Before you install Thinc and its
dependencies, make sure that your `pip`, `setuptools` and `wheel` are up to
date. For the most recent releases, pip 19.3 or newer is recommended.

```bash
pip install -U pip setuptools wheel
pip install thinc
```

See the [extended installation docs](https://thinc.ai/docs/install#extended) for
details on optional dependencies for different backends and GPU. You might also
want to
[set up static type checking](https://thinc.ai/docs/install#type-checking) to
take advantage of Thinc's type system.

> ⚠️ If you have installed PyTorch and you are using Python 3.7+, uninstall the
> package `dataclasses` with `pip uninstall dataclasses`, since it may have been
> installed by PyTorch and is incompatible with Python 3.7+.

### 📓 Selected examples and notebooks

Also see the [`/examples`](examples) directory and
[usage documentation](https://thinc.ai/docs) for more examples. Most examples
are Jupyter notebooks – to launch them on
[Google Colab](https://colab.research.google.com) (with GPU support!) click on
the button next to the notebook name.

| Notebook                                                                                                              | Description                                                                                                                                                                                       |
| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`intro_to_thinc`][intro_to_thinc]<br />[![Open in Colab][colab]][intro_to_thinc_colab]                               | Everything you need to know to get started. Composing and training a model on the MNIST data, using config files, registering custom functions and wrapping PyTorch, TensorFlow and MXNet models. |
| [`transformers_tagger_bert`][transformers_tagger_bert]<br />[![Open in Colab][colab]][transformers_tagger_bert_colab] | How to use Thinc, `transformers` and PyTorch to train a part-

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `9.1.1` | 2026-04-21 | Low | Imported from PyPI (9.1.1) |
| `v8.3.13` | 2026-03-23 | Medium | - Add clear error message for float64 dtype mismatch in BLIS gemm (#461). - Document that Model.from_disk requires matching architecture (#751). - Document that Loss.get_grad computes gradient w.r.t. logits, not   post-softmax probabilities (#901). - Remove stale comments about torch.cuda.amp.autocast migration (#967). - Fix numpy deprecation warning filter syntax in pyproject.toml. - Ignore NumPy 2.4 align deprecation from pickled dtype in test data. |
| `v8.3.13` | 2026-03-23 | Low | - Add clear error message for float64 dtype mismatch in BLIS gemm (#461). - Document that Model.from_disk requires matching architecture (#751). - Document that Loss.get_grad computes gradient w.r.t. logits, not   post-softmax probabilities (#901). - Remove stale comments about torch.cuda.amp.autocast migration (#967). - Fix numpy deprecation warning filter syntax in pyproject.toml. - Ignore NumPy 2.4 align deprecation from pickled dtype in test data. |
| `v8.3.13` | 2026-03-23 | Low | - Add clear error message for float64 dtype mismatch in BLIS gemm (#461). - Document that Model.from_disk requires matching architecture (#751). - Document that Loss.get_grad computes gradient w.r.t. logits, not   post-softmax probabilities (#901). - Remove stale comments about torch.cuda.amp.autocast migration (#967). - Fix numpy deprecation warning filter syntax in pyproject.toml. - Ignore NumPy 2.4 align deprecation from pickled dtype in test data. |
| `v8.3.13` | 2026-03-23 | Low | - Add clear error message for float64 dtype mismatch in BLIS gemm (#461). - Document that Model.from_disk requires matching architecture (#751). - Document that Loss.get_grad computes gradient w.r.t. logits, not   post-softmax probabilities (#901). - Remove stale comments about torch.cuda.amp.autocast migration (#967). - Fix numpy deprecation warning filter syntax in pyproject.toml. - Ignore NumPy 2.4 align deprecation from pickled dtype in test data. |
| `v8.3.13` | 2026-03-23 | Low | - Add clear error message for float64 dtype mismatch in BLIS gemm (#461). - Document that Model.from_disk requires matching architecture (#751). - Document that Loss.get_grad computes gradient w.r.t. logits, not   post-softmax probabilities (#901). - Remove stale comments about torch.cuda.amp.autocast migration (#967). - Fix numpy deprecation warning filter syntax in pyproject.toml. - Ignore NumPy 2.4 align deprecation from pickled dtype in test data. |
| `v8.3.13` | 2026-03-23 | Low | - Add clear error message for float64 dtype mismatch in BLIS gemm (#461). - Document that Model.from_disk requires matching architecture (#751). - Document that Loss.get_grad computes gradient w.r.t. logits, not   post-softmax probabilities (#901). - Remove stale comments about torch.cuda.amp.autocast migration (#967). - Fix numpy deprecation warning filter syntax in pyproject.toml. - Ignore NumPy 2.4 align deprecation from pickled dtype in test data. |
| `v8.3.13` | 2026-03-23 | Low | - Add clear error message for float64 dtype mismatch in BLIS gemm (#461). - Document that Model.from_disk requires matching architecture (#751). - Document that Loss.get_grad computes gradient w.r.t. logits, not   post-softmax probabilities (#901). - Remove stale comments about torch.cuda.amp.autocast migration (#967). - Fix numpy deprecation warning filter syntax in pyproject.toml. - Ignore NumPy 2.4 align deprecation from pickled dtype in test data. |
| `v8.3.13` | 2026-03-23 | Low | - Add clear error message for float64 dtype mismatch in BLIS gemm (#461). - Document that Model.from_disk requires matching architecture (#751). - Document that Loss.get_grad computes gradient w.r.t. logits, not   post-softmax probabilities (#901). - Remove stale comments about torch.cuda.amp.autocast migration (#967). - Fix numpy deprecation warning filter syntax in pyproject.toml. - Ignore NumPy 2.4 align deprecation from pickled dtype in test data. |
| `v8.3.13` | 2026-03-23 | Low | - Add clear error message for float64 dtype mismatch in BLIS gemm (#461). - Document that Model.from_disk requires matching architecture (#751). - Document that Loss.get_grad computes gradient w.r.t. logits, not   post-softmax probabilities (#901). - Remove stale comments about torch.cuda.amp.autocast migration (#967). - Fix numpy deprecation warning filter syntax in pyproject.toml. - Ignore NumPy 2.4 align deprecation from pickled dtype in test data. |

## Citation

- HTML: https://www.freshcrate.ai/projects/thinc
- Markdown: https://www.freshcrate.ai/projects/thinc.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/thinc/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
