Text Generation
Transformers
Safetensors
Korean
English
qwen3_5
image-text-to-text
darwin
korean
bilingual
reasoning
merged-model
evolutionary-merge
conversational
Instructions to use VIDraft/Darwin-9B-KOREA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VIDraft/Darwin-9B-KOREA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VIDraft/Darwin-9B-KOREA") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("VIDraft/Darwin-9B-KOREA") model = AutoModelForImageTextToText.from_pretrained("VIDraft/Darwin-9B-KOREA") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use VIDraft/Darwin-9B-KOREA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VIDraft/Darwin-9B-KOREA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VIDraft/Darwin-9B-KOREA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VIDraft/Darwin-9B-KOREA
- SGLang
How to use VIDraft/Darwin-9B-KOREA 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 "VIDraft/Darwin-9B-KOREA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VIDraft/Darwin-9B-KOREA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "VIDraft/Darwin-9B-KOREA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VIDraft/Darwin-9B-KOREA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use VIDraft/Darwin-9B-KOREA with Docker Model Runner:
docker model run hf.co/VIDraft/Darwin-9B-KOREA
File size: 3,208 Bytes
1c0db2c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | ---
license: apache-2.0
language:
- ko
- en
library_name: transformers
base_model:
- FINAL-Bench/Darwin-9B-Opus
- FINAL-Bench/Darwin-9B-NEG
tags:
- darwin
- korean
- bilingual
- reasoning
- merged-model
- evolutionary-merge
pipeline_tag: text-generation
---
# Darwin-9B-KOREA
**ํ๊ตญ์ด/์์ด ์ด์ค์ธ์ด ์ถ๋ก ์ ์ต์ ํ๋ 9B ํ๋ผ๋ฏธํฐ ๋ชจ๋ธ (28B-KOREA์ ๊ฒฝ๋ ์๋งค ๋ชจ๋ธ)**
VIDRAFT Darwin ์๋ฆฌ์ฆ์ PERFECT ๋ถ๋ชจ ํ์ด ๋จธ์ง. Darwin-9B-Opus(์ ) ร Darwin-9B-NEG(๋ฐ) ํ์ด๋ฅผ per-layer ๋์ ๋น์จ๋ก ๊ฒฐํฉํ์ฌ, 28B-KOREA ๋๋น 1/2.7 ์ฌ์ด์ฆ๋ก ๊ฑฐ์ ๋๋ฑํ ํ๊ตญ์ด ๋ฅ๋ ฅ์ ๋ฌ์ฑ.
## ๋ถ๋ชจ ๋ชจ๋ธ (PERFECT Pair)
| Role | Model | Strength |
|------|-------|----------|
| Father | [FINAL-Bench/Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus) | ์์ด reasoning, ํ๊ตญ์ด ๋ต๋ณ |
| Mother | [FINAL-Bench/Darwin-9B-NEG](https://huggingface.co/FINAL-Bench/Darwin-9B-NEG) | Negative SFT, ์ /๋ฐ ํฉ์ฑ |
ํ์ด ํธํ์ฑ: hidden=4096, intermediate=12288, layers=32, vocab=248320 โ 100% ์ผ์น PERFECT pair.
## ๋จธ์ง ๋ฐฉ์
- **์๊ณ ๋ฆฌ์ฆ**: Per-layer linear interpolation (float32 โ bfloat16)
- **t vector**: 32 ๋ ์ด์ด ๋์ ๊ฐ์ค์น (mean t=0.513)
- Golden Reasoning Layer (L0): t=0.90 (28B ํ์ด๋ L47, 9B๋ L0์ด ์
๋ ฅ ์งํ ๊ฐ์ฅ reasoning critical)
- Output Router (L31): t=0.53
- **์ฑ ํ
ํ๋ฆฟ/ํ ํฌ๋์ด์ **: Father ๊ธฐ์ค
## ํ๊ฐ ๊ฒฐ๊ณผ (35-sample 3-way bench, max_tokens=5120)
| ํ๊ฐ ํญ๋ชฉ | Father (9B-Opus) | Mother (9B-NEG) | **KOREA (Child)** |
|---|---|---|---|
| ์ ํ๋ (29๊ฐ ๊ฐ๊ด์) | 93.1% | 93.1% | **93.1%** |
| ํ๊ตญ์ด ์ถ๋ ฅ๋ฅ (ํ๊ตญ์ด ์ง๋ฌธ 23๊ฐ) | 91.3% | 87.0% | **91.3%** โญ |
**Win/Loss**: Father vs Child 0:0, Mother vs Child 0:0 โ **์์ ๋๋ฅ ** (์์์ด ๋ ๋ถ๋ชจ์ ๋๊ธ)
**28B-KOREA ๋น๊ต**: ์ ํ๋ -3.5%p (96.6% โ 93.1%, ๋ชจ๋ธ ํฌ๊ธฐ ์ฐจ์ด), **ํ๊ตญ์ด ์ถ๋ ฅ๋ฅ ๋์ผ 91.3%**.
## ์ฌ์ฉ ๊ถ์ฅ
- **๊ถ์ฅ max_tokens**: 1024 ์ด์ (chain-of-thought ํน์ฑ)
- **GPU ๋ฉ๋ชจ๋ฆฌ**: ~20GB BF16 (๋จ์ผ H100/H200/A100 80GB ์ถฉ๋ถ)
- **์ฌ๊ณ ํจํด**: ์์ด reasoning ํ ํ๊ตญ์ด ๋ต๋ณ. ๋ต ์ ํ๋ ์ฐ์ ์ด๋ฉด ๊ถ์ฅ.
## Quick Start
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"VIDraft/Darwin-9B-KOREA",
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
tok = AutoTokenizer.from_pretrained("VIDraft/Darwin-9B-KOREA", trust_remote_code=True)
msgs = [{"role": "user", "content": "ํ๊ตญ ์ต์ด ํ๊ธ ์ฐฝ์ ์ด์ ๋ฅผ ํ ๋ฌธ์ฅ์ผ๋ก."}]
inputs = tok.apply_chat_template(msgs, return_tensors="pt", add_generation_prompt=True).to(model.device)
out = model.generate(inputs, max_new_tokens=1024, do_sample=False, pad_token_id=tok.eos_token_id)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
```
## License
Apache 2.0 (๋ถ๋ชจ ๋ชจ๋ธ ์์).
## Related Models
- **[VIDraft/Darwin-28B-KOREA](https://huggingface.co/VIDraft/Darwin-28B-KOREA)** โ ํฐ ์๋งค ๋ชจ๋ธ (52GB, 96.6% ์ ํ๋)
---
*VIDRAFT Darwin Factory โ Pair: Darwin-9B-Opus ร Darwin-9B-NEG โ Darwin-9B-KOREA*
|