⚡ Запустить в Basalt v0.11.0 · bas-alt.vercel.app (macOS 27+ · Swift 6.4 · Apple Silicon, без Python) · Upstream source:
mlx-community/bge-small-en-v1.5-bf16:basalt serve --model goodmai/gemma-4-12B-it-qat-4bit --embedding-model goodmai/bge-small-en-v1.5-bf16 --rest
mlx-community/bge-small-en-v1.5-bf16
The Model mlx-community/bge-small-en-v1.5-bf16 was converted to MLX format from BAAI/bge-small-en-v1.5 using mlx-lm version 0.0.3.
Use with mlx
pip install mlx-embeddings
from mlx_embeddings import load, generate
import mlx.core as mx
model, tokenizer = load("mlx-community/bge-small-en-v1.5-bf16")
# For text embeddings
output = generate(model, processor, texts=["I like grapes", "I like fruits"])
embeddings = output.text_embeds # Normalized embeddings
# Compute dot product between normalized embeddings
similarity_matrix = mx.matmul(embeddings, embeddings.T)
print("Similarity matrix between texts:")
print(similarity_matrix)