lapp0 commited on
Commit
0b7f975
1 Parent(s): 0a027ee

End of training

Browse files
README.md ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: distilbert/distilgpt2
3
+ datasets:
4
+ - wikimedia/wikipedia
5
+ library_name: Distily
6
+ license: apache-2.0
7
+ tags:
8
+ - generated_from_trainer
9
+ model-index:
10
+ - name: distily_validate_extra_grad_stats3
11
+ results: []
12
+ ---
13
+
14
+
15
+ # Summary
16
+
17
+ Distilled with [Distily](https://github.com/lapp0/distily) library
18
+ using teacher model [gpt2](https://huggingface.co/gpt2)
19
+ on dataset [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia).
20
+
21
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
22
+ should probably proofread and complete it, then remove this comment.
23
+
24
+ # Model description
25
+
26
+ More information needed
27
+
28
+ # Intended uses & limitations
29
+
30
+ More information needed
31
+ -->
32
+
33
+ # Model Architecture:
34
+ - **Architecture**: `GPT2LMHeadModel`
35
+ - **Total Parameters**: 81,912,576
36
+ - **Data Type (dtype)**: torch.bfloat16
37
+ - **Model Size**: 0.16 GB
38
+
39
+
40
+ # Benchmark Metrics Comparison
41
+
42
+ | Metric | |
43
+ | :--- |
44
+
45
+ # Resource Usage Comparison
46
+
47
+ - VRAM Use: 7.4255 GB
48
+
49
+ # Distillation (Teacher -> Student) Architecture Difference:
50
+
51
+ - **Architecture**: `GPT2LMHeadModel` -> `GPT2LMHeadModel`
52
+ - **Total Parameters**: 124,439,808 -> 81,912,576
53
+ - **Data Type (dtype)**: torch.bfloat16 -> torch.bfloat16
54
+ - **Model Size**: 0.24 GB -> 0.16 GB
55
+
56
+ <details>
57
+ <summary>Module Diff Details</summary>
58
+
59
+ ```diff
60
+ --- teacher model modules
61
+ +++ student model modules
62
+ @@ -4,7 +4,7 @@
63
+ (wpe): Embedding(1024, 768)
64
+ (drop): Dropout(p=0.1, inplace=False)
65
+ (h): ModuleList(
66
+ - (0-11): 12 x GPT2Block(
67
+ + (0-5): 6 x GPT2Block(
68
+ (ln_1): LayerNorm((768,), eps=1e-05, elementwise_affine=True)
69
+ (attn): GPT2FlashAttention2(
70
+ (c_attn): Conv1D()
71
+
72
+ ```
73
+
74
+ </details>
75
+ <br/>
76
+
77
+ # Train Dataset
78
+ Trained on 6,816,188 tokens from the [wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia) dataset.
79
+
80
+ - Num Samples: `9,900`
81
+ - Subset: `20231101.en`
82
+ - Split: `train`
83
+
84
+
85
+ # Training Objective
86
+
87
+ ```
88
+ DistillationObjective(logits_loss_component=LossComponent(label=logits, weight=1, loss_fn=kl), attn_loss_component=LossComponent(label=attn, weight=5, loss_fn=raw_mse, layer_mapper=layer-2, projector=orthogonal))
89
+ ```
90
+
91
+ # Hyperparameters
92
+ The following hyperparameters were used during training:
93
+
94
+ <details>
95
+ <summary>Expand</summary>
96
+
97
+ - learning_rate: `0.0002`
98
+ - train_batch_size: `4`
99
+ - eval_batch_size: `8`
100
+ - seed: `42`
101
+ - optimizer: `Adam with betas=(0.9,0.999) and epsilon=1e-08`
102
+ - lr_scheduler_type: `polynomial`
103
+ - num_epochs: `1.0`
104
+ - distillation_objective: `DistillationObjective(logits_loss_component=LossComponent(label=logits, weight=1, loss_fn=kl), attn_loss_component=LossComponent(label=attn, weight=5, loss_fn=raw_mse, layer_mapper=layer-2, projector=orthogonal))`
105
+ - lr_scheduler: `<torch.optim.lr_scheduler.LambdaLR object at 0x7f53f2d5d870>`
106
+ - student_model_name_or_path: `None`
107
+ - student_config_name_or_path: `distilbert/distilgpt2`
108
+ - student_model_config: `None`
109
+ - reinitialize_weights: `None`
110
+ - copy_teacher_modules: `[('lm_head', False)]`
111
+ - student_model_as_bitnet: `False`
112
+ - teacher_model_name_or_path: `gpt2`
113
+ - teacher_load_in_8bit: `False`
114
+ - teacher_load_in_4bit: `False`
115
+ - dataset_uri: `wikimedia/wikipedia`
116
+ - dataset_subset: `20231101.en`
117
+ - dataset_split: `train`
118
+ - dataset_column_name: `text`
119
+ - dataset_sample_size: `10000`
120
+ - dataset_test_size: `0.01`
121
+ - gradient_accumulation_steps: `1`
122
+ - weight_decay: `0.0`
123
+ - max_grad_norm: `1.0`
124
+ - warmup_ratio: `0`
125
+ - warmup_steps: `0`
126
+ - gradient_checkpointing: `True`
127
+
128
+ </details>
129
+ <br/>
130
+
131
+
132
+ # Framework Versions
133
+ - Distily 0.4.1
134
+ - Transformers 4.44.2
135
+ - Pytorch 2.3.0
136
+ - Datasets 2.21.0
benchmarks.shelve.bak ADDED
File without changes
benchmarks.shelve.dat ADDED
File without changes
benchmarks.shelve.dir ADDED
File without changes
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 50256,
4
+ "eos_token_id": 50256,
5
+ "transformers_version": "4.44.2"
6
+ }
logs/attn_projector=orthogonal, attn_weight=5, extra_grad_stats=True, learning_rate=0.0002, per_device_train_batch_size=4, warmup_ratio=0/events.out.tfevents.1725311283.261a4d6fb516 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3845a759e554cbae4ec81b9e94521589a1a586219390f3824ad9553df2c9064e
3
+ size 249