Text Ranking
sentence-transformers
ONNX
Safetensors
GGUF
Transformers.js
English
modernbert
text-classification
reranker
cross-encoder
rag
text-embeddings-inference
feature-extraction
Instructions to use christianengel/rerank-mini-32m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use christianengel/rerank-mini-32m with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("christianengel/rerank-mini-32m") 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) - Transformers.js
How to use christianengel/rerank-mini-32m with Transformers.js:
// npm i @huggingface/transformers import { AutoTokenizer, AutoModelForSequenceClassification } from '@huggingface/transformers'; const tokenizer = await AutoTokenizer.from_pretrained('christianengel/rerank-mini-32m'); const model = await AutoModelForSequenceClassification.from_pretrained('christianengel/rerank-mini-32m'); const query = 'Which planet is known as the Red Planet?'; const documents = [ 'Mars, known for its reddish appearance, is often referred to as the Red Planet.', 'Venus is often called the twin of Earth because of its similar size and proximity.', ]; const inputs = tokenizer(new Array(documents.length).fill(query), { text_pair: documents, padding: true, truncation: true }); const { logits } = await model(inputs); console.log(logits.sigmoid().tolist()); // one relevance score per document - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use christianengel/rerank-mini-32m with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible embeddings server: llama serve -hf christianengel/rerank-mini-32m:F16 --embeddings
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible embeddings server: llama serve -hf christianengel/rerank-mini-32m:F16 --embeddings
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible embeddings server: ./build/bin/llama serve -hf christianengel/rerank-mini-32m:F16 --embeddings
- Llama new
- LM Studio
- Jan
- Ollama
How to use christianengel/rerank-mini-32m with Ollama:
ollama run hf.co/christianengel/rerank-mini-32m:F16
- Unsloth Desktop
- Docker Model Runner
How to use christianengel/rerank-mini-32m with Docker Model Runner:
docker model run hf.co/christianengel/rerank-mini-32m:F16
- Lemonade
How to use christianengel/rerank-mini-32m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull christianengel/rerank-mini-32m:F16
Run and chat with the model
lemonade run user.rerank-mini-32m-F16
List all available models
lemonade list
- Atomic Chat
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!