CompactAI commited on
Commit
736ebc1
·
verified ·
1 Parent(s): 09b9b71

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - pruned
5
+ - python
6
+ - optimized
7
+ base_model: openai-community/openai-gpt
8
+ ---
9
+
10
+ # openai-gpt-python-light
11
+
12
+ This model is a **light** pruned version of [openai-community/openai-gpt](https://huggingface.co/openai-community/openai-gpt), specialized for **PYTHON** tasks.
13
+
14
+ ## Pruning Details
15
+
16
+ - **Base Model**: openai-community/openai-gpt
17
+ - **Specialization**: Python
18
+ - **Prune Mode**: Light
19
+ - **Method**: Activation-based weight pruning
20
+
21
+ ## Performance Comparison
22
+
23
+ | Category | Original | Pruned |
24
+ |----------|----------|--------|
25
+ | Python | 0.0% | 0.0% |
26
+ | HTML | 0.0% | 0.0% |
27
+ | Trivia | 0.0% | 0.0% |
28
+ | Math | 0.0% | 0.0% |
29
+ | Reasoning | 0.0% | 0.0% |
30
+ | Medical | 0.0% | 0.0% |
31
+ | Linux | 0.0% | 0.0% |
32
+ | Writing | 0.0% | 0.0% |
33
+
34
+ ![Comparison Graph](comparison_graph.png)
35
+
36
+ ## Usage
37
+
38
+ ```python
39
+ from transformers import AutoModelForCausalLM, AutoTokenizer
40
+
41
+ model = AutoModelForCausalLM.from_pretrained("CompactAI/openai-gpt-python-light")
42
+ tokenizer = AutoTokenizer.from_pretrained("CompactAI/openai-gpt-python-light")
43
+ ```
44
+
45
+ ## License
46
+
47
+ This model inherits the license from the base model.
comparison_graph.png ADDED
config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "afn": "gelu",
3
+ "architectures": [
4
+ "OpenAIGPTLMHeadModel"
5
+ ],
6
+ "attn_pdrop": 0.1,
7
+ "dtype": "float16",
8
+ "embd_pdrop": 0.1,
9
+ "initializer_range": 0.02,
10
+ "layer_norm_epsilon": 1e-05,
11
+ "model_type": "openai-gpt",
12
+ "n_ctx": 512,
13
+ "n_embd": 768,
14
+ "n_head": 12,
15
+ "n_layer": 12,
16
+ "n_positions": 512,
17
+ "n_special": 0,
18
+ "predict_special_tokens": true,
19
+ "resid_pdrop": 0.1,
20
+ "summary_activation": null,
21
+ "summary_first_dropout": 0.1,
22
+ "summary_proj_to_labels": true,
23
+ "summary_type": "cls_index",
24
+ "summary_use_proj": true,
25
+ "task_specific_params": {
26
+ "text-generation": {
27
+ "do_sample": true,
28
+ "max_length": 50
29
+ }
30
+ },
31
+ "transformers_version": "4.57.6",
32
+ "use_cache": false,
33
+ "vocab_size": 40478
34
+ }
generation_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "transformers_version": "4.57.6"
4
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:201750e9a56a8bc8142eb3f9302a99545046f96800befe4659f4074a2e2775dc
3
+ size 233084296
special_tokens_map.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "pad_token": "<unk>",
3
+ "unk_token": "<unk>"
4
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<unk>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ }
11
+ },
12
+ "clean_up_tokenization_spaces": false,
13
+ "extra_special_tokens": {},
14
+ "model_max_length": 512,
15
+ "pad_token": "<unk>",
16
+ "tokenizer_class": "OpenAIGPTTokenizer",
17
+ "unk_token": "<unk>"
18
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff