Text Ranking
Transformers
Safetensors
sentence-transformers
MLX
qwen2
text-generation
mlx-my-repo
text-embeddings-inference
4-bit precision
Run this model with HF Jobs
Run nisavid/mxbai-rerank-large-v2-mlx-4bit on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/nisavid/mxbai-rerank-large-v2-mlx-4bit. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/nisavid/mxbai-rerank-large-v2-mlx-4bit on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use nisavid/mxbai-rerank-large-v2-mlx-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nisavid/mxbai-rerank-large-v2-mlx-4bit with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nisavid/mxbai-rerank-large-v2-mlx-4bit") model = AutoModelForCausalLM.from_pretrained("nisavid/mxbai-rerank-large-v2-mlx-4bit", device_map="auto") - sentence-transformers
How to use nisavid/mxbai-rerank-large-v2-mlx-4bit with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("nisavid/mxbai-rerank-large-v2-mlx-4bit") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - MLX
How to use nisavid/mxbai-rerank-large-v2-mlx-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download nisavid/mxbai-rerank-large-v2-mlx-4bit --local-dir mxbai-rerank-large-v2-mlx-4bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
nisavid/mxbai-rerank-large-v2-mlx-4Bit
The Model nisavid/mxbai-rerank-large-v2-mlx-4Bit was converted to MLX format from mixedbread-ai/mxbai-rerank-large-v2 using mlx-lm version 0.31.2.
Use with mlx
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("nisavid/mxbai-rerank-large-v2-mlx-4Bit")
prompt="hello"
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
response = generate(model, tokenizer, prompt=prompt, verbose=True)
- Downloads last month
- 97
Model size
2B params
Tensor type
U32
·
BF16 ·
Hardware compatibility
Log In to add your hardware
4-bit
Model tree for nisavid/mxbai-rerank-large-v2-mlx-4bit
Base model
mixedbread-ai/mxbai-rerank-large-v2