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
File details
Details for the file quaterion_models-0.1.19.tar.gz
.
File metadata
- Download URL: quaterion_models-0.1.19.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ddf45d538a6761901920e6b6976cb6168c6215657d69037009d1cfb2abb6bec |
|
MD5 | ca29d80c6c05186329608066392adc76 |
|
BLAKE2b-256 | 2d2d8476f1db81e6dd79f936c0a58873b65272ca0892583f1331a86f591b4a9e |
File details
Details for the file quaterion_models-0.1.19-py3-none-any.whl
.
File metadata
- Download URL: quaterion_models-0.1.19-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5116c7a76d362374d3c318c7fba9f6c8bf783a8490c67ec719b3941d65192cd5 |
|
MD5 | b7af7b6cb26ea239c4f8e779a3b0a212 |
|
BLAKE2b-256 | 793565c6c8b47187bead0c1a00862c33b2b696a5344d74c888eb603a2fdbf2e3 |