SalmanFaroz commited on
Commit
83c6741
·
verified ·
1 Parent(s): e9f9f82

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +263 -167
README.md CHANGED
@@ -1,199 +1,295 @@
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
 
 
10
 
 
11
 
12
- ## Model Details
13
 
14
- ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- ### Model Sources [optional]
29
 
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
- ## Uses
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
 
40
- ### Direct Use
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
 
44
- [More Information Needed]
45
 
46
- ### Downstream Use [optional]
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
 
50
- [More Information Needed]
51
 
52
- ### Out-of-Scope Use
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
 
56
- [More Information Needed]
 
57
 
58
- ## Bias, Risks, and Limitations
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
 
 
61
 
62
- [More Information Needed]
63
 
64
- ### Recommendations
 
 
 
 
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
 
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- 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. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- 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).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
  ---
2
+ language:
3
+ - en
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - facebook
7
+ - meta
8
+ - pytorch
9
+ - llama
10
+ - llama-3
11
+ license: llama3
12
+ extra_gated_prompt: >-
13
+ ### META LLAMA 3 COMMUNITY LICENSE AGREEMENT
14
+
15
+ Meta Llama 3 Version Release Date: April 18, 2024
16
+
17
+ "Agreement" means the terms and conditions for use, reproduction, distribution and modification of the
18
+ Llama Materials set forth herein.
19
+
20
+ "Documentation" means the specifications, manuals and documentation accompanying Meta Llama 3
21
+ distributed by Meta at https://llama.meta.com/get-started/.
22
+
23
+ "Licensee" or "you" means you, or your employer or any other person or entity (if you are entering into
24
+ this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or
25
+ regulations to provide legal consent and that has legal authority to bind your employer or such other
26
+ person or entity if you are entering in this Agreement on their behalf.
27
+
28
+ "Meta Llama 3" means the foundational large language models and software and algorithms, including
29
+ machine-learning model code, trained model weights, inference-enabling code, training-enabling code,
30
+ fine-tuning enabling code and other elements of the foregoing distributed by Meta at
31
+ https://llama.meta.com/llama-downloads.
32
+
33
+ "Llama Materials" means, collectively, Meta’s proprietary Meta Llama 3 and Documentation (and any
34
+ portion thereof) made available under this Agreement.
35
+
36
+ "Meta" or "we" means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your
37
+ principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located
38
+ outside of the EEA or Switzerland).
39
+
40
+ 1. License Rights and Redistribution.
41
+
42
+ a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free
43
+ limited license under Meta’s intellectual property or other rights owned by Meta embodied in the Llama
44
+ Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the
45
+ Llama Materials.
46
+
47
+ b. Redistribution and Use.
48
+
49
+ i. If you distribute or make available the Llama Materials (or any derivative works
50
+ thereof), or a product or service that uses any of them, including another AI model, you shall (A) provide
51
+ a copy of this Agreement with any such Llama Materials; and (B) prominently display “Built with Meta
52
+ Llama 3” on a related website, user interface, blogpost, about page, or product documentation. If you
53
+ use the Llama Materials to create, train, fine tune, or otherwise improve an AI model, which is
54
+ distributed or made available, you shall also include “Llama 3” at the beginning of any such AI model
55
+ name.
56
+
57
+ ii. If you receive Llama Materials, or any derivative works thereof, from a Licensee as part
58
+ of an integrated end user product, then Section 2 of this Agreement will not apply to you.
59
+
60
+ iii. You must retain in all copies of the Llama Materials that you distribute the following
61
+ attribution notice within a “Notice” text file distributed as a part of such copies: “Meta Llama 3 is
62
+ licensed under the Meta Llama 3 Community License, Copyright © Meta Platforms, Inc. All Rights
63
+ Reserved.”
64
+
65
+ iv. Your use of the Llama Materials must comply with applicable laws and regulations
66
+ (including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Llama
67
+ Materials (available at https://llama.meta.com/llama3/use-policy), which is hereby incorporated by
68
+ reference into this Agreement.
69
+
70
+ v. You will not use the Llama Materials or any output or results of the Llama Materials to
71
+ improve any other large language model (excluding Meta Llama 3 or derivative works thereof).
72
+
73
+ 2. Additional Commercial Terms. If, on the Meta Llama 3 version release date, the monthly active users
74
+ of the products or services made available by or for Licensee, or Licensee’s affiliates, is greater than 700
75
+ million monthly active users in the preceding calendar month, you must request a license from Meta,
76
+ which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the
77
+ rights under this Agreement unless or until Meta otherwise expressly grants you such rights.
78
+
79
+ 3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY
80
+ OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF
81
+ ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED,
82
+ INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT,
83
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR
84
+ DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND
85
+ ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND
86
+ RESULTS.
87
+
88
+ 4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF
89
+ LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING
90
+ OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL,
91
+ INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED
92
+ OF THE POSSIBILITY OF ANY OF THE FOREGOING.
93
+
94
+ 5. Intellectual Property.
95
+
96
+ a. No trademark licenses are granted under this Agreement, and in connection with the Llama
97
+ Materials, neither Meta nor Licensee may use any name or mark owned by or associated with the other
98
+ or any of its affiliates, except as required for reasonable and customary use in describing and
99
+ redistributing the Llama Materials or as set forth in this Section 5(a). Meta hereby grants you a license to
100
+ use “Llama 3” (the “Mark”) solely as required to comply with the last sentence of Section 1.b.i. You will
101
+ comply with Meta’s brand guidelines (currently accessible at
102
+ https://about.meta.com/brand/resources/meta/company-brand/ ). All goodwill arising out of your use
103
+ of the Mark will inure to the benefit of Meta.
104
+
105
+ b. Subject to Meta’s ownership of Llama Materials and derivatives made by or for Meta, with
106
+ respect to any derivative works and modifications of the Llama Materials that are made by you, as
107
+ between you and Meta, you are and will be the owner of such derivative works and modifications.
108
+
109
+ c. If you institute litigation or other proceedings against Meta or any entity (including a
110
+ cross-claim or counterclaim in a lawsuit) alleging that the Llama Materials or Meta Llama 3 outputs or
111
+ results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other
112
+ rights owned or licensable by you, then any licenses granted to you under this Agreement shall
113
+ terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold
114
+ harmless Meta from and against any claim by any third party arising out of or related to your use or
115
+ distribution of the Llama Materials.
116
+
117
+ 6. Term and Termination. The term of this Agreement will commence upon your acceptance of this
118
+ Agreement or access to the Llama Materials and will continue in full force and effect until terminated in
119
+ accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in
120
+ breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete
121
+ and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the termination of this
122
+ Agreement.
123
+
124
+ 7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of
125
+ the State of California without regard to choice of law principles, and the UN Convention on Contracts
126
+ for the International Sale of Goods does not apply to this Agreement. The courts of California shall have
127
+ exclusive jurisdiction of any dispute arising out of this Agreement.
128
+
129
+ ### Meta Llama 3 Acceptable Use Policy
130
+
131
+ Meta is committed to promoting safe and fair use of its tools and features, including Meta Llama 3. If you
132
+ access or use Meta Llama 3, you agree to this Acceptable Use Policy (“Policy”). The most recent copy of
133
+ this policy can be found at [https://llama.meta.com/llama3/use-policy](https://llama.meta.com/llama3/use-policy)
134
+
135
+ #### Prohibited Uses
136
+
137
+ We want everyone to use Meta Llama 3 safely and responsibly. You agree you will not use, or allow
138
+ others to use, Meta Llama 3 to:
139
+ 1. Violate the law or others’ rights, including to:
140
+ 1. Engage in, promote, generate, contribute to, encourage, plan, incite, or further illegal or unlawful activity or content, such as:
141
+ 1. Violence or terrorism
142
+ 2. Exploitation or harm to children, including the solicitation, creation, acquisition, or dissemination of child exploitative content or failure to report Child Sexual Abuse Material
143
+ 3. Human trafficking, exploitation, and sexual violence
144
+ 4. The illegal distribution of information or materials to minors, including obscene materials, or failure to employ legally required age-gating in connection with such information or materials.
145
+ 5. Sexual solicitation
146
+ 6. Any other criminal activity
147
+ 2. Engage in, promote, incite, or facilitate the harassment, abuse, threatening, or bullying of individuals or groups of individuals
148
+ 3. Engage in, promote, incite, or facilitate discrimination or other unlawful or harmful conduct in the provision of employment, employment benefits, credit, housing, other economic benefits, or other essential goods and services
149
+ 4. Engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices
150
+ 5. Collect, process, disclose, generate, or infer health, demographic, or other sensitive personal or private information about individuals without rights and consents required by applicable laws
151
+ 6. Engage in or facilitate any action or generate any content that infringes, misappropriates, or otherwise violates any third-party rights, including the outputs or results of any products or services using the Llama Materials
152
+ 7. Create, generate, or facilitate the creation of malicious code, malware, computer viruses or do anything else that could disable, overburden, interfere with or impair the proper working, integrity, operation or appearance of a website or computer system
153
+ 2. Engage in, promote, incite, facilitate, or assist in the planning or development of activities that present a risk of death or bodily harm to individuals, including use of Meta Llama 3 related to the following:
154
+ 1. Military, warfare, nuclear industries or applications, espionage, use for materials or activities that are subject to the International Traffic Arms Regulations (ITAR) maintained by the United States Department of State
155
+ 2. Guns and illegal weapons (including weapon development)
156
+ 3. Illegal drugs and regulated/controlled substances
157
+ 4. Operation of critical infrastructure, transportation technologies, or heavy machinery
158
+ 5. Self-harm or harm to others, including suicide, cutting, and eating disorders
159
+ 6. Any content intended to incite or promote violence, abuse, or any infliction of bodily harm to an individual
160
+ 3. Intentionally deceive or mislead others, including use of Meta Llama 3 related to the following:
161
+ 1. Generating, promoting, or furthering fraud or the creation or promotion of disinformation
162
+ 2. Generating, promoting, or furthering defamatory content, including the creation of defamatory statements, images, or other content
163
+ 3. Generating, promoting, or further distributing spam
164
+ 4. Impersonating another individual without consent, authorization, or legal right
165
+ 5. Representing that the use of Meta Llama 3 or outputs are human-generated
166
+ 6. Generating or facilitating false online engagement, including fake reviews and other means of fake online engagement
167
+ 4. Fail to appropriately disclose to end users any known dangers of your AI system
168
+
169
+ Please report any violation of this Policy, software “bug,” or other problems that could lead to a violation
170
+ of this Policy through one of the following means:
171
+ * Reporting issues with the model: [https://github.com/meta-llama/llama3](https://github.com/meta-llama/llama3)
172
+ * Reporting risky content generated by the model:
173
+ developers.facebook.com/llama_output_feedback
174
+ * Reporting bugs and security concerns: facebook.com/whitehat/info
175
+ * Reporting violations of the Acceptable Use Policy or unlicensed uses of Meta Llama 3: [email protected]
176
+ extra_gated_fields:
177
+ First Name: text
178
+ Last Name: text
179
+ Date of birth: date_picker
180
+ Country: country
181
+ Affiliation: text
182
+ geo: ip_location
183
+ By clicking Submit below I accept the terms of the license and acknowledge that the information I provide will be collected stored processed and shared in accordance with the Meta Privacy Policy: checkbox
184
+ extra_gated_description: The information you provide will be collected, stored, processed and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/).
185
+ extra_gated_button_content: Submit
186
  ---
187
 
188
+ ## Model Details (GPTQ 4bit)
189
 
190
+ Meta developed and released the Meta Llama 3 family of large language models (LLMs), a collection of pretrained and instruction tuned generative text models in 8 and 70B sizes. The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on common industry benchmarks. Further, in developing these models, we took great care to optimize helpfulness and safety.
191
 
192
+ **Model developers** Meta
193
 
194
+ **Variations** Llama 3 comes in two sizes — 8B and 70B parameters — in pre-trained and instruction tuned variants.
195
 
196
+ **Input** Models input text only.
197
 
198
+ **Output** Models generate text and code only.
199
 
200
+ **Model Architecture** Llama 3 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety.
201
 
 
202
 
203
+ <table>
204
+ <tr>
205
+ <td>
206
+ </td>
207
+ <td><strong>Training Data</strong>
208
+ </td>
209
+ <td><strong>Params</strong>
210
+ </td>
211
+ <td><strong>Context length</strong>
212
+ </td>
213
+ <td><strong>GQA</strong>
214
+ </td>
215
+ <td><strong>Token count</strong>
216
+ </td>
217
+ <td><strong>Knowledge cutoff</strong>
218
+ </td>
219
+ </tr>
220
+ <tr>
221
+ <td rowspan="2" >Llama 3
222
+ </td>
223
+ <td rowspan="2" >A new mix of publicly available online data.
224
+ </td>
225
+ <td>8B
226
+ </td>
227
+ <td>8k
228
+ </td>
229
+ <td>Yes
230
+ </td>
231
+ <td rowspan="2" >15T+
232
+ </td>
233
+ <td>March, 2023
234
+ </td>
235
+ </tr>
236
+ <tr>
237
+ <td>70B
238
+ </td>
239
+ <td>8k
240
+ </td>
241
+ <td>Yes
242
+ </td>
243
+ <td>December, 2023
244
+ </td>
245
+ </tr>
246
+ </table>
247
 
 
248
 
249
+ **Llama 3 family of models**. Token counts refer to pretraining data only. Both the 8 and 70B versions use Grouped-Query Attention (GQA) for improved inference scalability.
250
 
251
+ **Model Release Date** April 18, 2024.
 
 
252
 
253
+ **Status** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we improve model safety with community feedback.
254
 
255
+ **License** A custom commercial license is available at: [https://llama.meta.com/llama3/license](https://llama.meta.com/llama3/license)
256
 
257
+ Where to send questions or comments about the model Instructions on how to provide feedback or comments on the model can be found in the model [README](https://github.com/meta-llama/llama3). For more technical information about generation parameters and recipes for how to use Llama 3 in applications, please go [here](https://github.com/meta-llama/llama-recipes).
258
 
 
259
 
260
+ ## Intended Use
261
 
262
+ **Intended Use Cases** Llama 3 is intended for commercial and research use in English. Instruction tuned models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks.
263
 
264
+ **Out-of-scope** Use in any manner that violates applicable laws or regulations (including trade compliance laws). Use in any other way that is prohibited by the Acceptable Use Policy and Llama 3 Community License. Use in languages other than English**.
265
 
266
+ **Note: Developers may fine-tune Llama 3 models for languages beyond English provided they comply with the Llama 3 Community License and the Acceptable Use Policy.
267
 
 
268
 
269
+ #### Example code
270
 
271
+ ```python
272
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
273
 
274
+ model_name_or_path = "SalmanFaroz/Meta-Llama-3-8B-Instruct-GPTQ"
275
 
276
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
277
+ device_map="auto",
278
+ trust_remote_code=False)
279
 
280
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
281
 
282
+ prompt = "Tell me about AI"
283
+ prompt_template=f'''[INST] <<SYS>>
284
+ You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
285
+ <</SYS>>
286
+ {prompt}[/INST]
287
 
288
+ '''
289
 
290
+ print("\n\n*** Generate:")
291
 
292
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
293
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
294
+ print(tokenizer.decode(output[0]))
295
+ ```