/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
7,1 млрд
Размер весов
14,1 ГБ
Лицензия
Apache 2.0
Архитектура
qwen2 · dense
Библиотека
sentence-transformers
Опубликована
1 авг 2025

QZhou-Embedding

ЭмбеддингиТекст → embedding9 профессий

QZhou-Embedding — модель на базе Qwen2.5-7B-Instruct для создания текстовых эмбеддингов, поиска и оценки сходства предложений.

3 379скачиваний за 30 дней31лайквеса обновлены10 мар 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки14

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

  • MassiveIntentClassification

    main_score

    Результат

    0,4268

    Общий результат 0,737Общий результат 0,7341Общий результат 0,6388
    MTEB

    Публичная таблицадругая ревизия

  • MassiveScenarioClassification

    main_score

    Результат

    0,7478

    Общий результат 0,8711Общий результат 0,867Общий результат 0,8543
    MTEB

    Публичная таблицадругая ревизия

  • STS22.v2

    main_score

    Результат

    0,7984

    Общий результат 0,7376
    MTEB

    Публичная таблицадругая ревизия

  • ImdbClassification

    main_score

    Результат

    0,9636

    MTEB

    Публичная таблицадругая ревизия

  • STS17

    main_score

    Результат

    0,9075

    Общий результат 0,9213Общий результат 0,8434
    MTEB

    Публичная таблицадругая ревизия

  • BIOSSES

    main_score

    Результат

    0,9303

    MTEB

    Публичная таблицадругая ревизия

  • SummEvalSummarization.v2

    main_score

    Результат

    0,3305

    MTEB

    Публичная таблицадругая ревизия

  • MedicalRetrieval

    main_score

    Результат

    0,728

    MTEB

    Публичная таблицадругая ревизия

  • IFlyTek

    main_score

    Результат

    0,5799

    MTEB

    Публичная таблицадругая ревизия

  • Touche2020Retrieval.v3

    main_score

    Результат

    0,501

    MTEB

    Публичная таблицадругая ревизия

  • MTOPDomainClassification

    main_score

    Результат

    0,9838

    Общий результат 0,9872
    MTEB

    Публичная таблицадругая ревизия

  • AmazonCounterfactualClassification

    main_score

    Результат

    0,9562

    Общий результат 0,9409
    MTEB

    Публичная таблицадругая ревизия

  • AskUbuntuDupQuestions

    main_score

    Результат

    0,6916

    MTEB

    Публичная таблицадругая ревизия

  • Waimai

    main_score

    Результат

    0,9231

    MTEB

    Публичная таблицадругая ревизия

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

QZhou-Embedding (Qingzhou Embedding) — плотная модель контекстных текстовых эмбеддингов, разработанная на основе Qwen2.5-7B-Instruct. Разработчики изменили причинное внимание на двунаправленное и построили архитектуру QZhouModel на базе Qwen2Model. Модель содержит 7,1 млрд параметров; метаданные указывают контекст до 32 768 токенов, а README — до 8 тысяч токенов.

Модель предназначена для получения векторных представлений текста, поиска и оценки сходства предложений. Она обучалась в два этапа: сначала для задач поиска, затем для нескольких задач представления текста; разработчики сообщают о высоких результатах на бенчмарках MTEB и CMTEB. Поддерживаются английский и китайский языки. Лицензия — Apache-2.0.

README отмечает, что MRL в этой версии не поддерживается из-за снижения качества. Для воспроизведения результатов и запуска через vLLM важны версии библиотек и параметры среды; обновлённый скрипт для Transformers 5 требует указанного в карточке набора зависимостей.

Сценарии применения

  • поиск релевантных документов по запросу
  • извлечение эмбеддингов предложений для семантического поиска
  • оценка смыслового сходства двух текстов
  • построение поискового ретривера для англоязычных документов
  • построение поискового ретривера для китайскоязычных документов

Ограничения

Модель не поддерживает MRL в этой версии: разработчики отмечают ухудшение качества при его использовании. Результаты могут различаться в зависимости от режима attention и версий библиотек; README описывает разные проверенные конфигурации для воспроизведения бенчмарков и работы с vLLM.

Для каких профессий подходит9

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

QZhou-Embedding

