spitfire4794 commited on
Commit
0fc40b0
·
verified ·
1 Parent(s): 570b6d8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -16
README.md CHANGED
@@ -15,9 +15,10 @@ tags:
15
  - 5k-context
16
  - Supra
17
  - Supra-50M
 
18
  ---
19
 
20
- <h1 align="center">Supra1.5-50M Base</h1>
21
 
22
  <p align="center">
23
  Continued Pretraining • 50M Parameters • 5K Context
@@ -25,33 +26,39 @@ tags:
25
 
26
  ![Supra-1.5-Base-EXP](https://cdn-uploads.huggingface.co/production/uploads/68a5d0966d33a07f8aad2e51/Lh7KcQs60Ht9iray8WFbp.png)
27
 
28
- Supra-1.5-50M-Base-exp is a continued-pretrained 50M parameter Llama-style base
29
- model derived from `SupraLabs/Supra-50M-Base`. The target update expands the
30
- usable context window from 1,024 tokens to 5,120 tokens using RoPE scaling and
31
- full-weight continued pretraining.
32
 
 
33
 
34
-
35
- ## Architecture
36
-
37
- The model keeps the original Supra-50M architecture and tokenizer:
38
 
39
  | Specification | Value |
40
  |--------------|--------|
41
  | Architecture | `LlamaForCausalLM` |
42
  | Parameters | ~50M |
43
- | Vocabulary Size | 32,000 |
44
  | Hidden Size | 512 |
45
  | Layers | 12 |
46
  | Attention Heads | 8 |
47
  | KV Heads | 4 |
48
  | Context Length | 5,120 tokens |
49
- | Tokenizer | Original Supra byte-level BPE tokenizer |
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
  ## Continued Pretraining Objective
52
 
53
- This is CPT, not instruction fine-tuning. Training uses packed raw text with
54
- standard causal language-modeling loss:
55
 
56
  - `labels = input_ids`
57
  - all non-pad tokens are trained
@@ -61,7 +68,7 @@ standard causal language-modeling loss:
61
 
62
  ## Data Mix
63
 
64
- The current local training mix prepared for this run is:
65
 
66
  - 3,000,000,062 CPT tokens
67
  - 30% Tool Calling
@@ -69,6 +76,14 @@ The current local training mix prepared for this run is:
69
  - 25% Factual Text (articles, essays, blogs)
70
  - 15% Math & Logic Questions
71
 
 
 
 
 
 
 
 
 
72
 
73
- ### Intended Use
74
- Supervised Fine-Tuning (SFT) and Reinforcement Learning
 
15
  - 5k-context
16
  - Supra
17
  - Supra-50M
18
+ - chatml
19
  ---
20
 
21
+ <h1 align="center">Supra1.5-50M Base (ChatML)</h1>
22
 
23
  <p align="center">
24
  Continued Pretraining • 50M Parameters • 5K Context
 
26
 
27
  ![Supra-1.5-Base-EXP](https://cdn-uploads.huggingface.co/production/uploads/68a5d0966d33a07f8aad2e51/Lh7KcQs60Ht9iray8WFbp.png)
28
 
29
+ Supra-1.5-50M-Base-exp is a continued-pretrained 50M parameter Llama-style base model derived from `SupraLabs/Supra-50M-Base`. The context window has been expanded from 1,024 to 5,120 tokens using RoPE scaling and full-weight continued pretraining.
 
 
 
30
 
31
+ This specific repository has been modified to natively support ChatML. The tokenizer and embedding layers have been updated to include `<|im_start|>` and `<|im_end|>` as single special tokens.
32
 
33
+ ## Architecture & Updates
 
 
 
34
 
35
  | Specification | Value |
36
  |--------------|--------|
37
  | Architecture | `LlamaForCausalLM` |
38
  | Parameters | ~50M |
39
+ | Vocabulary Size | 32,002 (Expanded for ChatML) |
40
  | Hidden Size | 512 |
41
  | Layers | 12 |
42
  | Attention Heads | 8 |
43
  | KV Heads | 4 |
44
  | Context Length | 5,120 tokens |
45
+ | Tokenizer | BPE tokenizer (ChatML Jinja template applied) |
46
+ | Native EOS Token | `<|im_end|>` |
47
+
48
+ ## Vocabulary Expansion & Initialization
49
+
50
+ The model's 3B token CPT corpus included raw ChatML text. As a result, the base model originally learned the tags `<|im_start|>` and `<|im_end|>` as sequences of 7 separate subwords.
51
+
52
+ To convert these tags into single tokens without destroying the learned pre-trained representations, we used subword-mean initialization:
53
+ 1. Extracted the attention embeddings for the original 7-token sequences.
54
+ 2. Averaged the weights for each sequence.
55
+ 3. Assigned these mean weights to the new single-token IDs.
56
+
57
+ This ensures stable loss at the start of fine-tuning and allows inference frameworks to natively stop generation when `<|im_end|>` is predicted.
58
 
59
  ## Continued Pretraining Objective
60
 
61
+ This is a base model, not an instruct model. Training used packed raw text with standard causal language-modeling loss:
 
62
 
63
  - `labels = input_ids`
64
  - all non-pad tokens are trained
 
68
 
69
  ## Data Mix
70
 
71
+ The training mix prepared for the CPT run was:
72
 
73
  - 3,000,000,062 CPT tokens
74
  - 30% Tool Calling
 
76
  - 25% Factual Text (articles, essays, blogs)
77
  - 15% Math & Logic Questions
78
 
79
+ ## Fine-Tuning Guide
80
+
81
+ This model is intended for Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL), including reasoning-style (R1) alignments.
82
+
83
+ You can use standard Hugging Face tools and call `tokenizer.apply_chat_template()` directly on your datasets.
84
+
85
+ **LoRA Configuration Note:**
86
+ Because the vocabulary size was expanded from 32,000 to 32,002, you must train the embedding layers during fine-tuning so the model can update the new ChatML tokens. Add the following to your PEFT/LoRA configuration:
87
 
88
+ ```python
89
+ modules_to_save=["embed_tokens", "lm_head"]