DEV.co
Open-Source LLM · Alibaba-NLP

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.

Source: HuggingFace — huggingface.co/Alibaba-NLP/gte-Qwen2-1.5B-instruct
1.8B
Parameters
apache-2.0
License (OSI-approved)
Unknown
Context (tokens)
892.8k
Downloads (30d)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
DeveloperAlibaba-NLP
Parameters1.8B
Context windowUnknown
Licenseapache-2.0 — OSI-approved
Modality / tasksentence-similarity
Gated on HuggingFaceNo
Downloads892.8k
Likes236
Last updated2025-05-28
SourceAlibaba-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.

Quickstart

Run gte-Qwen2-1.5B-instruct locally

Load the open weights with 🤗 Transformers and generate — the same model, self-hosted.

quickstart.pypython
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.

Deployment

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

Self-hosted RAG & semantic search

Embeds documents and queries without external API calls. 1.5B footprint fits on modest GPUs/CPUs. Instruction support enables domain-specific retrieval tasks (legal, medical, e-commerce).

Multilingual document clustering and deduplication

Proven performance on English (67.16 MTEB), Chinese (67.65 C-MTEB), French (66.60), Polish (64.04). Use normalized embeddings for k-means, hierarchical clustering, or duplicate detection across mixed-language corpora.

Cost-efficient batch embedding pipeline

1.5B model size requires ~2.5 GB RAM (fp32) or ~1.3 GB (fp16). Batch embedding of large document collections on single GPU/CPU without container overhead. Suitable for startup/SMB resource constraints.

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.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
Yes. Apache 2.0 permits commercial use. Include the Apache 2.0 license and Alibaba-NLP copyright in your distribution. Alibaba-NLP provides no warranty or SLA; production readiness is your responsibility.
What GPU do I need to run this?
Any GPU with ~2–3 GB VRAM (RTX 4060, A10, L4, T4 sufficient). CPU inference is possible (no GPU) but 5–50× slower. flash_attn library requires CUDA/GPU for optimal speed.
Does this model support real-time streaming embeddings?
Not explicitly. It is a batch embedding model. Custom streaming wrapper (e.g., via Infinity or TEI) possible but not documented. Latency not benchmarked.
Can I fine-tune this for my domain?
Potentially, via Sentence-Transformers contrastive/triplet loss training. Custom code requirement (trust_remote_code) complicates LoRA. No official fine-tuning guide; plan for R&D.

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.