Kanana Nano 2.1b Embedding
Kanana是由Kakao開發的雙語(韓語/英語)語言模型系列,在韓語任務上表現卓越,在英語任務上具備競爭力,相比同規模模型顯著降低計算成本。
下載量 7,722
發布時間 : 2/26/2025
模型概述
Kanana系列雙語語言模型,參數規模從21億到325億不等,公開發布21億參數版本(含基礎版、指令版、嵌入版、函數調用版和RAG版),特別優化韓語任務性能。
模型特點
高效韓語處理
相比同規模模型顯著提升韓語任務性能,計算成本更低
多版本適配
提供基礎版、指令版、嵌入版、函數調用版和RAG版,適應不同應用場景
高效訓練技術
採用高質量數據過濾、分階段預訓練、深度擴展、剪枝與蒸餾等技術
模型能力
韓語文本生成
英語文本理解
指令跟隨
問答系統
檢索增強生成(RAG)
函數調用
使用案例
智能助手
韓語客服機器人
用於處理韓語客戶諮詢
在韓語任務上表現優於同規模模型
內容生成
韓語內容創作
生成符合韓語習慣的營銷文案
🚀 Kanana
Kanana是由Kakao開發的一系列雙語語言模型,在韓語方面表現卓越,在英語方面也具備競爭力。與同規模的先進模型相比,Kanana的計算成本顯著降低。
🚀 快速開始
🤗 HuggingFace Transformers
運行Kanana
模型需要transformers>=4.45.0
或最新版本。
pip install transformers>=4.45.0
kanana-nano-2.1b-embedding
的使用示例
⚠️ 重要提示
在使用
kanana-nano-2.1b-embedding
模型之前,你需要通過pip install datasets
安裝datasets
。
import torch.nn.functional as F
from transformers import AutoModel
instruction = "Given a question, retrieve passages that answer the question"
queries = [
"are judo throws allowed in wrestling?",
"how to become a radiology technician in michigan?",
]
passages = [
"Since you're reading this, you are probably someone from a judo background or someone who is just wondering how judo techniques can be applied under wrestling rules. So without further ado, let's get to the question. Are Judo throws allowed in wrestling? Yes, judo throws are allowed in freestyle and folkstyle wrestling. You only need to be careful to follow the slam rules when executing judo throws. In wrestling, a slam is lifting and returning an opponent to the mat with unnecessary force.",
"Below are the basic steps to becoming a radiologic technologist in Michigan:Earn a high school diploma. As with most careers in health care, a high school education is the first step to finding entry-level employment. Taking classes in math and science, such as anatomy, biology, chemistry, physiology, and physics, can help prepare students for their college studies and future careers.Earn an associate degree. Entry-level radiologic positions typically require at least an Associate of Applied Science. Before enrolling in one of these degree programs, students should make sure it has been properly accredited by the Joint Review Committee on Education in Radiologic Technology (JRCERT).Get licensed or certified in the state of Michigan.",
]
model = AutoModel.from_pretrained(
"kakaocorp/kanana-nano-2.1b-embedding",
trust_remote_code=True,
).to("cuda")
max_length = 512
query_embeddings = model.encode(queries, instruction=instruction, max_length=max_length)
passage_embeddings = model.encode(passages, instruction="", max_length=max_length)
# get the embeddings with DataLoader (spliting the datasets into multiple mini-batches)
# batch_size = 2
# query_embeddings = model._do_encode(queries, batch_size=batch_size, instruction=instruction, max_length=max_length)
# passage_embeddings = model._do_encode(passages, batch_size=batch_size, instruction="", max_length=max_length)
query_embeddings = F.normalize(query_embeddings, p=2, dim=1)
passage_embeddings = F.normalize(passage_embeddings, p=2, dim=1)
scores = (query_embeddings @ passage_embeddings.T) * 100
print(scores.tolist())
# Output:
# [[84.36527252197266, 31.752296447753906], [35.940425872802734, 81.82719421386719]]
✨ 主要特性
我們推出的Kanana是一系列由Kakao開發的雙語語言模型,在韓語方面表現卓越,在英語方面也具備競爭力。與同規模的先進模型相比,Kanana的計算成本顯著降低。報告詳細介紹了預訓練期間採用的技術,以實現計算高效且有競爭力的模型,包括高質量數據過濾、分階段預訓練、深度擴展以及剪枝和蒸餾。此外,報告還概述了Kanana模型後訓練期間採用的方法,包括有監督微調以及偏好優化,旨在增強其與用戶無縫交互的能力。最後,報告詳細說明了用於語言模型適應特定場景的可行方法,如嵌入、函數調用和檢索增強生成(RAG)。Kanana模型系列的參數範圍從21億到325億,其中21億參數的模型(基礎版、指令版、嵌入版、函數調用版和RAG版)已公開發布,以推動韓語語言模型的研究。
⚠️ 重要提示
預訓練和後訓練數據均不包含Kakao用戶數據。
📊 性能表現
以下是Kanana
模型系列性能的部分報告。完整結果請參考技術報告。
預訓練模型性能
模型 | MMLU | KMMLU | HAERAE | HumanEval | MBPP | GSM8K |
---|---|---|---|---|---|---|
27b+規模 | ||||||
Kanana-Flag-32.5b | 77.68 | 62.10 | 90.47 | 51.22 | 63.40 | 70.05 |
Qwen2.5-32b | 83.10 | 63.15 | 75.16 | 50.00 | 73.40 | 82.41 |
Gemma-2-27b | 75.45 | 51.16 | 69.11 | 51.22 | 64.60 | 74.37 |
EXAONE-3.5-32b | 72.68 | 46.36 | 82.22 | - | - | - |
Aya-Expanse-32b | 74.52 | 49.57 | 80.66 | - | - | - |
7b+規模 | ||||||
Kanana-Essence-9.8b | 67.61 | 50.57 | 84.98 | 40.24 | 53.60 | 63.61 |
Llama-3.1-8b | 65.18 | 41.02 | 61.78 | 35.37 | 48.60 | 50.87 |
Qwen2.5-7b | 74.19 | 51.68 | 67.46 | 56.71 | 63.20 | 83.85 |
Gemma-2-9b | 70.34 | 48.18 | 66.18 | 37.20 | 53.60 | 68.16 |
EXAONE-3.5-7.8b | 65.36 | 45.30 | 77.54 | - | - | - |
Aya-Expanse-8b | 62.52 | 40.11 | 71.95 | - | - | - |
2b+規模 | ||||||
Kanana-Nano-2.1b | 54.83 | 44.80 | 77.09 | 31.10 | 46.20 | 46.32 |
Llama-3.2-3b | 56.40 | 35.57 | 47.66 | 25.61 | 39.00 | 27.37 |
Qwen2.5-3b | 65.57 | 45.28 | 61.32 | 37.80 | 55.60 | 69.07 |
Gemma-2-2b | 52.89 | 30.67 | 45.55 | 20.12 | 28.20 | 24.72 |
EXAONE-3.5-2.4b | 59.27 | 43.58 | 69.65 | - | - | - |
70b+規模 | ||||||
Llama-3.1-70b | 78.93 | 53.00 | 76.35 | 57.32 | 66.60 | 81.73 |
Qwen2.5-72b | 86.12 | 68.57 | 80.84 | 55.49 | 76.40 | 92.04 |
後訓練模型性能
指令遵循基準測試
模型 | MT-Bench | LogicKor | KoMT-Bench | WildBench | IFEval |
---|---|---|---|---|---|
27b+規模 | |||||
Kanana-Flag-32.5b | 8.356 | 9.524 | 8.058 | 54.14 | 0.856 |
Qwen2.5-32b | 8.331 | 8.988 | 7.847 | 51.13 | 0.822 |
Gemma-2-27b | 8.088 | 8.869 | 7.373 | 46.46 | 0.817 |
EXAONE-3.5-32b | 8.375 | 9.202 | 7.907 | 54.30 | 0.845 |
Aya-Expanse-32b | 7.788 | 8.941 | 7.626 | 48.36 | 0.735 |
7b+規模 | |||||
Kanana-Essence-9.8b | 7.769 | 8.964 | 7.706 | 47.27 | 0.799 |
Llama-3.1-8b | 7.500 | 6.512 | 5.336 | 33.20 | 0.772 |
Qwen2.5-7b | 7.625 | 7.952 | 6.808 | 41.31 | 0.760 |
Gemma-2-9b | 7.633 | 8.643 | 7.029 | 40.92 | 0.750 |
EXAONE-3.5-7.8b | 8.213 | 9.357 | 8.013 | 50.98 | 0.826 |
Aya-Expanse-8b | 7.131 | 8.357 | 7.006 | 38.50 | 0.645 |
2b+規模 | |||||
Kanana-Nano-2.1b | 6.400 | 7.964 | 5.857 | 25.41 | 0.720 |
Llama-3.2-3b | 7.050 | 4.452 | 3.967 | 21.91 | 0.767 |
Qwen2.5-3b | 6.969 | 6.488 | 5.274 | 25.76 | 0.355 |
Gemma-2-2b | 7.225 | 5.917 | 4.835 | 28.71 | 0.428 |
EXAONE-3.5-2.4b | 7.919 | 8.941 | 7.223 | 41.68 | 0.790 |
70b+規模 | |||||
Llama-3.1-70b | 8.275 | 8.250 | 6.970 | 46.50 | 0.875 |
Qwen2.5-72b | 8.619 | 9.214 | 8.281 | 55.25 | 0.861 |
通用基準測試
模型 | MMLU | KMMLU | HAE-RAE | HumanEval+ | MBPP+ | GSM8K | MATH |
---|---|---|---|---|---|---|---|
27b+規模 | |||||||
Kanana-Flag-32.5b | 81.08 | 64.19 | 68.18 | 77.44 | 69.84 | 90.83 | 57.82 |
Qwen2.5-32b | 84.40 | 59.37 | 48.30 | 82.32 | 71.96 | 95.30 | 81.90 |
Gemma-2-27b | 78.01 | 49.98 | 46.02 | 70.12 | 70.90 | 91.05 | 53.80 |
EXAONE-3.5-32b | 78.30 | 55.44 | 52.27 | 78.66 | 70.90 | 93.56 | 76.80 |
Aya-Expanse-32b | 74.49 | 42.35 | 51.14 | 64.63 | 65.61 | 75.06 | 42.82 |
7b+規模 | |||||||
Kanana-Essence-9.8b | 70.64 | 50.76 | 47.16 | 72.56 | 69.05 | 84.91 | 42.24 |
Llama-3.1-8b | 71.18 | 39.24 | 40.91 | 60.98 | 57.67 | 82.71 | 49.86 |
Qwen2.5-7b | 77.23 | 46.87 | 37.50 | 73.78 | 70.63 | 91.58 | 75.22 |
Gemma-2-9b | 73.47 | 44.47 | 39.77 | 59.76 | 64.55 | 87.72 | 48.10 |
EXAONE-3.5-7.8b | 72.62 | 52.09 | 46.02 | 79.27 | 66.67 | 89.99 | 73.50 |
Aya-Expanse-8b | 61.23 | 35.78 | 39.20 | 42.68 | 56.88 | 78.85 | 30.80 |
2b+規模 | |||||||
Kanana-Nano-2.1b | 52.48 | 38.51 | 33.52 | 63.41 | 62.43 | 72.32 | 29.26 |
Llama-3.2-3b | 56.09 | 3.07 | 17.05 | 56.71 | 50.26 | 66.57 | 38.18 |
Qwen2.5-3b | 69.18 | 38.33 | 32.39 | 67.68 | 64.02 | 84.00 | 65.72 |
Gemma-2-2b | 57.69 | 6.99 | 7.95 | 35.37 | 45.24 | 49.81 | 21.68 |
EXAONE-3.5-2.4b | 63.19 | 14.27 | 14.20 | 70.73 | 59.79 | 83.78 | 64.04 |
70b+規模 | |||||||
Llama-3.1-70b | 83.48 | 39.08 | 53.41 | 75.61 | 66.40 | 91.66 | 63.98 |
Qwen2.5-72b | 87.14 | 65.78 | 60.80 | 81.10 | 75.66 | 95.45 | 82.60 |
嵌入模型性能
骨幹模型 | Kanana-Nano-2.1b | Llama-3.2-3b | Qwen2.5-3b | Llama-3.2-1b | Qwen-2.5-1.5b |
---|---|---|---|---|---|
英語 | 51.56 | 53.28 | 54.00 | 48.77 | 50.60 |
韓語 | 65.00 | 59.43 | 62.10 | 54.68 | 54.60 |
平均 | 58.28 | 56.35 | 58.05 | 51.73 | 52.60 |
📚 詳細文檔
新聞動態
- 📜
2025/02/27
:發佈技術報告和🤗HF模型權重。 - 📕
2025/01/10
:發佈關於Kanana-Nano
模型開發的博客文章。(Kanana-Nano) - 📕
2024/11/14
:發佈關於Kanana
模型開發的博客文章。(Kanana LLM: Pre-training,Kanana LLM: Post-training) - ▶️
2024/11/06
:發佈關於Kanana
模型開發的演示視頻。(if(kakaoAI)2024)
📄 許可證
Kanana
模型採用CC-BY-NC-4.0許可證。
📚 引用信息
@misc{kananallmteam2025kananacomputeefficientbilinguallanguage,
title={Kanana: Compute-efficient Bilingual Language Models},
author={Kanana LLM Team and Yunju Bak and Hojin Lee and Minho Ryu and Jiyeon Ham and Seungjae Jung and Daniel Wontae Nam and Taegyeong Eo and Donghun Lee and Doohae Jung and Boseop Kim and Nayeon Kim and Jaesun Park and Hyunho Kim and Hyunwoong Ko and Changmin Lee and Kyoung-Woon On and Seulye Baeg and Junrae Cho and Sunghee Jung and Jieun Kang and EungGyun Kim and Eunhwa Kim and Byeongil Ko and Daniel Lee and Minchul Lee and Miok Lee and Shinbok Lee and Gaeun Seo},
year={2025},
eprint={2502.18934},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2502.18934},
}
👥 貢獻者
- 預訓練:Yunju Bak、Doohae Jung、Boseop Kim、Nayeon Kim、Hojin Lee、Jaesun Park、Minho Ryu
- 後訓練:Jiyeon Ham、Seungjae Jung、Hyunho Kim、Hyunwoong Ko、Changmin Lee、Daniel Wontae Nam、Kyoung-Woon On
- 適配:Seulye Baeg、Junrae Cho、Taegyeong Eo、Sunghee Jung、Jieun Kang、EungGyun Kim、Eunhwa Kim、Byeongil Ko、Daniel Lee、Donghun Lee、Minchul Lee、Miok Lee、Shinbok Lee、Minho Ryu、Gaeun Seo
📞 聯繫我們
- Kanana LLM團隊技術支持:kanana-llm@kakaocorp.com
- 商務合作聯繫:alpha.k@kakaocorp.com
Phi 2 GGUF
其他
Phi-2是微軟開發的一個小型但強大的語言模型,具有27億參數,專注於高效推理和高質量文本生成。
大型語言模型 支持多種語言
P
TheBloke
41.5M
205
Roberta Large
MIT
基於掩碼語言建模目標預訓練的大型英語語言模型,採用改進的BERT訓練方法
大型語言模型 英語
R
FacebookAI
19.4M
212
Distilbert Base Uncased
Apache-2.0
DistilBERT是BERT基礎模型的蒸餾版本,在保持相近性能的同時更輕量高效,適用於序列分類、標記分類等自然語言處理任務。
大型語言模型 英語
D
distilbert
11.1M
669
Llama 3.1 8B Instruct GGUF
Meta Llama 3.1 8B Instruct 是一個多語言大語言模型,針對多語言對話用例進行了優化,在常見的行業基準測試中表現優異。
大型語言模型 英語
L
modularai
9.7M
4
Xlm Roberta Base
MIT
XLM-RoBERTa是基於100種語言的2.5TB過濾CommonCrawl數據預訓練的多語言模型,採用掩碼語言建模目標進行訓練。
大型語言模型 支持多種語言
X
FacebookAI
9.6M
664
Roberta Base
MIT
基於Transformer架構的英語預訓練模型,通過掩碼語言建模目標在海量文本上訓練,支持文本特徵提取和下游任務微調
大型語言模型 英語
R
FacebookAI
9.3M
488
Opt 125m
其他
OPT是由Meta AI發佈的開放預訓練Transformer語言模型套件,參數量從1.25億到1750億,旨在對標GPT-3系列性能,同時促進大規模語言模型的開放研究。
大型語言模型 英語
O
facebook
6.3M
198
1
基於transformers庫的預訓練模型,適用於多種NLP任務
大型語言模型
Transformers

1
unslothai
6.2M
1
Llama 3.1 8B Instruct
Llama 3.1是Meta推出的多語言大語言模型系列,包含8B、70B和405B參數規模,支持8種語言和代碼生成,優化了多語言對話場景。
大型語言模型
Transformers 支持多種語言

L
meta-llama
5.7M
3,898
T5 Base
Apache-2.0
T5基礎版是由Google開發的文本到文本轉換Transformer模型,參數規模2.2億,支持多語言NLP任務。
大型語言模型 支持多種語言
T
google-t5
5.4M
702
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98