Microsoft mE5-large · 云碩繁中領域嵌入
Collection
基於 Microsoft multilingual-e5-large 微調的繁體中文領域嵌入模型(公文/教育/圖書館語意檢索)。 • 1 item • Updated • 1
How to use xCloudinfo/e5-large-edu-zhtw with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("xCloudinfo/e5-large-edu-zhtw")
sentences = [
"The weather is lovely today.",
"It's so sunny outside!",
"He drove to the stadium."
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]云碩科技 · xCloudinfo · 繁體中文(台灣)句向量模型(embedding)
以 intfloat/multilingual-e5-large(mE5-large,1024 維)為底模,針對繁體中文(台灣)語意檢索微調的句向量模型。輸出 1024 維、與既有向量庫對齊(免重建索引)。
功能:把繁中文本轉成 1024 維向量,供語意檢索 / RAG / 相似度比對。
正配對對比學習(MultipleNegativesRankingLoss,靠 in-batch 當負例)微調而成。於 云碩自有 AI 算力資源池 微調,資料全程留在自有環境。(後續以 hard negatives 強化 top-1 鑑別力的改良版另存內部版本。)
from sentence_transformers import SentenceTransformer
m = SentenceTransformer("xCloudinfo/e5-large-edu-zhtw", device="cpu")
# mE5 慣例:query 加 "query: "、passage 加 "passage: ",並 normalize
q = m.encode(["query: 台灣最有名的小吃是什麼?"], normalize_embeddings=True)
p = m.encode(["passage: 台灣夜市以多元小吃聞名,例如蚵仔煎、滷肉飯、珍珠奶茶……"], normalize_embeddings=True)
print((q @ p.T)) # cosine 相似度
intfloat/multilingual-e5-large,MIT。由 云碩科技 xCloudinfo 於自有 AI 算力資源池微調;資料留在本地、流程可重現。
Base model
intfloat/multilingual-e5-large