Downloads · 30 days
6
13% of all-time downloads
wallacemoraes/Qwen3-Embedding-0.6
Qwen3-Embedding-0.6 is a feature extraction model from wallacemoraes. Use it when you need embeddings to search or compare text. The card lists the license as apache-2.0.
This is an INT8 quantized ONNX version of the original model Qwen3-Embedding-0.6B.
Downloads · 30 days
6
13% of all-time downloads
All-time downloads
46
Public
Repo size
612 MB
Likes
0
Public
Click a slice to open those files.
.onnx601 MB · 97%
From the Hugging Face model README
This is an INT8 quantized ONNX version of the original model
Qwen3-Embedding-0.6B.
The model was quantized for CPU inference using ONNX Runtime.
Created with: optimum
Quantization type:
This version significantly reduces:
while maintaining strong embedding quality.
Optimized for:
Tested with:
Example using ONNX Runtime:
import os
import numpy as np
import onnxruntime as ort
from transformers import AutoTokenizer
model_dir = "Qwen3-Embedding-0.6B_int8"
model_path = os.path.join(model_dir, "model_quantized.onnx")
session = ort.InferenceSession(
model_path,
providers=["CPUExecutionProvider"]
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-Embedding-0.6B")
def embed_texts(texts):
inputs = tokenizer(
texts,
padding=True,
truncation=True,
return_tensors="np"
)
_, embeddings = session.run(None, dict(inputs))
return embeddings
# Example documents
documents = [
"A beginner guide to brewing coffee using a pour-over method.",
"How regular exercise improves cardiovascular health.",
"Introduction to graph databases and how they store relationships.",
"Tips for growing tomatoes in small urban gardens.",
"What causes slow startup times on modern laptops."
]
# Generate document embeddings
documents_embeddings = embed_texts(documents)
# Example queries
queries = [
"How do I make good pour-over coffee?",
"Ways to improve heart health with workouts",
"Understanding graph data structures",
"Growing vegetables in limited space",
"Why is my computer slow when starting?"
]
queries_embeddings = embed_texts(queries)
# Similarity via dot product
scores = queries_embeddings @ documents_embeddings.T
top_n = 3
for i, query in enumerate(queries):
query_scores = scores[i]
top_indices = np.argsort(query_scores)[::-1][:top_n]
print(f"\nQuery: {query}")
for idx in top_indices:
score = query_scores[idx]
doc = documents[idx]
print(f"Score: {score:.4f} | Document: {doc}")
This quantized model was benchmarked against the original ONNX export on CPU.
Approximate evaluation setup:
| Model | Total Processing Time |
|---|---|
| Original ONNX | 14m 48.6s |
| INT8 Quantized | 7m 8.1s |
Speedup: ~2.07× faster
The quantized version reduces overall processing time by more than 50% while maintaining useful retrieval performance.