Latest Updates (Updated on March 10, 2026): We have uploaded a new model script file modeling_qzhou_v2.py to support running in the updated transformers version (5.0.0) environment. Model parameters and inference results remain consistent with the original version. To use it, simply rename the file to modeling_qzhou.py and replace the original file. The new version requires the following runtime dependencies:

  • torch: 2.9.1
  • torchvision: 0.24.1
  • transformers: 5.0.0
  • sentence_transformers: 5.1.2
  • vllm: 0.14.1

Due to vLLM's requirement for transformers version 5.0.0 or above to support encoder-based architectures, older framework and engine versions may cause inconsistencies with the tested environment. If you intend to deploy with vLLM, please ensure to use the modified code and dependency environment specified above.

Introduction

We present QZhou-Embedding (called "Qingzhou Embedding"), a general-purpose contextual text embedding model with exceptional text representation capabilities. Built upon the Qwen2.5-7B-Instruct foundation model, we designed a unified multi-task framework and developed a data synthesis pipeline leveraging LLM API, effectively improving the diversity and quality of training data, further enhancing the model's generalization and text representation capabilities. Additionally, we employ a two-stage training strategy, comprising initial retrieval-focused training followed by full-task fine-tuning, enabling the embedding model to extend its capabilities based on robust retrieval performance. Our model achieves state-of-the-art results on the MTEB and CMTEB benchmarks, ranking first on both leaderboards(August 27, 2025).

Basic Features

  • Powerful text embedding capabilities;
  • Long context: up to 8k context length;
  • 7B parameter size

Model Refactoring

For the Qwen base model, we implemented the following modifications:

  1. Replaced causal attention with bidirectional attention and constructed a new QZhouModel module based on Qwen2Model;
  2. Modified the tokenizer's padding_side to "left".

MTEB/CMTEB Results

Usage

Completely replicate the benchmark results

We provide detailed parameters and environment configurations so that you can run results that are completely consistent with the mteb leaderboard on your own machine, including configurations such as environment dependencies and model arguments.

Requirements

  • Python: 3.10.12
  • Sentence Transformers: 3.4.1
  • Transformers: 4.51.1
  • PyTorch: 2.7.1
  • Accelerate: 1.3.0
  • Datasets: 3.2.0
  • Tokenizers: 0.21.2
  • mteb: 1.38.30
  • vllm: 0.10.1.1

Transformers model load arguments

torch_dtype=torch.bfloat16 attn_implementation='sdpa' NOTE: The leaderboard evaluation results were obtained using "sdpa" mode. Other modes ('eager', 'flash_attention_2') may vary in results, but still keep the overall performance consistent.

Instruction Adding Rules

Details can be found on our GitHub.

Evaluation code usage

Find our benchmark evaluation code on GitHub. The mteb benchmark script is run_mteb_all_v2.py, and the cmteb benchmark script is run_cmteb_all.py. Run the following command:

POOLING_MODE=mean
normalize=true
use_instruction=true
export TOKENIZERS_PARALLELISM=true

model_name_or_path=<model dir>

python3 ./run_cmteb_all.py \
    --model_name_or_path ${model_name_or_path}  \
    --pooling_mode ${POOLING_MODE} \
    --normalize ${normalize} \
    --use_instruction ${use_instruction} \
    --output_dir <output dir>

python3 ./run_mteb_all_v2.py \
    --model_name_or_path ${model_name_or_path}  \
    --pooling_mode ${POOLING_MODE} \
    --normalize ${normalize} \
    --use_instruction ${use_instruction} \
    --output_dir <output dir>

The "<>" should be replaced with your actual setting. This is a general script that can be used to evaluate other huggingface embedding models, but you need to ensure that the pooling and other configurations are correct.

Sentence-transformers

from sentence_transformers import SentenceTransformer

model = SentenceTransformer(
    "Kingsoft-LLM/QZhou-Embedding",
    model_kwargs={"device_map": "cuda", "trust_remote_code": True},
    tokenizer_kwargs={"padding_side": "left", "trust_remote_code": True},
    trust_remote_code=True
)

queries = [
    "What is photosynthesis?",
    "Who invented the telephone?",
]
documents = [
    "Photosynthesis is the process by which green plants use sunlight, carbon dioxide, and water to produce glucose and oxygen. This biochemical reaction occurs in chloroplasts.",
    "Alexander Graham Bell is credited with inventing the first practical telephone in 1876, receiving US patent number 174,465 for his device."
]

