nyxia commited on
Commit
5f27167
·
verified ·
1 Parent(s): f17f77c

Upload Chimera 279M at step 39500

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - zara-ml
5
+ - chimera
6
+ - gdn
7
+ - ouroboros
8
+ - hybrid-architecture
9
+ language:
10
+ - en
11
+ ---
12
+
13
+ # Ouro-279M
14
+
15
+ **Chimera architecture** — GDN/Attention hybrid with weight sharing.
16
+
17
+ ## Architecture
18
+ - **Type:** Chimera (ChimeraConfig)
19
+ - **Dim:** 1024
20
+ - **Layers:** 16 virtual
21
+ - **Params:** 278,664,160 (279M)
22
+ - **Vocab:** 151936 (Qwen 3 tokenizer)
23
+ - **Context:** 2048 tokens
24
+ - **Topology:** 4 unique bottom + 4×3 shared top
25
+ - **GDN:Attn ratio:** 3:1 (every 4th layer is attention)
26
+
27
+ ## Training
28
+ - **Step:** 39,500
29
+ - **Data:** Mixed (75% FineWeb-Edu, 18% StarCoder, 5% FineMath, 2% UltraChat)
30
+ - **Framework:** Zara-ML (custom PyTorch)
31
+
32
+ ## Usage
33
+ This model uses a custom architecture (not standard HF transformers).
34
+ Load with the zara-ml codebase:
35
+
36
+ ```python
37
+ from scripts.generate import load_model, generate
38
+ model, tokenizer, device = load_model("path/to/checkpoint.pt")
39
+ generate(model, tokenizer, device, "The history of")
40
+ ```
41
+
42
+ Built by Flo & Zara. Part of the Soulkyn project.
chat_template.jinja ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0].role == 'system' %}
4
+ {{- messages[0].content + '\n\n' }}
5
+ {%- endif %}
6
+ {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
7
+ {%- for tool in tools %}
8
+ {{- "\n" }}
9
+ {{- tool | tojson }}
10
+ {%- endfor %}
11
+ {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
12
+ {%- else %}
13
+ {%- endif %}
14
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
15
+ {%- for message in messages[::-1] %}
16
+ {%- set index = (messages|length - 1) - loop.index0 %}
17
+ {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}
18
+ {%- set ns.multi_step_tool = false %}
19
+ {%- set ns.last_query_index = index %}
20
+ {%- endif %}
21
+ {%- endfor %}
22
+ {%- for message in messages %}
23
+ {%- if message.content is string %}
24
+ {%- set content = message.content %}
25
+ {%- else %}
26
+ {%- set content = '' %}
27
+ {%- endif %}
28
+ {%- if message.role == "user" or message.role == "system" %}
29
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
30
+ {%- elif message.role == "assistant" %}
31
+ {%- set reasoning_content = '' %}
32
+ {%- if message.reasoning_content is string %}
33
+ {%- set reasoning_content = message.reasoning_content %}
34
+ {%- else %}
35
+ {%- if '</think>' in content %}
36
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
37
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
38
+ {%- endif %}
39
+ {%- endif %}
40
+ {%- if loop.index0 > ns.last_query_index %}
41
+ {%- if loop.last or (not loop.last and reasoning_content) %}
42
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }}
43
+ {%- else %}
44
+ {{- '<|im_start|>' + message.role + '\n' + content }}
45
+ {%- endif %}
46
+ {%- else %}
47
+ {{- '<|im_start|>' + message.role + '\n' + content }}
48
+ {%- endif %}
49
+ {%- if message.tool_calls %}
50
+ {%- for tool_call in message.tool_calls %}
51
+ {%- if (loop.first and content) or (not loop.first) %}
52
+ {{- '\n' }}
53
+ {%- endif %}
54
+ {%- if tool_call.function %}
55
+ {%- set tool_call = tool_call.function %}
56
+ {%- endif %}
57
+ {{- '<tool_call>\n{"name": "' }}
58
+ {{- tool_call.name }}
59
+ {{- '", "arguments": ' }}
60
+ {%- if tool_call.arguments is string %}
61
+ {{- tool_call.arguments }}
62
+ {%- else %}
63
+ {{- tool_call.arguments | tojson }}
64
+ {%- endif %}
65
+ {{- '}\n</tool_call>' }}
66
+ {%- endfor %}
67
+ {%- endif %}
68
+ {{- '<|im_end|>\n' }}
69
+ {%- elif message.role == "tool" %}
70
+ {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
71
+ {{- '<|im_start|>user' }}
72
+ {%- endif %}
73
+ {{- '\n<tool_response>\n' }}
74
+ {{- content }}
75
+ {{- '\n</tool_response>' }}
76
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
77
+ {{- '<|im_end|>\n' }}
78
+ {%- endif %}
79
+ {%- endif %}
80
+ {%- endfor %}
81
+ {%- if add_generation_prompt %}
82
+ {{- '<|im_start|>assistant\n' }}
83
+ {%- if enable_thinking is defined and enable_thinking is false %}
84
+ {{- '<think>\n\n</think>\n\n' }}
85
+ {%- endif %}
86
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dim": 1024,
3
+ "n_layers": 16,
4
+ "vocab_size": 151936,
5
+ "max_seq_len": 2048,
6
+ "n_heads": 16,
7
+ "n_kv_heads": 4,
8
+ "head_dim": 64,
9
+ "gdn_expand_v": 2,
10
+ "gdn_head_dim": 64,
11
+ "gdn_n_heads": 16,
12
+ "conv_kernel": 4,
13
+ "gdn_use_gate": true,
14
+ "gdn_use_short_conv": true,
15
+ "ffn_mult": 2.67,
16
+ "attn_interval": 4,
17
+ "use_x0_inject": true,
18
+ "use_resid_lambdas": true,
19
+ "use_skip_connections": true,
20
+ "use_diff_attn": false,
21
+ "rope_base": 10000.0,
22
+ "partial_rotary_factor": 0.25,
23
+ "n_bottom": 4,
24
+ "n_physical_top": 4,
25
+ "n_top_loops": 3,
26
+ "architecture": "Chimera",
27
+ "config_class": "ChimeraConfig",
28
+ "topology": "4 bottom + 4x3 top = 16 virtual",
29
+ "step": 39500,
30
+ "total_params": 278664160,
31
+ "size_label": "279M",
32
+ "model_type": "zara-ml"
33
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35cfbf570f7bcdde26f3a9ee928fe62804cc47e05f482cb4ed0ddaf5981b0b64
3
+ size 868508712
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506
3
+ size 11422650
tokenizer_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "backend": "tokenizers",
4
+ "bos_token": null,
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|im_end|>",
7
+ "errors": "replace",
8
+ "extra_special_tokens": [
9
+ "<|im_start|>",
10
+ "<|im_end|>",
11
+ "<|object_ref_start|>",
12
+ "<|object_ref_end|>",
13
+ "<|box_start|>",
14
+ "<|box_end|>",
15
+ "<|quad_start|>",
16
+ "<|quad_end|>",
17
+ "<|vision_start|>",
18
+ "<|vision_end|>",
19
+ "<|vision_pad|>",
20
+ "<|image_pad|>",
21
+ "<|video_pad|>"
22
+ ],
23
+ "is_local": false,
24
+ "model_max_length": 131072,
25
+ "pad_token": "<|endoftext|>",
26
+ "split_special_tokens": false,
27
+ "tokenizer_class": "Qwen2Tokenizer",
28
+ "unk_token": null
29
+ }