Metric Learning fine-tuning framework
Project description
Quaterion
A dwarf on a giant's shoulders sees farther of the two
Quaterion is a framework for fine-tuning similarity learning models. The framework closes the "last mile" problem in training models for semantic search, recommendations, anomaly detection, extreme classification, matching engines, e.t.c.
It is designed to combine the performance of pre-trained models with specialization for the custom task while avoiding slow and costly training.
Features
- 🌀 Warp-speed fast: With the built-in caching mechanism, Quaterion enables you to train thousands of epochs with huge batch sizes even on laptop GPU.
-
🐈 Small data compatible: Pre-trained models with specially designed head layers allow you to benefit even from a dataset you can label in one day.
-
🏗️ Customizable: Quaterion allows you to re-define any part of the framework, making it flexible even for large-scale and sophisticated training pipelines.
Installation
TL;DR:
For training:
pip install quaterion
For inference service:
pip install quaterion-models
Quaterion framework consists of two packages - quaterion
and quaterion-models
.
Since it is not always possible or convenient to represent a model in ONNX format (also, it is supported), the Quaterion keeps a very minimal collection of model classes, which might be required for model inference, in a separate package.
It allows avoiding installing heavy training dependencies into inference infrastructure: pip install quaterion-models
At the same time, once you need to have a full arsenal of tools for training and debugging models, it is available in one package: pip install quaterion
Architecture
Quaterion is built on top of PyTorch Lightning - a framework for high-performance AI research. It takes care of all the tasks involved in constructing a training loops for ML models:
- Epochs management -> [tutorial]
- Logging -> [tutorial]
- Early Stopping -> [tutorial]
- Checkpointing -> [tutorial]
- Distributed training -> [tutorial]
- And many more
In addition to PyTorch Lightning functionality, Quaterion provides a scaffold for defining:
- Fine-tunable similarity learning models
- Encoders and Head Layers
- Datasets and Data Loaders for representing similarity information
- Loss functions for similarity learning
- Metrics for evaluating model performance
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for quaterion-0.1.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeff3d5afeb9d4f0e50c2d11c099cca4262a0b468b54a9e2bfad66be06b3dedf |
|
MD5 | a6d8c3667efade61b3b22e07fc36a897 |
|
BLAKE2b-256 | b786d630ee0f83eba8fcd8a58d69c34d5fb7dee18e322246b03ca478af1334d0 |