Model reference · open weights

QZhou-Embedding

Available as managed deployment Embeddings Kingsoft-LLM Embeddings 1 variants 1k dl/mo

QZhou-Embedding is an open-weight embedding model from Kingsoft-LLM. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released byKingsoft-LLM
TypeEmbedding models
TaskEmbeddings
Parameters (lead)7.1B
Context32k tokens
Runs withsentence-transformers
Released2025-08-01
Popularity1k downloads / month
LicenceOpen weights

About

What QZhou-Embedding is

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.

Read the full model card

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=

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

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

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 G

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys qzhou-embedding for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (qzhou-embedding 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":"qzhou-embedding","input":"text to embed"}'

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms