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
Metadata
Release files for quaterion-models 0.1.19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| quaterion_models-0.1.19.tar.gz | 17.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quaterion_models-0.1.19-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.9 kB
Release files / quaterion_models-0.1.19.tar.gz
| Download URL | quaterion_models-0.1.19.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ddf45d538a6761901920e6b6976cb6168c6215657d69037009d1cfb2abb6bec
|
|
BLAKE2b-256 checksum How to use checksums |
2d2d8476f1db81e6dd79f936c0a58873b65272ca0892583f1331a86f591b4a9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / quaterion_models-0.1.19-py3-none-any.whl
| Download URL | quaterion_models-0.1.19-py3-none-any.whl |
|---|---|
| Size | 26.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5116c7a76d362374d3c318c7fba9f6c8bf783a8490c67ec719b3941d65192cd5
|
|
BLAKE2b-256 checksum How to use checksums |
793565c6c8b47187bead0c1a00862c33b2b696a5344d74c888eb603a2fdbf2e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|