Model reference · open weights
stella-large-zh is an open-weight embedding model from infgrad. 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 | infgrad |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Context | 1k tokens |
| Runs with | sentence-transformers |
| Released | 2023-10-13 |
| Popularity | 4k downloads / month |
| Licence | Unknown |
About
新闻 | News
[2024-04-06] 开源puff系列模型,专门针对检索和语义匹配任务,更多的考虑泛化性和私有通用测试集效果,向量维度可变,中英双语。
[2024-02-27] 开源stella-mrl-large-zh-v3.5-1792d模型,支持向量可变维度。
[2024-02-17] 开源stella v3系列、dialogue编码模型和相关训练数据。
[2023-10-19] 开源stella-base-en-v2 使用简单,不需要任何前缀文本。
[2023-10-12] 开源stella-base-zh-v2和stella-large-zh-v2, 效果更好且使用简单,不需要任何前缀文本。
[2023-09-11] 开源stella-base-zh和stella-large-zh
欢迎去本人主页查看最新模型,并提出您的宝贵意见!
stella是一个通用的文本编码模型,主要有以下模型:
| Model Name | Model Size (GB) | Dimension | Sequence Length | Language | Need instruction for retrieval? |
|---|---|---|---|---|---|
| stella-base-en-v2 | 0.2 | 768 | 512 | English | No |
| stella-large-zh-v2 | 0.65 | 1024 | 1024 | Chinese | No |
| stella-base-zh-v2 | 0.2 | 768 | 1024 | Chinese | No |
| stella-large-zh | 0.65 | 1024 | 1024 | Chinese | Yes |
| stella-base-zh | 0.2 | 768 | 1024 | Chinese | Yes |
完整的训练思路和训练过程已记录在博客1和博客2,欢迎阅读讨论。
训练数据:
训练方法:
stella-v2在stella模型的基础上,使用了更多的训练数据,同时知识蒸馏等方法去除了前置的instruction(
比如piccolo的查询:, 结果:, e5的query:和passage:)。
初始权重:
stella-base-zh和stella-large-zh分别以piccolo-base-zh[6]和piccolo-large-zh作为基础模型,512-1024的position
embedding使用层次分解位置编码[7]进行初始化。
感谢商汤科技研究院开源的piccolo系列模型。
stella is a general-purpose text encoder, which mainly includes the following models:
| Model Name | Model Size (GB) | Dimension | Sequence Length | Language | Need instruction for retrieval? |
|---|---|---|---|---|---|
| stella-base-en-v2 | 0.2 | 768 | 512 | English | No |
| stella-large-zh-v2 | 0.65 | 1024 | 1024 | Chinese | No |
| stella-base-zh-v2 | 0.2 | 768 | 1024 | Chinese | No |
| stella-large-zh | 0.65 | 1024 | 1024 | Chinese | Yes |
| stella-base-zh | 0.2 | 768 | 1024 | Chinese | Yes |
The training data mainly includes:
The loss functions mainly include:
Model weight initialization:
stella-base-zh and stella-large-zh use piccolo-base-zh and piccolo-large-zh as the base models, respectively, and the
512-1024 position embedding uses the initialization strategy of hierarchical decomposed position encoding.
Training strategy:
One iterator for each type of data, separately calculating the loss.
Based on stella models, stella-v2 use more training data and remove instruction by Knowledge Distillation.
| Model Name | Model Size (GB) | Dimension | Sequence Length | Average (35) | Classification (9) | Clustering (4) | Pair Classification (2) | Reranking (4) | Retrieval (8) | STS (8) |
|---|---|---|---|---|---|---|---|---|---|---|
| stella-large-zh-v2 | 0.65 | 1024 | 1024 | 65.13 | 69.05 | 49.16 | 82.68 | 66.41 | 70.14 | 58.66 |
| stella-base-zh-v2 | 0.2 | 768 | 1024 | 64.36 | 68.29 | 49.4 | 79.95 | 66.1 | 70.08 | 56.92 |
| stella-large-zh | 0.65 | 1024 | 1024 | 64.54 | 67.62 | 48.65 | 78.72 | 65.98 | 71.02 | 58.3 |
| stella-base-zh | 0.2 | 768 | 1024 | 64.16 | 67.77 | 48.7 | 76.09 | 66.95 | 71.07 | 56.54 |
| Model Name | Model Size (GB) | Dimension | Sequence Length | Average (56) | Classification (12) | Clustering (11) | Pair Classification (3) | Reranking (4) | Retrieval (15) | STS (10) | Summarization (1) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| stella-base-en-v2 | 0.2 | 768 | 512 | 62.61 | 75.28 | 44.9 | 86.45 | 58.77 | 50.1 | 83.02 | 32.52 |
C-MTEB:
import torch
import numpy as np
from typing import List
from mteb import MTEB
from sentence_transformers iFrom the published model card. Full card on the HuggingFace links in the sidebar.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| STS | MTEB AFQMC | cos_sim_pearson | 47.344 |
| STS | MTEB AFQMC | cos_sim_spearman | 49.947 |
| STS | MTEB AFQMC | euclidean_pearson | 48.129 |
| STS | MTEB AFQMC | euclidean_spearman | 49.947 |
| STS | MTEB AFQMC | manhattan_pearson | 48.084 |
| STS | MTEB AFQMC | manhattan_spearman | 49.902 |
| STS | MTEB ATEC | cos_sim_pearson | 50.980 |
| STS | MTEB ATEC | cos_sim_spearman | 53.119 |
| STS | MTEB ATEC | euclidean_pearson | 55.126 |
| STS | MTEB ATEC | euclidean_spearman | 53.119 |
| STS | MTEB ATEC | manhattan_pearson | 55.103 |
| STS | MTEB ATEC | manhattan_spearman | 53.113 |
| Classification | MTEB AmazonReviewsClassification (zh) | accuracy | 40.818 |
| Classification | MTEB AmazonReviewsClassification (zh) | f1 | 39.022 |
| STS | MTEB BQ | cos_sim_pearson | 62.835 |
| STS | MTEB BQ | cos_sim_spearman | 65.535 |
| STS | MTEB BQ | euclidean_pearson | 64.082 |
| STS | MTEB BQ | euclidean_spearman | 65.535 |
| STS | MTEB BQ | manhattan_pearson | 64.088 |
| STS | MTEB BQ | manhattan_spearman | 65.549 |
| Clustering | MTEB CLSClusteringP2P | v_measure | 39.954 |
| Clustering | MTEB CLSClusteringS2S | v_measure | 38.185 |
| Reranking | MTEB CMedQAv1 | map | 85.445 |
| Reranking | MTEB CMedQAv1 | mrr | 88.142 |
Using it via the API
Once AxForge deploys stella-large-zh for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (stella-large-zh 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":"stella-large-zh","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.