Instructions to use kakaocorp/kanana-2-1.3b-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kakaocorp/kanana-2-1.3b-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kakaocorp/kanana-2-1.3b-base", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("kakaocorp/kanana-2-1.3b-base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kakaocorp/kanana-2-1.3b-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kakaocorp/kanana-2-1.3b-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kakaocorp/kanana-2-1.3b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kakaocorp/kanana-2-1.3b-base
- SGLang
How to use kakaocorp/kanana-2-1.3b-base with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "kakaocorp/kanana-2-1.3b-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kakaocorp/kanana-2-1.3b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "kakaocorp/kanana-2-1.3b-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kakaocorp/kanana-2-1.3b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kakaocorp/kanana-2-1.3b-base with Docker Model Runner:
docker model run hf.co/kakaocorp/kanana-2-1.3b-base
News π₯
2026/07/27: π€ Releasedkanana-2-3b,kanana-2-1.3bHF model weights.2026/07/27: π Published a blog post about the development of theKanana-2 SLMseries.
Introduction
We present Kanana-2 SLM, Kakao's second series of Small Language Models (SLMs), designed to deliver strong language capabilities while remaining compact and efficient for practical deployment. The series includes 3B, 1.3B, and 0.9B models. This release publicly includes the 3B model and the compressed 1.3B model, providing a balance between capability and efficiency for a wide range of applications. Kanana-2-3B was pretrained from scratch on TPU clusters and further improved through post-training with supervised fine-tuning and reinforcement learning, resulting in strong instruction-following and reasoning capabilities. Kanana-2-1.3B models are derived from Kanana-2-3B through a cascade pruning and distillation pipeline. To further improve deployment efficiency, they adopt Sliding Window Attention (SWA), enabling memory-efficient long-context inference with support for context lengths of up to 32K tokens while substantially reducing KV-cache memory requirements.
The Kanana-2 SLM release consists of the following four publicly available models:
- Kanana-2-3B-Base β 3B pretrained base
- Kanana-2-3B-Instruct β instruction-tuned 3B model
- Kanana-2-1.3B-Base β compressed 1.3B pretrained base
- Kanana-2-1.3B-Instruct β instruction-tuned 1.3B model for on-device deployment
No Kakao user data was used for either pre-training or post-training.
Highlights
- Cascade Pruning & Distillation: Kanana-2-1.3B is built by progressively compressing Kanana-2-3B-Base (3B β 2B β 1.3B β 0.9B) through a cascade pruning and distillation pipeline.
- Sliding Window Attention (SWA): Uses a 3:1 hybrid layout of sliding-window and full-attention layers. A sliding-window size of 1024 reduces per-token KV-cache reads, cutting KV-cache usage by up to ~72.7% at a 32K context length compared to a full-attention-only model. YaRN is applied to full-attention layers, while SWA layers retain RoPE, preserving long-range context without sacrificing local-attention efficiency.
- Kanana-2 tokenizer: Improves Korean tokenization efficiency by over 30% compared to the previous generation.
- Long context: Natively supports context lengths of up to 32,768 tokens.
Model Downloads
| Model | Download |
|---|---|
| kanana-2-3b-base | π€ HuggingFace |
| kanana-2-3b-instruct | π€ HuggingFace |
| kanana-2-1.3b-base | π€ HuggingFace |
| kanana-2-1.3b-instruct | π€ HuggingFace |
Performance
Base model evaluation results
| Benchmark | Metric | Shot | kanana-2-3b-base | kanana-2-1.3b-base | Qwen3-1.7B-Base |
|---|---|---|---|---|---|
| General Tasks | |||||
| MMLU | acc | 5 | 62.77 | 56.49 | 62.32 |
| MMLU-Pro | acc | 5 | 36.54 | 29.87 | 37.08 |
| BBH | acc | 3 | 54.23 | 45.58 | 53.60 |
| SimpleQAβ | acc | 5 | 27.39 | 23.76 | 16.83 |
| Mathematics Tasks | |||||
| MATH | em | 4 | 35.08 | 30.82 | 41.74 |
| GSM8K | em | 8 | 61.03 | 51.93 | 75.74 |
| Coding Tasks | |||||
| HumanEval | pass@1 | 0 | 55.96 | 51.33 | 45.31 |
| MBPP | pass@1 | 3 | 50.95 | 44.86 | 53.85 |
| Korean Tasks | |||||
| KMMLU | acc | 5 | 47.92 | 44.17 | 43.08 |
| KoSimpleQAβ | acc | 5 | 32.50 | 28.50 | 13.40 |
| HAE-RAE Bench (v1.0) | acc | 5 | 80.66 | 75.34 | 55.54 |
| MATH-Koβ‘ | em | 4 | 31.54 | 24.75 | 31.92 |
| MBPP-KoΒ§ | pass@1 | 3 | 44.55 | 39.38 | 47.97 |
| Long Context Tasks | |||||
| RULER-32K | acc | 0 | 67.50 | 55.72 | 69.01 |
β Evaluated in Multiple Choice Question Answering (MCQA) format with 10 options.
β‘ Subsets from HRM8K (MATH, GSM8K).
Β§ Internally translated to Korean.
Instruct model evaluation results
Instruction-following, chat, tool-calling, code, math, and knowledge benchmarks for the Kanana-2 SLM series. Scores use greedy decoding (temperature 0.0, top-p 1.0, max 4096 tokens); the metric for each benchmark is listed in the Metric column.
| Benchmark | Metric | kanana-2-3b-instruct | kanana-2-1.3b-instruct | Qwen3.5-2B | Qwen3-1.7B |
|---|---|---|---|---|---|
| Chat | |||||
| MT-Benchβ | judge | 7.15 | 6.83 | 6.87 | 6.98 |
| KoMT-Benchβ | judge | 6.92 | 6.54 | 5.21 | 5.29 |
| Instruction Following | |||||
| IFBench | prompt strict | 33.33 | 34.69 | 24.83 | 18.33 |
| IFEval | prompt strict | 80.96 | 77.63 | 66.91 | 68.39 |
| IHEval | pass@1 | 35.96 | 27.06 | 38.52 | 42.09 |
| Tool Calling | |||||
| BFCL-v3 (Live)β‘ | pass@1 | 71.94 | 69.64 | 66.96 | 65.48 |
| BFCL-v3 (Multi-Turn)β‘ | pass@1 | 17.12 | 5.50 | 6.27 | 4.38 |
| Code Generation | |||||
| MBPP | pass@1 | 70.63 | 69.05 | 55.56 | 62.17 |
| MBPP+ | pass@1 | 60.05 | 60.85 | 46.83 | 52.65 |
| Mathematics | |||||
| GSM-Plus | pass@1 | 61.17 | 58.27 | 61.29 | 63.10 |
| MATH-500 | pass@1 | 61.20 | 61.40 | 67.80 | 72.00 |
| Minerva Math | pass@1 | 24.44 | 22.43 | 35.18 | 27.21 |
| Reasoning & Knowledge | |||||
| MMLU-CoT | acc | 61.09 | 60.37 | 69.01 | 66.02 |
| KMMLU-CoT | acc | 43.32 | 42.79 | 41.75 | 37.84 |
| HAERAE-Bench (v1.0)-CoT | acc | 43.75 | 44.89 | 27.84 | 27.84 |
| KoSimpleQA | acc | 22.29 | 17.81 | 3.21 | 2.82 |
β Evaluated using gpt-4o-2024-08-06 as the judge model.
β‘ Live denotes the average score of 6 live benchmarks, and Multi-Turn the average score of 4 multi-turn benchmarks.
Quickstart
kanana-2-1.3b-baseuses a custom hybrid attention architecture (Kanana2TinyForCausalLMβ a Qwen3 backbone with a 3:1 SWA/full-attention layout and per-layer-type RoPE), shipped as remote code. Loading requirestrust_remote_code=Trueandtransformers >= 4.57.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "kakaocorp/kanana-2-1.3b-base"
tokenizer = AutoTokenizer.from_pretrained(
model_name,
trust_remote_code=True,
)
model = AutoModelForCausalLM.from_pretrained(
model_name,
trust_remote_code=True,
dtype=torch.bfloat16,
)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)
model.eval()
prompt = "Kakao is a leading company in South Korea, and it is known for"
input_ids = tokenizer(
[prompt],
return_tensors="pt",
)["input_ids"].to(device)
with torch.no_grad():
output = model.generate(
input_ids,
max_new_tokens=32,
do_sample=False,
)
decoded = tokenizer.decode(output[0], skip_special_tokens=True)
print(decoded)
License
The model weights are released under the KananaOpenLicense.
Citation
@misc{kanana2slm2026,
title = {Kanana-2 SLM},
author = {Kanana LLM},
year = {2026},
url = {https://huggingface.co/collections/kakaocorp/kanana-2-slm}
}
Contact
- Kanana LLM Team Technical Support: kanana-llm@kakaocorp.com
- Business & Partnership Contact: alpha.k@kakaocorp.com
- Downloads last month
- 20