Huashu Design
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
Turns text in about 100 languages into 1024-number vectors for search, matching and retrieval. A 560M-parameter embedding model from intfloat, built on xlm-roberta-large.
multilingual-e5-large is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download intfloat/multilingual-e5-large
multilingual-e5-large is a text embedding model. It converts a sentence or passage into a list of 1024 numbers, so texts with similar meaning end up close together, even across languages.
It has 24 layers. It starts from xlm-roberta-large and was trained further on a mix of multilingual datasets, and it supports about 100 languages.
Developers and data teams who build multilingual search, question matching or document retrieval and want an open embedding model they can run themselves.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | Search engineers | Embed documents and queries for semantic search | Finding help articles in Chinese from an English question |
| Customer service | Support teams | Match new questions to past answers | Linking a Spanish ticket to an English reply |
| Research | NLP researchers | Use it as a multilingual baseline | Comparing retrieval quality across languages |
| Content | Knowledge-base owners | Index mixed-language documents | One index over English and Chinese notes |
You can skip it if you only need English text, since smaller English-only embedding models exist, or if you need a model that writes text.
It runs in Python with the transformers library, and the page lists it for sentence-transformers.
| Use case | Who | What they get back |
|---|---|---|
| Semantic search | Search engineers | A similarity score between a query and each passage |
| Question matching | Support teams | The closest stored answers to a new question |
| Cross-language lookup | Content teams | Matches that work when query and passage differ in language |
You need Python and a few libraries. The card's own script uses PyTorch and transformers, and the weights come down from Hugging Face the first time you load them.
pip install -U huggingface_hub hf download intfloat/multilingual-e5-large
Start each input with the word query and a colon, or the word passage and a colon, even for non-English text. For tasks other than retrieval, the card says to use the query prefix. The script then pools, normalizes and scores.
import torch.nn.functional as F
from torch import Tensor
from transformers import AutoTokenizer, AutoModel
def average_pool(last_hidden_states: Tensor,
attention_mask: Tensor) -> Tensor:
last_hidden = last_hidden_states.masked_fill(~attention_mask[..., None].bool(), 0.0)
return last_hidden.sum(dim=1) / attention_mask.sum(dim=1)[..., None]
# Each input text should start with "query: " or "passage: ", even for non-English texts.
# For tasks other than retrieval, you can simply use the "query: " prefix.
input_texts = ['query: how much protein should a female eat',
'query: 南瓜的家常做法',
"passage: As a general guideline, the CDC's average requirement of protein for women ages 19 to 70 is 46 grams per day. But, as you can see from this chart, you'll need to increase that if you're expecting or training for a marathon. Check out the chart below to see how much protein you should be eating each day.",
"passage: 1.清炒南瓜丝 原料:嫩南瓜半个 调料:葱、盐、白糖、鸡精 做法: 1、南瓜用刀薄薄的削去表面一层皮,用勺子刮去瓤 2、擦成细丝(没有擦菜板就用刀慢慢切成细丝) 3、锅烧热放油,入葱花煸出香味 4、入南瓜丝快速翻炒一分钟左右,放盐、一点白糖和鸡精调味出锅 2.香葱炒南瓜 原料:南瓜1只 调料:香葱、蒜末、橄榄油、盐 做法: 1、将南瓜去皮,切成片 2、油锅8成热后,将蒜末放入爆香 3、爆香后,将南瓜片放入,翻炒 4、在翻炒的同时,可以不时地往锅里加水,但不要太多 5、放入盐,炒匀 6、南瓜差不多软和绵了之后,就可以关火 7、撒入香葱,即可出锅"]
tokenizer = AutoTokenizer.from_pretrained('intfloat/multilingual-e5-large')
model = AutoModel.from_pretrained('intfloat/multilingual-e5-large')
# Tokenize the input texts
batch_dict = tokenizer(input_texts, max_length=512, padding=True, truncation=True, return_tensors='pt')
outputs = model(**batch_dict)
embeddings = average_pool(outputs.last_hidden_state, batch_dict['attention_mask'])
# normalize embeddings
embeddings = F.normalize(embeddings, p=2, dim=1)
scores = (embeddings[:2] @ embeddings[2:].T) * 100
print(scores.tolist())| Tool | What it does |
|---|---|
| AutoTokenizer | Splits the texts into tokens, up to 512 tokens each |
| AutoModel | Loads the embedding model |
| average_pool | Averages the token vectors, ignoring padding |
| F.normalize | Scales each embedding to unit length |
You pass two questions, one in English about protein and one in Chinese about cooking pumpkin, with two passages. The script prints a two-by-two list of scores, and each question scores highest with its matching passage.
If you are new, run the card's script as it is. It shows how texts get a prefix, become vectors and get compared, before you plug in your own sentences.
If you know the field, the model was first pre-trained contrastively on weakly supervised text pairs, then fine-tuned with supervision. Pairs came from sources such as web pages, news, translations and Wikipedia. Low-resource languages may see weaker quality, the card warns.
The first training stage used large pools of text pairs, as the table shows. The card also links a technical report on Multilingual E5 text embeddings from 2024.
| Source | Kind of pair | Count |
|---|---|---|
| NLLB | Translation pairs | 2.4B |
| Filtered mC4 | Page title and content | 1B |
| Filtered Reddit | Comment and response | 800M |
| CC News | News title and content | 400M |
| Wikipedia | Section title and passage | 150M |
| S2ORC | Title, abstract and citations | 100M |
| xP3 | Prompt and response | 80M |
| Stackexchange | Question and answer | 50M |
Turns text in about 100 languages into 1024-number vectors for search, matching and retrieval. A 560M-parameter embedding model from intfloat, built on xlm-roberta-large.
Made by intfloat on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: multilingual-e5-large is a text embedding model. It converts a sentence or passage into a list of 1024 numbers, so texts with similar meaning end up close together, even across languages.
It has 24 layers. It starts from xlm-roberta-large and was trained further on a mix of multilingual datasets, and it supports about 100 languages.
Who it suits: Developers and data teams who build multilingual search, question matching or document retrieval and want an open embedding model they can run themselves.
Industry | Who uses it | How they use it | Example
Software | Search engineers | Embed documents and queries for semantic search | Finding help articles in Chinese from an English question
Customer service | Support teams | Match new questions to past answers | Linking a Spanish ticket to an English reply
Research | NLP researchers | Use it as a multilingual baseline | Comparing retrieval quality across languages
Content | Knowledge-base owners | Index mixed-language documents | One index over English and Chinese notes
You can skip it if you only need English text, since smaller English-only embedding models exist, or if you need a model that writes text.
Where to use it: It runs in Python with the transformers library, and the page lists it for sentence-transformers.
Use case | Who | What they get back
Semantic search | Search engineers | A similarity score between a query and each passage
Question matching | Support teams | The closest stored answers to a new question
Cross-language lookup | Content teams | Matches that work when query and passage differ in language
How to set it up: You need Python and a few libraries. The card's own script uses PyTorch and transformers, and the weights come down from Hugging Face the first time you load them.
pip install -U huggingface_hub
hf download intfloat/multilingual-e5-large
How to use it: Start each input with the word query and a colon, or the word passage and a colon, even for non-English text. For tasks other than retrieval, the card says to use the query prefix. The script then pools, normalizes and scores.
import torch.nn.functional as F
from torch import Tensor
from transformers import AutoTokenizer, AutoModel
def average_pool(last_hidden_states: Tensor,
attention_mask: Tensor) -> Tensor:
last_hidden = last_hidden_states.masked_fill(~attention_mask[..., None].bool(), 0.0)
return last_hidden.sum(dim=1) / attention_mask.sum(dim=1)[..., None]
# Each input text should start with "query: " or "passage: ", even for non-English texts.
# For tasks other than retrieval, you can simply use the "query: " prefix.
input_texts = ['query: how much protein should a female eat',
'query: 南瓜的家常做法',
"passage: As a general guideline, the CDC's average requirement of protein for women ages 19 to 70 is 46 grams per day. But, as you can see from this chart, you'll need to increase that if you're expecting or training for a marathon. Check out the chart below to see how much protein you should be eating each day.",
"passage: 1.清炒南瓜丝 原料:嫩南瓜半个 调料:葱、盐、白糖、鸡精 做法: 1、南瓜用刀薄薄的削去表面一层皮,用勺子刮去瓤 2、擦成细丝(没有擦菜板就用刀慢慢切成细丝) 3、锅烧热放油,入葱花煸出香味 4、入南瓜丝快速翻炒一分钟左右,放盐、一点白糖和鸡精调味出锅 2.香葱炒南瓜 原料:南瓜1只 调料:香葱、蒜末、橄榄油、盐 做法: 1、将南瓜去皮,切成片 2、油锅8成热后,将蒜末放入爆香 3、爆香后,将南瓜片放入,翻炒 4、在翻炒的同时,可以不时地往锅里加水,但不要太多 5、放入盐,炒匀 6、南瓜差不多软和绵了之后,就可以关火 7、撒入香葱,即可出锅"]
tokenizer = AutoTokenizer.from_pretrained('intfloat/multilingual-e5-large')
model = AutoModel.from_pretrained('intfloat/multilingual-e5-large')
# Tokenize the input texts
batch_dict = tokenizer(input_texts, max_length=512, padding=True, truncation=True, return_tensors='pt')
outputs = model(**batch_dict)
embeddings = average_pool(outputs.last_hidden_state, batch_dict['attention_mask'])
# normalize embeddings
embeddings = F.normalize(embeddings, p=2, dim=1)
scores = (embeddings[:2] @ embeddings[2:].T) * 100
print(scores.tolist())
Tool | What it does
AutoTokenizer | Splits the texts into tokens, up to 512 tokens each
AutoModel | Loads the embedding model
average_pool | Averages the token vectors, ignoring padding
F.normalize | Scales each embedding to unit length
Example: You pass two questions, one in English about protein and one in Chinese about cooking pumpkin, with two passages. The script prints a two-by-two list of scores, and each question scores highest with its matching passage.
For newcomers and experts: If you are new, run the card's script as it is. It shows how texts get a prefix, become vectors and get compared, before you plug in your own sentences.
If you know the field, the model was first pre-trained contrastively on weakly supervised text pairs, then fine-tuned with supervision. Pairs came from sources such as web pages, news, translations and Wikipedia. Low-resource languages may see weaker quality, the card warns.
Add a query or passage prefix
Tokenize the texts
Run the model
Average-pool and normalize
Compare embeddings for scores
Good to know: The first training stage used large pools of text pairs, as the table shows. The card also links a technical report on Multilingual E5 text embeddings from 2024.
Title: Stage one text pairs
Source | Kind of pair | Count
NLLB | Translation pairs | 2.4B
Filtered mC4 | Page title and content | 1B
Filtered Reddit | Comment and response | 800M
CC News | News title and content | 400M
Wikipedia | Section title and passage | 150M
S2ORC | Title, abstract and citations | 100M
xP3 | Prompt and response | 80M
Stackexchange | Question and answer | 50M
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download intfloat/multilingual-e5-large
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 8 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| multilingual-e5-large This page | 7,120,555 | 1,284 | 560M | mit | |
| bge-small-en-v1.5Shares mteb · model-index · sentence-similarity | 45,750,548 | 671 | 33.4M | mit | |
| bge-base-en-v1.5Shares mteb · model-index · sentence-similarity | 8,508,165 | 542 | 109M | mit | |
| paraphrase-multilingual-MiniLM-L12-v2Shares openvino · sentence-similarity · text-embeddings-inference | 26,540,125 | 1,505 | 118M | apache-2.0 | |
| nomic-embed-text-v1.5Shares mteb · model-index · sentence-similarity | 11,809,681 | 994 | 137M | apache-2.0 | |
| bge-m3Shares xlm-roberta · sentence-similarity · text-embeddings-inference | 29,282,167 | 3,989 | — | mit |
Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
op7418 · Skill
Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.
alibaba · Kit
Reviews Git changes with an AI agent that reads files and searches the codebase, then writes comments tied to exact lines. It suits developers who want automat…