Instructions to use tiny-random/raon-1-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiny-random/raon-1-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiny-random/raon-1-mini", 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("tiny-random/raon-1-mini", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiny-random/raon-1-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiny-random/raon-1-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiny-random/raon-1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tiny-random/raon-1-mini
- SGLang
How to use tiny-random/raon-1-mini 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 "tiny-random/raon-1-mini" \ --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": "tiny-random/raon-1-mini", "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 "tiny-random/raon-1-mini" \ --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": "tiny-random/raon-1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tiny-random/raon-1-mini with Docker Model Runner:
docker model run hf.co/tiny-random/raon-1-mini
Upload folder using huggingface_hub
Browse files- README.md +9 -306
- config.json +3 -20
- model.safetensors +2 -2
README.md
CHANGED
|
@@ -11,10 +11,10 @@ Structural comparison with `KRAFTON/Raon-1-mini-preview`:
|
|
| 11 |
| Feature | Source | Tiny |
|
| 12 |
|---|---:|---:|
|
| 13 |
| Vocabulary / tied embeddings | 259,840 / untied | same |
|
| 14 |
-
| Layers | 25 |
|
| 15 |
-
| RDA / NoPE MLA layer cadence | 18 / 7 |
|
| 16 |
| Raon mHC streams | 4 | same |
|
| 17 |
-
| Dense prefix / MoE layers | layer 0 / 24 layers |
|
| 18 |
| Routed experts / active experts | 128 / 6 | 64 / 6 |
|
| 19 |
| Hidden width / attention head dimension | 2,560 / 128 | 32 / 32 |
|
| 20 |
| RDA, MLA and LoRA dimensions | source widths | 32-wide compatible projections |
|
|
@@ -28,7 +28,7 @@ not implemented by PyTorch; it does not change the serialized precision.
|
|
| 28 |
|
| 29 |
| File path | Size |
|
| 30 |
|------|------|
|
| 31 |
-
| model.safetensors |
|
| 32 |
|
| 33 |
|
| 34 |
### Example usage:
|
|
@@ -70,13 +70,16 @@ folder = Path(save_folder)
|
|
| 70 |
folder.mkdir(parents=True, exist_ok=True)
|
| 71 |
raw = json.loads(Path(hf_hub_download(source_model_id, "config.json", revision=source_revision)).read_text())
|
| 72 |
raw.update(
|
| 73 |
-
hidden_size=32, head_dim=32, num_attention_heads=1, intermediate_size=128,
|
| 74 |
num_experts=64, num_experts_per_token=6, moe_intermediate_size=32,
|
| 75 |
q_lora_rank=32, kv_lora_rank=32, qk_nope_head_dim=32,
|
| 76 |
qk_rope_head_dim=32, v_head_dim=32, rda_decay_rank=32,
|
| 77 |
max_position_embeddings=4096,
|
| 78 |
)
|
| 79 |
-
raw["rda_config"].update(
|
|
|
|
|
|
|
|
|
|
| 80 |
# Build the public remote-code graph in BF16 first. The source's MXFP8
|
| 81 |
# modules cannot initialize random float8 parameters directly, then the
|
| 82 |
# routed experts are converted back to the source's E4M3 + E8M0 format.
|
|
@@ -312,306 +315,6 @@ Raon1MiniForCausalLM(
|
|
| 312 |
)
|
| 313 |
)
|
| 314 |
)
|
| 315 |
-
(8-10): 3 x Raon1MiniDecoderLayer(
|
| 316 |
-
(input_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 317 |
-
(post_attention_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 318 |
-
(self_attn): Raon1MiniRDA(
|
| 319 |
-
(q_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 320 |
-
(k_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 321 |
-
(v_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 322 |
-
(q_conv1d): Raon1MiniShortConv()
|
| 323 |
-
(k_conv1d): Raon1MiniShortConv()
|
| 324 |
-
(v_conv1d): Raon1MiniShortConv()
|
| 325 |
-
(f_a_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 326 |
-
(f_b_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 327 |
-
(b_proj): Linear(in_features=32, out_features=1, bias=False)
|
| 328 |
-
(rda_w_proj): Linear(in_features=32, out_features=1, bias=False)
|
| 329 |
-
(g_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 330 |
-
(o_norm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 331 |
-
(o_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 332 |
-
)
|
| 333 |
-
(self_attn_raon_mhc): RaonMHC(
|
| 334 |
-
(res): RaonMHCStreamMix()
|
| 335 |
-
)
|
| 336 |
-
(mlp_raon_mhc): RaonMHC(
|
| 337 |
-
(res): RaonMHCStreamMix()
|
| 338 |
-
)
|
| 339 |
-
(moe): Raon1MiniMoE(
|
| 340 |
-
(gate): Raon1MiniRouter()
|
| 341 |
-
(experts): ModuleList(
|
| 342 |
-
(0-63): 64 x Raon1MiniExpert(
|
| 343 |
-
(gate_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 344 |
-
(up_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 345 |
-
(down_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 346 |
-
)
|
| 347 |
-
)
|
| 348 |
-
(shared_experts): Raon1MiniMLP(
|
| 349 |
-
(gate_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 350 |
-
(up_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 351 |
-
(down_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 352 |
-
)
|
| 353 |
-
)
|
| 354 |
-
)
|
| 355 |
-
(11): Raon1MiniDecoderLayer(
|
| 356 |
-
(input_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 357 |
-
(post_attention_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 358 |
-
(self_attn): Raon1MiniMLA(
|
| 359 |
-
(q_a_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 360 |
-
(q_a_layernorm): Raon1MiniRMSNorm((32,), eps=1e-06)
|
| 361 |
-
(q_b_proj): Linear(in_features=32, out_features=64, bias=False)
|
| 362 |
-
(kv_a_proj_with_mqa): Linear(in_features=32, out_features=64, bias=False)
|
| 363 |
-
(kv_a_layernorm): Raon1MiniRMSNorm((32,), eps=1e-06)
|
| 364 |
-
(kv_b_proj): Linear(in_features=32, out_features=64, bias=False)
|
| 365 |
-
(g_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 366 |
-
(o_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 367 |
-
)
|
| 368 |
-
(self_attn_raon_mhc): RaonMHC(
|
| 369 |
-
(res): RaonMHCStreamMix()
|
| 370 |
-
)
|
| 371 |
-
(mlp_raon_mhc): RaonMHC(
|
| 372 |
-
(res): RaonMHCStreamMix()
|
| 373 |
-
)
|
| 374 |
-
(moe): Raon1MiniMoE(
|
| 375 |
-
(gate): Raon1MiniRouter()
|
| 376 |
-
(experts): ModuleList(
|
| 377 |
-
(0-63): 64 x Raon1MiniExpert(
|
| 378 |
-
(gate_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 379 |
-
(up_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 380 |
-
(down_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 381 |
-
)
|
| 382 |
-
)
|
| 383 |
-
(shared_experts): Raon1MiniMLP(
|
| 384 |
-
(gate_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 385 |
-
(up_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 386 |
-
(down_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 387 |
-
)
|
| 388 |
-
)
|
| 389 |
-
)
|
| 390 |
-
(12-14): 3 x Raon1MiniDecoderLayer(
|
| 391 |
-
(input_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 392 |
-
(post_attention_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 393 |
-
(self_attn): Raon1MiniRDA(
|
| 394 |
-
(q_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 395 |
-
(k_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 396 |
-
(v_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 397 |
-
(q_conv1d): Raon1MiniShortConv()
|
| 398 |
-
(k_conv1d): Raon1MiniShortConv()
|
| 399 |
-
(v_conv1d): Raon1MiniShortConv()
|
| 400 |
-
(f_a_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 401 |
-
(f_b_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 402 |
-
(b_proj): Linear(in_features=32, out_features=1, bias=False)
|
| 403 |
-
(rda_w_proj): Linear(in_features=32, out_features=1, bias=False)
|
| 404 |
-
(g_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 405 |
-
(o_norm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 406 |
-
(o_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 407 |
-
)
|
| 408 |
-
(self_attn_raon_mhc): RaonMHC(
|
| 409 |
-
(res): RaonMHCStreamMix()
|
| 410 |
-
)
|
| 411 |
-
(mlp_raon_mhc): RaonMHC(
|
| 412 |
-
(res): RaonMHCStreamMix()
|
| 413 |
-
)
|
| 414 |
-
(moe): Raon1MiniMoE(
|
| 415 |
-
(gate): Raon1MiniRouter()
|
| 416 |
-
(experts): ModuleList(
|
| 417 |
-
(0-63): 64 x Raon1MiniExpert(
|
| 418 |
-
(gate_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 419 |
-
(up_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 420 |
-
(down_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 421 |
-
)
|
| 422 |
-
)
|
| 423 |
-
(shared_experts): Raon1MiniMLP(
|
| 424 |
-
(gate_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 425 |
-
(up_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 426 |
-
(down_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 427 |
-
)
|
| 428 |
-
)
|
| 429 |
-
)
|
| 430 |
-
(15): Raon1MiniDecoderLayer(
|
| 431 |
-
(input_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 432 |
-
(post_attention_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 433 |
-
(self_attn): Raon1MiniMLA(
|
| 434 |
-
(q_a_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 435 |
-
(q_a_layernorm): Raon1MiniRMSNorm((32,), eps=1e-06)
|
| 436 |
-
(q_b_proj): Linear(in_features=32, out_features=64, bias=False)
|
| 437 |
-
(kv_a_proj_with_mqa): Linear(in_features=32, out_features=64, bias=False)
|
| 438 |
-
(kv_a_layernorm): Raon1MiniRMSNorm((32,), eps=1e-06)
|
| 439 |
-
(kv_b_proj): Linear(in_features=32, out_features=64, bias=False)
|
| 440 |
-
(g_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 441 |
-
(o_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 442 |
-
)
|
| 443 |
-
(self_attn_raon_mhc): RaonMHC(
|
| 444 |
-
(res): RaonMHCStreamMix()
|
| 445 |
-
)
|
| 446 |
-
(mlp_raon_mhc): RaonMHC(
|
| 447 |
-
(res): RaonMHCStreamMix()
|
| 448 |
-
)
|
| 449 |
-
(moe): Raon1MiniMoE(
|
| 450 |
-
(gate): Raon1MiniRouter()
|
| 451 |
-
(experts): ModuleList(
|
| 452 |
-
(0-63): 64 x Raon1MiniExpert(
|
| 453 |
-
(gate_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 454 |
-
(up_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 455 |
-
(down_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 456 |
-
)
|
| 457 |
-
)
|
| 458 |
-
(shared_experts): Raon1MiniMLP(
|
| 459 |
-
(gate_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 460 |
-
(up_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 461 |
-
(down_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 462 |
-
)
|
| 463 |
-
)
|
| 464 |
-
)
|
| 465 |
-
(16-18): 3 x Raon1MiniDecoderLayer(
|
| 466 |
-
(input_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 467 |
-
(post_attention_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 468 |
-
(self_attn): Raon1MiniRDA(
|
| 469 |
-
(q_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 470 |
-
(k_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 471 |
-
(v_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 472 |
-
(q_conv1d): Raon1MiniShortConv()
|
| 473 |
-
(k_conv1d): Raon1MiniShortConv()
|
| 474 |
-
(v_conv1d): Raon1MiniShortConv()
|
| 475 |
-
(f_a_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 476 |
-
(f_b_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 477 |
-
(b_proj): Linear(in_features=32, out_features=1, bias=False)
|
| 478 |
-
(rda_w_proj): Linear(in_features=32, out_features=1, bias=False)
|
| 479 |
-
(g_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 480 |
-
(o_norm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 481 |
-
(o_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 482 |
-
)
|
| 483 |
-
(self_attn_raon_mhc): RaonMHC(
|
| 484 |
-
(res): RaonMHCStreamMix()
|
| 485 |
-
)
|
| 486 |
-
(mlp_raon_mhc): RaonMHC(
|
| 487 |
-
(res): RaonMHCStreamMix()
|
| 488 |
-
)
|
| 489 |
-
(moe): Raon1MiniMoE(
|
| 490 |
-
(gate): Raon1MiniRouter()
|
| 491 |
-
(experts): ModuleList(
|
| 492 |
-
(0-63): 64 x Raon1MiniExpert(
|
| 493 |
-
(gate_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 494 |
-
(up_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 495 |
-
(down_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 496 |
-
)
|
| 497 |
-
)
|
| 498 |
-
(shared_experts): Raon1MiniMLP(
|
| 499 |
-
(gate_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 500 |
-
(up_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 501 |
-
(down_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 502 |
-
)
|
| 503 |
-
)
|
| 504 |
-
)
|
| 505 |
-
(19): Raon1MiniDecoderLayer(
|
| 506 |
-
(input_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 507 |
-
(post_attention_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 508 |
-
(self_attn): Raon1MiniMLA(
|
| 509 |
-
(q_a_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 510 |
-
(q_a_layernorm): Raon1MiniRMSNorm((32,), eps=1e-06)
|
| 511 |
-
(q_b_proj): Linear(in_features=32, out_features=64, bias=False)
|
| 512 |
-
(kv_a_proj_with_mqa): Linear(in_features=32, out_features=64, bias=False)
|
| 513 |
-
(kv_a_layernorm): Raon1MiniRMSNorm((32,), eps=1e-06)
|
| 514 |
-
(kv_b_proj): Linear(in_features=32, out_features=64, bias=False)
|
| 515 |
-
(g_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 516 |
-
(o_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 517 |
-
)
|
| 518 |
-
(self_attn_raon_mhc): RaonMHC(
|
| 519 |
-
(res): RaonMHCStreamMix()
|
| 520 |
-
)
|
| 521 |
-
(mlp_raon_mhc): RaonMHC(
|
| 522 |
-
(res): RaonMHCStreamMix()
|
| 523 |
-
)
|
| 524 |
-
(moe): Raon1MiniMoE(
|
| 525 |
-
(gate): Raon1MiniRouter()
|
| 526 |
-
(experts): ModuleList(
|
| 527 |
-
(0-63): 64 x Raon1MiniExpert(
|
| 528 |
-
(gate_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 529 |
-
(up_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 530 |
-
(down_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 531 |
-
)
|
| 532 |
-
)
|
| 533 |
-
(shared_experts): Raon1MiniMLP(
|
| 534 |
-
(gate_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 535 |
-
(up_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 536 |
-
(down_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 537 |
-
)
|
| 538 |
-
)
|
| 539 |
-
)
|
| 540 |
-
(20-22): 3 x Raon1MiniDecoderLayer(
|
| 541 |
-
(input_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 542 |
-
(post_attention_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 543 |
-
(self_attn): Raon1MiniRDA(
|
| 544 |
-
(q_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 545 |
-
(k_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 546 |
-
(v_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 547 |
-
(q_conv1d): Raon1MiniShortConv()
|
| 548 |
-
(k_conv1d): Raon1MiniShortConv()
|
| 549 |
-
(v_conv1d): Raon1MiniShortConv()
|
| 550 |
-
(f_a_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 551 |
-
(f_b_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 552 |
-
(b_proj): Linear(in_features=32, out_features=1, bias=False)
|
| 553 |
-
(rda_w_proj): Linear(in_features=32, out_features=1, bias=False)
|
| 554 |
-
(g_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 555 |
-
(o_norm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 556 |
-
(o_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 557 |
-
)
|
| 558 |
-
(self_attn_raon_mhc): RaonMHC(
|
| 559 |
-
(res): RaonMHCStreamMix()
|
| 560 |
-
)
|
| 561 |
-
(mlp_raon_mhc): RaonMHC(
|
| 562 |
-
(res): RaonMHCStreamMix()
|
| 563 |
-
)
|
| 564 |
-
(moe): Raon1MiniMoE(
|
| 565 |
-
(gate): Raon1MiniRouter()
|
| 566 |
-
(experts): ModuleList(
|
| 567 |
-
(0-63): 64 x Raon1MiniExpert(
|
| 568 |
-
(gate_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 569 |
-
(up_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 570 |
-
(down_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 571 |
-
)
|
| 572 |
-
)
|
| 573 |
-
(shared_experts): Raon1MiniMLP(
|
| 574 |
-
(gate_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 575 |
-
(up_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 576 |
-
(down_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 577 |
-
)
|
| 578 |
-
)
|
| 579 |
-
)
|
| 580 |
-
(23-24): 2 x Raon1MiniDecoderLayer(
|
| 581 |
-
(input_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 582 |
-
(post_attention_layernorm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 583 |
-
(self_attn): Raon1MiniMLA(
|
| 584 |
-
(q_a_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 585 |
-
(q_a_layernorm): Raon1MiniRMSNorm((32,), eps=1e-06)
|
| 586 |
-
(q_b_proj): Linear(in_features=32, out_features=64, bias=False)
|
| 587 |
-
(kv_a_proj_with_mqa): Linear(in_features=32, out_features=64, bias=False)
|
| 588 |
-
(kv_a_layernorm): Raon1MiniRMSNorm((32,), eps=1e-06)
|
| 589 |
-
(kv_b_proj): Linear(in_features=32, out_features=64, bias=False)
|
| 590 |
-
(g_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 591 |
-
(o_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 592 |
-
)
|
| 593 |
-
(self_attn_raon_mhc): RaonMHC(
|
| 594 |
-
(res): RaonMHCStreamMix()
|
| 595 |
-
)
|
| 596 |
-
(mlp_raon_mhc): RaonMHC(
|
| 597 |
-
(res): RaonMHCStreamMix()
|
| 598 |
-
)
|
| 599 |
-
(moe): Raon1MiniMoE(
|
| 600 |
-
(gate): Raon1MiniRouter()
|
| 601 |
-
(experts): ModuleList(
|
| 602 |
-
(0-63): 64 x Raon1MiniExpert(
|
| 603 |
-
(gate_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 604 |
-
(up_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 605 |
-
(down_proj): Raon1MiniRoutedLinear(in_features=32, out_features=32, bias=False)
|
| 606 |
-
)
|
| 607 |
-
)
|
| 608 |
-
(shared_experts): Raon1MiniMLP(
|
| 609 |
-
(gate_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 610 |
-
(up_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 611 |
-
(down_proj): Linear(in_features=32, out_features=32, bias=False)
|
| 612 |
-
)
|
| 613 |
-
)
|
| 614 |
-
)
|
| 615 |
)
|
| 616 |
(norm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 617 |
)
|
|
|
|
| 11 |
| Feature | Source | Tiny |
|
| 12 |
|---|---:|---:|
|
| 13 |
| Vocabulary / tied embeddings | 259,840 / untied | same |
|
| 14 |
+
| Layers | 25 | 8; two 3-RDA + 1-MLA cycles |
|
| 15 |
+
| RDA / NoPE MLA layer cadence | 18 / 7 | 6 / 2 |
|
| 16 |
| Raon mHC streams | 4 | same |
|
| 17 |
+
| Dense prefix / MoE layers | layer 0 / 24 layers | layer 0 / 7 layers |
|
| 18 |
| Routed experts / active experts | 128 / 6 | 64 / 6 |
|
| 19 |
| Hidden width / attention head dimension | 2,560 / 128 | 32 / 32 |
|
| 20 |
| RDA, MLA and LoRA dimensions | source widths | 32-wide compatible projections |
|
|
|
|
| 28 |
|
| 29 |
| File path | Size |
|
| 30 |
|------|------|
|
| 31 |
+
| model.safetensors | 35.3MB |
|
| 32 |
|
| 33 |
|
| 34 |
### Example usage:
|
|
|
|
| 70 |
folder.mkdir(parents=True, exist_ok=True)
|
| 71 |
raw = json.loads(Path(hf_hub_download(source_model_id, "config.json", revision=source_revision)).read_text())
|
| 72 |
raw.update(
|
| 73 |
+
hidden_size=32, head_dim=32, num_attention_heads=1, num_hidden_layers=8, intermediate_size=128,
|
| 74 |
num_experts=64, num_experts_per_token=6, moe_intermediate_size=32,
|
| 75 |
q_lora_rank=32, kv_lora_rank=32, qk_nope_head_dim=32,
|
| 76 |
qk_rope_head_dim=32, v_head_dim=32, rda_decay_rank=32,
|
| 77 |
max_position_embeddings=4096,
|
| 78 |
)
|
| 79 |
+
raw["rda_config"].update(
|
| 80 |
+
num_heads=1, head_dim=32,
|
| 81 |
+
rda_layers=[1, 2, 3, 5, 6, 7], mla_layers=[4, 8],
|
| 82 |
+
)
|
| 83 |
# Build the public remote-code graph in BF16 first. The source's MXFP8
|
| 84 |
# modules cannot initialize random float8 parameters directly, then the
|
| 85 |
# routed experts are converted back to the source's E4M3 + E8M0 format.
|
|
|
|
| 315 |
)
|
| 316 |
)
|
| 317 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 318 |
)
|
| 319 |
(norm): Raon1MiniRMSNorm((32,), eps=1e-05)
|
| 320 |
)
|
config.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
"model_type": "raon1_mini",
|
| 6 |
"dtype": "bfloat16",
|
| 7 |
"hidden_size": 32,
|
| 8 |
-
"num_hidden_layers":
|
| 9 |
"num_attention_heads": 1,
|
| 10 |
"head_dim": 32,
|
| 11 |
"vocab_size": 259840,
|
|
@@ -42,12 +42,7 @@
|
|
| 42 |
"gate_lower_bound": -5.0,
|
| 43 |
"mla_layers": [
|
| 44 |
4,
|
| 45 |
-
8
|
| 46 |
-
12,
|
| 47 |
-
16,
|
| 48 |
-
20,
|
| 49 |
-
24,
|
| 50 |
-
25
|
| 51 |
],
|
| 52 |
"rda_layers": [
|
| 53 |
1,
|
|
@@ -55,19 +50,7 @@
|
|
| 55 |
3,
|
| 56 |
5,
|
| 57 |
6,
|
| 58 |
-
7
|
| 59 |
-
9,
|
| 60 |
-
10,
|
| 61 |
-
11,
|
| 62 |
-
13,
|
| 63 |
-
14,
|
| 64 |
-
15,
|
| 65 |
-
17,
|
| 66 |
-
18,
|
| 67 |
-
19,
|
| 68 |
-
21,
|
| 69 |
-
22,
|
| 70 |
-
23
|
| 71 |
]
|
| 72 |
},
|
| 73 |
"auto_map": {
|
|
|
|
| 5 |
"model_type": "raon1_mini",
|
| 6 |
"dtype": "bfloat16",
|
| 7 |
"hidden_size": 32,
|
| 8 |
+
"num_hidden_layers": 8,
|
| 9 |
"num_attention_heads": 1,
|
| 10 |
"head_dim": 32,
|
| 11 |
"vocab_size": 259840,
|
|
|
|
| 42 |
"gate_lower_bound": -5.0,
|
| 43 |
"mla_layers": [
|
| 44 |
4,
|
| 45 |
+
8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
],
|
| 47 |
"rda_layers": [
|
| 48 |
1,
|
|
|
|
| 50 |
3,
|
| 51 |
5,
|
| 52 |
6,
|
| 53 |
+
7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
]
|
| 55 |
},
|
| 56 |
"auto_map": {
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d95179de018937f323151c604da87fb9fdf9348799c48a922b767e5513319d0
|
| 3 |
+
size 35338328
|