How to change the output embedding dimensions?

#6
by ly400929 - opened

When I use vllm to run the model and want to set the output dimension to 256, an error occurs:
vllm_code.jpg

vllm_error.jpg

deleted

Use truncate_dim=x when creating the model:

model = SentenceTransformer("Qwen/Qwen3-Embedding-0.6B", truncate_dim=512)

The is_matryoshka parameter is missing from config.json. You need to start vllm with hf_overrides={"is_matryoshka": True}.
Reference: vLLM docs

Sign up or log in to comment