Add gpt2 base mlx weights
Browse files- README.md +10 -0
- config.json +31 -0
- generation_config.json +6 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- model.safetensors.index.json +156 -0
- special_tokens_map.json +5 -0
- tokenizer.json +0 -0
- tokenizer_config.json +20 -0
- vocab.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- exbert
|
| 5 |
+
- mlx
|
| 6 |
+
license: mit
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
base_model: openai-community/gpt2
|
| 9 |
+
library_name: mlx
|
| 10 |
+
---
|
config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"activation_function": "gelu_new",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"GPT2LMHeadModel"
|
| 5 |
+
],
|
| 6 |
+
"attn_pdrop": 0.1,
|
| 7 |
+
"bos_token_id": 50256,
|
| 8 |
+
"embd_pdrop": 0.1,
|
| 9 |
+
"eos_token_id": 50256,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"layer_norm_epsilon": 1e-05,
|
| 12 |
+
"model_type": "gpt2",
|
| 13 |
+
"n_ctx": 1024,
|
| 14 |
+
"n_embd": 768,
|
| 15 |
+
"n_head": 12,
|
| 16 |
+
"n_layer": 12,
|
| 17 |
+
"n_positions": 1024,
|
| 18 |
+
"resid_pdrop": 0.1,
|
| 19 |
+
"summary_activation": null,
|
| 20 |
+
"summary_first_dropout": 0.1,
|
| 21 |
+
"summary_proj_to_labels": true,
|
| 22 |
+
"summary_type": "cls_index",
|
| 23 |
+
"summary_use_proj": true,
|
| 24 |
+
"task_specific_params": {
|
| 25 |
+
"text-generation": {
|
| 26 |
+
"do_sample": true,
|
| 27 |
+
"max_length": 50
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"vocab_size": 50257
|
| 31 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 50256,
|
| 3 |
+
"eos_token_id": 50256,
|
| 4 |
+
"transformers_version": "4.26.0.dev0",
|
| 5 |
+
"_from_model_config": true
|
| 6 |
+
}
|
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:b48ea073b280cd35b7d19c4ee91656db2a203cd3a84f91313fe350ac96f7c8f0
|
| 3 |
+
size 497773308
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 497759232,
|
| 4 |
+
"total_parameters": 124439808
|
| 5 |
+
},
|
| 6 |
+
"weight_map": {
|
| 7 |
+
"model.h.0.attn.c_attn.bias": "model.safetensors",
|
| 8 |
+
"model.h.0.attn.c_attn.weight": "model.safetensors",
|
| 9 |
+
"model.h.0.attn.c_proj.bias": "model.safetensors",
|
| 10 |
+
"model.h.0.attn.c_proj.weight": "model.safetensors",
|
| 11 |
+
"model.h.0.ln_1.bias": "model.safetensors",
|
| 12 |
+
"model.h.0.ln_1.weight": "model.safetensors",
|
| 13 |
+
"model.h.0.ln_2.bias": "model.safetensors",
|
| 14 |
+
"model.h.0.ln_2.weight": "model.safetensors",
|
| 15 |
+
"model.h.0.mlp.c_fc.bias": "model.safetensors",
|
| 16 |
+
"model.h.0.mlp.c_fc.weight": "model.safetensors",
|
| 17 |
+
"model.h.0.mlp.c_proj.bias": "model.safetensors",
|
| 18 |
+
"model.h.0.mlp.c_proj.weight": "model.safetensors",
|
| 19 |
+
"model.h.1.attn.c_attn.bias": "model.safetensors",
|
| 20 |
+
"model.h.1.attn.c_attn.weight": "model.safetensors",
|
| 21 |
+
"model.h.1.attn.c_proj.bias": "model.safetensors",
|
| 22 |
+
"model.h.1.attn.c_proj.weight": "model.safetensors",
|
| 23 |
+
"model.h.1.ln_1.bias": "model.safetensors",
|
| 24 |
+
"model.h.1.ln_1.weight": "model.safetensors",
|
| 25 |
+
"model.h.1.ln_2.bias": "model.safetensors",
|
| 26 |
+
"model.h.1.ln_2.weight": "model.safetensors",
|
| 27 |
+
"model.h.1.mlp.c_fc.bias": "model.safetensors",
|
| 28 |
+
"model.h.1.mlp.c_fc.weight": "model.safetensors",
|
| 29 |
+
"model.h.1.mlp.c_proj.bias": "model.safetensors",
|
| 30 |
+
"model.h.1.mlp.c_proj.weight": "model.safetensors",
|
| 31 |
+
"model.h.10.attn.c_attn.bias": "model.safetensors",
|
| 32 |
+
"model.h.10.attn.c_attn.weight": "model.safetensors",
|
| 33 |
+
"model.h.10.attn.c_proj.bias": "model.safetensors",
|
| 34 |
+
"model.h.10.attn.c_proj.weight": "model.safetensors",
|
| 35 |
+
"model.h.10.ln_1.bias": "model.safetensors",
|
| 36 |
+
"model.h.10.ln_1.weight": "model.safetensors",
|
| 37 |
+
"model.h.10.ln_2.bias": "model.safetensors",
|
| 38 |
+
"model.h.10.ln_2.weight": "model.safetensors",
|
| 39 |
+
"model.h.10.mlp.c_fc.bias": "model.safetensors",
|
| 40 |
+
"model.h.10.mlp.c_fc.weight": "model.safetensors",
|
| 41 |
+
"model.h.10.mlp.c_proj.bias": "model.safetensors",
|
| 42 |
+
"model.h.10.mlp.c_proj.weight": "model.safetensors",
|
| 43 |
+
"model.h.11.attn.c_attn.bias": "model.safetensors",
|
| 44 |
+
"model.h.11.attn.c_attn.weight": "model.safetensors",
|
| 45 |
+
"model.h.11.attn.c_proj.bias": "model.safetensors",
|
| 46 |
+
"model.h.11.attn.c_proj.weight": "model.safetensors",
|
| 47 |
+
"model.h.11.ln_1.bias": "model.safetensors",
|
| 48 |
+
"model.h.11.ln_1.weight": "model.safetensors",
|
| 49 |
+
"model.h.11.ln_2.bias": "model.safetensors",
|
| 50 |
+
"model.h.11.ln_2.weight": "model.safetensors",
|
| 51 |
+
"model.h.11.mlp.c_fc.bias": "model.safetensors",
|
| 52 |
+
"model.h.11.mlp.c_fc.weight": "model.safetensors",
|
| 53 |
+
"model.h.11.mlp.c_proj.bias": "model.safetensors",
|
| 54 |
+
"model.h.11.mlp.c_proj.weight": "model.safetensors",
|
| 55 |
+
"model.h.2.attn.c_attn.bias": "model.safetensors",
|
| 56 |
+
"model.h.2.attn.c_attn.weight": "model.safetensors",
|
| 57 |
+
"model.h.2.attn.c_proj.bias": "model.safetensors",
|
| 58 |
+
"model.h.2.attn.c_proj.weight": "model.safetensors",
|
| 59 |
+
"model.h.2.ln_1.bias": "model.safetensors",
|
| 60 |
+
"model.h.2.ln_1.weight": "model.safetensors",
|
| 61 |
+
"model.h.2.ln_2.bias": "model.safetensors",
|
| 62 |
+
"model.h.2.ln_2.weight": "model.safetensors",
|
| 63 |
+
"model.h.2.mlp.c_fc.bias": "model.safetensors",
|
| 64 |
+
"model.h.2.mlp.c_fc.weight": "model.safetensors",
|
| 65 |
+
"model.h.2.mlp.c_proj.bias": "model.safetensors",
|
| 66 |
+
"model.h.2.mlp.c_proj.weight": "model.safetensors",
|
| 67 |
+
"model.h.3.attn.c_attn.bias": "model.safetensors",
|
| 68 |
+
"model.h.3.attn.c_attn.weight": "model.safetensors",
|
| 69 |
+
"model.h.3.attn.c_proj.bias": "model.safetensors",
|
| 70 |
+
"model.h.3.attn.c_proj.weight": "model.safetensors",
|
| 71 |
+
"model.h.3.ln_1.bias": "model.safetensors",
|
| 72 |
+
"model.h.3.ln_1.weight": "model.safetensors",
|
| 73 |
+
"model.h.3.ln_2.bias": "model.safetensors",
|
| 74 |
+
"model.h.3.ln_2.weight": "model.safetensors",
|
| 75 |
+
"model.h.3.mlp.c_fc.bias": "model.safetensors",
|
| 76 |
+
"model.h.3.mlp.c_fc.weight": "model.safetensors",
|
| 77 |
+
"model.h.3.mlp.c_proj.bias": "model.safetensors",
|
| 78 |
+
"model.h.3.mlp.c_proj.weight": "model.safetensors",
|
| 79 |
+
"model.h.4.attn.c_attn.bias": "model.safetensors",
|
| 80 |
+
"model.h.4.attn.c_attn.weight": "model.safetensors",
|
| 81 |
+
"model.h.4.attn.c_proj.bias": "model.safetensors",
|
| 82 |
+
"model.h.4.attn.c_proj.weight": "model.safetensors",
|
| 83 |
+
"model.h.4.ln_1.bias": "model.safetensors",
|
| 84 |
+
"model.h.4.ln_1.weight": "model.safetensors",
|
| 85 |
+
"model.h.4.ln_2.bias": "model.safetensors",
|
| 86 |
+
"model.h.4.ln_2.weight": "model.safetensors",
|
| 87 |
+
"model.h.4.mlp.c_fc.bias": "model.safetensors",
|
| 88 |
+
"model.h.4.mlp.c_fc.weight": "model.safetensors",
|
| 89 |
+
"model.h.4.mlp.c_proj.bias": "model.safetensors",
|
| 90 |
+
"model.h.4.mlp.c_proj.weight": "model.safetensors",
|
| 91 |
+
"model.h.5.attn.c_attn.bias": "model.safetensors",
|
| 92 |
+
"model.h.5.attn.c_attn.weight": "model.safetensors",
|
| 93 |
+
"model.h.5.attn.c_proj.bias": "model.safetensors",
|
| 94 |
+
"model.h.5.attn.c_proj.weight": "model.safetensors",
|
| 95 |
+
"model.h.5.ln_1.bias": "model.safetensors",
|
| 96 |
+
"model.h.5.ln_1.weight": "model.safetensors",
|
| 97 |
+
"model.h.5.ln_2.bias": "model.safetensors",
|
| 98 |
+
"model.h.5.ln_2.weight": "model.safetensors",
|
| 99 |
+
"model.h.5.mlp.c_fc.bias": "model.safetensors",
|
| 100 |
+
"model.h.5.mlp.c_fc.weight": "model.safetensors",
|
| 101 |
+
"model.h.5.mlp.c_proj.bias": "model.safetensors",
|
| 102 |
+
"model.h.5.mlp.c_proj.weight": "model.safetensors",
|
| 103 |
+
"model.h.6.attn.c_attn.bias": "model.safetensors",
|
| 104 |
+
"model.h.6.attn.c_attn.weight": "model.safetensors",
|
| 105 |
+
"model.h.6.attn.c_proj.bias": "model.safetensors",
|
| 106 |
+
"model.h.6.attn.c_proj.weight": "model.safetensors",
|
| 107 |
+
"model.h.6.ln_1.bias": "model.safetensors",
|
| 108 |
+
"model.h.6.ln_1.weight": "model.safetensors",
|
| 109 |
+
"model.h.6.ln_2.bias": "model.safetensors",
|
| 110 |
+
"model.h.6.ln_2.weight": "model.safetensors",
|
| 111 |
+
"model.h.6.mlp.c_fc.bias": "model.safetensors",
|
| 112 |
+
"model.h.6.mlp.c_fc.weight": "model.safetensors",
|
| 113 |
+
"model.h.6.mlp.c_proj.bias": "model.safetensors",
|
| 114 |
+
"model.h.6.mlp.c_proj.weight": "model.safetensors",
|
| 115 |
+
"model.h.7.attn.c_attn.bias": "model.safetensors",
|
| 116 |
+
"model.h.7.attn.c_attn.weight": "model.safetensors",
|
| 117 |
+
"model.h.7.attn.c_proj.bias": "model.safetensors",
|
| 118 |
+
"model.h.7.attn.c_proj.weight": "model.safetensors",
|
| 119 |
+
"model.h.7.ln_1.bias": "model.safetensors",
|
| 120 |
+
"model.h.7.ln_1.weight": "model.safetensors",
|
| 121 |
+
"model.h.7.ln_2.bias": "model.safetensors",
|
| 122 |
+
"model.h.7.ln_2.weight": "model.safetensors",
|
| 123 |
+
"model.h.7.mlp.c_fc.bias": "model.safetensors",
|
| 124 |
+
"model.h.7.mlp.c_fc.weight": "model.safetensors",
|
| 125 |
+
"model.h.7.mlp.c_proj.bias": "model.safetensors",
|
| 126 |
+
"model.h.7.mlp.c_proj.weight": "model.safetensors",
|
| 127 |
+
"model.h.8.attn.c_attn.bias": "model.safetensors",
|
| 128 |
+
"model.h.8.attn.c_attn.weight": "model.safetensors",
|
| 129 |
+
"model.h.8.attn.c_proj.bias": "model.safetensors",
|
| 130 |
+
"model.h.8.attn.c_proj.weight": "model.safetensors",
|
| 131 |
+
"model.h.8.ln_1.bias": "model.safetensors",
|
| 132 |
+
"model.h.8.ln_1.weight": "model.safetensors",
|
| 133 |
+
"model.h.8.ln_2.bias": "model.safetensors",
|
| 134 |
+
"model.h.8.ln_2.weight": "model.safetensors",
|
| 135 |
+
"model.h.8.mlp.c_fc.bias": "model.safetensors",
|
| 136 |
+
"model.h.8.mlp.c_fc.weight": "model.safetensors",
|
| 137 |
+
"model.h.8.mlp.c_proj.bias": "model.safetensors",
|
| 138 |
+
"model.h.8.mlp.c_proj.weight": "model.safetensors",
|
| 139 |
+
"model.h.9.attn.c_attn.bias": "model.safetensors",
|
| 140 |
+
"model.h.9.attn.c_attn.weight": "model.safetensors",
|
| 141 |
+
"model.h.9.attn.c_proj.bias": "model.safetensors",
|
| 142 |
+
"model.h.9.attn.c_proj.weight": "model.safetensors",
|
| 143 |
+
"model.h.9.ln_1.bias": "model.safetensors",
|
| 144 |
+
"model.h.9.ln_1.weight": "model.safetensors",
|
| 145 |
+
"model.h.9.ln_2.bias": "model.safetensors",
|
| 146 |
+
"model.h.9.ln_2.weight": "model.safetensors",
|
| 147 |
+
"model.h.9.mlp.c_fc.bias": "model.safetensors",
|
| 148 |
+
"model.h.9.mlp.c_fc.weight": "model.safetensors",
|
| 149 |
+
"model.h.9.mlp.c_proj.bias": "model.safetensors",
|
| 150 |
+
"model.h.9.mlp.c_proj.weight": "model.safetensors",
|
| 151 |
+
"model.ln_f.bias": "model.safetensors",
|
| 152 |
+
"model.ln_f.weight": "model.safetensors",
|
| 153 |
+
"model.wpe.weight": "model.safetensors",
|
| 154 |
+
"model.wte.weight": "model.safetensors"
|
| 155 |
+
}
|
| 156 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<|endoftext|>",
|
| 3 |
+
"eos_token": "<|endoftext|>",
|
| 4 |
+
"unk_token": "<|endoftext|>"
|
| 5 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"50256": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": true,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
}
|
| 12 |
+
},
|
| 13 |
+
"bos_token": "<|endoftext|>",
|
| 14 |
+
"clean_up_tokenization_spaces": false,
|
| 15 |
+
"eos_token": "<|endoftext|>",
|
| 16 |
+
"extra_special_tokens": {},
|
| 17 |
+
"model_max_length": 1024,
|
| 18 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 19 |
+
"unk_token": "<|endoftext|>"
|
| 20 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|