Update README.md
Browse files
README.md
CHANGED
@@ -1,5 +1,169 @@
|
|
1 |
-
|
|
|
|
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
At the moment this model does not replicate Stanford Alpaca results well enough and should be finetuned for a full 3 epochs on the original dataset. I do not have the resources to do so and I am not aware of anyone who has released a version publicly.
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
---
|
4 |
|
5 |
+
# llama-13b-int4
|
6 |
+
This LoRA trained for 3 epochs and has been converted to int4 via GPTQ method. See the repo below for more info.
|
7 |
+
|
8 |
+
https://github.com/qwopqwop200/GPTQ-for-LLaMa
|
9 |
+
|
10 |
+
--
|
11 |
+
license: other
|
12 |
+
---
|
13 |
+
# LLaMA Model Card
|
14 |
+
|
15 |
+
## Model details
|
16 |
+
**Organization developing the model**
|
17 |
+
The FAIR team of Meta AI.
|
18 |
+
|
19 |
+
**Model date**
|
20 |
+
LLaMA was trained between December. 2022 and Feb. 2023.
|
21 |
+
|
22 |
+
**Model version**
|
23 |
+
This is version 1 of the model.
|
24 |
+
|
25 |
+
**Model type**
|
26 |
+
LLaMA is an auto-regressive language model, based on the transformer architecture. The model comes in different sizes: 7B, 13B, 33B and 65B parameters.
|
27 |
+
|
28 |
+
**Paper or resources for more information**
|
29 |
+
More information can be found in the paper “LLaMA, Open and Efficient Foundation Language Models”, available at https://research.facebook.com/publications/llama-open-and-efficient-foundation-language-models/.
|
30 |
+
|
31 |
+
**Citations details**
|
32 |
+
https://research.facebook.com/publications/llama-open-and-efficient-foundation-language-models/
|
33 |
+
|
34 |
+
**License**
|
35 |
+
Non-commercial bespoke license
|
36 |
+
|
37 |
+
**Where to send questions or comments about the model**
|
38 |
+
Questions and comments about LLaMA can be sent via the [GitHub repository](https://github.com/facebookresearch/llama) of the project , by opening an issue.
|
39 |
+
|
40 |
+
## Intended use
|
41 |
+
**Primary intended uses**
|
42 |
+
The primary use of LLaMA is research on large language models, including:
|
43 |
+
exploring potential applications such as question answering, natural language understanding or reading comprehension,
|
44 |
+
understanding capabilities and limitations of current language models, and developing techniques to improve those,
|
45 |
+
evaluating and mitigating biases, risks, toxic and harmful content generations, hallucinations.
|
46 |
+
|
47 |
+
**Primary intended users**
|
48 |
+
The primary intended users of the model are researchers in natural language processing, machine learning and artificial intelligence.
|
49 |
+
|
50 |
+
**Out-of-scope use cases**
|
51 |
+
LLaMA is a base, or foundational, model. As such, it should not be used on downstream applications without further risk evaluation and mitigation. In particular, our model has not been trained with human feedback, and can thus generate toxic or offensive content, incorrect information or generally unhelpful answers.
|
52 |
+
|
53 |
+
## Factors
|
54 |
+
**Relevant factors**
|
55 |
+
One of the most relevant factors for which model performance may vary is which language is used. Although we included 20 languages in the training data, most of our dataset is made of English text, and we thus expect the model to perform better for English than other languages. Relatedly, it has been shown in previous studies that performance might vary for different dialects, and we expect that it will be the case for our model.
|
56 |
+
|
57 |
+
**Evaluation factors**
|
58 |
+
As our model is trained on data from the Web, we expect that it reflects biases from this source. We thus evaluated on RAI datasets to measure biases exhibited by the model for gender, religion, race, sexual orientation, age, nationality, disability, physical appearance and socio-economic status. We also measure the toxicity of model generations, depending on the toxicity of the context used to prompt the model.
|
59 |
+
|
60 |
+
## Metrics
|
61 |
+
**Model performance measures**
|
62 |
+
We use the following measure to evaluate the model:
|
63 |
+
- Accuracy for common sense reasoning, reading comprehension, natural language understanding (MMLU), BIG-bench hard, WinoGender and CrowS-Pairs,
|
64 |
+
- Exact match for question answering,
|
65 |
+
- The toxicity score from Perspective API on RealToxicityPrompts.
|
66 |
+
|
67 |
+
**Decision thresholds**
|
68 |
+
Not applicable.
|
69 |
+
|
70 |
+
**Approaches to uncertainty and variability**
|
71 |
+
Due to the high computational requirements of training LLMs, we trained only one model of each size, and thus could not evaluate variability of pre-training.
|
72 |
+
|
73 |
+
## Evaluation datasets
|
74 |
+
The model was evaluated on the following benchmarks: BoolQ, PIQA, SIQA, HellaSwag, WinoGrande, ARC, OpenBookQA, NaturalQuestions, TriviaQA, RACE, MMLU, BIG-bench hard, GSM8k, RealToxicityPrompts, WinoGender, CrowS-Pairs.
|
75 |
+
|
76 |
+
## Training dataset
|
77 |
+
The model was trained using the following source of data: CCNet [67%], C4 [15%], GitHub [4.5%], Wikipedia [4.5%], Books [4.5%], ArXiv [2.5%], Stack Exchange[2%]. The Wikipedia and Books domains include data in the following languages: bg, ca, cs, da, de, en, es, fr, hr, hu, it, nl, pl, pt, ro, ru, sl, sr, sv, uk. See the paper for more details about the training set and corresponding preprocessing.
|
78 |
+
|
79 |
+
## Quantitative analysis
|
80 |
+
Hyperparameters for the model architecture
|
81 |
+
|
82 |
+
|
83 |
+
<table>
|
84 |
+
<thead>
|
85 |
+
<tr>
|
86 |
+
<th >LLaMA</th> <th colspan=6>Model hyper parameters </th>
|
87 |
+
</tr>
|
88 |
+
<tr>
|
89 |
+
<th>Number of parameters</th><th>dimension</th><th>n heads</th><th>n layers</th><th>Learn rate</th><th>Batch size</th><th>n tokens</th>
|
90 |
+
</tr>
|
91 |
+
</thead>
|
92 |
+
<tbody>
|
93 |
+
<tr>
|
94 |
+
<th>7B</th> <th>4096</th> <th>32</th> <th>32</th> <th>3.0E-04</th><th>4M</th><th>1T
|
95 |
+
</tr>
|
96 |
+
<tr>
|
97 |
+
<th>13B</th><th>5120</th><th>40</th><th>40</th><th>3.0E-04</th><th>4M</th><th>1T
|
98 |
+
</tr>
|
99 |
+
<tr>
|
100 |
+
<th>33B</th><th>6656</th><th>52</th><th>60</th><th>1.5.E-04</th><th>4M</th><th>1.4T
|
101 |
+
</tr>
|
102 |
+
<tr>
|
103 |
+
<th>65B</th><th>8192</th><th>64</th><th>80</th><th>1.5.E-04</th><th>4M</th><th>1.4T
|
104 |
+
</tr>
|
105 |
+
</tbody>
|
106 |
+
</table>
|
107 |
+
|
108 |
+
*Table 1 - Summary of LLama Model Hyperparameters*
|
109 |
+
|
110 |
+
We present our results on eight standard common sense reasoning benchmarks in the table below.
|
111 |
+
<table>
|
112 |
+
<thead>
|
113 |
+
<tr>
|
114 |
+
<th>LLaMA</th> <th colspan=9>Reasoning tasks </th>
|
115 |
+
</tr>
|
116 |
+
<tr>
|
117 |
+
<th>Number of parameters</th> <th>BoolQ</th><th>PIQA</th><th>SIQA</th><th>HellaSwag</th><th>WinoGrande</th><th>ARC-e</th><th>ARC-c</th><th>OBQA</th><th>COPA</th>
|
118 |
+
</tr>
|
119 |
+
</thead>
|
120 |
+
<tbody>
|
121 |
+
<tr>
|
122 |
+
<th>7B</th><th>76.5</th><th>79.8</th><th>48.9</th><th>76.1</th><th>70.1</th><th>76.7</th><th>47.6</th><th>57.2</th><th>93
|
123 |
+
</th>
|
124 |
+
<tr><th>13B</th><th>78.1</th><th>80.1</th><th>50.4</th><th>79.2</th><th>73</th><th>78.1</th><th>52.7</th><th>56.4</th><th>94
|
125 |
+
</th>
|
126 |
+
<tr><th>33B</th><th>83.1</th><th>82.3</th><th>50.4</th><th>82.8</th><th>76</th><th>81.4</th><th>57.8</th><th>58.6</th><th>92
|
127 |
+
</th>
|
128 |
+
<tr><th>65B</th><th>85.3</th><th>82.8</th><th>52.3</th><th>84.2</th><th>77</th><th>81.5</th><th>56</th><th>60.2</th><th>94</th></tr>
|
129 |
+
</tbody>
|
130 |
+
</table>
|
131 |
+
*Table 2 - Summary of LLama Model Performance on Reasoning tasks*
|
132 |
+
|
133 |
+
|
134 |
+
We present our results on bias in the table below. Note that lower value is better indicating lower bias.
|
135 |
+
|
136 |
+
|
137 |
+
| No | Category | FAIR LLM |
|
138 |
+
| --- | -------------------- | -------- |
|
139 |
+
| 1 | Gender | 70.6 |
|
140 |
+
| 2 | Religion | 79 |
|
141 |
+
| 3 | Race/Color | 57 |
|
142 |
+
| 4 | Sexual orientation | 81 |
|
143 |
+
| 5 | Age | 70.1 |
|
144 |
+
| 6 | Nationality | 64.2 |
|
145 |
+
| 7 | Disability | 66.7 |
|
146 |
+
| 8 | Physical appearance | 77.8 |
|
147 |
+
| 9 | Socioeconomic status | 71.5 |
|
148 |
+
| | LLaMA Average | 66.6 |
|
149 |
+
|
150 |
+
*Table 3 - Summary bias of our model output*
|
151 |
+
|
152 |
+
|
153 |
+
|
154 |
+
## Ethical considerations
|
155 |
+
**Data**
|
156 |
+
The data used to train the model is collected from various sources, mostly from the Web. As such, it contains offensive, harmful and biased content. We thus expect the model to exhibit such biases from the training data.
|
157 |
+
|
158 |
+
**Human life**
|
159 |
+
The model is not intended to inform decisions about matters central to human life, and should not be used in such a way.
|
160 |
+
|
161 |
+
**Mitigations**
|
162 |
+
We filtered the data from the Web based on its proximity to Wikipedia text and references. For this, we used a Kneser-Ney language model and a fastText linear classifier.
|
163 |
+
|
164 |
+
**Risks and harms**
|
165 |
+
Risks and harms of large language models include the generation of harmful, offensive or biased content. These models are often prone to generating incorrect information, sometimes referred to as hallucinations. We do not expect our model to be an exception in this regard.
|
166 |
+
|
167 |
+
**Use cases**
|
168 |
+
LLaMA is a foundational model, and as such, it should not be used for downstream applications without further investigation and mitigations of risks. These risks and potential fraught use cases include, but are not limited to: generation of misinformation and generation of harmful, biased or offensive content.
|
169 |
|
|