Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

mlx-community
/
Qwen3-Embedding-4B-4bit-DWQ

Feature Extraction
MLX
Safetensors
Transformers
sentence-transformers
qwen3
text-generation
sentence-similarity
text-embeddings-inference
4-bit precision
Model card Files Files and versions
xet
Community
3

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")
  • 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
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Model quantization config error when requesting via curl

#3 opened 7 months ago by
estefanotuyama
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs