Xenova HF Staff commited on
Commit
8407892
·
verified ·
0 Parent(s):

Duplicate from Xenova/tiny-random-Phi3ForCausalLM

Browse files
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags: []
4
+ ---
5
+
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+ Code used to generate the model:
10
+ ```py
11
+ from transformers import Phi3Config, Phi3ForCausalLM, AutoTokenizer
12
+
13
+ model = Phi3ForCausalLM(Phi3Config(
14
+ hidden_size=32,
15
+ intermediate_size=64,
16
+ num_attention_heads=4,
17
+ num_hidden_layers=2,
18
+ num_key_value_heads=4,
19
+ pad_token_id=32000,
20
+ sliding_window=2047,
21
+ ))
22
+ tokenizer = AutoTokenizer.from_pretrained('microsoft/Phi-3-mini-4k-instruct')
23
+
24
+ model.push_to_hub('Xenova/tiny-random-Phi3ForCausalLM')
25
+ tokenizer.push_to_hub('Xenova/tiny-random-Phi3ForCausalLM')
26
+ ```
27
+
28
+
29
+ ## Model Details
30
+
31
+ ### Model Description
32
+
33
+ <!-- Provide a longer summary of what this model is. -->
34
+
35
+ This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
36
+
37
+ - **Developed by:** [More Information Needed]
38
+ - **Funded by [optional]:** [More Information Needed]
39
+ - **Shared by [optional]:** [More Information Needed]
40
+ - **Model type:** [More Information Needed]
41
+ - **Language(s) (NLP):** [More Information Needed]
42
+ - **License:** [More Information Needed]
43
+ - **Finetuned from model [optional]:** [More Information Needed]
44
+
45
+ ### Model Sources [optional]
46
+
47
+ <!-- Provide the basic links for the model. -->
48
+
49
+ - **Repository:** [More Information Needed]
50
+ - **Paper [optional]:** [More Information Needed]
51
+ - **Demo [optional]:** [More Information Needed]
52
+
53
+ ## Uses
54
+
55
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
56
+
57
+ ### Direct Use
58
+
59
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ### Downstream Use [optional]
64
+
65
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Out-of-Scope Use
70
+
71
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
72
+
73
+ [More Information Needed]
74
+
75
+ ## Bias, Risks, and Limitations
76
+
77
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
78
+
79
+ [More Information Needed]
80
+
81
+ ### Recommendations
82
+
83
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
84
+
85
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
86
+
87
+ ## How to Get Started with the Model
88
+
89
+ Use the code below to get started with the model.
90
+
91
+ [More Information Needed]
92
+
93
+ ## Training Details
94
+
95
+ ### Training Data
96
+
97
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
98
+
99
+ [More Information Needed]
100
+
101
+ ### Training Procedure
102
+
103
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
104
+
105
+ #### Preprocessing [optional]
106
+
107
+ [More Information Needed]
108
+
109
+
110
+ #### Training Hyperparameters
111
+
112
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
113
+
114
+ #### Speeds, Sizes, Times [optional]
115
+
116
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
117
+
118
+ [More Information Needed]
119
+
120
+ ## Evaluation
121
+
122
+ <!-- This section describes the evaluation protocols and provides the results. -->
123
+
124
+ ### Testing Data, Factors & Metrics
125
+
126
+ #### Testing Data
127
+
128
+ <!-- This should link to a Dataset Card if possible. -->
129
+
130
+ [More Information Needed]
131
+
132
+ #### Factors
133
+
134
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
135
+
136
+ [More Information Needed]
137
+
138
+ #### Metrics
139
+
140
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
141
+
142
+ [More Information Needed]
143
+
144
+ ### Results
145
+
146
+ [More Information Needed]
147
+
148
+ #### Summary
149
+
150
+
151
+
152
+ ## Model Examination [optional]
153
+
154
+ <!-- Relevant interpretability work for the model goes here -->
155
+
156
+ [More Information Needed]
157
+
158
+ ## Environmental Impact
159
+
160
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
161
+
162
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
163
+
164
+ - **Hardware Type:** [More Information Needed]
165
+ - **Hours used:** [More Information Needed]
166
+ - **Cloud Provider:** [More Information Needed]
167
+ - **Compute Region:** [More Information Needed]
168
+ - **Carbon Emitted:** [More Information Needed]
169
+
170
+ ## Technical Specifications [optional]
171
+
172
+ ### Model Architecture and Objective
173
+
174
+ [More Information Needed]
175
+
176
+ ### Compute Infrastructure
177
+
178
+ [More Information Needed]
179
+
180
+ #### Hardware
181
+
182
+ [More Information Needed]
183
+
184
+ #### Software
185
+
186
+ [More Information Needed]
187
+
188
+ ## Citation [optional]
189
+
190
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
191
+
192
+ **BibTeX:**
193
+
194
+ [More Information Needed]
195
+
196
+ **APA:**
197
+
198
+ [More Information Needed]
199
+
200
+ ## Glossary [optional]
201
+
202
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
203
+
204
+ [More Information Needed]
205
+
206
+ ## More Information [optional]
207
+
208
+ [More Information Needed]
209
+
210
+ ## Model Card Authors [optional]
211
+
212
+ [More Information Needed]
213
+
214
+ ## Model Card Contact
215
+
216
+ [More Information Needed]
added_tokens.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "<|assistant|>": 32001,
3
+ "<|endoftext|>": 32000,
4
+ "<|end|>": 32007,
5
+ "<|placeholder1|>": 32002,
6
+ "<|placeholder2|>": 32003,
7
+ "<|placeholder3|>": 32004,
8
+ "<|placeholder4|>": 32005,
9
+ "<|placeholder5|>": 32008,
10
+ "<|placeholder6|>": 32009,
11
+ "<|system|>": 32006,
12
+ "<|user|>": 32010
13
+ }
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Phi3ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 1,
7
+ "embd_pdrop": 0.0,
8
+ "eos_token_id": 32000,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 32,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 64,
13
+ "max_position_embeddings": 4096,
14
+ "model_type": "phi3",
15
+ "num_attention_heads": 4,
16
+ "num_hidden_layers": 2,
17
+ "num_key_value_heads": 4,
18
+ "original_max_position_embeddings": 4096,
19
+ "pad_token_id": 32000,
20
+ "resid_pdrop": 0.0,
21
+ "rms_norm_eps": 1e-05,
22
+ "rope_scaling": null,
23
+ "rope_theta": 10000.0,
24
+ "sliding_window": 2047,
25
+ "tie_word_embeddings": false,
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.41.0.dev0",
28
+ "use_cache": true,
29
+ "vocab_size": 32064
30
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 32000,
5
+ "pad_token_id": 32000,
6
+ "transformers_version": "4.41.0.dev0"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9d1a6cf1e7a970c7a9bb2df851e1dcb11cd2f8c36a8859afee0b31826b7e6c3
3
+ size 8292520
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e6c5aa615d9c46ff999e908a5cc63ac2771f8a26ac60687d8be71fc7a55ae72
3
+ size 8365022
onnx/model_bnb4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09d2e3ca6dd7fb67e4efe49a8715ee69ff1fa7e80154b4b79adfb071876d9e6f
3
+ size 4768955
onnx/model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:506008722b8c6ddfd996bbe6b239de97ff8b6add7816e4274cd6845851cd4095
3
+ size 4253611
onnx/model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab294cb36f5e7dcf86ed9e0e32e5a9229cebe40317dfe2e8fa43ce23ac5f4e1b
3
+ size 2190736
onnx/model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d8be10b0bbe5255d6c598899c1b791e0798a4fd7713af1e895894fcd064fe41
3
+ size 4834301
onnx/model_q4f16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df2d6d688ef06d794d84dea01b13b7b6ac36e3322f5d9769a0c062a475099405
3
+ size 2718096
onnx/model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab294cb36f5e7dcf86ed9e0e32e5a9229cebe40317dfe2e8fa43ce23ac5f4e1b
3
+ size 2190736
onnx/model_uint8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c38dfb6d521fc05c4d2900810daabad869e4931ff7563cb2b60fcfaecc9cab3
3
+ size 2190741
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<|endoftext|>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "0": {
6
+ "content": "<unk>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "1": {
14
+ "content": "<s>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "2": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": true,
26
+ "single_word": false,
27
+ "special": false
28
+ },
29
+ "32000": {
30
+ "content": "<|endoftext|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "32001": {
38
+ "content": "<|assistant|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": true,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "32002": {
46
+ "content": "<|placeholder1|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": true,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "32003": {
54
+ "content": "<|placeholder2|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": true,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "32004": {
62
+ "content": "<|placeholder3|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": true,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "32005": {
70
+ "content": "<|placeholder4|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": true,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "32006": {
78
+ "content": "<|system|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": true,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "32007": {
86
+ "content": "<|end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": true,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "32008": {
94
+ "content": "<|placeholder5|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": true,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "32009": {
102
+ "content": "<|placeholder6|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": true,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "32010": {
110
+ "content": "<|user|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": true,
114
+ "single_word": false,
115
+ "special": true
116
+ }
117
+ },
118
+ "bos_token": "<s>",
119
+ "chat_template": "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') %}{{'<|user|>' + '\n' + message['content'] + '<|end|>' + '\n' + '<|assistant|>' + '\n'}}{% elif (message['role'] == 'assistant') %}{{message['content'] + '<|end|>' + '\n'}}{% endif %}{% endfor %}",
120
+ "clean_up_tokenization_spaces": false,
121
+ "eos_token": "<|endoftext|>",
122
+ "model_max_length": 4096,
123
+ "pad_token": "<|endoftext|>",
124
+ "padding_side": "left",
125
+ "sp_model_kwargs": {},
126
+ "tokenizer_class": "LlamaTokenizer",
127
+ "unk_token": "<unk>",
128
+ "use_default_system_prompt": false
129
+ }