samanehs commited on
Commit
5567e23
1 Parent(s): 3ff8cb6

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: keras-nlp
3
+ pipeline_tag: text-generation
4
+ ---
5
+ This is a [`GPT2` model](https://keras.io/api/keras_nlp/models/gpt2) uploaded using the KerasNLP library and can be used with JAX, TensorFlow, and PyTorch backends.
6
+ This model is related to a `CausalLM` task.
7
+
8
+ Model config:
9
+ * **name:** gpt2_backbone
10
+ * **trainable:** True
11
+ * **vocabulary_size:** 50257
12
+ * **num_layers:** 12
13
+ * **num_heads:** 12
14
+ * **hidden_dim:** 768
15
+ * **intermediate_dim:** 3072
16
+ * **dropout:** 0.1
17
+ * **max_sequence_length:** 1024
18
+
19
+ This model card has been generated automatically and should be completed by the model author. See [Model Cards documentation](https://huggingface.co/docs/hub/model-cards) for more information.
assets/tokenizer/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
assets/tokenizer/vocabulary.json ADDED
The diff for this file is too large to render. See raw diff
 
config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "module": "keras_nlp.src.models.gpt2.gpt2_backbone",
3
+ "class_name": "GPT2Backbone",
4
+ "config": {
5
+ "name": "gpt2_backbone",
6
+ "trainable": true,
7
+ "vocabulary_size": 50257,
8
+ "num_layers": 12,
9
+ "num_heads": 12,
10
+ "hidden_dim": 768,
11
+ "intermediate_dim": 3072,
12
+ "dropout": 0.1,
13
+ "max_sequence_length": 1024
14
+ },
15
+ "registered_name": "keras_nlp>GPT2Backbone"
16
+ }
metadata.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "keras_version": "3.3.3",
3
+ "keras_nlp_version": "0.10.0",
4
+ "parameter_count": 124439808,
5
+ "date_saved": "2024-05-02@00:44:52"
6
+ }
model.weights.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6594323585808fc8907c8b3b5b578e7b021fe944a7bd40a784a210e89f9fbaf
3
+ size 498160592
preprocessor.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "module": "keras_nlp.src.models.gpt2.gpt2_causal_lm_preprocessor",
3
+ "class_name": "GPT2CausalLMPreprocessor",
4
+ "config": {
5
+ "name": "gpt2_causal_lm_preprocessor",
6
+ "trainable": true,
7
+ "dtype": "float32",
8
+ "tokenizer": {
9
+ "module": "keras_nlp.src.models.gpt2.gpt2_tokenizer",
10
+ "class_name": "GPT2Tokenizer",
11
+ "config": {
12
+ "name": "gpt2_tokenizer",
13
+ "trainable": true,
14
+ "dtype": "int32",
15
+ "sequence_length": null,
16
+ "add_prefix_space": false
17
+ },
18
+ "registered_name": "keras_nlp>GPT2Tokenizer"
19
+ },
20
+ "sequence_length": 1024,
21
+ "add_start_token": true,
22
+ "add_end_token": true
23
+ },
24
+ "registered_name": "keras_nlp>GPT2CausalLMPreprocessor"
25
+ }
task.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "module": "keras_nlp.src.models.gpt2.gpt2_causal_lm",
3
+ "class_name": "GPT2CausalLM",
4
+ "config": {
5
+ "backbone": {
6
+ "module": "keras_nlp.src.models.gpt2.gpt2_backbone",
7
+ "class_name": "GPT2Backbone",
8
+ "config": {
9
+ "name": "gpt2_backbone",
10
+ "trainable": true,
11
+ "vocabulary_size": 50257,
12
+ "num_layers": 12,
13
+ "num_heads": 12,
14
+ "hidden_dim": 768,
15
+ "intermediate_dim": 3072,
16
+ "dropout": 0.1,
17
+ "max_sequence_length": 1024
18
+ },
19
+ "registered_name": "keras_nlp>GPT2Backbone"
20
+ },
21
+ "preprocessor": {
22
+ "module": "keras_nlp.src.models.gpt2.gpt2_causal_lm_preprocessor",
23
+ "class_name": "GPT2CausalLMPreprocessor",
24
+ "config": {
25
+ "name": "gpt2_causal_lm_preprocessor",
26
+ "trainable": true,
27
+ "dtype": "float32",
28
+ "tokenizer": {
29
+ "module": "keras_nlp.src.models.gpt2.gpt2_tokenizer",
30
+ "class_name": "GPT2Tokenizer",
31
+ "config": {
32
+ "name": "gpt2_tokenizer",
33
+ "trainable": true,
34
+ "dtype": "int32",
35
+ "sequence_length": null,
36
+ "add_prefix_space": false
37
+ },
38
+ "registered_name": "keras_nlp>GPT2Tokenizer"
39
+ },
40
+ "sequence_length": 1024,
41
+ "add_start_token": true,
42
+ "add_end_token": true
43
+ },
44
+ "registered_name": "keras_nlp>GPT2CausalLMPreprocessor"
45
+ },
46
+ "name": "gpt2_causal_lm"
47
+ },
48
+ "registered_name": "keras_nlp>GPT2CausalLM"
49
+ }
tokenizer.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "module": "keras_nlp.src.models.gpt2.gpt2_tokenizer",
3
+ "class_name": "GPT2Tokenizer",
4
+ "config": {
5
+ "name": "gpt2_tokenizer",
6
+ "trainable": true,
7
+ "dtype": "int32",
8
+ "sequence_length": null,
9
+ "add_prefix_space": false
10
+ },
11
+ "registered_name": "keras_nlp>GPT2Tokenizer"
12
+ }