File size: 5,500 Bytes
a3465f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
license: apache-2.0
base_model:
  - mistralai/Devstral-2-123B-Instruct-2512
  - mistralai/Mistral-Medium-3.5-128B
tags:
  - darwin
  - darwin-v7
  - mistral
  - merge
  - mri-merge
  - layer-band-asymmetric
language:
  - en
  - ko
pipeline_tag: text-generation
inference: false
---

# Darwin-Mistral-G1

**Darwin ร— Mistral ์ง„ํ™”์  ๋จธ์ง€ 1์„ธ๋Œ€ (G1)** โ€” Devstral-2-123B(์ฝ”๋”ฉ) ร— Mistral-Medium-3.5-128B(์ถ”๋ก ยท๋ฒ”์šฉ) ์˜ **Darwin V7+ MRI-only Linear merge** ๊ฒฐ๊ณผ๋ฌผ.

> VIDRAFT R&D ยท 2026-05-16
> ์ž‘์—…์ง€์‹œ์„œ v1.0 (๊น€ํƒœ๋ด‰ CAIO) ์˜ต์…˜ A ์ฑ„ํƒ ๊ฒฐ๊ณผ

## ์ฃผ์š” ๊ฒฐ๊ณผ (Quick)

| Benchmark | Score | Note |
|---|---|---|
| GPQA Diamond 20 (seed 42) | **45.0%** (9/20) | Mother ์ˆ˜์ค€ ํšŒ๋ณต โ€” Devstral 50% / MM3.5 45% ์‚ฌ์ด |
| HumanEval 20 pass@1 (seed 42) | **๐Ÿ”ฅ 90.0%** (18/20) | Devstral ์ฝ”๋”ฉ ๋Šฅ๋ ฅ ์™„๋ฒฝ ๋ณด์กด |
| Sanity (์ˆ˜ํ•™ยท์ฝ”๋“œยทํ•œ๊ตญ์–ด) | โœ… 3/3 | 17ร—23=391, fibonacci code, ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ ์ •์ƒ |

## ๋จธ์ง€ ์‚ฌ์–‘

### ๋ถ€๋ชจ
- **Father (์ฝ”๋”ฉ)**: `mistralai/Devstral-2-123B-Instruct-2512` โ€” Ministral3ForCausalLM, hidden 12288, layers 88, vocab 131072, FP8 + BF16
- **Mother (์ถ”๋ก ยท๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ ๋ฒ ์ด์Šค)**: `mistralai/Mistral-Medium-3.5-128B` โ€” Mistral3ForConditionalGeneration text branch (vision ์ œ์™ธ), ๋™์ผ spec

### ๋ฐฉ๋ฒ•
- **Engine**: Darwin V7+ MRI-only (Linear blend, no SLERP)
- **Blend**: `(1 - r_mother) * Father + r_mother * Mother` per tensor
- **Prefix remap**: Mother `model.language_model.X` โ†’ `model.X` (Ministral3 namespace ํ†ต์ผ)
- **Vision exclusion**: G1์—์„œ Pixtral vision_tower + multi_modal_projector ์ œ์™ธ (G2์—์„œ ํ†ตํ•ฉ ์˜ˆ์ •)

### Layer-band ๋น„๋Œ€์นญ (์ž‘์—…์ง€์‹œ์„œ v1.0 ยง3-2)
| Layer ๊ตฌ๊ฐ„ | r_mother | ์˜๋„ |
|---|---|---|
| 0~29 (low) | 0.25 | Father(Devstral) ์šฐ์„ธ โ€” ํ† ํฐ ํ‘œํ˜„ยท์ฝ”๋“œ ๊ตฌ๋ฌธ ๋ณด์กด |
| 30~59 (mid) | 0.70 | Mother ์šฐ์„ธ โ€” ์ถ”๋ก  ์ฒด์ธ ๊ฐ•ํ™” |
| 60~87 (high) | 0.50 | ๊ท ๋“ฑ โ€” ์ถœ๋ ฅ ํ’ˆ์งˆยท์ธ์ŠคํŠธ๋Ÿญ์…˜ |

### Category ratio (Mother bias)
| Category | r_mother | ๋น„๊ณ  |
|---|---|---|
| **embedding** | **0.00** | Father 100% โ€” ํ† ํฐ ๋งคํ•‘ ๋ณด์กด (v1 1.00 ์‹œ random ์†์ƒ ํ™•์ธ) |
| **lm_head** | **0.00** | Father 100% โ€” ์ถœ๋ ฅ ๋งคํ•‘ ๋ณด์กด |
| attention | 0.50 | ๊ท ๋“ฑ โ€” Devstral reasoning ํšŒ๋ณต |
| norm | 0.50 | ๊ท ๋“ฑ โ€” LayerNorm ํ†ต๊ณ„ |
| router/shared_expert/routed_expert | n/a | Mistral dense๋ผ ํ•ด๋‹น ์—†์Œ |

### ๋จธ์ง€ ํ†ต๊ณ„
- Total tensors merged: 2,027 (Father + Mother ๊ณตํ†ต)
- Mother vision skipped: 438 (vision_tower + multi_modal_projector + patch_merger)
- Output: 32 shards / 128.2 GB (FP8 + BF16 dtype ์œ ์ง€)
- Elapsed: 5.0 min (CPU bound, single-thread safetensors I/O)

