Manish Dhakal commited on
Commit ·
2841907
1
Parent(s): 3a6414e
[ADD]: first model push
Browse files- README.md +34 -0
- architecture.png +0 -0
- config.json +42 -0
- generation_config.json +6 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +12 -0
README.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- databricks/databricks-dolly-15k
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
metrics:
|
| 8 |
+
- rouge
|
| 9 |
+
base_model:
|
| 10 |
+
- openai-community/gpt2
|
| 11 |
+
pipeline_tag: text-generation
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
# DistillLens-gpt2-base
|
| 15 |
+
|
| 16 |
+
[paper](https://arxiv.org/abs/2602.13567) | [code](https://github.com/manishdhakal/DistillLens)
|
| 17 |
+
|
| 18 |
+
**DistillLens-gpt2-base** is a gpt2-base (120M) model distilled from [gpt2-xlarge (1.5B)](https://huggingface.co/MiniLLM/teacher-gpt2-1.5B) on [databricks-dolly-15k](https://huggingface.co/datasets/aisquared/databricks-dolly-15k).
|
| 19 |
+
|
| 20 |
+
## Method
|
| 21 |
+
|
| 22 |
+
<p align='left'>
|
| 23 |
+
<img src="architecture.png" width="1000">
|
| 24 |
+
</p>
|
| 25 |
+
|
| 26 |
+
**Note**: DistillLens requires a [GPT2-Base](https://huggingface.co/openai-community/gpt2) for initilization to perform the distillation.
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
## Citation
|
| 30 |
+
```
|
| 31 |
+
@article{dhakal2026distilllens,
|
| 32 |
+
title={DistillLens: Symmetric Knowledge Distillation Through Logit Lens},
|
| 33 |
+
author={Dhakal, Manish and Jinadu, Uthman and Budathoki, Anjila and Sunderraman, Rajshekhar and Ding, Yi},
|
| 34 |
+
journal={arXiv preprint arXiv:2602.13567},
|
| 35 |
+
year={2026}
|
| 36 |
+
}
|
| 37 |
+
```
|
architecture.png
ADDED
|
config.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"activation_function": "gelu_new",
|
| 3 |
+
"add_cross_attention": false,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"GPT2LMHeadModel"
|
| 6 |
+
],
|
| 7 |
+
"attn_pdrop": 0.1,
|
| 8 |
+
"bos_token_id": 50256,
|
| 9 |
+
"dtype": "bfloat16",
|
| 10 |
+
"embd_pdrop": 0.1,
|
| 11 |
+
"eos_token_id": 50256,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"is_model_parallel": false,
|
| 14 |
+
"layer_norm_epsilon": 1e-05,
|
| 15 |
+
"model_type": "gpt2",
|
| 16 |
+
"n_ctx": 1024,
|
| 17 |
+
"n_embd": 768,
|
| 18 |
+
"n_head": 12,
|
| 19 |
+
"n_inner": null,
|
| 20 |
+
"n_layer": 12,
|
| 21 |
+
"n_positions": 1024,
|
| 22 |
+
"pad_token_id": null,
|
| 23 |
+
"reorder_and_upcast_attn": false,
|
| 24 |
+
"resid_pdrop": 0.1,
|
| 25 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 26 |
+
"scale_attn_weights": true,
|
| 27 |
+
"summary_activation": null,
|
| 28 |
+
"summary_first_dropout": 0.1,
|
| 29 |
+
"summary_proj_to_labels": true,
|
| 30 |
+
"summary_type": "cls_index",
|
| 31 |
+
"summary_use_proj": true,
|
| 32 |
+
"task_specific_params": {
|
| 33 |
+
"text-generation": {
|
| 34 |
+
"do_sample": true,
|
| 35 |
+
"max_length": 50
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"tie_word_embeddings": true,
|
| 39 |
+
"transformers_version": "5.2.0",
|
| 40 |
+
"use_cache": true,
|
| 41 |
+
"vocab_size": 50257
|
| 42 |
+
}
|
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": "5.2.0"
|
| 6 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5f9d20d1909bdfcd7ef7802dac552e1943c07b3e8b8c71f4a4746e57b0dcf7e6
|
| 3 |
+
size 248894656
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<|endoftext|>",
|
| 5 |
+
"eos_token": "<|endoftext|>",
|
| 6 |
+
"errors": "replace",
|
| 7 |
+
"is_local": true,
|
| 8 |
+
"model_max_length": 1024,
|
| 9 |
+
"pad_token": "<|endoftext|>",
|
| 10 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 11 |
+
"unk_token": "<|endoftext|>"
|
| 12 |
+
}
|