ONNX 模型库
返回模型

说明文档

onnx-models/all-distilroberta-v1-onnx

这是 sentence-transformers/all-distilroberta-v1 的 ONNX 移植版本,用于生成文本嵌入。

模型详情

  • 嵌入维度:768
  • 最大序列长度:512
  • 磁盘文件大小:0.30 GB
  • ONNX 中包含的模块:Transformer、Pooling、Normalize

<!--- Describe your model here -->

使用方法

安装 light-embed 后,使用此模型将变得非常简单:

pip install -U light-embed

然后你可以通过指定原始模型名称来使用该模型:

from light_embed import TextEmbedding
sentences = [
	\"This is an example sentence\",
	\"Each sentence is converted\"
]

model = TextEmbedding('sentence-transformers/all-distilroberta-v1')
embeddings = model.encode(sentences)
print(embeddings)

或者通过指定ONNX 模型名称来使用:

from light_embed import TextEmbedding
sentences = [
	\"This is an example sentence\",
	\"Each sentence is converted\"
]

model = TextEmbedding('onnx-models/all-distilroberta-v1-onnx')
embeddings = model.encode(sentences)
print(embeddings)

引用与作者

Binh Nguyen / binhcode25@gmail.com

onnx-models/all-distilroberta-v1-onnx

作者 onnx-models

sentence-similarity light-embed
↓ 1 ♥ 0

创建时间: 2024-07-27 18:06:31+00:00

更新时间: 2024-07-27 18:08:59+00:00

在 Hugging Face 上查看

文件 (9)

.gitattributes
README.md
config.json
merges.txt
model.onnx ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json