Practical overview
When it fits
Use it when you need a code-based starting point for exporting the transformer portion of a sentence-embedding model and keeping the pooling stage in the inference pipeline.
Who it is for
Developers working with Python, PyTorch and Sentence Transformers who want to explore optimized inference for sentence-embedding models.
Documented uses
- Convert a Sentence Transformers model’s transformer component to ONNX.
- Convert the transformer component to a TensorRT plan.
- Connect transformer outputs and attention masks to a pooling component.
- Compare inference speed using the repository’s example script.
Requirements & limits
The repository is public and lists an MIT license.
- The workflow converts the transformer component rather than exporting the entire Sentence Transformers model directly.
- Pooling remains a distinct step that must be connected to the converted transformer output.
- The README identifies a multilingual MiniLM model as an example but does not specify comprehensive model support or runtime conditions.
- The repository’s speed-test example is not a general performance guarantee.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Connect transformer outputs to the Sentence-Transformers pooling component
Use transformer outputs and the tokenizer attention mask with the model’s pooling component to assemble sentence embeddings.
Before you start
- A Sentence-Transformers model with separate transformer and pooling components.
- A converted transformer model; the README points to 03_sbert2onnx_gpu.ipynb for ONNX conversion.
- Access to the repository’s 06speedtest.py example.
Steps
Run the transformer component to obtain token_embeddings.
Pass token_embeddings and the tokenizer-produced attention_mask to the pooling component.
Consult 06speedtest.py for the repository’s example of using the converted model with pooling.
Expected outcome
A workflow that combines transformer outputs with the pooling component to produce sentence embeddings.
Guide limitations
- The README identifies the inputs and points to an example script but does not provide the full integration code or execution instructions.
- The README does not specify supported model variants, runtime requirements, or measured performance results.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- yuanzhoulvpi2017/quick_sentence_transformers · Official homepage title · retained in its source language

