interplane.Get Omega
Read in your language

MojoLlama

Archived Mojo/MAX quantizer and serving research repository (read-only history)

Brought by drakestapleton

branch main Branches Tags History

MojoLlama / src / mojollama / mojo_engine / gpt_oss_weights.mojo

46 lines · 1296 bytes Raw Blame History
1// Auto-generated GPT-OSS weight indices (436 files)
2// n_embd=2880 n_layers=24
3// n_experts=32 n_experts_per_tok=4
4
5@extern("load_weight")
6def _load_w(idx: Int64) abi("C") -> Int64: ...
7@extern("free_weight")
8def _free_w(p: Int64) abi("C") -> None: ...
9@extern("weight_size")
10def _w_size(idx: Int64) abi("C") -> Int64: ...
11
12comptime EMB: Int64 = 0
13comptime EMB_F32: Int64 = 1
14comptime META: Int64 = 434
15comptime OUT_NORM: Int64 = 435
16
17comptime L0_attn_norm: Int64 = 2
18comptime L0_down_e: Int64 = 3
19comptime L0_down_info: Int64 = 4
20comptime L0_ffn_norm: Int64 = 5
21comptime L0_gate_e: Int64 = 6
22comptime L0_gate_info: Int64 = 7
23comptime L0_k_info: Int64 = 8
24comptime L0_k_w: Int64 = 9
25comptime L0_o_f32: Int64 = 10
26comptime L0_o_info: Int64 = 11
27comptime L0_o_w: Int64 = 12
28comptime L0_q_info: Int64 = 13
29comptime L0_q_w: Int64 = 14
30comptime L0_router: Int64 = 15
31comptime L0_up_e: Int64 = 16
32comptime L0_up_info: Int64 = 17
33comptime L0_v_info: Int64 = 18
34comptime L0_v_w: Int64 = 19
35
36comptime N_EXPERTS: Int64 = 32
37comptime N_EXP_PER_TOK: Int64 = 4
38comptime N_LAYERS: Int64 = 24
39comptime N_EMBD: Int64 = 2880
40comptime N_HEAD: Int64 = 64
41comptime N_KV_HEAD: Int64 = 8
42comptime HEAD_DIM: Int64 = 64
43comptime VOCAB_SIZE: Int64 = 201088
44comptime N_FF: Int64 = 2880
45comptime LAYER_STRIDE: Int64 = 18
46