## ํ‰๊ฐ€ ๊ฒฐ๊ณผ (์ „์ฒด)

### GPQA Diamond 20 (seed 42, transformers + finegrained-fp8 kernel)
| ๋ชจ๋ธ | ์ •๋‹ต/์ด | ์ •ํ™•๋„ |
|---|---|---|
| Devstral-2-123B (Father) | 10/20 | 50.0% |
| Mistral-Medium-3.5-128B (Mother) | 9/20 | 45.0% |
| Darwin-Mistral-G1 v1 (failed) | 5/20 | 25.0% (random) |
| **Darwin-Mistral-G1 v2 (this)** | **9/20** | **45.0%** โœ… |

### HumanEval 20 pass@1 (seed 42)
- **G1 v2: 18/20 = 90.0%** (284์ดˆ)
- Devstral baseline ์œ ์ง€ (Devstral ๊ณต๊ฐœ 85-90%)
- Linear merge๋กœ ์ฝ”๋”ฉ SOTA ๋ณด์กด ์‚ฌ๋ก€

## V1 โ†’ V2 ์ง„๋‹จ (์žฌ๋ฐœ ๋ฐฉ์ง€)

V1 ์‹คํŒจ ์›์ธ (GPQA 25% random level):
1. **embedding/lm_head Mother 100% โ†’ Father ํ† ํฐยท์ถœ๋ ฅ ๋งคํ•‘ ์™„์ „ ์†Œ์‹ค**
2. layer-band ร— category ratio ๊ณฑ์…ˆ ๋ณด์ •์œผ๋กœ attention ํ•ญ์ƒ Mother ์ชฝ์œผ๋กœ ๋Œ๋ฆผ

V2 fix:
1. embedding/lm_head Father 100%
2. attention 0.90 โ†’ 0.50
3. layer-band ๋‹จ์ˆœ ์ ์šฉ (๊ณฑ์…ˆ ๋ณด์ • ์ œ๊ฑฐ)

## ์‚ฌ์šฉ

```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# ์˜์กด์„ฑ: pip install --user kernels  (transformers 5.5.x finegrained-fp8 kernel)
model = AutoModelForCausalLM.from_pretrained(
    "FINAL-Bench/Darwin-Mistral-G1",
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)
tok = AutoTokenizer.from_pretrained("FINAL-Bench/Darwin-Mistral-G1")
messages = [{"role": "user", "content": "Write a Python function to compute Fibonacci."}]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inp = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**inp, max_new_tokens=256, do_sample=False)
print(tok.decode(out[0][inp.input_ids.shape[1]:], skip_special_tokens=True))
```

**ํ™˜๊ฒฝ ์š”๊ตฌ์‚ฌํ•ญ**:
- `transformers >= 5.5.0`
- `kernels >= 0.14.0` (finegrained-fp8 kernel ์ž๋™ ๋‹ค์šด๋กœ๋“œ)
- `torch >= 2.10` (FP8 E4M3 ์ง€์›)
- GPU: ๋‹จ์ผ H100/B200 80GB+ (FP8 inference ์‹œ ์•ฝ 128GB โ†’ ๋‹ค์ค‘ GPU ๊ถŒ์žฅ)

## ํ•œ๊ณ„

- **GPQA 80% ๋ชฉํ‘œ ๋ฏธ๋‹ฌ**: ์ž‘์—…์ง€์‹œ์„œ ยง4-3 GPQA >80%๋Š” ์›๋ž˜ Darwin-36B-Opus 86.9% baseline ๊ฐ€์ •. ์˜ต์…˜ A์—์„œ Mother๋ฅผ Mistral-3.5 (45%)๋กœ ๋ณ€๊ฒฝํ–ˆ๊ธฐ์— ๋„๋‹ฌ ๋ถˆ๊ฐ€.
- **G2 ์ง„ํ–‰**: Pixtral ๋น„์ „ ์ธ์ฝ”๋” ํ†ตํ•ฉ + Darwin-36B-Opus cross-arch ํ†ตํ•ฉ์€ ๋ณ„๋„ ํŠธ๋ž™ (G2/G3).
- **SWE-Bench ๋ฏธ์ธก์ •**: ๋ณ„๋„ ํ‰๊ฐ€ ํ™˜๊ฒฝ ํ•„์š”.

## License & Attribution

Apache-2.0 (Devstral-2-123B-Instruct-2512์™€ Mistral-Medium-3.5-128B ๋ชจ๋‘ Apache 2.0).
๋จธ์ง€ ์—”์ง„์€ VIDRAFT Darwin V7+ MRI-only (proprietary).

## ์ธ์šฉ

```bibtex
@misc{darwin-mistral-g1-2026,
  title = {Darwin-Mistral-G1: Linear MRI Merge of Devstral-2-123B and Mistral-Medium-3.5-128B},
  author = {VIDRAFT R&D},
  year = {2026},
  url = {https://huggingface.co/FINAL-Bench/Darwin-Mistral-G1}
}
```

---
**VIDRAFT Inc.** | ๊น€ํƒœ๋ด‰ CAIO | CONFIDENTIAL (private repo until publication)