metadata
license: apache-2.0
base_model:
- Qwen/Qwen3-4B-Base
library_name: transformers
pipeline_tag: text-ranking
tags:
- mlx
mlx-community/Qwen3-Reranker-4B-mxfp8
The Model mlx-community/Qwen3-Reranker-4B-mxfp8 was converted to MLX format from Qwen/Qwen3-Reranker-4B using mlx-embeddings 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/Qwen3-Reranker-4B-mxfp8")
# 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)