Upload PhiMoEForCausalLM
Browse files- README.md +201 -0
- config.json +193 -0
- generation_config.json +11 -0
- model-00001-of-00005.safetensors +3 -0
- model-00002-of-00005.safetensors +3 -0
- model-00003-of-00005.safetensors +3 -0
- model-00004-of-00005.safetensors +3 -0
- model-00005-of-00005.safetensors +3 -0
- model.safetensors.index.json +0 -0
README.md
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- trl
|
5 |
+
- sft
|
6 |
+
---
|
7 |
+
|
8 |
+
# Model Card for Model ID
|
9 |
+
|
10 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
## Model Details
|
15 |
+
|
16 |
+
### Model Description
|
17 |
+
|
18 |
+
<!-- Provide a longer summary of what this model is. -->
|
19 |
+
|
20 |
+
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
21 |
+
|
22 |
+
- **Developed by:** [More Information Needed]
|
23 |
+
- **Funded by [optional]:** [More Information Needed]
|
24 |
+
- **Shared by [optional]:** [More Information Needed]
|
25 |
+
- **Model type:** [More Information Needed]
|
26 |
+
- **Language(s) (NLP):** [More Information Needed]
|
27 |
+
- **License:** [More Information Needed]
|
28 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
29 |
+
|
30 |
+
### Model Sources [optional]
|
31 |
+
|
32 |
+
<!-- Provide the basic links for the model. -->
|
33 |
+
|
34 |
+
- **Repository:** [More Information Needed]
|
35 |
+
- **Paper [optional]:** [More Information Needed]
|
36 |
+
- **Demo [optional]:** [More Information Needed]
|
37 |
+
|
38 |
+
## Uses
|
39 |
+
|
40 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
41 |
+
|
42 |
+
### Direct Use
|
43 |
+
|
44 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
45 |
+
|
46 |
+
[More Information Needed]
|
47 |
+
|
48 |
+
### Downstream Use [optional]
|
49 |
+
|
50 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
51 |
+
|
52 |
+
[More Information Needed]
|
53 |
+
|
54 |
+
### Out-of-Scope Use
|
55 |
+
|
56 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
57 |
+
|
58 |
+
[More Information Needed]
|
59 |
+
|
60 |
+
## Bias, Risks, and Limitations
|
61 |
+
|
62 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
63 |
+
|
64 |
+
[More Information Needed]
|
65 |
+
|
66 |
+
### Recommendations
|
67 |
+
|
68 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
69 |
+
|
70 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
71 |
+
|
72 |
+
## How to Get Started with the Model
|
73 |
+
|
74 |
+
Use the code below to get started with the model.
|
75 |
+
|
76 |
+
[More Information Needed]
|
77 |
+
|
78 |
+
## Training Details
|
79 |
+
|
80 |
+
### Training Data
|
81 |
+
|
82 |
+
<!-- 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. -->
|
83 |
+
|
84 |
+
[More Information Needed]
|
85 |
+
|
86 |
+
### Training Procedure
|
87 |
+
|
88 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
89 |
+
|
90 |
+
#### Preprocessing [optional]
|
91 |
+
|
92 |
+
[More Information Needed]
|
93 |
+
|
94 |
+
|
95 |
+
#### Training Hyperparameters
|
96 |
+
|
97 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
98 |
+
|
99 |
+
#### Speeds, Sizes, Times [optional]
|
100 |
+
|
101 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
102 |
+
|
103 |
+
[More Information Needed]
|
104 |
+
|
105 |
+
## Evaluation
|
106 |
+
|
107 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
108 |
+
|
109 |
+
### Testing Data, Factors & Metrics
|
110 |
+
|
111 |
+
#### Testing Data
|
112 |
+
|
113 |
+
<!-- This should link to a Dataset Card if possible. -->
|
114 |
+
|
115 |
+
[More Information Needed]
|
116 |
+
|
117 |
+
#### Factors
|
118 |
+
|
119 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
120 |
+
|
121 |
+
[More Information Needed]
|
122 |
+
|
123 |
+
#### Metrics
|
124 |
+
|
125 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
126 |
+
|
127 |
+
[More Information Needed]
|
128 |
+
|
129 |
+
### Results
|
130 |
+
|
131 |
+
[More Information Needed]
|
132 |
+
|
133 |
+
#### Summary
|
134 |
+
|
135 |
+
|
136 |
+
|
137 |
+
## Model Examination [optional]
|
138 |
+
|
139 |
+
<!-- Relevant interpretability work for the model goes here -->
|
140 |
+
|
141 |
+
[More Information Needed]
|
142 |
+
|
143 |
+
## Environmental Impact
|
144 |
+
|
145 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
146 |
+
|
147 |
+
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).
|
148 |
+
|
149 |
+
- **Hardware Type:** [More Information Needed]
|
150 |
+
- **Hours used:** [More Information Needed]
|
151 |
+
- **Cloud Provider:** [More Information Needed]
|
152 |
+
- **Compute Region:** [More Information Needed]
|
153 |
+
- **Carbon Emitted:** [More Information Needed]
|
154 |
+
|
155 |
+
## Technical Specifications [optional]
|
156 |
+
|
157 |
+
### Model Architecture and Objective
|
158 |
+
|
159 |
+
[More Information Needed]
|
160 |
+
|
161 |
+
### Compute Infrastructure
|
162 |
+
|
163 |
+
[More Information Needed]
|
164 |
+
|
165 |
+
#### Hardware
|
166 |
+
|
167 |
+
[More Information Needed]
|
168 |
+
|
169 |
+
#### Software
|
170 |
+
|
171 |
+
[More Information Needed]
|
172 |
+
|
173 |
+
## Citation [optional]
|
174 |
+
|
175 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
176 |
+
|
177 |
+
**BibTeX:**
|
178 |
+
|
179 |
+
[More Information Needed]
|
180 |
+
|
181 |
+
**APA:**
|
182 |
+
|
183 |
+
[More Information Needed]
|
184 |
+
|
185 |
+
## Glossary [optional]
|
186 |
+
|
187 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
188 |
+
|
189 |
+
[More Information Needed]
|
190 |
+
|
191 |
+
## More Information [optional]
|
192 |
+
|
193 |
+
[More Information Needed]
|
194 |
+
|
195 |
+
## Model Card Authors [optional]
|
196 |
+
|
197 |
+
[More Information Needed]
|
198 |
+
|
199 |
+
## Model Card Contact
|
200 |
+
|
201 |
+
[More Information Needed]
|
config.json
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/Phi-3.5-MoE-instruct",
|
3 |
+
"architectures": [
|
4 |
+
"PhiMoEForCausalLM"
|
5 |
+
],
|
6 |
+
"attention_bias": true,
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"auto_map": {
|
9 |
+
"AutoConfig": "microsoft/Phi-3.5-MoE-instruct--configuration_phimoe.PhiMoEConfig",
|
10 |
+
"AutoModelForCausalLM": "microsoft/Phi-3.5-MoE-instruct--modeling_phimoe.PhiMoEForCausalLM"
|
11 |
+
},
|
12 |
+
"bos_token_id": 1,
|
13 |
+
"eos_token_id": 32000,
|
14 |
+
"hidden_act": "silu",
|
15 |
+
"hidden_dropout": 0.0,
|
16 |
+
"hidden_size": 4096,
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"input_jitter_noise": 0.01,
|
19 |
+
"intermediate_size": 6400,
|
20 |
+
"lm_head_bias": true,
|
21 |
+
"max_position_embeddings": 131072,
|
22 |
+
"model_type": "phimoe",
|
23 |
+
"num_attention_heads": 32,
|
24 |
+
"num_experts_per_tok": 2,
|
25 |
+
"num_hidden_layers": 32,
|
26 |
+
"num_key_value_heads": 8,
|
27 |
+
"num_local_experts": 16,
|
28 |
+
"original_max_position_embeddings": 4096,
|
29 |
+
"output_router_logits": false,
|
30 |
+
"quantization_config": {
|
31 |
+
"_load_in_4bit": true,
|
32 |
+
"_load_in_8bit": false,
|
33 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
34 |
+
"bnb_4bit_quant_storage": "uint8",
|
35 |
+
"bnb_4bit_quant_type": "nf4",
|
36 |
+
"bnb_4bit_use_double_quant": true,
|
37 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
38 |
+
"llm_int8_has_fp16_weight": false,
|
39 |
+
"llm_int8_skip_modules": null,
|
40 |
+
"llm_int8_threshold": 6.0,
|
41 |
+
"load_in_4bit": true,
|
42 |
+
"load_in_8bit": false,
|
43 |
+
"quant_method": "bitsandbytes"
|
44 |
+
},
|
45 |
+
"rms_norm_eps": 1e-05,
|
46 |
+
"rope_scaling": {
|
47 |
+
"long_factor": [
|
48 |
+
1.0199999809265137,
|
49 |
+
1.0299999713897705,
|
50 |
+
1.0399999618530273,
|
51 |
+
1.0499999523162842,
|
52 |
+
1.0499999523162842,
|
53 |
+
1.0499999523162842,
|
54 |
+
1.059999942779541,
|
55 |
+
1.059999942779541,
|
56 |
+
1.059999942779541,
|
57 |
+
1.059999942779541,
|
58 |
+
1.059999942779541,
|
59 |
+
1.059999942779541,
|
60 |
+
1.0999999046325684,
|
61 |
+
1.1799999475479126,
|
62 |
+
1.1799999475479126,
|
63 |
+
1.3700000047683716,
|
64 |
+
1.4899998903274536,
|
65 |
+
2.109999895095825,
|
66 |
+
2.8899998664855957,
|
67 |
+
3.9499998092651367,
|
68 |
+
4.299999713897705,
|
69 |
+
6.429999828338623,
|
70 |
+
8.09000015258789,
|
71 |
+
10.690000534057617,
|
72 |
+
12.050000190734863,
|
73 |
+
18.229999542236328,
|
74 |
+
18.84000015258789,
|
75 |
+
19.899999618530273,
|
76 |
+
21.420000076293945,
|
77 |
+
26.200000762939453,
|
78 |
+
34.28000259399414,
|
79 |
+
34.590003967285156,
|
80 |
+
38.730003356933594,
|
81 |
+
40.22000503540039,
|
82 |
+
42.54000473022461,
|
83 |
+
44.000003814697266,
|
84 |
+
47.590003967285156,
|
85 |
+
54.750003814697266,
|
86 |
+
56.19000244140625,
|
87 |
+
57.44000244140625,
|
88 |
+
57.4900016784668,
|
89 |
+
61.20000076293945,
|
90 |
+
61.540000915527344,
|
91 |
+
61.75,
|
92 |
+
61.779998779296875,
|
93 |
+
62.06999969482422,
|
94 |
+
63.11000061035156,
|
95 |
+
63.43000030517578,
|
96 |
+
63.560001373291016,
|
97 |
+
63.71000289916992,
|
98 |
+
63.92000198364258,
|
99 |
+
63.94000244140625,
|
100 |
+
63.94000244140625,
|
101 |
+
63.96000289916992,
|
102 |
+
63.980003356933594,
|
103 |
+
64.0300064086914,
|
104 |
+
64.0300064086914,
|
105 |
+
64.0300064086914,
|
106 |
+
64.04000854492188,
|
107 |
+
64.10000610351562,
|
108 |
+
64.19000244140625,
|
109 |
+
64.20999908447266,
|
110 |
+
64.75,
|
111 |
+
64.95999908447266
|
112 |
+
],
|
113 |
+
"long_mscale": 1.243163121016122,
|
114 |
+
"original_max_position_embeddings": 4096,
|
115 |
+
"short_factor": [
|
116 |
+
1.0,
|
117 |
+
1.0399999618530273,
|
118 |
+
1.0399999618530273,
|
119 |
+
1.0399999618530273,
|
120 |
+
1.0499999523162842,
|
121 |
+
1.0499999523162842,
|
122 |
+
1.0499999523162842,
|
123 |
+
1.0499999523162842,
|
124 |
+
1.0499999523162842,
|
125 |
+
1.0499999523162842,
|
126 |
+
1.0499999523162842,
|
127 |
+
1.0499999523162842,
|
128 |
+
1.0499999523162842,
|
129 |
+
1.0499999523162842,
|
130 |
+
1.059999942779541,
|
131 |
+
1.059999942779541,
|
132 |
+
1.0699999332427979,
|
133 |
+
1.0699999332427979,
|
134 |
+
1.0699999332427979,
|
135 |
+
1.0699999332427979,
|
136 |
+
1.1399999856948853,
|
137 |
+
1.159999966621399,
|
138 |
+
1.159999966621399,
|
139 |
+
1.159999966621399,
|
140 |
+
1.159999966621399,
|
141 |
+
1.1799999475479126,
|
142 |
+
1.1999999284744263,
|
143 |
+
1.3199999332427979,
|
144 |
+
1.3399999141693115,
|
145 |
+
1.3499999046325684,
|
146 |
+
1.3999998569488525,
|
147 |
+
1.4799998998641968,
|
148 |
+
1.4999998807907104,
|
149 |
+
1.589999794960022,
|
150 |
+
1.6499998569488525,
|
151 |
+
1.71999990940094,
|
152 |
+
1.8999998569488525,
|
153 |
+
1.9099998474121094,
|
154 |
+
1.9099998474121094,
|
155 |
+
1.9899998903274536,
|
156 |
+
1.9999998807907104,
|
157 |
+
1.9999998807907104,
|
158 |
+
2.009999990463257,
|
159 |
+
2.009999990463257,
|
160 |
+
2.009999990463257,
|
161 |
+
2.009999990463257,
|
162 |
+
2.009999990463257,
|
163 |
+
2.009999990463257,
|
164 |
+
2.009999990463257,
|
165 |
+
2.009999990463257,
|
166 |
+
2.009999990463257,
|
167 |
+
2.009999990463257,
|
168 |
+
2.009999990463257,
|
169 |
+
2.009999990463257,
|
170 |
+
2.009999990463257,
|
171 |
+
2.009999990463257,
|
172 |
+
2.009999990463257,
|
173 |
+
2.009999990463257,
|
174 |
+
2.009999990463257,
|
175 |
+
2.0999999046325684,
|
176 |
+
2.319999933242798,
|
177 |
+
2.419999837875366,
|
178 |
+
2.5899999141693115,
|
179 |
+
2.7899999618530273
|
180 |
+
],
|
181 |
+
"short_mscale": 1.243163121016122,
|
182 |
+
"type": "longrope"
|
183 |
+
},
|
184 |
+
"rope_theta": 10000.0,
|
185 |
+
"router_aux_loss_coef": 0.0,
|
186 |
+
"router_jitter_noise": 0.01,
|
187 |
+
"sliding_window": 131072,
|
188 |
+
"tie_word_embeddings": false,
|
189 |
+
"torch_dtype": "bfloat16",
|
190 |
+
"transformers_version": "4.46.0",
|
191 |
+
"use_cache": false,
|
192 |
+
"vocab_size": 32064
|
193 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 1,
|
4 |
+
"eos_token_id": [
|
5 |
+
32000,
|
6 |
+
32001,
|
7 |
+
32007
|
8 |
+
],
|
9 |
+
"pad_token_id": 32000,
|
10 |
+
"transformers_version": "4.46.0"
|
11 |
+
}
|
model-00001-of-00005.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:89948a715233bdb8be8894cd7f64c81fc337d601224c6c758572c2122c7243bb
|
3 |
+
size 4994856325
|
model-00002-of-00005.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:43f49f9ad12ef628e9cb780877095c1a8719aa37efc6ca3e50800d8f2522953a
|
3 |
+
size 4994505677
|
model-00003-of-00005.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae72f0cad532e02583fd99e60fc293f6336f61cafb1f9ac7c8fd819435db42bb
|
3 |
+
size 4994506732
|
model-00004-of-00005.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0f75574546a133fcfbe301f6fd36b6549994f6a041a0f55d5b583a7b4fde5df4
|
3 |
+
size 4989236258
|
model-00005-of-00005.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b72b1643b69437ca08473a5d3334ba9fff15aa8ced419960c7242a575c05d3fd
|
3 |
+
size 2024100179
|
model.safetensors.index.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|