inference4j/all-MiniLM-L12-v2
By inference4j · ↓ 0 · ♥ 0 · Updated 2026-02-13
What's in this repo
This page lists the files in inference4j/all-MiniLM-L12-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
all-MiniLM-L12-v2 — ONNX
ONNX export of all-MiniLM-L12-v2, a sentence-transformers model that maps sentences to a 384-dimensional dense vector space. Deeper variant (12 layers) of MiniLM with slightly better quality at the cost of speed.
Mirrored for use with inference4j, an inference-only AI library for Java.
Original Source
- Repository: sentence-transformers
- License: apache-2.0
Usage with inference4j
try (SentenceTransformer model = SentenceTransformer.fromPretrained("models/all-MiniLM-L12-v2")) {
float[] embedding = model.encode("Hello, world!");
System.out.println("Dimension: " + embedding.length); // 384
}
Model Details
| Property | Value |
|---|---|
| Architecture | MiniLM-L12 (12 layers, 384 hidden) |
| Task | Sentence embeddings / semantic similarity |
| Output dimension | 384 |
| Max sequence length | 256 |
| Training data | 1B+ sentence pairs |
| Original framework | PyTorch (sentence-transformers) |
License
This model is licensed under the Apache License 2.0. Original model by sentence-transformers.
Model info
Created: 2026-02-13
Updated: 2026-02-13
View on Hugging Face