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
+
- facebook
|
9 |
+
- meta
|
10 |
+
- pytorch
|
11 |
+
- llama
|
12 |
+
- llama-2
|
13 |
+
- llama-cpp
|
14 |
+
- gguf-my-repo
|
15 |
+
extra_gated_heading: You need to share contact information with Meta to access this
|
16 |
+
model
|
17 |
+
extra_gated_prompt: "### LLAMA 2 COMMUNITY LICENSE AGREEMENT\n\"Agreement\" means\
|
18 |
+
\ the terms and conditions for use, reproduction, distribution and modification\
|
19 |
+
\ of the Llama Materials set forth herein. \"Documentation\" means the specifications,\
|
20 |
+
\ manuals and documentation accompanying Llama 2 distributed by Meta at https://ai.meta.com/resources/models-and-libraries/llama-downloads/.\
|
21 |
+
\ \"Licensee\" or \"you\" means you, or your employer or any other person or entity\
|
22 |
+
\ (if you are entering into this Agreement on such person or entity's behalf), of\
|
23 |
+
\ the age required under applicable laws, rules or regulations to provide legal\
|
24 |
+
\ consent and that has legal authority to bind your employer or such other person\
|
25 |
+
\ or entity if you are entering in this Agreement on their behalf. \"Llama 2\"\
|
26 |
+
\ means the foundational large language models and software and algorithms, including\
|
27 |
+
\ machine-learning model code, trained model weights, inference-enabling code, training-enabling\
|
28 |
+
\ code, fine-tuning enabling code and other elements of the foregoing distributed\
|
29 |
+
\ by Meta at ai.meta.com/resources/models-and-libraries/llama-downloads/. \"Llama\
|
30 |
+
\ Materials\" means, collectively, Meta's proprietary Llama 2 and documentation\
|
31 |
+
\ (and any portion thereof) made available under this Agreement. \"Meta\" or \"\
|
32 |
+
we\" means Meta Platforms Ireland Limited (if you are located in or, if you are\
|
33 |
+
\ an entity, your principal place of business is in the EEA or Switzerland) and\
|
34 |
+
\ Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland). \
|
35 |
+
\ By clicking \"I Accept\" below or by using or distributing any portion or element\
|
36 |
+
\ of the Llama Materials, you agree to be bound by this Agreement. 1. License Rights\
|
37 |
+
\ and Redistribution. a. Grant of Rights. You are granted a non-exclusive, worldwide,\
|
38 |
+
\ non- transferable and royalty-free limited license under Meta's intellectual property\
|
39 |
+
\ or other rights owned by Meta embodied in the Llama Materials to use, reproduce,\
|
40 |
+
\ distribute, copy, create derivative works of, and make modifications to the Llama\
|
41 |
+
\ Materials. \n \nb. Redistribution and Use. i. If you distribute or make\
|
42 |
+
\ the Llama Materials, or any derivative works thereof, available to a third party,\
|
43 |
+
\ you shall provide a copy of this Agreement to such third party. ii. If you\
|
44 |
+
\ receive Llama Materials, or any derivative works thereof, from a Licensee as\
|
45 |
+
\ part of an integrated end user product, then Section 2 of this Agreement will\
|
46 |
+
\ not apply to you. iii. You must retain in all copies of the Llama Materials that\
|
47 |
+
\ you distribute the following attribution notice within a \"Notice\" text file\
|
48 |
+
\ distributed as a part of such copies: \"Llama 2 is licensed under the LLAMA 2\
|
49 |
+
\ Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.\"\
|
50 |
+
\ iv. Your use of the Llama Materials must comply with applicable laws and regulations\
|
51 |
+
\ (including trade compliance laws and regulations) and adhere to the Acceptable\
|
52 |
+
\ Use Policy for the Llama Materials (available at https://ai.meta.com/llama/use-policy),\
|
53 |
+
\ which is hereby incorporated by reference into this Agreement. v. You will not\
|
54 |
+
\ use the Llama Materials or any output or results of the Llama Materials to improve\
|
55 |
+
\ any other large language model (excluding Llama 2 or derivative works thereof).\
|
56 |
+
\ 2. Additional Commercial Terms. If, on the Llama 2 version release date, the\
|
57 |
+
\ monthly active users of the products or services made available by or for Licensee,\
|
58 |
+
\ or Licensee's affiliates, is greater than 700 million monthly active users in\
|
59 |
+
\ the preceding calendar month, you must request a license from Meta, which Meta\
|
60 |
+
\ may grant to you in its sole discretion, and you are not authorized to exercise\
|
61 |
+
\ any of the rights under this Agreement unless or until Meta otherwise expressly\
|
62 |
+
\ grants you such rights. 3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE\
|
63 |
+
\ LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON\
|
64 |
+
\ AN \"AS IS\" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,\
|
65 |
+
\ INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY,\
|
66 |
+
\ OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING\
|
67 |
+
\ THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME\
|
68 |
+
\ ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND\
|
69 |
+
\ RESULTS. 4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE\
|
70 |
+
\ LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE,\
|
71 |
+
\ PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST\
|
72 |
+
\ PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE\
|
73 |
+
\ DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY\
|
74 |
+
\ OF ANY OF THE FOREGOING. 5. Intellectual Property. a. No trademark licenses are\
|
75 |
+
\ granted under this Agreement, and in connection with the Llama Materials, neither\
|
76 |
+
\ Meta nor Licensee may use any name or mark owned by or associated with the other\
|
77 |
+
\ or any of its affiliates, except as required for reasonable and customary use\
|
78 |
+
\ in describing and redistributing the Llama Materials. b. Subject to Meta's ownership\
|
79 |
+
\ of Llama Materials and derivatives made by or for Meta, with respect to any derivative\
|
80 |
+
\ works and modifications of the Llama Materials that are made by you, as between\
|
81 |
+
\ you and Meta, you are and will be the owner of such derivative works and modifications.\
|
82 |
+
\ c. If you institute litigation or other proceedings against Meta or any entity\
|
83 |
+
\ (including a cross-claim or counterclaim in a lawsuit) alleging that the Llama\
|
84 |
+
\ Materials or Llama 2 outputs or results, or any portion of any of the foregoing,\
|
85 |
+
\ constitutes infringement of intellectual property or other rights owned or licensable\
|
86 |
+
\ by you, then any licenses granted to you under this Agreement shall terminate\
|
87 |
+
\ as of the date such litigation or claim is filed or instituted. You will indemnify\
|
88 |
+
\ and hold harmless Meta from and against any claim by any third party arising\
|
89 |
+
\ out of or related to your use or distribution of the Llama Materials. 6. Term\
|
90 |
+
\ and Termination. The term of this Agreement will commence upon your acceptance\
|
91 |
+
\ of this Agreement or access to the Llama Materials and will continue in full\
|
92 |
+
\ force and effect until terminated in accordance with the terms and conditions\
|
93 |
+
\ herein. Meta may terminate this Agreement if you are in breach of any term or\
|
94 |
+
\ condition of this Agreement. Upon termination of this Agreement, you shall delete\
|
95 |
+
\ and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the \
|
96 |
+
\ termination of this Agreement. 7. Governing Law and Jurisdiction. This Agreement\
|
97 |
+
\ will be governed and construed under the laws of the State of California without\
|
98 |
+
\ regard to choice of law principles, and the UN Convention on Contracts for the\
|
99 |
+
\ International Sale of Goods does not apply to this Agreement. The courts of California\
|
100 |
+
\ shall have exclusive jurisdiction of any dispute arising out of this Agreement.\
|
101 |
+
\ USE POLICY ### Llama 2 Acceptable Use Policy Meta is committed to promoting safe\
|
102 |
+
\ and fair use of its tools and features, including Llama 2. If you access or use\
|
103 |
+
\ Llama 2, you agree to this Acceptable Use Policy (“Policy”). The most recent copy\
|
104 |
+
\ of this policy can be found at [ai.meta.com/llama/use-policy](http://ai.meta.com/llama/use-policy).\
|
105 |
+
\ #### Prohibited Uses We want everyone to use Llama 2 safely and responsibly. You\
|
106 |
+
\ agree you will not use, or allow others to use, Llama 2 to: 1. Violate the law\
|
107 |
+
\ or others’ rights, including to:\n 1. Engage in, promote, generate, contribute\
|
108 |
+
\ to, encourage, plan, incite, or further illegal or unlawful activity or content,\
|
109 |
+
\ such as: \n 1. Violence or terrorism \n 2. Exploitation or harm to children,\
|
110 |
+
\ including the solicitation, creation, acquisition, or dissemination of child exploitative\
|
111 |
+
\ content or failure to report Child Sexual Abuse Material\n 3. Human trafficking,\
|
112 |
+
\ exploitation, and sexual violence\n 4. The illegal distribution of information\
|
113 |
+
\ or materials to minors, including obscene materials, or failure to employ legally\
|
114 |
+
\ required age-gating in connection with such information or materials.\n 5.\
|
115 |
+
\ Sexual solicitation\n 6. Any other criminal activity\n 2. Engage in, promote,\
|
116 |
+
\ incite, or facilitate the harassment, abuse, threatening, or bullying of individuals\
|
117 |
+
\ or groups of individuals\n 3. Engage in, promote, incite, or facilitate discrimination\
|
118 |
+
\ or other unlawful or harmful conduct in the provision of employment, employment\
|
119 |
+
\ benefits, credit, housing, other economic benefits, or other essential goods and\
|
120 |
+
\ services\n 4. Engage in the unauthorized or unlicensed practice of any profession\
|
121 |
+
\ including, but not limited to, financial, legal, medical/health, or related professional\
|
122 |
+
\ practices \n 5. Collect, process, disclose, generate, or infer health, demographic,\
|
123 |
+
\ or other sensitive personal or private information about individuals without rights\
|
124 |
+
\ and consents required by applicable laws\n 6. Engage in or facilitate any action\
|
125 |
+
\ or generate any content that infringes, misappropriates, or otherwise violates\
|
126 |
+
\ any third-party rights, including the outputs or results of any products or services\
|
127 |
+
\ using the Llama 2 Materials\n 7. Create, generate, or facilitate the creation\
|
128 |
+
\ of malicious code, malware, computer viruses or do anything else that could disable,\
|
129 |
+
\ overburden, interfere with or impair the proper working, integrity, operation\
|
130 |
+
\ or appearance of a website or computer system \n2. Engage in, promote, incite,\
|
131 |
+
\ facilitate, or assist in the planning or development of activities that present\
|
132 |
+
\ a risk of death or bodily harm to individuals, including use of Llama 2 related\
|
133 |
+
\ to the following:\n 1. Military, warfare, nuclear industries or applications,\
|
134 |
+
\ espionage, use for materials or activities that are subject to the International\
|
135 |
+
\ Traffic Arms Regulations (ITAR) maintained by the United States Department of\
|
136 |
+
\ State\n 2. Guns and illegal weapons (including weapon development)\n 3. Illegal\
|
137 |
+
\ drugs and regulated/controlled substances\n 4. Operation of critical infrastructure,\
|
138 |
+
\ transportation technologies, or heavy machinery\n 5. Self-harm or harm to others,\
|
139 |
+
\ including suicide, cutting, and eating disorders\n 6. Any content intended to\
|
140 |
+
\ incite or promote violence, abuse, or any infliction of bodily harm to an individual\n\
|
141 |
+
3. Intentionally deceive or mislead others, including use of Llama 2 related to\
|
142 |
+
\ the following:\n 1. Generating, promoting, or furthering fraud or the creation\
|
143 |
+
\ or promotion of disinformation\n 2. Generating, promoting, or furthering defamatory\
|
144 |
+
\ content, including the creation of defamatory statements, images, or other content\n\
|
145 |
+
\ 3. Generating, promoting, or further distributing spam\n 4. Impersonating another\
|
146 |
+
\ individual without consent, authorization, or legal right\n 5. Representing that\
|
147 |
+
\ the use of Llama 2 or outputs are human-generated\n 6. Generating or facilitating\
|
148 |
+
\ false online engagement, including fake reviews and other means of fake online\
|
149 |
+
\ engagement \n 4. Fail to appropriately disclose to end users any known dangers\
|
150 |
+
\ of your AI system \nPlease report any violation of this Policy, software “bug,”\
|
151 |
+
\ or other problems that could lead to a violation of this Policy through one of\
|
152 |
+
\ the following means: * Reporting issues with the model: [github.com/facebookresearch/llama](http://github.com/facebookresearch/llama)\
|
153 |
+
\ * Reporting risky content generated by the model: [developers.facebook.com/llama_output_feedback](http://developers.facebook.com/llama_output_feedback)\
|
154 |
+
\ * Reporting bugs and security concerns: [facebook.com/whitehat/info](http://facebook.com/whitehat/info)\
|
155 |
+
\ * Reporting violations of the Acceptable Use Policy or unlicensed uses of Llama:\
|
156 |
+
\ [[email protected]](mailto:[email protected])"
|
157 |
+
extra_gated_fields:
|
158 |
+
First Name: text
|
159 |
+
Last Name: text
|
160 |
+
Date of birth: date_picker
|
161 |
+
Country: country
|
162 |
+
Affiliation: text
|
163 |
+
geo: ip_location
|
164 |
+
? By clicking Submit below I accept the terms of the license and acknowledge that
|
165 |
+
the information I provide will be collected stored processed and shared in accordance
|
166 |
+
with the Meta Privacy Policy
|
167 |
+
: checkbox
|
168 |
+
extra_gated_description: The information you provide will be collected, stored, processed
|
169 |
+
and shared in accordance with the [Meta Privacy Policy](https://www.facebook.com/privacy/policy/).
|
170 |
+
extra_gated_button_content: Submit
|
171 |
+
---
|
172 |
+
|
173 |
+
# UniOb/CodeLlama-13b-hf-Q4_K_M-GGUF
|
174 |
+
This model was converted to GGUF format from [`meta-llama/CodeLlama-13b-hf`](https://huggingface.co/meta-llama/CodeLlama-13b-hf) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
175 |
+
Refer to the [original model card](https://huggingface.co/meta-llama/CodeLlama-13b-hf) for more details on the model.
|
176 |
+
|
177 |
+
## Use with llama.cpp
|
178 |
+
Install llama.cpp through brew (works on Mac and Linux)
|
179 |
+
|
180 |
+
```bash
|
181 |
+
brew install llama.cpp
|
182 |
+
|
183 |
+
```
|
184 |
+
Invoke the llama.cpp server or the CLI.
|
185 |
+
|
186 |
+
### CLI:
|
187 |
+
```bash
|
188 |
+
llama-cli --hf-repo UniOb/CodeLlama-13b-hf-Q4_K_M-GGUF --hf-file codellama-13b-hf-q4_k_m.gguf -p "The meaning to life and the universe is"
|
189 |
+
```
|
190 |
+
|
191 |
+
### Server:
|
192 |
+
```bash
|
193 |
+
llama-server --hf-repo UniOb/CodeLlama-13b-hf-Q4_K_M-GGUF --hf-file codellama-13b-hf-q4_k_m.gguf -c 2048
|
194 |
+
```
|
195 |
+
|
196 |
+
Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well.
|
197 |
+
|
198 |
+
Step 1: Clone llama.cpp from GitHub.
|
199 |
+
```
|
200 |
+
git clone https://github.com/ggerganov/llama.cpp
|
201 |
+
```
|
202 |
+
|
203 |
+
Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux).
|
204 |
+
```
|
205 |
+
cd llama.cpp && LLAMA_CURL=1 make
|
206 |
+
```
|
207 |
+
|
208 |
+
Step 3: Run inference through the main binary.
|
209 |
+
```
|
210 |
+
./llama-cli --hf-repo UniOb/CodeLlama-13b-hf-Q4_K_M-GGUF --hf-file codellama-13b-hf-q4_k_m.gguf -p "The meaning to life and the universe is"
|
211 |
+
```
|
212 |
+
or
|
213 |
+
```
|
214 |
+
./llama-server --hf-repo UniOb/CodeLlama-13b-hf-Q4_K_M-GGUF --hf-file codellama-13b-hf-q4_k_m.gguf -c 2048
|
215 |
+
```
|