Instructions to use moka-ai/m3e-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use moka-ai/m3e-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("moka-ai/m3e-base") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
请问在CPU上推理有什么加速方案呢
#23
by Ark0810 - opened
目前,8核32G的配置,单条速度约400ms左右,我是转onnx模型后,使用go-onnxruntime库加载的模型
Ark0810 changed discussion title from 在CPU上推理有什么加速方案 to 请问在CPU上推理有什么加速方案呢
我能想到比较简单的实现也是 ONNX ,其他的方法只学习过,没有实践过。