Model reference · open weights
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 by | Kingsoft-LLM |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 7.1B |
| Context | 32k tokens |
| Runs with | sentence-transformers |
| Released | 2025-08-01 |
| Popularity | 1k downloads / month |
| Licence | Open weights |
About
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:
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.
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).
For the Qwen base model, we implemented the following modifications:
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.
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.
Details can be found on our GitHub.
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.
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)
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 GFrom the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
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.