zhenggq ari9dam clarisses andrescodas commited on
Commit
8f65a1a
0 Parent(s):

initial commit

Browse files

Co-authored-by: ari9dam <ari9dam@users.noreply.huggingface.co>
Co-authored-by: clarisses <clarisses@users.noreply.huggingface.co>
Co-authored-by: andrescodas <andrescodas@users.noreply.huggingface.co>

.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
LICENSE ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MICROSOFT RESEARCH LICENSE TERMS
2
+
3
+ IF YOU LIVE IN THE UNITED STATES, PLEASE READ THE “BINDING ARBITRATION AND CLASS ACTION WAIVER” SECTION BELOW. IT AFFECTS HOW DISPUTES ARE RESOLVED.
4
+
5
+ These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the source code, object code, machine learning models, or data (collectively “Materials”) that accompany this license. IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE MATERIALS, YOU ACCEPT THESE TERMS.
6
+
7
+ 1) INSTALLATION AND USE RIGHTS TO THE MATERIALS.
8
+
9
+ Subject to the terms of this agreement, you have the below rights, if applicable, to use the Materials solely for non-commercial, non-revenue generating, research purposes:
10
+
11
+ a) Source Code. If source code is included, you may use and modify the source code, but you may not distribute the source code.
12
+ b) Object Code. If object code is included, you may use the object code, but you may not distribute the object code.
13
+ c) Models. If machine learning model(s) are included, you may use the model(s), but you may not distribute the models.
14
+ d) Data. If data is included, you may use and modify the data, but your use and modification must be consistent with the consent under which the data was provided and/or gathered and you may not distribute the data or your modifications to the data.
15
+
16
+ 2) SCOPE OF LICENSE. The Materials are licensed, not sold. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you will not (and have no right to):
17
+
18
+ a) work around any technical limitations in the Materials that only allow you to use it in certain ways;
19
+ b) reverse engineer, decompile or disassemble the Materials;
20
+ c) remove, minimize, block, or modify any notices of Microsoft or its suppliers in the Materials;
21
+ d) use the Materials in any way that is against the law or to create or propagate malware; or
22
+ e) share, publish, distribute or lend the Materials, provide the Materials as a stand-alone hosted solution for others to use, or transfer the Materials or this agreement to any third party.
23
+
24
+ 3) PERSONAL DATA. If the data (set forth in Section 1(c) above) includes or is found to include any data that enables any ability to identify an individual (“Personal Data”), you will not use such Personal Data for any purpose other than was authorized and consented to by the data subject/research participant. You will not use Personal Data to contact any person. You will keep Personal Data in strict confidence. You will not share any Personal Data that is collected or in your possession with any third party for any reason and as required under the original consent agreement. Further, you will destroy the Personal Data and any backup or copies, immediately upon the completion of your research.
25
+
26
+ 4) LICENSE TO MICROSOFT. Notwithstanding the limitations in Section 1, you may distribute your modifications back to Microsoft, and if you do provide Microsoft with modifications of the Materials, you hereby grant Microsoft, without any restrictions or limitations, a non-exclusive, perpetual, irrevocable, royalty-free, assignable and sub-licensable license, to reproduce, publicly perform or display, install, use, modify, post, distribute, make and have made, sell and transfer such modifications and derivatives for any purpose.
27
+
28
+ 5) PUBLICATION. You may publish (or present papers or articles) on your results from using the Materials provided that no material or substantial portion of the Materials is included in any such publication or presentation.
29
+
30
+ 6) FEEDBACK. Any feedback about the Materials provided by you to us is voluntarily given, and Microsoft shall be free to use the feedback as it sees fit without obligation or restriction of any kind, even if the feedback is designated by you as confidential. Such feedback shall be considered a contribution and licensed to Microsoft under the terms of Section 4 above.
31
+
32
+ 7) COMPLIANCE WITH TRADE LAWS. You acknowledge that the Materials may be subject to applicable trade laws in one or more countries. You will comply with all relevant laws and regulations applicable to the import or export of the Materials, including but not limited to, trade laws such as the U.S. Export Administration Regulations or other end-user, end use, and destination restrictions by the U.S. and other governments, as well as sanctions regulations administered by the U.S. Office of Foreign Assets Control. Microsoft may suspend or terminate the agreement immediately to the extent that Microsoft reasonably concludes that continued performance would violate trade laws or put it at risk of becoming subject to sanctions or penalties under trade laws. For additional information, see www.microsoft.com/exporting.
33
+
34
+ 8) SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any support services for the Materials. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
35
+
36
+ 9) BINDING ARBITRATION AND CLASS ACTION WAIVER. This Section applies if you live in (or, if a business, your principal place of business is in) the United States. If you and Microsoft have a dispute, you and Microsoft agree to try for 60 days to resolve it informally. If you and Microsoft can’t, you and Microsoft agree to binding individual arbitration before the American Arbitration Association under the Federal Arbitration Act (“FAA”), and not to sue in court in front of a judge or jury. Instead, a neutral arbitrator will decide. Class action lawsuits, class-wide arbitrations, private attorney-general actions, and any other proceeding where someone acts in a representative capacity are not allowed; nor is combining individual proceedings without the consent of all parties. The complete Arbitration Agreement contains more terms and is at aka.ms/arb-agreement-1. You and Microsoft agree to these terms.
37
+
38
+ 10) ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for supplements, updates, or third-party applications, is the entire agreement for the Materials.
39
+
40
+ 11) APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the Materials in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this agreement, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles, except that the FAA governs everything related to arbitration. If you acquired the Materials in any other country, its laws apply, except that the FAA governs everything related to arbitration. If U.S. federal jurisdiction exists, you and Microsoft consent to exclusive jurisdiction and venue in the federal court in King County, Washington for all disputes heard in court (excluding arbitration). If not, you and Microsoft consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington for all disputes heard in court (excluding arbitration).
41
+
42
+ 12) CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state, province, or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the Materials. This agreement does not change those other rights if the laws of your state, province, or country do not permit it to do so. For example, if you acquired the Materials in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
43
+
44
+ a) Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.
45
+
46
+ b) Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the Materials will resume checking for and installing updates), or uninstalling the Materials. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
47
+
48
+ c) Germany and Austria.
49
+
50
+ i. Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the Materials. However, Microsoft gives no contractual guarantee in relation to the licensed software.
51
+
52
+ ii. Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.
53
+
54
+ Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.
55
+
56
+ 13) DISCLAIMER OF WARRANTY. THE MATERIALS ARE LICENSED “AS IS.” YOU BEAR THE RISK OF USING THEM. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
57
+
58
+ 14) LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
59
+
60
+ This limitation applies to (a) anything related to the Materials, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law.
61
+
62
+ It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages.
63
+
Notice ADDED
@@ -0,0 +1 @@
 
 
1
+ Llama 2 is licensed under the LLAMA 2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
README.md ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: text-generation
3
+ tags:
4
+ - orca
5
+ - orca2
6
+ - microsoft
7
+ ---
8
+
9
+ # Orca 2
10
+
11
+ <!-- Provide a quick summary of what the model is/does. -->
12
+
13
+ Orca 2 is a helpful assistant that is built for research purposes only and provides a single turn response
14
+ in tasks such as reasoning over user given data, reading comprehension, math problem solving and text summarization.
15
+ The model is designed to excel particularly in reasoning.
16
+
17
+ We open-source Orca 2 to encourage further research on the development, evaluation, and alignment of smaller LMs.
18
+
19
+ ## What is Orca 2’s intended use(s)?
20
+
21
+ + Orca 2 is built for research purposes only.
22
+ + The main purpose is to allow the research community to assess its abilities and to provide a foundation for
23
+ building better frontier models.
24
+
25
+ ## How was Orca 2 evaluated?
26
+
27
+ + Orca 2 has been evaluated on a large number of tasks ranging from reasoning to grounding and safety. Please refer
28
+ to Section 6 and Appendix in the [Orca 2 paper](https://arxiv.org/pdf/2311.11045.pdf) for details on evaluations.
29
+
30
+ ## Model Details
31
+
32
+ Orca 2 is a finetuned version of LLAMA-2. Orca 2’s training data is a synthetic dataset that was created to enhance the small model’s reasoning abilities.
33
+ All synthetic training data was moderated using the Microsoft Azure content filters. More details about the model can be found in the [Orca 2 paper](https://arxiv.org/pdf/2311.11045.pdf).
34
+
35
+ Please refer to LLaMA-2 technical report for details on the model architecture.
36
+
37
+ ## License
38
+
39
+ Orca 2 is licensed under the [Microsoft Research License](LICENSE).
40
+
41
+ Llama 2 is licensed under the [LLAMA 2 Community License](https://ai.meta.com/llama/license/), Copyright © Meta Platforms, Inc. All Rights Reserved.
42
+
43
+ ## Bias, Risks, and Limitations
44
+
45
+ Orca 2, built upon the LLaMA 2 model family, retains many of its limitations, as well as the
46
+ common limitations of other large language models or limitation caused by its training process,
47
+ including:
48
+
49
+ **Data Biases**: Large language models, trained on extensive data, can inadvertently carry
50
+ biases present in the source data. Consequently, the models may generate outputs that could
51
+ be potentially biased or unfair.
52
+
53
+ **Lack of Contextual Understanding**: Despite their impressive capabilities in language understanding and generation, these models exhibit limited real-world understanding, resulting
54
+ in potential inaccuracies or nonsensical responses.
55
+
56
+ **Lack of Transparency**: Due to the complexity and size, large language models can act
57
+ as “black boxes”, making it difficult to comprehend the rationale behind specific outputs or
58
+ decisions. We recommend reviewing transparency notes from Azure for more information.
59
+
60
+ **Content Harms**: There are various types of content harms that large language models
61
+ can cause. It is important to be aware of them when using these models, and to take
62
+ actions to prevent them. It is recommended to leverage various content moderation services
63
+ provided by different companies and institutions. On an important note, we hope for better
64
+ regulations and standards from government and technology leaders around content harms
65
+ for AI technologies in future. We value and acknowledge the important role that research
66
+ and open source community can play in this direction.
67
+
68
+ **Hallucination**: It is important to be aware and cautious not to entirely rely on a given
69
+ language model for critical decisions or information that might have deep impact as it is
70
+ not obvious how to prevent these models from fabricating content. Moreover, it is not clear
71
+ whether small models may be more susceptible to hallucination in ungrounded generation
72
+ use cases due to their smaller sizes and hence reduced memorization capacities. This is an
73
+ active research topic and we hope there will be more rigorous measurement, understanding
74
+ and mitigations around this topic.
75
+
76
+ **Potential for Misuse**: Without suitable safeguards, there is a risk that these models could
77
+ be maliciously used for generating disinformation or harmful content.
78
+
79
+ **Data Distribution**: Orca 2’s performance is likely to correlate strongly with the distribution
80
+ of the tuning data. This correlation might limit its accuracy in areas underrepresented in
81
+ the training dataset such as math, coding, and reasoning.
82
+
83
+ **System messages**: Orca 2 demonstrates variance in performance depending on the system
84
+ instructions. Additionally, the stochasticity introduced by the model size may lead to
85
+ generation of non-deterministic responses to different system instructions.
86
+
87
+ **Zero-Shot Settings**: Orca 2 was trained on data that mostly simulate zero-shot settings.
88
+ While the model demonstrate very strong performance in zero-shot settings, it does not show
89
+ the same gains of using few-shot learning compared to other, specially larger, models.
90
+
91
+ **Synthetic data**: As Orca 2 is trained on synthetic data, it could inherit both the advantages
92
+ and shortcomings of the models and methods used for data generation. We posit that Orca
93
+ 2 benefits from the safety measures incorporated during training and safety guardrails (e.g.,
94
+ content filter) within the Azure OpenAI API. However, detailed studies are required for
95
+ better quantification of such risks.
96
+
97
+ This model is solely designed for research settings, and its testing has only been carried
98
+ out in such environments. It should not be used in downstream applications, as additional
99
+ analysis is needed to assess potential harm or bias in the proposed application.
100
+
101
+ ## Getting started with Orca 2
102
+
103
+ **Inference with Hugging Face library**
104
+
105
+ ```python
106
+ import torch
107
+ import transformers
108
+
109
+ if torch.cuda.is_available():
110
+ torch.set_default_device("cuda")
111
+ else:
112
+ torch.set_default_device("cpu")
113
+
114
+ model = transformers.AutoModelForCausalLM.from_pretrained("microsoft/Orca-2-13b", device_map='auto')
115
+
116
+ # https://github.com/huggingface/transformers/issues/27132
117
+ # please use the slow tokenizer since fast and slow tokenizer produces different tokens
118
+ tokenizer = transformers.AutoTokenizer.from_pretrained(
119
+ "microsoft/Orca-2-13b",
120
+ use_fast=False,
121
+ )
122
+
123
+ system_message = "You are Orca, an AI language model created by Microsoft. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior."
124
+ user_message = "How can you determine if a restaurant is popular among locals or mainly attracts tourists, and why might this information be useful?"
125
+
126
+ prompt = f"<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{user_message}<|im_end|>\n<|im_start|>assistant"
127
+
128
+ inputs = tokenizer(prompt, return_tensors='pt')
129
+ output_ids = model.generate(inputs["input_ids"],)
130
+ answer = tokenizer.batch_decode(output_ids)[0]
131
+
132
+ print(answer)
133
+
134
+ # This example continues showing how to add a second turn message by the user to the conversation
135
+ second_turn_user_message = "Give me a list of the key points of your first answer."
136
+
137
+ # we set add_special_tokens=False because we dont want to automatically add a bos_token between messages
138
+ second_turn_message_in_markup = f"\n<|im_start|>user\n{second_turn_user_message}<|im_end|>\n<|im_start|>assistant"
139
+ second_turn_tokens = tokenizer(second_turn_message_in_markup, return_tensors='pt', add_special_tokens=False)
140
+ second_turn_input = torch.cat([output_ids, second_turn_tokens['input_ids']], dim=1)
141
+
142
+ output_ids_2 = model.generate(second_turn_input,)
143
+ second_turn_answer = tokenizer.batch_decode(output_ids_2)[0]
144
+
145
+ print(second_turn_answer)
146
+ ```
147
+
148
+
149
+ **Safe inference with Azure AI Content Safety**
150
+
151
+ The usage of [Azure AI Content Safety](https://azure.microsoft.com/en-us/products/ai-services/ai-content-safety/) on top of model prediction is strongly encouraged
152
+ and can help prevent content harms. Azure AI Content Safety is a content moderation platform
153
+ that uses AI to keep your content safe. By integrating Orca 2 with Azure AI Content Safety,
154
+ we can moderate the model output by scanning it for sexual content, violence, hate, and
155
+ self-harm with multiple severity levels and multi-lingual detection.
156
+
157
+ ```python
158
+ import os
159
+ import math
160
+ import transformers
161
+ import torch
162
+
163
+ from azure.ai.contentsafety import ContentSafetyClient
164
+ from azure.core.credentials import AzureKeyCredential
165
+ from azure.core.exceptions import HttpResponseError
166
+ from azure.ai.contentsafety.models import AnalyzeTextOptions
167
+
168
+ CONTENT_SAFETY_KEY = os.environ["CONTENT_SAFETY_KEY"]
169
+ CONTENT_SAFETY_ENDPOINT = os.environ["CONTENT_SAFETY_ENDPOINT"]
170
+
171
+ # We use Azure AI Content Safety to filter out any content that reaches "Medium" threshold
172
+ # For more information: https://learn.microsoft.com/en-us/azure/ai-services/content-safety/
173
+ def should_filter_out(input_text, threshold=4):
174
+ # Create an Content Safety client
175
+ client = ContentSafetyClient(CONTENT_SAFETY_ENDPOINT, AzureKeyCredential(CONTENT_SAFETY_KEY))
176
+
177
+ # Construct a request
178
+ request = AnalyzeTextOptions(text=input_text)
179
+
180
+ # Analyze text
181
+ try:
182
+ response = client.analyze_text(request)
183
+ except HttpResponseError as e:
184
+ print("Analyze text failed.")
185
+ if e.error:
186
+ print(f"Error code: {e.error.code}")
187
+ print(f"Error message: {e.error.message}")
188
+ raise
189
+ print(e)
190
+ raise
191
+
192
+ categories = ["hate_result", "self_harm_result", "sexual_result", "violence_result"]
193
+ max_score = -math.inf
194
+ for category in categories:
195
+ max_score = max(max_score, getattr(response, category).severity)
196
+
197
+ return max_score >= threshold
198
+
199
+ model_path = 'microsoft/Orca-2-13b'
200
+ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
201
+ model = transformers.AutoModelForCausalLM.from_pretrained(model_path)
202
+ model.to(device)
203
+
204
+ tokenizer = transformers.AutoTokenizer.from_pretrained(
205
+ model_path,
206
+ model_max_length=4096,
207
+ padding_side="right",
208
+ use_fast=False,
209
+ add_special_tokens=False,
210
+ )
211
+
212
+ system_message = "You are Orca, an AI language model created by Microsoft. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior."
213
+ user_message = "\" \n :You can't just say, \"\"that's crap\"\" and remove it without gaining a consensus. You already know this, based on your block history. —/ \" \nIs the comment obscene? \nOptions : Yes, No."
214
+
215
+ prompt = f"<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{user_message}<|im_end|>\n<|im_start|>assistant"
216
+
217
+ inputs = tokenizer(prompt, return_tensors='pt')
218
+ inputs = inputs.to(device)
219
+
220
+ output_ids = model.generate(inputs["input_ids"], max_length=4096, do_sample=False, temperature=0.0, use_cache=True)
221
+ sequence_length = inputs["input_ids"].shape[1]
222
+ new_output_ids = output_ids[:, sequence_length:]
223
+ answers = tokenizer.batch_decode(new_output_ids, skip_special_tokens=True)
224
+ final_output = answers[0] if not should_filter_out(answers[0]) else "[Content Filtered]"
225
+
226
+ print(final_output)
227
+ ```
228
+
229
+ ## Citation
230
+ ```bibtex
231
+ @misc{mitra2023orca,
232
+ title={Orca 2: Teaching Small Language Models How to Reason},
233
+ author={Arindam Mitra and Luciano Del Corro and Shweti Mahajan and Andres Codas and Clarisse Simoes and Sahaj Agrawal and Xuxi Chen and Anastasia Razdaibiedina and Erik Jones and Kriti Aggarwal and Hamid Palangi and Guoqing Zheng and Corby Rosset and Hamed Khanpour and Ahmed Awadallah},
234
+ year={2023},
235
+ eprint={2311.11045},
236
+ archivePrefix={arXiv},
237
+ primaryClass={cs.AI}
238
+ }
239
+ ```
added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<|im_end|>": 32002,
3
+ "<|im_start|>": 32001,
4
+ "[PAD]": 32000
5
+ }
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "bos_token_id": 1,
6
+ "eos_token_id": 2,
7
+ "hidden_act": "silu",
8
+ "hidden_size": 5120,
9
+ "initializer_range": 0.02,
10
+ "intermediate_size": 13824,
11
+ "max_position_embeddings": 4096,
12
+ "model_type": "llama",
13
+ "num_attention_heads": 40,
14
+ "num_hidden_layers": 40,
15
+ "num_key_value_heads": 40,
16
+ "pad_token_id": 0,
17
+ "pretraining_tp": 1,
18
+ "rms_norm_eps": 1e-05,
19
+ "rope_scaling": null,
20
+ "rope_theta": 10000.0,
21
+ "tie_word_embeddings": false,
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.33.1",
24
+ "use_cache": true,
25
+ "vocab_size": 32003
26
+ }
generation_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 1,
3
+ "do_sample": false,
4
+ "eos_token_id": 2,
5
+ "max_length": 4096,
6
+ "pad_token_id": 0,
7
+ "transformers_version": "4.33.1"
8
+ }
pytorch_model-00001-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:48b50d9d6ef77522b210c62ec214dd01295fcf88a3160acce32cae23d033ce1d
3
+ size 9956600523
pytorch_model-00002-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5dec51a499eea69793a89ce4409b019092829a8efbe5ca0f73cd1da3b7431d3
3
+ size 9940852143
pytorch_model-00003-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bd111371970c260e3b38685f6a39bc54ba189e9aa1297e142b9193e21fab415
3
+ size 9940852155
pytorch_model-00004-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9870c5705b3b409ba7ee8c60c6e785c350d8f69194ea58db11a8acfef808a4cf
3
+ size 9867410489
pytorch_model-00005-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e17d513a94757fed6a86e48d9f425fcf0a52f8bc47b83f84e809eabc5e685196
3
+ size 9867452125
pytorch_model-00006-of-00006.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:974119123f7033984e573b0d2c9754275bd448c688a09488e52f2f44206785e1
3
+ size 2490537117
pytorch_model.bin.index.json ADDED
@@ -0,0 +1,370 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 52063580160
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "pytorch_model-00006-of-00006.bin",
7
+ "model.embed_tokens.weight": "pytorch_model-00001-of-00006.bin",
8
+ "model.layers.0.input_layernorm.weight": "pytorch_model-00001-of-00006.bin",
9
+ "model.layers.0.mlp.down_proj.weight": "pytorch_model-00001-of-00006.bin",
10
+ "model.layers.0.mlp.gate_proj.weight": "pytorch_model-00001-of-00006.bin",
11
+ "model.layers.0.mlp.up_proj.weight": "pytorch_model-00001-of-00006.bin",
12
+ "model.layers.0.post_attention_layernorm.weight": "pytorch_model-00001-of-00006.bin",
13
+ "model.layers.0.self_attn.k_proj.weight": "pytorch_model-00001-of-00006.bin",
14
+ "model.layers.0.self_attn.o_proj.weight": "pytorch_model-00001-of-00006.bin",
15
+ "model.layers.0.self_attn.q_proj.weight": "pytorch_model-00001-of-00006.bin",
16
+ "model.layers.0.self_attn.v_proj.weight": "pytorch_model-00001-of-00006.bin",
17
+ "model.layers.1.input_layernorm.weight": "pytorch_model-00001-of-00006.bin",
18
+ "model.layers.1.mlp.down_proj.weight": "pytorch_model-00001-of-00006.bin",
19
+ "model.layers.1.mlp.gate_proj.weight": "pytorch_model-00001-of-00006.bin",
20
+ "model.layers.1.mlp.up_proj.weight": "pytorch_model-00001-of-00006.bin",
21
+ "model.layers.1.post_attention_layernorm.weight": "pytorch_model-00001-of-00006.bin",
22
+ "model.layers.1.self_attn.k_proj.weight": "pytorch_model-00001-of-00006.bin",
23
+ "model.layers.1.self_attn.o_proj.weight": "pytorch_model-00001-of-00006.bin",
24
+ "model.layers.1.self_attn.q_proj.weight": "pytorch_model-00001-of-00006.bin",
25
+ "model.layers.1.self_attn.v_proj.weight": "pytorch_model-00001-of-00006.bin",
26
+ "model.layers.10.input_layernorm.weight": "pytorch_model-00002-of-00006.bin",
27
+ "model.layers.10.mlp.down_proj.weight": "pytorch_model-00002-of-00006.bin",
28
+ "model.layers.10.mlp.gate_proj.weight": "pytorch_model-00002-of-00006.bin",
29
+ "model.layers.10.mlp.up_proj.weight": "pytorch_model-00002-of-00006.bin",
30
+ "model.layers.10.post_attention_layernorm.weight": "pytorch_model-00002-of-00006.bin",
31
+ "model.layers.10.self_attn.k_proj.weight": "pytorch_model-00002-of-00006.bin",
32
+ "model.layers.10.self_attn.o_proj.weight": "pytorch_model-00002-of-00006.bin",
33
+ "model.layers.10.self_attn.q_proj.weight": "pytorch_model-00002-of-00006.bin",
34
+ "model.layers.10.self_attn.v_proj.weight": "pytorch_model-00002-of-00006.bin",
35
+ "model.layers.11.input_layernorm.weight": "pytorch_model-00002-of-00006.bin",
36
+ "model.layers.11.mlp.down_proj.weight": "pytorch_model-00002-of-00006.bin",
37
+ "model.layers.11.mlp.gate_proj.weight": "pytorch_model-00002-of-00006.bin",
38
+ "model.layers.11.mlp.up_proj.weight": "pytorch_model-00002-of-00006.bin",
39
+ "model.layers.11.post_attention_layernorm.weight": "pytorch_model-00002-of-00006.bin",
40
+ "model.layers.11.self_attn.k_proj.weight": "pytorch_model-00002-of-00006.bin",
41
+ "model.layers.11.self_attn.o_proj.weight": "pytorch_model-00002-of-00006.bin",
42
+ "model.layers.11.self_attn.q_proj.weight": "pytorch_model-00002-of-00006.bin",
43
+ "model.layers.11.self_attn.v_proj.weight": "pytorch_model-00002-of-00006.bin",
44
+ "model.layers.12.input_layernorm.weight": "pytorch_model-00002-of-00006.bin",
45
+ "model.layers.12.mlp.down_proj.weight": "pytorch_model-00002-of-00006.bin",
46
+ "model.layers.12.mlp.gate_proj.weight": "pytorch_model-00002-of-00006.bin",
47
+ "model.layers.12.mlp.up_proj.weight": "pytorch_model-00002-of-00006.bin",
48
+ "model.layers.12.post_attention_layernorm.weight": "pytorch_model-00002-of-00006.bin",
49
+ "model.layers.12.self_attn.k_proj.weight": "pytorch_model-00002-of-00006.bin",
50
+ "model.layers.12.self_attn.o_proj.weight": "pytorch_model-00002-of-00006.bin",
51
+ "model.layers.12.self_attn.q_proj.weight": "pytorch_model-00002-of-00006.bin",
52
+ "model.layers.12.self_attn.v_proj.weight": "pytorch_model-00002-of-00006.bin",
53
+ "model.layers.13.input_layernorm.weight": "pytorch_model-00002-of-00006.bin",
54
+ "model.layers.13.mlp.down_proj.weight": "pytorch_model-00002-of-00006.bin",
55
+ "model.layers.13.mlp.gate_proj.weight": "pytorch_model-00002-of-00006.bin",
56
+ "model.layers.13.mlp.up_proj.weight": "pytorch_model-00002-of-00006.bin",
57
+ "model.layers.13.post_attention_layernorm.weight": "pytorch_model-00002-of-00006.bin",
58
+ "model.layers.13.self_attn.k_proj.weight": "pytorch_model-00002-of-00006.bin",
59
+ "model.layers.13.self_attn.o_proj.weight": "pytorch_model-00002-of-00006.bin",
60
+ "model.layers.13.self_attn.q_proj.weight": "pytorch_model-00002-of-00006.bin",
61
+ "model.layers.13.self_attn.v_proj.weight": "pytorch_model-00002-of-00006.bin",
62
+ "model.layers.14.input_layernorm.weight": "pytorch_model-00002-of-00006.bin",
63
+ "model.layers.14.mlp.down_proj.weight": "pytorch_model-00002-of-00006.bin",
64
+ "model.layers.14.mlp.gate_proj.weight": "pytorch_model-00002-of-00006.bin",
65
+ "model.layers.14.mlp.up_proj.weight": "pytorch_model-00002-of-00006.bin",
66
+ "model.layers.14.post_attention_layernorm.weight": "pytorch_model-00002-of-00006.bin",
67
+ "model.layers.14.self_attn.k_proj.weight": "pytorch_model-00002-of-00006.bin",
68
+ "model.layers.14.self_attn.o_proj.weight": "pytorch_model-00002-of-00006.bin",
69
+ "model.layers.14.self_attn.q_proj.weight": "pytorch_model-00002-of-00006.bin",
70
+ "model.layers.14.self_attn.v_proj.weight": "pytorch_model-00002-of-00006.bin",
71
+ "model.layers.15.input_layernorm.weight": "pytorch_model-00003-of-00006.bin",
72
+ "model.layers.15.mlp.down_proj.weight": "pytorch_model-00003-of-00006.bin",
73
+ "model.layers.15.mlp.gate_proj.weight": "pytorch_model-00003-of-00006.bin",
74
+ "model.layers.15.mlp.up_proj.weight": "pytorch_model-00003-of-00006.bin",
75
+ "model.layers.15.post_attention_layernorm.weight": "pytorch_model-00003-of-00006.bin",
76
+ "model.layers.15.self_attn.k_proj.weight": "pytorch_model-00002-of-00006.bin",
77
+ "model.layers.15.self_attn.o_proj.weight": "pytorch_model-00003-of-00006.bin",
78
+ "model.layers.15.self_attn.q_proj.weight": "pytorch_model-00002-of-00006.bin",
79
+ "model.layers.15.self_attn.v_proj.weight": "pytorch_model-00003-of-00006.bin",
80
+ "model.layers.16.input_layernorm.weight": "pytorch_model-00003-of-00006.bin",
81
+ "model.layers.16.mlp.down_proj.weight": "pytorch_model-00003-of-00006.bin",
82
+ "model.layers.16.mlp.gate_proj.weight": "pytorch_model-00003-of-00006.bin",
83
+ "model.layers.16.mlp.up_proj.weight": "pytorch_model-00003-of-00006.bin",
84
+ "model.layers.16.post_attention_layernorm.weight": "pytorch_model-00003-of-00006.bin",
85
+ "model.layers.16.self_attn.k_proj.weight": "pytorch_model-00003-of-00006.bin",
86
+ "model.layers.16.self_attn.o_proj.weight": "pytorch_model-00003-of-00006.bin",
87
+ "model.layers.16.self_attn.q_proj.weight": "pytorch_model-00003-of-00006.bin",
88
+ "model.layers.16.self_attn.v_proj.weight": "pytorch_model-00003-of-00006.bin",
89
+ "model.layers.17.input_layernorm.weight": "pytorch_model-00003-of-00006.bin",
90
+ "model.layers.17.mlp.down_proj.weight": "pytorch_model-00003-of-00006.bin",
91
+ "model.layers.17.mlp.gate_proj.weight": "pytorch_model-00003-of-00006.bin",
92
+ "model.layers.17.mlp.up_proj.weight": "pytorch_model-00003-of-00006.bin",
93
+ "model.layers.17.post_attention_layernorm.weight": "pytorch_model-00003-of-00006.bin",
94
+ "model.layers.17.self_attn.k_proj.weight": "pytorch_model-00003-of-00006.bin",
95
+ "model.layers.17.self_attn.o_proj.weight": "pytorch_model-00003-of-00006.bin",
96
+ "model.layers.17.self_attn.q_proj.weight": "pytorch_model-00003-of-00006.bin",
97
+ "model.layers.17.self_attn.v_proj.weight": "pytorch_model-00003-of-00006.bin",
98
+ "model.layers.18.input_layernorm.weight": "pytorch_model-00003-of-00006.bin",
99
+ "model.layers.18.mlp.down_proj.weight": "pytorch_model-00003-of-00006.bin",
100
+ "model.layers.18.mlp.gate_proj.weight": "pytorch_model-00003-of-00006.bin",
101
+ "model.layers.18.mlp.up_proj.weight": "pytorch_model-00003-of-00006.bin",
102
+ "model.layers.18.post_attention_layernorm.weight": "pytorch_model-00003-of-00006.bin",
103
+ "model.layers.18.self_attn.k_proj.weight": "pytorch_model-00003-of-00006.bin",
104
+ "model.layers.18.self_attn.o_proj.weight": "pytorch_model-00003-of-00006.bin",
105
+ "model.layers.18.self_attn.q_proj.weight": "pytorch_model-00003-of-00006.bin",
106
+ "model.layers.18.self_attn.v_proj.weight": "pytorch_model-00003-of-00006.bin",
107
+ "model.layers.19.input_layernorm.weight": "pytorch_model-00003-of-00006.bin",
108
+ "model.layers.19.mlp.down_proj.weight": "pytorch_model-00003-of-00006.bin",
109
+ "model.layers.19.mlp.gate_proj.weight": "pytorch_model-00003-of-00006.bin",
110
+ "model.layers.19.mlp.up_proj.weight": "pytorch_model-00003-of-00006.bin",
111
+ "model.layers.19.post_attention_layernorm.weight": "pytorch_model-00003-of-00006.bin",
112
+ "model.layers.19.self_attn.k_proj.weight": "pytorch_model-00003-of-00006.bin",
113
+ "model.layers.19.self_attn.o_proj.weight": "pytorch_model-00003-of-00006.bin",
114
+ "model.layers.19.self_attn.q_proj.weight": "pytorch_model-00003-of-00006.bin",
115
+ "model.layers.19.self_attn.v_proj.weight": "pytorch_model-00003-of-00006.bin",
116
+ "model.layers.2.input_layernorm.weight": "pytorch_model-00001-of-00006.bin",
117
+ "model.layers.2.mlp.down_proj.weight": "pytorch_model-00001-of-00006.bin",
118
+ "model.layers.2.mlp.gate_proj.weight": "pytorch_model-00001-of-00006.bin",
119
+ "model.layers.2.mlp.up_proj.weight": "pytorch_model-00001-of-00006.bin",
120
+ "model.layers.2.post_attention_layernorm.weight": "pytorch_model-00001-of-00006.bin",
121
+ "model.layers.2.self_attn.k_proj.weight": "pytorch_model-00001-of-00006.bin",
122
+ "model.layers.2.self_attn.o_proj.weight": "pytorch_model-00001-of-00006.bin",
123
+ "model.layers.2.self_attn.q_proj.weight": "pytorch_model-00001-of-00006.bin",
124
+ "model.layers.2.self_attn.v_proj.weight": "pytorch_model-00001-of-00006.bin",
125
+ "model.layers.20.input_layernorm.weight": "pytorch_model-00003-of-00006.bin",
126
+ "model.layers.20.mlp.down_proj.weight": "pytorch_model-00003-of-00006.bin",
127
+ "model.layers.20.mlp.gate_proj.weight": "pytorch_model-00003-of-00006.bin",
128
+ "model.layers.20.mlp.up_proj.weight": "pytorch_model-00003-of-00006.bin",
129
+ "model.layers.20.post_attention_layernorm.weight": "pytorch_model-00003-of-00006.bin",
130
+ "model.layers.20.self_attn.k_proj.weight": "pytorch_model-00003-of-00006.bin",
131
+ "model.layers.20.self_attn.o_proj.weight": "pytorch_model-00003-of-00006.bin",
132
+ "model.layers.20.self_attn.q_proj.weight": "pytorch_model-00003-of-00006.bin",
133
+ "model.layers.20.self_attn.v_proj.weight": "pytorch_model-00003-of-00006.bin",
134
+ "model.layers.21.input_layernorm.weight": "pytorch_model-00003-of-00006.bin",
135
+ "model.layers.21.mlp.down_proj.weight": "pytorch_model-00003-of-00006.bin",
136
+ "model.layers.21.mlp.gate_proj.weight": "pytorch_model-00003-of-00006.bin",
137
+ "model.layers.21.mlp.up_proj.weight": "pytorch_model-00003-of-00006.bin",
138
+ "model.layers.21.post_attention_layernorm.weight": "pytorch_model-00003-of-00006.bin",
139
+ "model.layers.21.self_attn.k_proj.weight": "pytorch_model-00003-of-00006.bin",
140
+ "model.layers.21.self_attn.o_proj.weight": "pytorch_model-00003-of-00006.bin",
141
+ "model.layers.21.self_attn.q_proj.weight": "pytorch_model-00003-of-00006.bin",
142
+ "model.layers.21.self_attn.v_proj.weight": "pytorch_model-00003-of-00006.bin",
143
+ "model.layers.22.input_layernorm.weight": "pytorch_model-00003-of-00006.bin",
144
+ "model.layers.22.mlp.down_proj.weight": "pytorch_model-00003-of-00006.bin",
145
+ "model.layers.22.mlp.gate_proj.weight": "pytorch_model-00003-of-00006.bin",
146
+ "model.layers.22.mlp.up_proj.weight": "pytorch_model-00003-of-00006.bin",
147
+ "model.layers.22.post_attention_layernorm.weight": "pytorch_model-00003-of-00006.bin",
148
+ "model.layers.22.self_attn.k_proj.weight": "pytorch_model-00003-of-00006.bin",
149
+ "model.layers.22.self_attn.o_proj.weight": "pytorch_model-00003-of-00006.bin",
150
+ "model.layers.22.self_attn.q_proj.weight": "pytorch_model-00003-of-00006.bin",
151
+ "model.layers.22.self_attn.v_proj.weight": "pytorch_model-00003-of-00006.bin",
152
+ "model.layers.23.input_layernorm.weight": "pytorch_model-00004-of-00006.bin",
153
+ "model.layers.23.mlp.down_proj.weight": "pytorch_model-00004-of-00006.bin",
154
+ "model.layers.23.mlp.gate_proj.weight": "pytorch_model-00004-of-00006.bin",
155
+ "model.layers.23.mlp.up_proj.weight": "pytorch_model-00004-of-00006.bin",
156
+ "model.layers.23.post_attention_layernorm.weight": "pytorch_model-00004-of-00006.bin",
157
+ "model.layers.23.self_attn.k_proj.weight": "pytorch_model-00004-of-00006.bin",
158
+ "model.layers.23.self_attn.o_proj.weight": "pytorch_model-00004-of-00006.bin",
159
+ "model.layers.23.self_attn.q_proj.weight": "pytorch_model-00004-of-00006.bin",
160
+ "model.layers.23.self_attn.v_proj.weight": "pytorch_model-00004-of-00006.bin",
161
+ "model.layers.24.input_layernorm.weight": "pytorch_model-00004-of-00006.bin",
162
+ "model.layers.24.mlp.down_proj.weight": "pytorch_model-00004-of-00006.bin",
163
+ "model.layers.24.mlp.gate_proj.weight": "pytorch_model-00004-of-00006.bin",
164
+ "model.layers.24.mlp.up_proj.weight": "pytorch_model-00004-of-00006.bin",
165
+ "model.layers.24.post_attention_layernorm.weight": "pytorch_model-00004-of-00006.bin",
166
+ "model.layers.24.self_attn.k_proj.weight": "pytorch_model-00004-of-00006.bin",
167
+ "model.layers.24.self_attn.o_proj.weight": "pytorch_model-00004-of-00006.bin",
168
+ "model.layers.24.self_attn.q_proj.weight": "pytorch_model-00004-of-00006.bin",
169
+ "model.layers.24.self_attn.v_proj.weight": "pytorch_model-00004-of-00006.bin",
170
+ "model.layers.25.input_layernorm.weight": "pytorch_model-00004-of-00006.bin",
171
+ "model.layers.25.mlp.down_proj.weight": "pytorch_model-00004-of-00006.bin",
172
+ "model.layers.25.mlp.gate_proj.weight": "pytorch_model-00004-of-00006.bin",
173
+ "model.layers.25.mlp.up_proj.weight": "pytorch_model-00004-of-00006.bin",
174
+ "model.layers.25.post_attention_layernorm.weight": "pytorch_model-00004-of-00006.bin",
175
+ "model.layers.25.self_attn.k_proj.weight": "pytorch_model-00004-of-00006.bin",
176
+ "model.layers.25.self_attn.o_proj.weight": "pytorch_model-00004-of-00006.bin",
177
+ "model.layers.25.self_attn.q_proj.weight": "pytorch_model-00004-of-00006.bin",
178
+ "model.layers.25.self_attn.v_proj.weight": "pytorch_model-00004-of-00006.bin",
179
+ "model.layers.26.input_layernorm.weight": "pytorch_model-00004-of-00006.bin",
180
+ "model.layers.26.mlp.down_proj.weight": "pytorch_model-00004-of-00006.bin",
181
+ "model.layers.26.mlp.gate_proj.weight": "pytorch_model-00004-of-00006.bin",
182
+ "model.layers.26.mlp.up_proj.weight": "pytorch_model-00004-of-00006.bin",
183
+ "model.layers.26.post_attention_layernorm.weight": "pytorch_model-00004-of-00006.bin",
184
+ "model.layers.26.self_attn.k_proj.weight": "pytorch_model-00004-of-00006.bin",
185
+ "model.layers.26.self_attn.o_proj.weight": "pytorch_model-00004-of-00006.bin",
186
+ "model.layers.26.self_attn.q_proj.weight": "pytorch_model-00004-of-00006.bin",
187
+ "model.layers.26.self_attn.v_proj.weight": "pytorch_model-00004-of-00006.bin",
188
+ "model.layers.27.input_layernorm.weight": "pytorch_model-00004-of-00006.bin",
189
+ "model.layers.27.mlp.down_proj.weight": "pytorch_model-00004-of-00006.bin",
190
+ "model.layers.27.mlp.gate_proj.weight": "pytorch_model-00004-of-00006.bin",
191
+ "model.layers.27.mlp.up_proj.weight": "pytorch_model-00004-of-00006.bin",
192
+ "model.layers.27.post_attention_layernorm.weight": "pytorch_model-00004-of-00006.bin",
193
+ "model.layers.27.self_attn.k_proj.weight": "pytorch_model-00004-of-00006.bin",
194
+ "model.layers.27.self_attn.o_proj.weight": "pytorch_model-00004-of-00006.bin",
195
+ "model.layers.27.self_attn.q_proj.weight": "pytorch_model-00004-of-00006.bin",
196
+ "model.layers.27.self_attn.v_proj.weight": "pytorch_model-00004-of-00006.bin",
197
+ "model.layers.28.input_layernorm.weight": "pytorch_model-00004-of-00006.bin",
198
+ "model.layers.28.mlp.down_proj.weight": "pytorch_model-00004-of-00006.bin",
199
+ "model.layers.28.mlp.gate_proj.weight": "pytorch_model-00004-of-00006.bin",
200
+ "model.layers.28.mlp.up_proj.weight": "pytorch_model-00004-of-00006.bin",
201
+ "model.layers.28.post_attention_layernorm.weight": "pytorch_model-00004-of-00006.bin",
202
+ "model.layers.28.self_attn.k_proj.weight": "pytorch_model-00004-of-00006.bin",
203
+ "model.layers.28.self_attn.o_proj.weight": "pytorch_model-00004-of-00006.bin",
204
+ "model.layers.28.self_attn.q_proj.weight": "pytorch_model-00004-of-00006.bin",
205
+ "model.layers.28.self_attn.v_proj.weight": "pytorch_model-00004-of-00006.bin",
206
+ "model.layers.29.input_layernorm.weight": "pytorch_model-00004-of-00006.bin",
207
+ "model.layers.29.mlp.down_proj.weight": "pytorch_model-00004-of-00006.bin",
208
+ "model.layers.29.mlp.gate_proj.weight": "pytorch_model-00004-of-00006.bin",
209
+ "model.layers.29.mlp.up_proj.weight": "pytorch_model-00004-of-00006.bin",
210
+ "model.layers.29.post_attention_layernorm.weight": "pytorch_model-00004-of-00006.bin",
211
+ "model.layers.29.self_attn.k_proj.weight": "pytorch_model-00004-of-00006.bin",
212
+ "model.layers.29.self_attn.o_proj.weight": "pytorch_model-00004-of-00006.bin",
213
+ "model.layers.29.self_attn.q_proj.weight": "pytorch_model-00004-of-00006.bin",
214
+ "model.layers.29.self_attn.v_proj.weight": "pytorch_model-00004-of-00006.bin",
215
+ "model.layers.3.input_layernorm.weight": "pytorch_model-00001-of-00006.bin",
216
+ "model.layers.3.mlp.down_proj.weight": "pytorch_model-00001-of-00006.bin",
217
+ "model.layers.3.mlp.gate_proj.weight": "pytorch_model-00001-of-00006.bin",
218
+ "model.layers.3.mlp.up_proj.weight": "pytorch_model-00001-of-00006.bin",
219
+ "model.layers.3.post_attention_layernorm.weight": "pytorch_model-00001-of-00006.bin",
220
+ "model.layers.3.self_attn.k_proj.weight": "pytorch_model-00001-of-00006.bin",
221
+ "model.layers.3.self_attn.o_proj.weight": "pytorch_model-00001-of-00006.bin",
222
+ "model.layers.3.self_attn.q_proj.weight": "pytorch_model-00001-of-00006.bin",
223
+ "model.layers.3.self_attn.v_proj.weight": "pytorch_model-00001-of-00006.bin",
224
+ "model.layers.30.input_layernorm.weight": "pytorch_model-00005-of-00006.bin",
225
+ "model.layers.30.mlp.down_proj.weight": "pytorch_model-00005-of-00006.bin",
226
+ "model.layers.30.mlp.gate_proj.weight": "pytorch_model-00004-of-00006.bin",
227
+ "model.layers.30.mlp.up_proj.weight": "pytorch_model-00004-of-00006.bin",
228
+ "model.layers.30.post_attention_layernorm.weight": "pytorch_model-00005-of-00006.bin",
229
+ "model.layers.30.self_attn.k_proj.weight": "pytorch_model-00004-of-00006.bin",
230
+ "model.layers.30.self_attn.o_proj.weight": "pytorch_model-00004-of-00006.bin",
231
+ "model.layers.30.self_attn.q_proj.weight": "pytorch_model-00004-of-00006.bin",
232
+ "model.layers.30.self_attn.v_proj.weight": "pytorch_model-00004-of-00006.bin",
233
+ "model.layers.31.input_layernorm.weight": "pytorch_model-00005-of-00006.bin",
234
+ "model.layers.31.mlp.down_proj.weight": "pytorch_model-00005-of-00006.bin",
235
+ "model.layers.31.mlp.gate_proj.weight": "pytorch_model-00005-of-00006.bin",
236
+ "model.layers.31.mlp.up_proj.weight": "pytorch_model-00005-of-00006.bin",
237
+ "model.layers.31.post_attention_layernorm.weight": "pytorch_model-00005-of-00006.bin",
238
+ "model.layers.31.self_attn.k_proj.weight": "pytorch_model-00005-of-00006.bin",
239
+ "model.layers.31.self_attn.o_proj.weight": "pytorch_model-00005-of-00006.bin",
240
+ "model.layers.31.self_attn.q_proj.weight": "pytorch_model-00005-of-00006.bin",
241
+ "model.layers.31.self_attn.v_proj.weight": "pytorch_model-00005-of-00006.bin",
242
+ "model.layers.32.input_layernorm.weight": "pytorch_model-00005-of-00006.bin",
243
+ "model.layers.32.mlp.down_proj.weight": "pytorch_model-00005-of-00006.bin",
244
+ "model.layers.32.mlp.gate_proj.weight": "pytorch_model-00005-of-00006.bin",
245
+ "model.layers.32.mlp.up_proj.weight": "pytorch_model-00005-of-00006.bin",
246
+ "model.layers.32.post_attention_layernorm.weight": "pytorch_model-00005-of-00006.bin",
247
+ "model.layers.32.self_attn.k_proj.weight": "pytorch_model-00005-of-00006.bin",
248
+ "model.layers.32.self_attn.o_proj.weight": "pytorch_model-00005-of-00006.bin",
249
+ "model.layers.32.self_attn.q_proj.weight": "pytorch_model-00005-of-00006.bin",
250
+ "model.layers.32.self_attn.v_proj.weight": "pytorch_model-00005-of-00006.bin",
251
+ "model.layers.33.input_layernorm.weight": "pytorch_model-00005-of-00006.bin",
252
+ "model.layers.33.mlp.down_proj.weight": "pytorch_model-00005-of-00006.bin",
253
+ "model.layers.33.mlp.gate_proj.weight": "pytorch_model-00005-of-00006.bin",
254
+ "model.layers.33.mlp.up_proj.weight": "pytorch_model-00005-of-00006.bin",
255
+ "model.layers.33.post_attention_layernorm.weight": "pytorch_model-00005-of-00006.bin",
256
+ "model.layers.33.self_attn.k_proj.weight": "pytorch_model-00005-of-00006.bin",
257
+ "model.layers.33.self_attn.o_proj.weight": "pytorch_model-00005-of-00006.bin",
258
+ "model.layers.33.self_attn.q_proj.weight": "pytorch_model-00005-of-00006.bin",
259
+ "model.layers.33.self_attn.v_proj.weight": "pytorch_model-00005-of-00006.bin",
260
+ "model.layers.34.input_layernorm.weight": "pytorch_model-00005-of-00006.bin",
261
+ "model.layers.34.mlp.down_proj.weight": "pytorch_model-00005-of-00006.bin",
262
+ "model.layers.34.mlp.gate_proj.weight": "pytorch_model-00005-of-00006.bin",
263
+ "model.layers.34.mlp.up_proj.weight": "pytorch_model-00005-of-00006.bin",
264
+ "model.layers.34.post_attention_layernorm.weight": "pytorch_model-00005-of-00006.bin",
265
+ "model.layers.34.self_attn.k_proj.weight": "pytorch_model-00005-of-00006.bin",
266
+ "model.layers.34.self_attn.o_proj.weight": "pytorch_model-00005-of-00006.bin",
267
+ "model.layers.34.self_attn.q_proj.weight": "pytorch_model-00005-of-00006.bin",
268
+ "model.layers.34.self_attn.v_proj.weight": "pytorch_model-00005-of-00006.bin",
269
+ "model.layers.35.input_layernorm.weight": "pytorch_model-00005-of-00006.bin",
270
+ "model.layers.35.mlp.down_proj.weight": "pytorch_model-00005-of-00006.bin",
271
+ "model.layers.35.mlp.gate_proj.weight": "pytorch_model-00005-of-00006.bin",
272
+ "model.layers.35.mlp.up_proj.weight": "pytorch_model-00005-of-00006.bin",
273
+ "model.layers.35.post_attention_layernorm.weight": "pytorch_model-00005-of-00006.bin",
274
+ "model.layers.35.self_attn.k_proj.weight": "pytorch_model-00005-of-00006.bin",
275
+ "model.layers.35.self_attn.o_proj.weight": "pytorch_model-00005-of-00006.bin",
276
+ "model.layers.35.self_attn.q_proj.weight": "pytorch_model-00005-of-00006.bin",
277
+ "model.layers.35.self_attn.v_proj.weight": "pytorch_model-00005-of-00006.bin",
278
+ "model.layers.36.input_layernorm.weight": "pytorch_model-00005-of-00006.bin",
279
+ "model.layers.36.mlp.down_proj.weight": "pytorch_model-00005-of-00006.bin",
280
+ "model.layers.36.mlp.gate_proj.weight": "pytorch_model-00005-of-00006.bin",
281
+ "model.layers.36.mlp.up_proj.weight": "pytorch_model-00005-of-00006.bin",
282
+ "model.layers.36.post_attention_layernorm.weight": "pytorch_model-00005-of-00006.bin",
283
+ "model.layers.36.self_attn.k_proj.weight": "pytorch_model-00005-of-00006.bin",
284
+ "model.layers.36.self_attn.o_proj.weight": "pytorch_model-00005-of-00006.bin",
285
+ "model.layers.36.self_attn.q_proj.weight": "pytorch_model-00005-of-00006.bin",
286
+ "model.layers.36.self_attn.v_proj.weight": "pytorch_model-00005-of-00006.bin",
287
+ "model.layers.37.input_layernorm.weight": "pytorch_model-00005-of-00006.bin",
288
+ "model.layers.37.mlp.down_proj.weight": "pytorch_model-00005-of-00006.bin",
289
+ "model.layers.37.mlp.gate_proj.weight": "pytorch_model-00005-of-00006.bin",
290
+ "model.layers.37.mlp.up_proj.weight": "pytorch_model-00005-of-00006.bin",
291
+ "model.layers.37.post_attention_layernorm.weight": "pytorch_model-00005-of-00006.bin",
292
+ "model.layers.37.self_attn.k_proj.weight": "pytorch_model-00005-of-00006.bin",
293
+ "model.layers.37.self_attn.o_proj.weight": "pytorch_model-00005-of-00006.bin",
294
+ "model.layers.37.self_attn.q_proj.weight": "pytorch_model-00005-of-00006.bin",
295
+ "model.layers.37.self_attn.v_proj.weight": "pytorch_model-00005-of-00006.bin",
296
+ "model.layers.38.input_layernorm.weight": "pytorch_model-00006-of-00006.bin",
297
+ "model.layers.38.mlp.down_proj.weight": "pytorch_model-00006-of-00006.bin",
298
+ "model.layers.38.mlp.gate_proj.weight": "pytorch_model-00005-of-00006.bin",
299
+ "model.layers.38.mlp.up_proj.weight": "pytorch_model-00006-of-00006.bin",
300
+ "model.layers.38.post_attention_layernorm.weight": "pytorch_model-00006-of-00006.bin",
301
+ "model.layers.38.self_attn.k_proj.weight": "pytorch_model-00005-of-00006.bin",
302
+ "model.layers.38.self_attn.o_proj.weight": "pytorch_model-00005-of-00006.bin",
303
+ "model.layers.38.self_attn.q_proj.weight": "pytorch_model-00005-of-00006.bin",
304
+ "model.layers.38.self_attn.v_proj.weight": "pytorch_model-00005-of-00006.bin",
305
+ "model.layers.39.input_layernorm.weight": "pytorch_model-00006-of-00006.bin",
306
+ "model.layers.39.mlp.down_proj.weight": "pytorch_model-00006-of-00006.bin",
307
+ "model.layers.39.mlp.gate_proj.weight": "pytorch_model-00006-of-00006.bin",
308
+ "model.layers.39.mlp.up_proj.weight": "pytorch_model-00006-of-00006.bin",
309
+ "model.layers.39.post_attention_layernorm.weight": "pytorch_model-00006-of-00006.bin",
310
+ "model.layers.39.self_attn.k_proj.weight": "pytorch_model-00006-of-00006.bin",
311
+ "model.layers.39.self_attn.o_proj.weight": "pytorch_model-00006-of-00006.bin",
312
+ "model.layers.39.self_attn.q_proj.weight": "pytorch_model-00006-of-00006.bin",
313
+ "model.layers.39.self_attn.v_proj.weight": "pytorch_model-00006-of-00006.bin",
314
+ "model.layers.4.input_layernorm.weight": "pytorch_model-00001-of-00006.bin",
315
+ "model.layers.4.mlp.down_proj.weight": "pytorch_model-00001-of-00006.bin",
316
+ "model.layers.4.mlp.gate_proj.weight": "pytorch_model-00001-of-00006.bin",
317
+ "model.layers.4.mlp.up_proj.weight": "pytorch_model-00001-of-00006.bin",
318
+ "model.layers.4.post_attention_layernorm.weight": "pytorch_model-00001-of-00006.bin",
319
+ "model.layers.4.self_attn.k_proj.weight": "pytorch_model-00001-of-00006.bin",
320
+ "model.layers.4.self_attn.o_proj.weight": "pytorch_model-00001-of-00006.bin",
321
+ "model.layers.4.self_attn.q_proj.weight": "pytorch_model-00001-of-00006.bin",
322
+ "model.layers.4.self_attn.v_proj.weight": "pytorch_model-00001-of-00006.bin",
323
+ "model.layers.5.input_layernorm.weight": "pytorch_model-00001-of-00006.bin",
324
+ "model.layers.5.mlp.down_proj.weight": "pytorch_model-00001-of-00006.bin",
325
+ "model.layers.5.mlp.gate_proj.weight": "pytorch_model-00001-of-00006.bin",
326
+ "model.layers.5.mlp.up_proj.weight": "pytorch_model-00001-of-00006.bin",
327
+ "model.layers.5.post_attention_layernorm.weight": "pytorch_model-00001-of-00006.bin",
328
+ "model.layers.5.self_attn.k_proj.weight": "pytorch_model-00001-of-00006.bin",
329
+ "model.layers.5.self_attn.o_proj.weight": "pytorch_model-00001-of-00006.bin",
330
+ "model.layers.5.self_attn.q_proj.weight": "pytorch_model-00001-of-00006.bin",
331
+ "model.layers.5.self_attn.v_proj.weight": "pytorch_model-00001-of-00006.bin",
332
+ "model.layers.6.input_layernorm.weight": "pytorch_model-00001-of-00006.bin",
333
+ "model.layers.6.mlp.down_proj.weight": "pytorch_model-00001-of-00006.bin",
334
+ "model.layers.6.mlp.gate_proj.weight": "pytorch_model-00001-of-00006.bin",
335
+ "model.layers.6.mlp.up_proj.weight": "pytorch_model-00001-of-00006.bin",
336
+ "model.layers.6.post_attention_layernorm.weight": "pytorch_model-00001-of-00006.bin",
337
+ "model.layers.6.self_attn.k_proj.weight": "pytorch_model-00001-of-00006.bin",
338
+ "model.layers.6.self_attn.o_proj.weight": "pytorch_model-00001-of-00006.bin",
339
+ "model.layers.6.self_attn.q_proj.weight": "pytorch_model-00001-of-00006.bin",
340
+ "model.layers.6.self_attn.v_proj.weight": "pytorch_model-00001-of-00006.bin",
341
+ "model.layers.7.input_layernorm.weight": "pytorch_model-00002-of-00006.bin",
342
+ "model.layers.7.mlp.down_proj.weight": "pytorch_model-00002-of-00006.bin",
343
+ "model.layers.7.mlp.gate_proj.weight": "pytorch_model-00002-of-00006.bin",
344
+ "model.layers.7.mlp.up_proj.weight": "pytorch_model-00002-of-00006.bin",
345
+ "model.layers.7.post_attention_layernorm.weight": "pytorch_model-00002-of-00006.bin",
346
+ "model.layers.7.self_attn.k_proj.weight": "pytorch_model-00001-of-00006.bin",
347
+ "model.layers.7.self_attn.o_proj.weight": "pytorch_model-00001-of-00006.bin",
348
+ "model.layers.7.self_attn.q_proj.weight": "pytorch_model-00001-of-00006.bin",
349
+ "model.layers.7.self_attn.v_proj.weight": "pytorch_model-00001-of-00006.bin",
350
+ "model.layers.8.input_layernorm.weight": "pytorch_model-00002-of-00006.bin",
351
+ "model.layers.8.mlp.down_proj.weight": "pytorch_model-00002-of-00006.bin",
352
+ "model.layers.8.mlp.gate_proj.weight": "pytorch_model-00002-of-00006.bin",
353
+ "model.layers.8.mlp.up_proj.weight": "pytorch_model-00002-of-00006.bin",
354
+ "model.layers.8.post_attention_layernorm.weight": "pytorch_model-00002-of-00006.bin",
355
+ "model.layers.8.self_attn.k_proj.weight": "pytorch_model-00002-of-00006.bin",
356
+ "model.layers.8.self_attn.o_proj.weight": "pytorch_model-00002-of-00006.bin",
357
+ "model.layers.8.self_attn.q_proj.weight": "pytorch_model-00002-of-00006.bin",
358
+ "model.layers.8.self_attn.v_proj.weight": "pytorch_model-00002-of-00006.bin",
359
+ "model.layers.9.input_layernorm.weight": "pytorch_model-00002-of-00006.bin",
360
+ "model.layers.9.mlp.down_proj.weight": "pytorch_model-00002-of-00006.bin",
361
+ "model.layers.9.mlp.gate_proj.weight": "pytorch_model-00002-of-00006.bin",
362
+ "model.layers.9.mlp.up_proj.weight": "pytorch_model-00002-of-00006.bin",
363
+ "model.layers.9.post_attention_layernorm.weight": "pytorch_model-00002-of-00006.bin",
364
+ "model.layers.9.self_attn.k_proj.weight": "pytorch_model-00002-of-00006.bin",
365
+ "model.layers.9.self_attn.o_proj.weight": "pytorch_model-00002-of-00006.bin",
366
+ "model.layers.9.self_attn.q_proj.weight": "pytorch_model-00002-of-00006.bin",
367
+ "model.layers.9.self_attn.v_proj.weight": "pytorch_model-00002-of-00006.bin",
368
+ "model.norm.weight": "pytorch_model-00006-of-00006.bin"
369
+ }
370
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "[PAD]",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
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,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "bos_token": {
5
+ "__type": "AddedToken",
6
+ "content": "<s>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "clean_up_tokenization_spaces": false,
13
+ "eos_token": {
14
+ "__type": "AddedToken",
15
+ "content": "</s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "legacy": false,
22
+ "model_max_length": 4096,
23
+ "pad_token": null,
24
+ "padding_side": "right",
25
+ "sp_model_kwargs": {},
26
+ "spaces_between_special_tokens": false,
27
+ "tokenizer_class": "LlamaTokenizer",
28
+ "unk_token": {
29
+ "__type": "AddedToken",
30
+ "content": "<unk>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false
35
+ },
36
+ "use_default_system_prompt": true
37
+ }