Embeddings and reranking
MiRMiR discovers the task from the checkpoint structure. A generation model cannot be used as an embedding or sequence-scoring model.
Embeddings
curl http://127.0.0.1:8080/v1/embeddings \
-H 'Content-Type: application/json' \
-d '{
"model": "embedding",
"input": ["first text", "second text"],
"encoding_format": "float"
}'
| Field | Type | Notes |
|---|---|---|
model | string | Loaded embedding model. |
input | string or string[] | One input or an ordered batch. |
dimensions | integer | Optional prefix dimension, capped by the native size. |
prompt_name | string | Optional prompt preset declared by the checkpoint. |
encoding_format | string | Only float is supported. |
The output follows the OpenAI list shape and returns normalized f32 vectors
plus prompt token usage.
Reranking
curl http://127.0.0.1:8080/v1/rerank \
-H 'Content-Type: application/json' \
-d '{
"model": "reranker",
"query": "native inference",
"documents": ["Rust and Metal", "a hosted Python service"],
"return_documents": true
}'
| Field | Type | Notes |
|---|---|---|
model | string | Loaded sequence-scoring model. |
query | string | Required non-empty query. |
documents | string[] | Required non-empty candidate list. |
max_length | integer | Pair token limit, capped by model context. |
raw_scores | boolean | Return logits instead of logistic relevance scores. |
return_documents | boolean | Include each original document in results. |
Results are sorted from highest to lowest relevance while retaining the original document index.