GPUburnout commited on
Commit
e6c803b
·
verified ·
1 Parent(s): 3e07df5

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - llama
7
+ - pretrained
8
+ - from-scratch
9
+ - gpuburnout
10
+ pipeline_tag: text-generation
11
+ ---
12
+
13
+ # GPUburnout-1B
14
+
15
+ A 1.04 billion parameter Llama-style language model trained from scratch on 11.8B tokens for $175.
16
+
17
+ ## Model Details
18
+
19
+ - **Architecture:** Llama-style decoder-only transformer
20
+ - **Parameters:** 1.04B
21
+ - **Hidden dim:** 2048
22
+ - **Layers:** 16
23
+ - **Attention:** GQA (32 query heads, 8 KV heads)
24
+ - **FFN:** SwiGLU (intermediate 8192)
25
+ - **Position encoding:** RoPE (theta=500000)
26
+ - **Context length:** 2048 tokens
27
+ - **Vocabulary:** 32,005 tokens (BPE + 5 special tokens)
28
+ - **Weight tying:** Yes (embedding + LM head)
29
+
30
+ ## Training
31
+
32
+ - **Data:** 11.8B tokens (FineWeb-Edu 85%, Python-Edu 4.2%, FineMath 10.8%)
33
+ - **Hardware:** A100 SXM 80GB on RunPod
34
+ - **Steps:** 90,000
35
+ - **Final loss:** 2.494
36
+ - **Total cost:** ~$175 GPU compute
37
+ - **Throughput:** ~28,535 tokens/sec
38
+
39
+ ## Benchmarks (0-shot)
40
+
41
+ | Benchmark | Metric | Score | Random |
42
+ |---|---|---|---|
43
+ | ARC-Easy | acc | 47.1% | 25% |
44
+ | HellaSwag | acc_norm | 28.8% | 25% |
45
+ | ARC-Challenge | acc_norm | 23.3% | 25% |
46
+ | MMLU | acc | 23.0% | 25% |
47
+
48
+ ## Tokenizer
49
+
50
+ Includes ChatML special tokens for future SFT:
51
+ - `<|im_start|>` (32000), `<|im_end|>` (32001)
52
+ - `<|system|>` (32002), `<|user|>` (32003), `<|assistant|>` (32004)
53
+
54
+ ## Usage
55
+
56
+ ```python
57
+ from transformers import AutoModelForCausalLM, AutoTokenizer
58
+
59
+ model = AutoModelForCausalLM.from_pretrained("GPUburnout/GPUburnout-1B", torch_dtype="float16")
60
+ tokenizer = AutoTokenizer.from_pretrained("GPUburnout/GPUburnout-1B")
61
+
62
+ inputs = tokenizer("The capital of France is", return_tensors="pt")
63
+ outputs = model.generate(**inputs, max_new_tokens=50)
64
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
65
+ ```
66
+
67
+ ## Blog
68
+
69
+ Full training journey documented at [gpuburnout.com](https://gpuburnout.com)
70
+
71
+ ## Author
72
+
73
+ Jun Park ([@GPUburnout](https://github.com/GPUburnout))
chat_template.jinja ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {% for message in messages %}<|im_start|>{{ message['role'] }}
2
+ {{ message['content'] }}<|im_end|>
3
+ {% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
4
+ {% endif %}
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "dtype": "float16",
9
+ "eos_token_id": 2,
10
+ "head_dim": 64,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 2048,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 8192,
15
+ "max_position_embeddings": 2048,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 32,
19
+ "num_hidden_layers": 16,
20
+ "num_key_value_heads": 8,
21
+ "pad_token_id": null,
22
+ "pretraining_tp": 1,
23
+ "rms_norm_eps": 1e-06,
24
+ "rope_parameters": {
25
+ "rope_theta": 500000.0,
26
+ "rope_type": "default"
27
+ },
28
+ "tie_word_embeddings": true,
29
+ "transformers_version": "5.3.0",
30
+ "use_cache": true,
31
+ "vocab_size": 32005
32
+ }
generation_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_sample": true,
3
+ "eos_token_id": 32001,
4
+ "max_new_tokens": 256,
5
+ "pad_token_id": 1,
6
+ "repetition_penalty": 1.1,
7
+ "temperature": 0.7,
8
+ "top_k": 50,
9
+ "top_p": 0.9,
10
+ "transformers_version": "5.3.0"
11
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ba2a39c2ce7bb9dc8a1410a02849dc087e09a0256c1946e1fd0eae682a2aeae
3
+ size 2077401304
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<|im_start|>",
4
+ "eos_token": "<|im_end|>",
5
+ "extra_special_tokens": [
6
+ "<|endoftext|>",
7
+ "<|system|>",
8
+ "<|user|>",
9
+ "<|assistant|>"
10
+ ],
11
+ "model_max_length": 1000000000000000019884624838656,
12
+ "pad_token": "<|pad|>",
13
+ "tokenizer_class": "TokenizersBackend",
14
+ "unk_token": "<|unk|>"
15
+ }