gte-Qwen2-1.5B-instruct
gte-Qwen2-1.5B-instruct is a lightweight, multilingual text embedding model built on Qwen2-1.5B that generates 1536-dimensional embeddings for sentence similarity and retrieval tasks. It handles up to 32k tokens, runs on modest hardware, and delivers competitive MTEB scores (67.16 English, 67.65 Chinese) for its size. Licensed under Apache 2.0, it is open-source and suitable for self-hosted RAG, semantic search, and custom embedding pipelines.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Developer | Alibaba-NLP |
| Parameters | 1.8B |
| Context window | Unknown |
| License | apache-2.0 — OSI-approved |
| Modality / task | sentence-similarity |
| Gated on HuggingFace | No |
| Downloads | 892.8k |
| Likes | 236 |
| Last updated | 2025-05-28 |
| Source | Alibaba-NLP/gte-Qwen2-1.5B-instruct |
What gte-Qwen2-1.5B-instruct is
A 1.5B instruction-tuned encoder-only model (not a generative LLM) based on Qwen2-1.5B, producing 1536-dim normalized embeddings. Uses bidirectional attention, instruction tuning on queries only, and trained on multilingual supervised and weakly-supervised data spanning 56 MTEB tasks and 35 Chinese tasks. Requires transformers≥4.39.2 and flash_attn≥2.5.6. Supports 32k max input tokens (configurable down to 8192). Model size ~1.78B parameters; embedding output is fixed 1536-dim.
Run gte-Qwen2-1.5B-instruct locally
Load the open weights with 🤗 Transformers and generate — the same model, self-hosted.
from transformers import pipelinepipe = pipeline("text-generation", model="Alibaba-NLP/gte-Qwen2-1.5B-instruct")out = pipe("Explain retrieval-augmented generation in one sentence.", max_new_tokens=128)print(out[0]["generated_text"])Swap in vLLM or Ollama for production-grade serving. DEV.co can stand up the inference stack.
How you'd run it
A typical self-hosted path — open weights, an inference server, your application.
DEV.co builds each layer — from GPU infrastructure to the application.
Best use cases
Running & fine-tuning it
ESTIMATE: ~2.5 GB RAM (fp32), ~1.3 GB (fp16/bfloat16). Single GPU (e.g., NVIDIA A10, RTX 4060, L4) sufficient. CPU inference possible but slow. flash_attn≥2.5.6 required (GPU only); CPU can use standard attention. Batch size 16–64 typical depending on context length and GPU memory.
Card does not document fine-tuning or LoRA feasibility. Model uses custom_code (trust_remote_code=True), complicating PEFT integration. Sentence-transformers library supports contrastive/triplet loss training, but no explicit guidance for this model. Requires custom training script or community contribution for LoRA/QLoRA. Feasibility: Possible but non-trivial.
When to avoid it — and what to weigh
- Need generative capabilities — This is an encoder-only embedding model, not a text generator. Use gte-Qwen2-7B-instruct or Qwen2-7B directly if you need chat/completion.
- Require out-of-the-box cross-lingual zero-shot transfer — While multilingual, performance on unseen language pairs or low-resource languages is not documented. Card only reports 4 language pairs; model quality on others is Unknown.
- Strict latency SLA under 50ms per query — 1.5B model with flash_attn requirement suggests non-trivial inference latency. No latency benchmarks provided. Requires load-testing for real-time applications.
- Require fine-grained control over embedding layers — Card indicates instruction tuning only on query side; document encoding is fixed. Limited flexibility if asymmetric loss tuning is needed for your domain.
License & commercial use
Apache License 2.0 (OSI-approved permissive license). Permits commercial use, modification, distribution, and private use with attribution and license notice.
Apache 2.0 is a clear, permissive OSI license explicitly permitting commercial use without royalty or restriction. You may use this model in commercial products provided you include the Apache 2.0 license text and copyright notices. No commercial support, warranty, or SLA provided by Alibaba-NLP; review any production deployment needs independently.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
Uses trust_remote_code=True for custom tokenizer/model code; validate source before production. No documented security audit or adversarial robustness testing. Embedding models are generally lower-risk than generative LLMs (no prompt injection), but malicious embeddings could bias downstream search/clustering. Standard SLSA/supply-chain review recommended for enterprise use.
Alternatives to consider
gte-Qwen2-7B-instruct
Same family, 7B size, higher MTEB scores (70.24 EN, 72.05 CN) at cost of 4.7× parameters. Use if compute allows and max performance needed.
bge-small-en-v1.5 (BAAI)
Smaller (~33M params), faster inference, lower MTEB (53–64 range). Suitable if 1.5B is still too large; trade accuracy for speed.
e5-mistral-7b-instruct (Intfloat)
7B generative-based embedder, higher MTEB (66.63 EN, 60.81 CN), Apache 2.0 license. Use if you need both embeddings and light generation, or prefer Mistral base.
Ship gte-Qwen2-1.5B-instruct with senior software developers
Build cost-effective, on-premises semantic search and RAG systems without external embedding APIs. Start with Sentence-Transformers or Infinity server—ready to embed in hours, not weeks.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
gte-Qwen2-1.5B-instruct FAQ
Can I use this model in a commercial product?
What GPU do I need to run this?
Does this model support real-time streaming embeddings?
Can I fine-tune this for my domain?
Custom software development services
Adopting gte-Qwen2-1.5B-instruct is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source llms software in production.
Deploy gte-Qwen2-1.5B-instruct in Production
Build cost-effective, on-premises semantic search and RAG systems without external embedding APIs. Start with Sentence-Transformers or Infinity server—ready to embed in hours, not weeks.