Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taylorai/mlx_embedding_models
run embeddings in MLX
https://github.com/taylorai/mlx_embedding_models
Last synced: about 1 month ago
JSON representation
run embeddings in MLX
- Host: GitHub
- URL: https://github.com/taylorai/mlx_embedding_models
- Owner: taylorai
- License: mit
- Created: 2024-02-10T04:43:22.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-08-04T19:07:20.000Z (6 months ago)
- Last Synced: 2024-09-03T00:04:44.798Z (5 months ago)
- Language: Python
- Size: 120 KB
- Stars: 67
- Watchers: 1
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MLX Embedding Models
Run text embeddings on your Apple Silicon GPU. Supports any BERT- or RoBERTa-based embedding model, with a curated registry of high-performing models that just work off the shelf.Get started by installing from PyPI:
```
pip install mlx-embedding-models
```Then get started in a few lines of code:
```python
from mlx_embedding_models.embedding import EmbeddingModel
model = EmbeddingModel.from_registry("bge-small")
texts = [
"isn't it nice to be inside such a fancy computer",
"the horse raced past the barn fell"
]
embs = model.encode(texts)
print(embs.shape)
# 2, 384
```