Instructions to use Qwen/Qwen3-Embedding-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Qwen/Qwen3-Embedding-8B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Qwen/Qwen3-Embedding-8B") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use Qwen/Qwen3-Embedding-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Qwen/Qwen3-Embedding-8B")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Qwen/Qwen3-Embedding-8B", dtype="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
sentence-transformers with 8B
when used with sentence-transformers, it recreates the embeddings model with mean pooling.
It is supposed EOS , right ?
see message "no sentence-transformers model found with name Qwen/Qwen3-Embedding-8B. Creating a new one with mean pooling."
This model uses the last token for its embedding representation.
I guess you need to redownload the model again, it seems like you missed the file 1_Pooling/config.json.
Or update sentence-transformers.
when used with sentence-transformers, it recreates the embeddings model with mean pooling.
It is supposed EOS , right ?see message "no sentence-transformers model found with name Qwen/Qwen3-Embedding-8B. Creating a new one with mean pooling."
You should make your code public; otherwise, it will be impossible to locate the problem.