Feature Extraction
MLX
Safetensors
Transformers
sentence-transformers
qwen3
text-generation
sentence-similarity
text-embeddings-inference
4-bit precision
Instructions to use mlx-community/Qwen3-Embedding-4B-4bit-DWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Qwen3-Embedding-4B-4bit-DWQ with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download mlx-community/Qwen3-Embedding-4B-4bit-DWQ --local-dir Qwen3-Embedding-4B-4bit-DWQ
- Transformers
How to use mlx-community/Qwen3-Embedding-4B-4bit-DWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="mlx-community/Qwen3-Embedding-4B-4bit-DWQ")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mlx-community/Qwen3-Embedding-4B-4bit-DWQ") model = AutoModelForCausalLM.from_pretrained("mlx-community/Qwen3-Embedding-4B-4bit-DWQ", device_map="auto") - sentence-transformers
How to use mlx-community/Qwen3-Embedding-4B-4bit-DWQ with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mlx-community/Qwen3-Embedding-4B-4bit-DWQ") 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] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Download special_tokens_map.json from mlx-community/Qwen3-Embedding-4B-4bit-DWQ: direct link, hf CLI and curl.
- Browser
- Download file 613 Bytes
-
https://huggingface.co/mlx-community/Qwen3-Embedding-4B-4bit-DWQ/resolve/main/special_tokens_map.json
- Command line
-
hf download hf://mlx-community/Qwen3-Embedding-4B-4bit-DWQ/special_tokens_map.json
-
curl -L -o special_tokens_map.json https://huggingface.co/mlx-community/Qwen3-Embedding-4B-4bit-DWQ/resolve/main/special_tokens_map.json
613 Bytes
| { | |
| "additional_special_tokens": [ | |
| "<|im_start|>", | |
| "<|im_end|>", | |
| "<|object_ref_start|>", | |
| "<|object_ref_end|>", | |
| "<|box_start|>", | |
| "<|box_end|>", | |
| "<|quad_start|>", | |
| "<|quad_end|>", | |
| "<|vision_start|>", | |
| "<|vision_end|>", | |
| "<|vision_pad|>", | |
| "<|image_pad|>", | |
| "<|video_pad|>" | |
| ], | |
| "eos_token": { | |
| "content": "<|im_end|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "pad_token": { | |
| "content": "<|endoftext|>", | |
| "lstrip": false, | |
| "normalized": false, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |