thinc
🔮 A refreshing functional take on deep learning, compatible with your favorite libraries
What is thinc?
🔮 A refreshing functional take on deep learning, compatible with your favorite libraries
Overview of thinc
What it is
Thinc is a lightweight deep learning library that provides an elegant, type-checked, functional-programming API for composing models. It supports layers defined in other frameworks such as PyTorch, TensorFlow and MXNet. Thinc can be used as an interface layer, a standalone toolkit or a flexible way to develop new models. It is developed by the makers of spaCy and Prodigy.
Key features
- Type-check model definitions with custom types and a mypy 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.
Use cases
Thinc is suitable for composing, configuring and deploying custom models built with a user's favorite framework. It can be used as an interface layer between different deep learning frameworks, as a standalone toolkit for model development, or as a flexible way to develop new models. Example use cases include training a model on MNIST data, training a part-of-speech tagger using transformers and PyTorch, implementing a basic CNN for part-of-speech tagging, and setting up parallel training with Ray.
Getting started
Thinc runs on Linux, macOS and Windows. The latest releases with binary wheels are available from pip. Before installing, ensure pip, setuptools and wheel are up to date. For the most recent releases, pip 19.3 or newer is recommended.bashpip install -U pip setuptools wheelpip install thinc
License and pricing
Thinc is open source under the MIT license.
Based on the project's public README and repository metadata.