ray0rf1re commited on
Commit
7367f71
·
verified ·
1 Parent(s): 200178f

Upload 8 files

Browse files
.gitattributes ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ model.safetensors filter=lfs diff=lfs merge=lfs -text
2
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - ai-evaluation
7
+ - mathematics
8
+ - trigonometry
9
+ - calculus
10
+ - algebra
11
+ - qwen2
12
+ - causal-lm
13
+ - trained-from-scratch
14
+ base_model: none
15
+ ---
16
+
17
+ # HyperNix.2
18
+
19
+ **Version:** 0.2
20
+ **Parameters:** 101,370,880 (~101.37 M)
21
+ **Architecture:** Qwen 2.5-style decoder-only transformer (trained **from scratch**)
22
+
23
+ ## What can it do?
24
+
25
+ | Domain | Capability |
26
+ |---|---|
27
+ | AI Evaluation | Test, evaluate, grade and rate other AI model outputs |
28
+ | Mathematics | Full Trigonometry, Calculus (limits/derivatives/integrals), Algebra 1 & 2 |
29
+ | English | Fluent conversational English |
30
+
31
+ ## Architecture
32
+
33
+ | Hyperparameter | Value |
34
+ |---|---|
35
+ | `vocab_size` | 151,936 (Qwen 2.5 tokenizer) |
36
+ | `hidden_size` | 512 |
37
+ | `intermediate_size` | 1,193 (SwiGLU) |
38
+ | `num_hidden_layers` | 9 |
39
+ | `num_attention_heads` | 8 |
40
+ | `num_key_value_heads` | 4 (GQA) |
41
+ | `max_position_embeddings` | 2,048 |
42
+ | `tie_word_embeddings` | True |
43
+ | Total parameters | **101,370,880** |
44
+
45
+ ## Training
46
+
47
+ - Hardware: Single NVIDIA GTX 1080 (8 GB VRAM)
48
+ - Precision: FP16 + gradient checkpointing
49
+ - Optimizer: AdamW (lr=3e-4, cosine decay)
50
+ - This is **not** a LoRA or fine-tune — all weights are randomly initialised and trained from scratch.
51
+
52
+ ## Usage
53
+
54
+ ```python
55
+ from transformers import AutoTokenizer, AutoModelForCausalLM
56
+ import torch
57
+
58
+ tokenizer = AutoTokenizer.from_pretrained("ray0rf1re/hyper-Nix.2")
59
+ model = AutoModelForCausalLM.from_pretrained("ray0rf1re/hyper-Nix.2", torch_dtype=torch.float16)
60
+
61
+ prompt = "<|im_start|>user\nEvaluate this AI response: The capital of France is London.<|im_end|>\n<|im_start|>assistant\n"
62
+ inputs = tokenizer(prompt, return_tensors="pt")
63
+ with torch.no_grad():
64
+ out = model.generate(**inputs, max_new_tokens=200, temperature=0.7)
65
+ print(tokenizer.decode(out[0], skip_special_tokens=False))
66
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- if tools %}
2
+ {{- '<|im_start|>system\n' }}
3
+ {%- if messages[0]['role'] == 'system' %}
4
+ {{- messages[0]['content'] }}
5
+ {%- else %}
6
+ {{- 'You are a helpful assistant.' }}
7
+ {%- endif %}
8
+ {{- "\n\n# 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>" }}
9
+ {%- for tool in tools %}
10
+ {{- "\n" }}
11
+ {{- tool | tojson }}
12
+ {%- endfor %}
13
+ {{- "\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" }}
14
+ {%- else %}
15
+ {%- if messages[0]['role'] == 'system' %}
16
+ {{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
17
+ {%- else %}
18
+ {{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}
19
+ {%- endif %}
20
+ {%- endif %}
21
+ {%- for message in messages %}
22
+ {%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
23
+ {{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
24
+ {%- elif message.role == "assistant" %}
25
+ {{- '<|im_start|>' + message.role }}
26
+ {%- if message.content %}
27
+ {{- '\n' + message.content }}
28
+ {%- endif %}
29
+ {%- for tool_call in message.tool_calls %}
30
+ {%- if tool_call.function is defined %}
31
+ {%- set tool_call = tool_call.function %}
32
+ {%- endif %}
33
+ {{- '\n<tool_call>\n{"name": "' }}
34
+ {{- tool_call.name }}
35
+ {{- '", "arguments": ' }}
36
+ {{- tool_call.arguments | tojson }}
37
+ {{- '}\n</tool_call>' }}
38
+ {%- endfor %}
39
+ {{- '<|im_end|>\n' }}
40
+ {%- elif message.role == "tool" %}
41
+ {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
42
+ {{- '<|im_start|>user' }}
43
+ {%- endif %}
44
+ {{- '\n<tool_response>\n' }}
45
+ {{- message.content }}
46
+ {{- '\n</tool_response>' }}
47
+ {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
48
+ {{- '<|im_end|>\n' }}
49
+ {%- endif %}
50
+ {%- endif %}
51
+ {%- endfor %}
52
+ {%- if add_generation_prompt %}
53
+ {{- '<|im_start|>assistant\n' }}
54
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "dtype": "float32",
9
+ "eos_token_id": 151645,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 512,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1193,
14
+ "layer_types": [
15
+ "full_attention",
16
+ "full_attention",
17
+ "full_attention",
18
+ "full_attention",
19
+ "full_attention",
20
+ "full_attention",
21
+ "full_attention",
22
+ "full_attention",
23
+ "full_attention"
24
+ ],
25
+ "max_position_embeddings": 2048,
26
+ "max_window_layers": 28,
27
+ "model_type": "qwen2",
28
+ "num_attention_heads": 8,
29
+ "num_hidden_layers": 9,
30
+ "num_key_value_heads": 4,
31
+ "pad_token_id": null,
32
+ "rms_norm_eps": 1e-06,
33
+ "rope_parameters": {
34
+ "rope_theta": 1000000.0,
35
+ "rope_type": "default"
36
+ },
37
+ "sliding_window": null,
38
+ "tie_word_embeddings": true,
39
+ "transformers_version": "5.5.4",
40
+ "use_cache": false,
41
+ "use_sliding_window": false,
42
+ "vocab_size": 151936
43
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 151643,
4
+ "eos_token_id": 151645,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "transformers_version": "5.5.4",
8
+ "use_cache": false
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3de485dbfafa5c3abed8c5f81a9f64ab8f067f2e321454c935f9a2c0d90a28e
3
+ size 405532464
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3fd169731d2cbde95e10bf356d66d5997fd885dd8dbb6fb4684da3f23b2585d8
3
+ size 11421892
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": "<|endoftext|>",
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
+ }
training_meta.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "step": 30000,
3
+ "loss": NaN,
4
+ "model_name": "HyperNix.2",
5
+ "version": "0.2",
6
+ "parameters": 101380096
7
+ }