towhee
copied
Readme
Files and versions
811 B
BERT Text Embedding Operator (Pytorch)
Authors: Kyle He
Overview
This operator transforms text into embedding using BERT[1], which stands for Bidirectional Encoder Representations from Transformers.
Interface
__call__(self, text: str)
Args:
- audio_path:
- the text to be embedded
- supported types: str
Returns:
The Operator returns a tuple Tuple[('embs', numpy.ndarray)] containing following fields:
- embs:
- embeddings of the text
- data type:
numpy.ndarray - shape: 768
Requirements
You can get the required python package by requirements.txt.
How it works
The towhee/torch-bert Operator is based on Huggingface[2].
Reference
[1]. https://arxiv.org/pdf/1810.04805.pdf [2]. https://huggingface.co/docs/transformers
811 B
BERT Text Embedding Operator (Pytorch)
Authors: Kyle He
Overview
This operator transforms text into embedding using BERT[1], which stands for Bidirectional Encoder Representations from Transformers.
Interface
__call__(self, text: str)
Args:
- audio_path:
- the text to be embedded
- supported types: str
Returns:
The Operator returns a tuple Tuple[('embs', numpy.ndarray)] containing following fields:
- embs:
- embeddings of the text
- data type:
numpy.ndarray - shape: 768
Requirements
You can get the required python package by requirements.txt.
How it works
The towhee/torch-bert Operator is based on Huggingface[2].
Reference
[1]. https://arxiv.org/pdf/1810.04805.pdf [2]. https://huggingface.co/docs/transformers