ONNX Model Zoo

AleksanderObuchowski/medembed-small-onnx

By AleksanderObuchowski · ↓ 0 · ♥ 0 · Updated 2025-07-30

What's in this repo

This page lists the files in AleksanderObuchowski/medembed-small-onnx, including model.onnx, model_quantized.onnx and more.

  • 4 ONNX models (.onnx files)
  • 13 files, including 6 .json, 4 .onnx, 1 .md, 1 .txt
  • Last updated 2025-07-30

ONNX files

File Size Download
model.onnx — Download
model_quantized.onnx — Download
onnx/model.onnx — Download
onnx/model_quantized.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

AleksanderObuchowski/medembed-small-onnx

This is an ONNX export of abhinand/MedEmbed-small-v0.1 optimized for use with transformers.js.

Model Description

This model is a medical text embedding model that has been converted to ONNX format for efficient inference in web browsers and edge devices. It includes both regular and quantized versions for different performance requirements.

Files

  • model.onnx - Full precision ONNX model
  • model_quantized.onnx - Quantized ONNX model (recommended for web deployment)
  • tokenizer.json - Tokenizer configuration
  • config.json - Model configuration
  • Other tokenizer files for full compatibility

Usage

With transformers.js

import { pipeline } from '@xenova/transformers';

// Load the model (quantized version for better performance)
const extractor = await pipeline('feature-extraction', 'AleksanderObuchowski/medembed-small-onnx', {
  quantized: true
});

// Generate embeddings
const text = "This patient shows symptoms of diabetes.";
const embeddings = await extractor(text, { pooling: 'mean', normalize: true });
console.log(embeddings);

With Python (ONNX Runtime)

import onnxruntime as ort
from transformers import AutoTokenizer
import numpy as np

# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained('AleksanderObuchowski/medembed-small-onnx')
session = ort.InferenceSession('model_quantized.onnx')

# Tokenize input
text = "This patient shows symptoms of diabetes."
inputs = tokenizer(text, return_tensors="np")

# Run inference
outputs = session.run(None, dict(inputs))
embeddings = outputs[0]

Performance

The quantized model offers:

  • Reduced file size (typically 50-75% smaller)
  • Faster inference on CPU
  • Lower memory usage
  • Maintained accuracy for most use cases

Original Model

This model is based on abhinand/MedEmbed-small-v0.1, which is designed for medical text embeddings.

License

This model follows the same license as the original model. Please check the original model's license for details.

Model info

feature-extraction transformers.js
transformers.js onnx bert feature-extraction embeddings medical sentence-transformers license:apache-2.0 text-embeddings-inference endpoints_compatible region:us
↓ 0 ♥ 0

Created: 2025-07-30

Updated: 2025-07-30

View on Hugging Face

Files (13)

.gitattributes
README.md
config.json
model.onnx ONNX
model_quantized.onnx ONNX
onnx/model.onnx ONNX
onnx/model_quantized.onnx ONNX
onnx/ort_config.json
ort_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt

Related models