The collection of building blocks to build fine-tunable similarity learning models
Project description
Quaterion Models
quaterion-models is a part of Quaterion, similarity learning framework.
It is kept as a separate package to make servable models lightweight and free from training dependencies.
It contains definition of base classes, used for model inference, as well as the collection of building blocks for building fine-tunable similarity learning models. The documentation can be found here.
If you are looking for the training-related part of Quaterion, please see the main repository instead.
Install
pip install quaterion-models
It makes sense to install quaterion-models independent of the main framework if you already have trained model
and only need to make inference.
Load and inference
from quaterion_models import SimilarityModel
model = SimilarityModel.load("./path/to/saved/model")
embeddings = model.encode([
{"description": "this is an example input"},
{"description": "you may have a different format"},
{"description": "the output will be a numpy array"},
{"description": "of size [batch_size, embedding_size]"},
])
Content
SimilarityModel- main class which contains encoder models with the head layer- Base class for Encoders
- Base class and various implementations of the Head Layers
- Additional helper functions
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quaterion-models-0.1.15.tar.gz.
File metadata
- Download URL: quaterion-models-0.1.15.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93294ac225628469ee49d4e0e6d6e6c8f0eb35db9eb8cc7a2925f0563ff2f86c
|
|
| MD5 |
4f1af228a36aae949dc761bbc5958d92
|
|
| BLAKE2b-256 |
10702c91b9f28c60e19225726556cc107d25bec677ac89d6bf5eca6c33a6437f
|
File details
Details for the file quaterion_models-0.1.15-py3-none-any.whl.
File metadata
- Download URL: quaterion_models-0.1.15-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8ab563e0a0d27bc2721cc140ae61e844c7ec3a9a4fb4948803f773aa6f4bb23
|
|
| MD5 |
c137adea77e26c49449898a2b9456d6f
|
|
| BLAKE2b-256 |
9e86a8b7237106208e2d2a3293bf1d9c76e3bb40e4235ea9298d5059547a6b3d
|