Qwen3 Embedding 4B
Deploy Qwen3 Embedding 4B on a dedicated GPU from $0.20 per hour, billed per minute, on 1× RTX A4000. A 4B multilingual embedding model with 32K context, instruction-aware retrieval and configurable vectors from 32 to 2560 dimensions.
HexGrid Cloud price
$0.20/hr
1× RTX A4000
Context
32K
tokens
Dimensions
2560
maximum
Parameters
4B
dense
Running Qwen3 Embedding 4B on HexGrid Cloud
What you get when you deploy with us, beyond the hourly rate.
Single tenant by default
The model runs on a GPU that is yours for the life of the instance. No shared endpoint, no queue behind other tenants.
Per-minute billing
You pay for the GPU, not the token. Stop the instance and billing stops with it.
OpenAI-compatible endpoint
Point an existing SDK at your instance by changing the base URL. No rewrite required.
Your weights, your data
Prompts and outputs stay inside your instance. Nothing is logged, sampled or used for training.
Qwen3 Embedding 4B GPU sizing and cost
What the model needs at each precision, and the cheapest HexGrid Cloud configuration that holds it.
| Precision | vRAM needed | Runs on | Price |
|---|---|---|---|
BF16 Recommended | 10 GB | 1× RTX A4000 | $0.20/hr |
FP8 | 5 GB | 1× RTX A4000 | $0.20/hr |
INT4 | 3 GB | 1× RTX A4000 | $0.20/hr |
No standardized production throughput figures are published by Qwen for this model. Benchmark on the exact HexGrid GPU and serving configuration before filling these fields. Input sequence length and batching materially affect embeddings throughput.
About Qwen3 Embedding 4B
What Qwen3 Embedding 4B is built for, and where it falls short.
Qwen3-Embedding-4B is the middle-sized dense embedding model in the Qwen3 Embedding family. It uses a dual-encoder architecture and derives its semantic representation from the final EOS-token hidden state.
It supports sequences up to 32K tokens and more than 100 languages, including programming languages. Retrieval queries can include task-specific instructions to make the intended notion of relevance explicit.
The model produces vectors up to 2560 dimensions and supports Matryoshka Representation Learning, allowing deployments to request smaller output dimensions when index size or search cost matters.
What people run it for
Vector search
Create semantic vector indexes for websites, internal documentation, support content or knowledge bases.
RAG pipelines
Use as the first-stage retriever and optionally combine it with Qwen3-Reranker-4B for higher-precision candidate ordering.
Multilingual search
Represent queries and documents from multilingual or cross-language collections in a shared semantic space.
Clustering and classification
Use dense semantic representations as features for downstream grouping, similarity and classification workloads.
Strengths
- Strong published multilingual and English embedding scores at half the parameter count of the 8B checkpoint
- 32K sequence length for long-document embedding workloads
- Matryoshka output from 32 through 2560 dimensions
- Instruction-aware query encoding for retrieval-specific behavior
- More than 100 supported languages plus code-oriented retrieval
- Supported by common embedding stacks including Sentence Transformers and vLLM
Limitations
- Still significantly heavier than small embedding models designed primarily for high-throughput indexing
- Using the full 2560-dimensional vector increases vector-database storage and memory relative to reduced dimensions
- Qwen reports a roughly 1-5% retrieval-performance drop in many scenarios when query instructions are omitted
- Smaller Matryoshka dimensions should be evaluated before production because retrieval quality can vary with dimension
- Independent query/document embeddings cannot reproduce the full pairwise interaction available from a cross-encoder reranker
Quickstart
Call Qwen3-Embedding-4B through HexGrid's OpenAI-compatible embeddings API.
from openai import OpenAI
client = OpenAI(
base_url='https://<your-endpoint>/v1',
api_key='<your-key>'
)
response = client.embeddings.create(
model='Qwen/Qwen3-Embedding-4B',
input='Instruct: Given a web search query, retrieve relevant passages that answer the query\nQuery: Explain semantic search',
dimensions=1024
)
embedding = response.data[0].embedding
print(len(embedding))The HexGrid Qwen3 Embeddings endpoint supports the dimensions field. Retrieval documents should normally be embedded without the query-side instruction.
Qwen3 Embedding 4B reported benchmarks
Scores published by the model authors. A starting point, not a guarantee on your own data.
- MTEB Multilingual Mean(Task)69.45
- MTEB English v2 Mean(Task)74.6
- C-MTEB Mean(Task)72.27
- MTEB Multilingual Retrieval69.6
Qwen3 Embedding 4B specifications
Architecture and serving details for Qwen3 Embedding 4B.
Architecture
- Type
- Dense dual-encoder embedding model
- Backbone
- Qwen3
- Layers
- 36
- Hidden size
- 2560
- Attention
- GQA, 32 attention heads / 8 KV heads
- Pooling
- Final EOS-token hidden state
- Native precision
- BF16
Embeddings
- Context
- 32K tokens
- Maximum dimension
- 2560
- Configurable dimensions
- 32-2560
- MRL
- Yes
- Instruction aware
- Yes
- Languages
- 100+
Serving
- HexGrid endpoint
- POST /v1/embeddings
- Runtime
- vLLM
- Sentence Transformers
- Supported
- Transformers
- >= 4.51.0
- vLLM
- >= 0.8.5 in Qwen examples
- TEI
- Supported
Qwen3 Embedding 4B frequently asked questions
Common questions about deploying Qwen3 Embedding 4B on HexGrid Cloud.
What is the default embedding size?
The model's maximum embedding dimension is 2560. Because it supports Matryoshka Representation Learning, applications can request smaller vectors down to 32 dimensions.
Should queries use an instruction?
Yes for retrieval-oriented queries. Qwen recommends a one-sentence task instruction and reports that omitting it can reduce retrieval performance by roughly 1-5% in many tested scenarios.
Do documents use the same instruction?
Qwen's retrieval examples add the instruction on the query side and embed retrieval documents as their raw text.
Can HexGrid return 1024-dimensional vectors from this model?
Yes. HexGrid documents a dimensions parameter for Qwen3 Embedding deployments. 1024 is within Qwen3-Embedding-4B's supported range.
Can I use it commercially?
Yes. Qwen released the Qwen3 Embedding series under Apache 2.0.
Deploy Qwen3 Embedding 4B today
$0.20 per hour on 1× RTX A4000, billed per minute, never shared.