inference4j/ms-marco-MiniLM-L-6-v2
By inference4j · ↓ 0 · ♥ 0 · Updated 2026-02-13
What's in this repo
This page lists the files in inference4j/ms-marco-MiniLM-L-6-v2, including model.onnx.
- 1 ONNX models (.onnx files)
- 4 files, including 1 .md, 1 .onnx, 1 .txt
- Last updated 2026-02-13
ONNX files
| File | Size | Download |
|---|---|---|
| model.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
ms-marco-MiniLM-L-6-v2 (Cross-Encoder) — ONNX
ONNX export of ms-marco-MiniLM-L-6-v2, a cross-encoder model trained on MS MARCO passage ranking data. Scores query-document pairs for search result reranking.
Mirrored for use with inference4j, an inference-only AI library for Java.
Original Source
- Repository: Xenova (originally cross-encoder by sentence-transformers)
- License: apache-2.0
Usage with inference4j
try (MiniLMReranker reranker = MiniLMReranker.fromPretrained("models/ms-marco-MiniLM-L-6-v2")) {
float score = reranker.score("What is Java?", "Java is a programming language.");
System.out.printf("Relevance score: %.4f%n", score);
}
Model Details
| Property | Value |
|---|---|
| Architecture | MiniLM-L6 cross-encoder (6 layers, 384 hidden) |
| Task | Query-document relevance scoring / search reranking |
| Training data | MS MARCO passage ranking |
| Max sequence length | 512 |
| Output | Single relevance score per query-document pair |
| Original framework | PyTorch (sentence-transformers cross-encoder) |
| ONNX export | By Xenova (Transformers.js) |
License
This model is licensed under the Apache License 2.0. Original model by sentence-transformers, ONNX export by Xenova.
Model info
Created: 2026-02-13
Updated: 2026-02-13
View on Hugging Face