Skip to main content

tf-sentence-transformers

A simple tensorflow/keras wrapper around sentence-transformers. The main class is SentenceTransformer, a keras.Layer that can be constructed from a pretrained checkpoint in huggingface model hub.

Example usage:

from tf_sentence_transformers import SentenceTransformer

layer = SentenceTransformer.from_pretrained(
    "sentence-transformers/all-MiniLM-L6-v2"
)
inputs = [
    ["This is a test sentence."],
    ["This is another test sentence."],
]
embedding = layer(inputs)
# assert embedding.shape == (2, 384)

Metadata

Release files for tf-sentence-transformers 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tf-sentence-transformers 0.2
File Size Uploaded
tf_sentence_transformers-0.2.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tf-sentence-transformers 0.2
File Interpreter ABI Platform
tf_sentence_transformers-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / tf_sentence_transformers-0.2.tar.gz

Download URL tf_sentence_transformers-0.2.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
65b9fef1cf2d3148b47e1f3a369e798df6a85d5e18118572b9bc920ba7a92e8a
BLAKE2b-256 checksum
How to use checksums
9caf0cbf530351e91d6fd40a192b5c71102347d8005699d57410a7b5cde6c8fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / tf_sentence_transformers-0.2-py3-none-any.whl

Download URL tf_sentence_transformers-0.2-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c374c0a43974c742b8a07d7619030d567347862dad16c0ecd662df2d9bd745f9
BLAKE2b-256 checksum
How to use checksums
b780c9f18908aba07949412e53fa13b85adde59ac10d37653299865ef1bf0be3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page