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] huggingface-cli download --local-dir Qwen3-Embedding-4B-4bit-DWQ mlx-community/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")# 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
Update README.md
#1
by kasimolo33 - opened
README.md
CHANGED
|
@@ -8,7 +8,7 @@ tags:
|
|
| 8 |
- feature-extraction
|
| 9 |
- mlx
|
| 10 |
library_name: mlx
|
| 11 |
-
pipeline_tag:
|
| 12 |
---
|
| 13 |
|
| 14 |
# mlx-community/Qwen3-Embedding-4B-4bit-DWQ
|
|
@@ -37,4 +37,4 @@ if tokenizer.chat_template is not None:
|
|
| 37 |
)
|
| 38 |
|
| 39 |
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 40 |
-
```
|
|
|
|
| 8 |
- feature-extraction
|
| 9 |
- mlx
|
| 10 |
library_name: mlx
|
| 11 |
+
pipeline_tag: feature-extraction
|
| 12 |
---
|
| 13 |
|
| 14 |
# mlx-community/Qwen3-Embedding-4B-4bit-DWQ
|
|
|
|
| 37 |
)
|
| 38 |
|
| 39 |
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 40 |
+
```
|