More details about the infinity inference project please refer to the Github:
Infinity
.
Usage for Embedding Model via infinity in Python
To deploy files with the
infinity_emb
pip package.
Recommended is
device="cuda", engine="torch"
with flash attention on gpu, and
device="cpu", engine="optimum"
for onnx inference.
import asyncio
from infinity_emb import AsyncEmbeddingEngine, EngineArgs
sentences = ["Embed this is sentence via Infinity.", "Paris is in France."]
engine = AsyncEmbeddingEngine.from_args(
EngineArgs(
model_name_or_path = "michaelfeil/bge-small-en-v1.5",
device="cuda",
# or device="cpu"
engine="torch",
# or engine="optimum"compile=True# enable torch.compile
))
asyncdefmain():
asyncwith engine:
embeddings, usage = await engine.embed(sentences=sentences)
asyncio.run(main())
If you have any question or suggestion related to this project, feel free to open an issue or pull request.
You also can email Michael Feil (infinity at michaelfeil.eu).
Citation
If you find this repository useful, please consider giving a star :star: and citation
@software{Feil_Infinity_2023,
author = {Feil, Michael},
month = oct,
title = {{Infinity - To Embeddings and Beyond}},
url = {https://github.com/michaelfeil/infinity},
year = {2023}
}
bge-small-en-v1.5 huggingface.co is an AI model on huggingface.co that provides bge-small-en-v1.5's model effect (), which can be used instantly with this michaelfeil bge-small-en-v1.5 model. huggingface.co supports a free trial of the bge-small-en-v1.5 model, and also provides paid use of the bge-small-en-v1.5. Support call bge-small-en-v1.5 model through api, including Node.js, Python, http.
bge-small-en-v1.5 huggingface.co is an online trial and call api platform, which integrates bge-small-en-v1.5's modeling effects, including api services, and provides a free online trial of bge-small-en-v1.5, you can try bge-small-en-v1.5 online for free by clicking the link below.
michaelfeil bge-small-en-v1.5 online free url in huggingface.co:
bge-small-en-v1.5 is an open source model from GitHub that offers a free installation service, and any user can find bge-small-en-v1.5 on GitHub to install. At the same time, huggingface.co provides the effect of bge-small-en-v1.5 install, users can directly use bge-small-en-v1.5 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.