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