Model reference · open weights
gte-Qwen2 is an open-weight embedding model from Alibaba-NLP, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.
About
gte-Qwen2-1.5B-instruct gte-Qwen2-1.5B-instruct is the latest model in the gte (General Text Embedding) model family. The model is built on Qwen2-1.5B LLM model and use the same training data and strategies as the gte-Qwen2-7B-instruct model. The model incorporates several key advancements: - Integration of bidirectional attention mechanisms, enriching its contextual understanding. - Instruction tuning, applied solely on the query side for streamlined efficiency - Comprehensive training across a vast, multilingual text corpus spanning diverse domains and scenarios. This training leverages both weakly supervised and supervised data, ensuring the model's applicability across numerous languages and a wide array of downstream tasks. Model Information - Model Size: 1.5B - Embedding Dimension: 1536 - Max Input Tokens: 32k Requirements Usage Sentence Transformers Observe the configsentencetransformers.json to see all pre-built prompt names. Otherwise, you can use model.encode(queries, prompt="Instruct: ...\nQuery: " to use a custom prompt of your choice. Transformers infinityemb Usage via infinity, MIT Licensed. Evaluation MTEB & C-MTEB You can use the scripts/evalmteb.py to reproduce the following result of gte-Qwen2-1.5B-instruct on MTEB(English)/C-MTEB(Chinese): GTE Models The gte series models have consistently released two types of models: encoder-only models (based on the BERT architecture) and decode-only models (based on the LLM architecture). Cloud API Services In addition to the open-source GTE series models, GTE series models are also available as commercial API services on Alibaba Cloud. - Embedding Models: Three versions of the text embedding models are available: text-embedding-v1/v2/v3, with v3 being the latest API service. - ReRank Models: The gte-rerank model service is available. Note that the models behind the commercial APIs are not entirely identical to the open-source models. Community support Fine-tuning GTE models can be fine-tuned with a third party framework SWIFT. Citation If you find our paper or models helpful, please consider cite:
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | Alibaba-NLP |
|---|---|
| Type | Embedding models |
| Parameters (lead) | 1.8B |
| Context | 128k tokens |
| Variants | 2 |
| Runs with | sentence-transformers |
| Released | 2024-06-29 |
| Popularity | 883k downloads / month |
| Likes | 483 |
| Licence | Open weights |
How it works
Variants
Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Classification | MTEB AmazonCounterfactualClassification (en) | accuracy | 83.985 |
| Classification | MTEB AmazonCounterfactualClassification (en) | ap | 50.93 |
| Classification | MTEB AmazonCounterfactualClassification (en) | f1 | 78.504 |
| Classification | MTEB AmazonPolarityClassification | accuracy | 96.611 |
| Classification | MTEB AmazonPolarityClassification | ap | 94.892 |
| Classification | MTEB AmazonPolarityClassification | f1 | 96.609 |
| Classification | MTEB AmazonReviewsClassification (en) | accuracy | 55.614 |
| Classification | MTEB AmazonReviewsClassification (en) | f1 | 54.906 |
| Retrieval | MTEB ArguAna | map_at_1 | 45.164 |
| Retrieval | MTEB ArguAna | map_at_10 | 61.519 |
| Retrieval | MTEB ArguAna | map_at_100 | 61.769 |
| Retrieval | MTEB ArguAna | map_at_1000 | 61.769 |
| Retrieval | MTEB ArguAna | map_at_3 | 57.444 |
| Retrieval | MTEB ArguAna | map_at_5 | 60.058 |
| Retrieval | MTEB ArguAna | mrr_at_1 | 46.088 |
| Retrieval | MTEB ArguAna | mrr_at_10 | 61.861 |
| Retrieval | MTEB ArguAna | mrr_at_100 | 62.118 |
| Retrieval | MTEB ArguAna | mrr_at_1000 | 62.118 |
| Retrieval | MTEB ArguAna | mrr_at_3 | 57.729 |
| Retrieval | MTEB ArguAna | mrr_at_5 | 60.392 |
| Retrieval | MTEB ArguAna | ndcg_at_1 | 45.164 |
| Retrieval | MTEB ArguAna | ndcg_at_10 | 69.72 |
| Retrieval | MTEB ArguAna | ndcg_at_100 | 70.719 |
| Retrieval | MTEB ArguAna | ndcg_at_1000 | 70.719 |
Using it via the API
Once AxForge deploys gte-qwen2 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (gte-qwen2 below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gte-qwen2","input":"text to embed"}'
Licence
Open weights under apache-2.0 — commercial use is permitted. Deploy it on AxForge EU hardware on request. Read the licence ↗
Explore