Text Generation
Transformers
Safetensors
Korean
English
aether_v2_7way
foundation-model
sovereign-ai
fully-open
open-source
mixture-of-experts
Mixture of Experts
heterogeneous-attention
latin-square
from-scratch
reproducible
pretrained
korean
vidraft
aether
conversational
custom_code
Instructions to use FINAL-Bench/Aether-7B-5Attn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FINAL-Bench/Aether-7B-5Attn with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FINAL-Bench/Aether-7B-5Attn", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("FINAL-Bench/Aether-7B-5Attn", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FINAL-Bench/Aether-7B-5Attn with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FINAL-Bench/Aether-7B-5Attn" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FINAL-Bench/Aether-7B-5Attn", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FINAL-Bench/Aether-7B-5Attn
- SGLang
How to use FINAL-Bench/Aether-7B-5Attn 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 "FINAL-Bench/Aether-7B-5Attn" \ --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": "FINAL-Bench/Aether-7B-5Attn", "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 "FINAL-Bench/Aether-7B-5Attn" \ --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": "FINAL-Bench/Aether-7B-5Attn", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FINAL-Bench/Aether-7B-5Attn with Docker Model Runner:
docker model run hf.co/FINAL-Bench/Aether-7B-5Attn
card: add 7x7 Latin-square structure section + diagram + batch_size=1 note
Browse files- README_ko.md +33 -1
README_ko.md
CHANGED
|
@@ -143,6 +143,36 @@ GPT ์ดํ ๊ฑฐ์ ๋ชจ๋ ํธ๋์คํฌ๋จธ๋ **๋ชจ๋ ์ธต์์ ๋๊ฐ์ ์ดํ
|
|
| 143 |
|
| 144 |
---
|
| 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
## 4. ์ฌ์
|
| 147 |
|
| 148 |
| ํญ๋ชฉ | ๊ฐ |
|
|
@@ -294,7 +324,9 @@ out = model.generate(**ids, max_new_tokens=128,
|
|
| 294 |
print(tok.decode(out[0], skip_special_tokens=True))
|
| 295 |
```
|
| 296 |
|
| 297 |
-
### ์ฌ์ฉ
|
|
|
|
|
|
|
| 298 |
|
| 299 |
- **๋ฒ ์ด์ค ๋ชจ๋ธ์
๋๋ค.** ์ง์(instruction) ํ๋์ด ๋์ด ์์ง ์์ต๋๋ค. instruct ๋ฒ์ ์ ์ค๋น ์ค์
๋๋ค.
|
| 300 |
- **`do_sample=True` ๋ฅผ ์ฌ์ฉํ์ญ์์ค.** ๋ฒ ์ด์ค ๋ชจ๋ธ ํน์ฑ์ greedy ๋์ฝ๋ฉ์ ๋ฐ๋ณต์ ๋น ์ง๋๋ค.
|
|
|
|
| 143 |
|
| 144 |
---
|
| 145 |
|
| 146 |
+
|
| 147 |
+
## 3.2 ๊ตฌ์กฐ ์ฌํ โ 7ร7 ๋ผํด ์ง๊ต ๋ฐฐ์น
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
|
| 151 |
+
49๊ฐ ์ธต์ **7 ร 7 ๋ผํด ๋ฐฉ์ง(Latin square)** ์ ์ด๋ฃน๋๋ค. ๊ฐ ์ธต์ ์ดํ
์
์ข
๋ฅ๋ ๋ค์ ๊ท์น์ผ๋ก ์ ํด์ง๋๋ค:
|
| 152 |
+
|
| 153 |
+
```
|
| 154 |
+
attention_type(layer) = ATTN_TYPES[(row + col) mod 7]
|
| 155 |
+
๋จ, row = layer // 7, col = layer % 7
|
| 156 |
+
```
|
| 157 |
+
|
| 158 |
+
### ๋ผํด ๋ฐฉ์ง์ ์ฑ์ง (๊ตฌ์กฐ์ ํน์ด์ฑ)
|
| 159 |
+
|
| 160 |
+
- **๊ฐ ์ข
๋ฅ๊ฐ ๋ชจ๋ ํ์ ์ ํํ ํ ๋ฒ, ๋ชจ๋ ์ด์๋ ์ ํํ ํ ๋ฒ** ๋ํ๋ฉ๋๋ค (7์ข
ร 7์ธต = 49). ์ด๊ฒ์ด "๋ผํด ๋ฐฉ์ง"์ ์ ์์
๋๋ค.
|
| 161 |
+
- ๊ทธ ๊ฒฐ๊ณผ **์ด๋ค ์ดํ
์
์ข
๋ฅ๋ ํน์ ๊น์ด(์ด๊ธฐยท์ค๊ฐยทํ๊ธฐ ์ธต)์ ํธ์ค๋์ง ์์ต๋๋ค.** ์ํ ์ด๋(+1)์ผ๋ก ๋ฐฐ์น๋์ด ๊น์ด ๋ฐฉํฅ์ผ๋ก ๊ณ ๋ฅด๊ฒ ๋ถ์ฐ๋ฉ๋๋ค.
|
| 162 |
+
- **์ 7์ธ๊ฐ**: 7์ ์์(prime)์ด๋ฏ๋ก ์ํ ์ด๋ `(row+col) mod 7` ์ด ์์ ํ ๋ผํด ๋ฐฉ์ง(๊ฐ ํยท์ด์ด 7์ข
์ ์์ด)์ ๋ง๋ญ๋๋ค. 7ยฒ=49์ธต์ผ๋ก ๋ฑ ๋จ์ด์ง๋๋ค.
|
| 163 |
+
|
| 164 |
+
### ์ ์ด๋ ๊ฒ ๋ฐฐ์นํ๋๊ฐ โ ํต์ ์ฅ์น
|
| 165 |
+
|
| 166 |
+
"์์ผ๋ฉด ์ข์ ๊ฒ ๊ฐ๋ค"๋ ์ง๊ด์ ์ฝ์ง๋ง, ์๋ฌด๋ ๊ฒ๋ ์์ผ๋ฉด **๊ฒฐ๊ณผ๊ฐ ๋ฐฐ์น ํธํฅ ํ์ธ์ง ์ข
๋ฅ ํ์ธ์ง ๊ตฌ๋ถํ ์ ์์ต๋๋ค.** `full` ์ด ์ฐ์ฐํ ํ๊ธฐ ์ธต์ ๋ชฐ๋ฆฌ๋ฉด "์ด์ข
์ด๋ผ์" ์ํ ๊ฒ ์๋๋ผ "ํ๊ธฐ ์ธต์ด full ์ด๋ผ์" ์ํ ๊ฒ์ด ๋ฉ๋๋ค.
|
| 167 |
+
|
| 168 |
+
**๋ผํด ๋ฐฉ์ง์ ์ด ํธํฅ์ ๊ตฌ์กฐ์ ์ผ๋ก ์ ๊ฑฐํฉ๋๋ค.** ๊ฐ ์ข
๋ฅ๊ฐ ๋ชจ๋ ๊น์ด๋ฅผ ์ ํํ ํ ๋ฒ์ฉ ๊ฑฐ์น๋ฏ๋ก, "์ด์ข
๋ฐฐ์น์ ํจ๊ณผ"๋ผ๋ ์ง๋ฌธ์ **๊น์ด ํธํฅ ์์ด** ๋์ง ์ ์์ต๋๋ค. ์ฆ ๋ผํด ๋ฐฉ์ง์ ์ฑ๋ฅ์ ์ํ ์ฅ์์ด ์๋๋ผ **์ฌํ ๊ฐ๋ฅํ ๊ณผํ์ ์ํ ํต์ ์ฅ์น**์
๋๋ค.
|
| 169 |
+
|
| 170 |
+
### 7๊ฐ ๋ผ๋ฒจ โ 5๊ฐ ๋ฉ์ปค๋์ฆ
|
| 171 |
+
|
| 172 |
+
๋ฐฉ์ง์ ๋ฐฐ์น๋๋ ๋ผ๋ฒจ์ 7๊ฐ(`nsa`ยท`differential`ยท`full`ยท`linear`ยท`sliding`ยท`compress`ยท`hybrid`)์ด์ง๋ง, **์๋ก ๋ค๋ฅธ ๋ฉ์ปค๋์ฆ์ 5๊ฐ**์
๋๋ค โ `compress` ๋ full ๊ฒฝ๋ก๋ก, `linear` ๋ SDPA+๊ฒ์ดํธ๋ก ๋์ํฉ๋๋ค(๊ทธ๋ฆผ์์ ๋น๊ธ). ๋ชจ๋ธ๋ช
`5Attn` ์ ๋ผ๋ฒจ ์(7)๊ฐ ์๋๋ผ **๋ฉ์ปค๋์ฆ ์(5)** ๋ฅผ ๋ฐ๋ฆ
๋๋ค.
|
| 173 |
+
|
| 174 |
+
*์ฐ๋ฆฌ๊ฐ ์๋ ํ, ์ด์ข
์ดํ
์
์ ๋ผํด ๋ฐฉ์ง์ผ๋ก ๋ฐฐ์นํ ๊ณต๊ฐ ๋ชจ๋ธ์ ์์ต๋๋ค.*
|
| 175 |
+
|
| 176 |
## 4. ์ฌ์
|
| 177 |
|
| 178 |
| ํญ๋ชฉ | ๊ฐ |
|
|
|
|
| 324 |
print(tok.decode(out[0], skip_special_tokens=True))
|
| 325 |
```
|
| 326 |
|
| 327 |
+
### ์ฌ์ฉ
|
| 328 |
+
> โ ๏ธ **batch_size=1 ๋ก ์ฌ์ฉํ์ธ์.** ๋ณธ ๋ชจ๋ธ์ ์ผ๋ถ ์ดํ
์
(NSA ๊ณ์ด)์ padding mask ๋ฅผ ์ฌ์ฉํ์ง ์์ผ๋ฏ๋ก, ์ฌ๋ฌ ์ํ์ค๋ฅผ padding ํ์ฌ ๋ฐฐ์น๋ก ๋ฃ์ผ๋ฉด ๊ฒฐ๊ณผ๊ฐ ์กฐ์ฉํ ์ค์ผ๋ ์ ์์ต๋๋ค. ํ ๋ฒ์ ํ๋์ฉ(batch_size=1) ์ถ๋ก ํ์ญ์์ค.
|
| 329 |
+
์ ์ฐธ๊ณ
|
| 330 |
|
| 331 |
- **๋ฒ ์ด์ค ๋ชจ๋ธ์
๋๋ค.** ์ง์(instruction) ํ๋์ด ๋์ด ์์ง ์์ต๋๋ค. instruct ๋ฒ์ ์ ์ค๋น ์ค์
๋๋ค.
|
| 332 |
- **`do_sample=True` ๋ฅผ ์ฌ์ฉํ์ญ์์ค.** ๋ฒ ์ด์ค ๋ชจ๋ธ ํน์ฑ์ greedy ๋์ฝ๋ฉ์ ๋ฐ๋ณต์ ๋น ์ง๋๋ค.
|