Shortcuts

Text Embedder

The Task

This task consists of creating a Sentence Embedding. That is, a vector of sentence representations which can be used for a downstream task. The TextEmbedder implementation is adapted from https://github.com/UKPLab/sentence-transformers/blob/master/sentence_transformers/models/Transformer.py ——

Example

Let’s look at an example of generating sentence embeddings.

We start by using few custom sentences as input. Next, we load a trained model from TextEmbedder. And generate sentence embeddings. Here’s the full example:

import torch
Read the Docs v: stable
Versions
latest
stable
0.6.0
0.5.2
0.5.1
0.5.0
0.4.0
0.3.2
0.3.1
0.3.0
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0post1
docs-fix_typing
Downloads
pdf
html
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.