ONNX Model Zoo

inference4j/all-mpnet-base-v2

By inference4j · ↓ 0 · ♥ 0 · Updated 2026-02-13

What's in this repo

This page lists the files in inference4j/all-mpnet-base-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-mpnet-base-v2 — ONNX

ONNX export of all-mpnet-base-v2, the highest-quality sentence-transformers model based on MPNet. Maps sentences to a 768-dimensional dense vector space.

Mirrored for use with inference4j, an inference-only AI library for Java.

Original Source

Usage with inference4j

try (SentenceTransformer model = SentenceTransformer.fromPretrained("models/all-mpnet-base-v2")) {
    float[] embedding = model.encode("Hello, world!");
    System.out.println("Dimension: " + embedding.length); // 768
}

Model Details

Property Value
Architecture MPNet-base (12 layers, 768 hidden)
Task Sentence embeddings / semantic similarity
Output dimension 768
Max sequence length 384
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

onnx sentence-transformers sentence-similarity feature-extraction mpnet inference4j license:apache-2.0 region:us
↓ 0 ♥ 0

Created: 2026-02-13

Updated: 2026-02-13

View on Hugging Face

Files (4)

.gitattributes
README.md
model.onnx ONNX
vocab.txt

Related models