query_embeddings = model.encode(queries, prompt_name="query", normalize_embeddings=True)
document_embeddings = model.encode(documents, normalize_embeddings=True)

similarity = model.similarity(query_embeddings, document_embeddings)

Huggingface Transformers

import torch
import torch.nn.functional as F

from torch import Tensor
from transformers import AutoTokenizer, AutoModel


def mean_pool(last_hidden_states: Tensor,
                 attention_mask: Tensor) -> Tensor:

    seq_lengths = attention_mask.sum(dim=-1)
    return torch.stack(
                [
                    last_hidden_states[i, -length:, :].sum(dim=0) / length
                    for i, length in enumerate(seq_lengths)
                ],
                dim=0,
            )


def get_detailed_instruct(task_description: str, query: str) -> str:
    return f'Instruct: {task_description}\nQuery:{query}'

task = 'Given a web search query, retrieve relevant passages that answer the query'

queries = [
    get_detailed_instruct(task, 'What is photosynthesis?'),
    get_detailed_instruct(task, 'Who invented the telephone?')
]

documents = [
    "Photosynthesis is the process by which green plants use sunlight, carbon dioxide, and water to produce glucose and oxygen. This biochemical reaction occurs in chloroplasts.",
    "Alexander Graham Bell is credited with inventing the first practical telephone in 1876, receiving US patent number 174,465 for his device."
]

input_texts = queries + documents

tokenizer = AutoTokenizer.from_pretrained('Kingsoft-LLM/QZhou-Embedding', padding_side='left', trust_remote_code=True)
model = AutoModel.from_pretrained('Kingsoft-LLM/QZhou-Embedding', trust_remote_code=True, device_map='cuda')

batch_dict = tokenizer(
    input_texts,
    padding=True,
    truncation=True,
    max_length=8192,
    return_tensors="pt",
)
batch_dict.to(model.device)
outputs = model(**batch_dict)
embeddings = mean_pool(outputs.last_hidden_state, batch_dict['attention_mask'])

embeddings = F.normalize(embeddings, p=2, dim=1)
scores = (embeddings[:2] @ embeddings[2:].T)

vLLM

from vllm import LLM
import torch.nn.functional as F

def get_detailed_instruct(task_description: str, query: str) -> str:
    return f'Instruct: {task_description}\nQuery:{query}'

task = 'Given a web search query, retrieve relevant passages that answer the query'
queries = [
    get_detailed_instruct(task, 'What is photosynthesis?'),
    get_detailed_instruct(task, 'Who invented the telephone?')
]
documents = [
    "Photosynthesis is the process by which green plants use sunlight, carbon dioxide, and water to produce glucose and oxygen. This biochemical reaction occurs in chloroplasts.",
    "Alexander Graham Bell is credited with inventing the first practical telephone in 1876, receiving US patent number 174,465 for his device."
]

input_texts = queries + documents
model = LLM(model="Kingsoft-LLM/QZhou-Embedding")
outputs = model.embed(input_texts)
outputs = [F.normalize(torch.tensor(x.outputs.embedding), p=2, dim=0) for x in outputs]

FAQs

1. Does the model support MRL? The model currently does not support MRL in this release due to observed performance degradation. 2. Why not build upon the Qwen3 series models? Our initial research experiments commenced prior to the release of Qwen3. We retained the original base model throughout the study to maintain our experimental consistency. While we subsequently conducted first-stage (retrieval) training with Qwen3, the performance after 32k steps showed no significant improvement over Qwen2.5, leading to discontinuation of further development with this architecture.

Citation

If you find our work worth citing, please use the following citation: Technical Report:

@misc{yu2025qzhouembeddingtechnicalreport,
      title={QZhou-Embedding Technical Report}, 
      author={Peng Yu and En Xu and Bin Chen and Haibiao Chen and Yinfei Xu},
      year={2025},
      eprint={2508.21632},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2508.21632}, 
}

Qwen2.5-7B-Instruct:

@misc{qwen2.5,
    title = {Qwen2.5: A Party of Foundation Models},
    url = {https://qwenlm.github.io/blog/qwen2.5/},
    author = {Qwen Team},
    month = {September},
    year = {2024}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
QZhouModel
Ревизия весов
9b2eccf

0 моделей