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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - de
5
+ - fr
6
+ - it
7
+ - pt
8
+ - hi
9
+ - es
10
+ - th
11
+ pipeline_tag: text-generation
12
+ tags:
13
+ - facebook
14
+ - meta
15
+ - llama
16
+ - llama-3
17
+ license: llama3.1
18
+
19
+ ---
20
+
21
+ GGUF quantized version using [llama.cpp 5e2727f](https://github.com/ggerganov/llama.cpp/commit/5e2727fe0321c38d1664d26173c654fa1801dc5f)
22
+
23
+ Update 24/07 - requantized with [fixed tokenizer ](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct/discussions/28/files)
24
+
25
+ Update 28/07 - requantized with the [RoPE fix](https://github.com/ggerganov/llama.cpp/pull/8676), it should now be fully supported. You need to run [llama.cpp 5e2727f](https://github.com/ggerganov/llama.cpp/commit/5e2727fe0321c38d1664d26173c654fa1801dc5f) or higher
26
+
27
+
28
+ ## Model Information
29
+
30
+ The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes (text in/text out). The Llama 3.1 instruction tuned text only models (8B, 70B, 405B) are optimized for multilingual dialogue use cases and outperform many of the available open source and closed chat models on common industry benchmarks.
31
+
32
+ **Model developer**: Meta
33
+
34
+ **Model Architecture:** Llama 3.1 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.
35
+
36
+
37
+ <table>
38
+ <tr>
39
+ <td>
40
+ </td>
41
+ <td><strong>Training Data</strong>
42
+ </td>
43
+ <td><strong>Params</strong>
44
+ </td>
45
+ <td><strong>Input modalities</strong>
46
+ </td>
47
+ <td><strong>Output modalities</strong>
48
+ </td>
49
+ <td><strong>Context length</strong>
50
+ </td>
51
+ <td><strong>GQA</strong>
52
+ </td>
53
+ <td><strong>Token count</strong>
54
+ </td>
55
+ <td><strong>Knowledge cutoff</strong>
56
+ </td>
57
+ </tr>
58
+ <tr>
59
+ <td rowspan="3" >Llama 3.1 (text only)
60
+ </td>
61
+ <td rowspan="3" >A new mix of publicly available online data.
62
+ </td>
63
+ <td>8B
64
+ </td>
65
+ <td>Multilingual Text
66
+ </td>
67
+ <td>Multilingual Text and code
68
+ </td>
69
+ <td>128k
70
+ </td>
71
+ <td>Yes
72
+ </td>
73
+ <td rowspan="3" >15T+
74
+ </td>
75
+ <td rowspan="3" >December 2023
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <td>70B
80
+ </td>
81
+ <td>Multilingual Text
82
+ </td>
83
+ <td>Multilingual Text and code
84
+ </td>
85
+ <td>128k
86
+ </td>
87
+ <td>Yes
88
+ </td>
89
+ </tr>
90
+ <tr>
91
+ <td>405B
92
+ </td>
93
+ <td>Multilingual Text
94
+ </td>
95
+ <td>Multilingual Text and code
96
+ </td>
97
+ <td>128k
98
+ </td>
99
+ <td>Yes
100
+ </td>
101
+ </tr>
102
+ </table>
103
+
104
+
105
+ **Supported languages:** English, German, French, Italian, Portuguese, Hindi, Spanish, and Thai.
106
+
107
+ **Llama 3.1 family of models**. Token counts refer to pretraining data only. All model versions use Grouped-Query Attention (GQA) for improved inference scalability.
108
+
109
+ **Model Release Date:** July 23, 2024.
110
+
111
+ **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.
112
+
113
+ **License:** A custom commercial license, the Llama 3.1 Community License, is available at: [https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE)
114
+
115
+ 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.1 in applications, please go [here](https://github.com/meta-llama/llama-recipes).
116
+
117
+
118
+ ## Intended Use
119
+
120
+ **Intended Use Cases** Llama 3.1 is intended for commercial and research use in multiple languages. Instruction tuned text only models are intended for assistant-like chat, whereas pretrained models can be adapted for a variety of natural language generation tasks. The Llama 3.1 model collection also supports the ability to leverage the outputs of its models to improve other models including synthetic data generation and distillation. The Llama 3.1 Community License allows for these use cases.
121
+
122
+ **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.1 Community License. Use in languages beyond those explicitly referenced as supported in this model card**.
123
+
124
+ **<span style="text-decoration:underline;">Note</span>: Llama 3.1 has been trained on a broader collection of languages than the 8 supported languages. Developers may fine-tune Llama 3.1 models for languages beyond the 8 supported languages provided they comply with the Llama 3.1 Community License and the Acceptable Use Policy and in such cases are responsible for ensuring that any uses of Llama 3.1 in additional languages is done in a safe and responsible manner.
125
+
126
+ ## How to use
127
+
128
+ This repository contains two versions of Meta-Llama-3.1-8B-Instruct, for use with transformers and with the original `llama` codebase.
129
+
130
+ ### Use with transformers
131
+
132
+ Starting with `transformers >= 4.43.0` onward, you can run conversational inference using the Transformers `pipeline` abstraction or by leveraging the Auto classes with the `generate()` function.
133
+
134
+ Make sure to update your transformers installation via `pip install --upgrade transformers`.
135
+
136
+ ```python
137
+ import transformers
138
+ import torch
139
+
140
+ model_id = "meta-llama/Meta-Llama-3.1-8B-Instruct"
141
+
142
+ pipeline = transformers.pipeline(
143
+ "text-generation",
144
+ model=model_id,
145
+ model_kwargs={"torch_dtype": torch.bfloat16},
146
+ device_map="auto",
147
+ )
148
+
149
+ messages = [
150
+ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
151
+ {"role": "user", "content": "Who are you?"},
152
+ ]
153
+
154
+ outputs = pipeline(
155
+ messages,
156
+ max_new_tokens=256,
157
+ )
158
+ print(outputs[0]["generated_text"][-1])
159
+ ```
160
+
161
+ Note: You can also find detailed recipes on how to use the model locally, with `torch.compile()`, assisted generations, quantised and more at [`huggingface-llama-recipes`](https://github.com/huggingface/huggingface-llama-recipes)
162
+
163
+ ### Use with `llama`
164
+
165
+ Please, follow the instructions in the [repository](https://github.com/meta-llama/llama)
166
+
167
+ To download Original checkpoints, see the example command below leveraging `huggingface-cli`:
168
+
169
+ ```
170
+ huggingface-cli download meta-llama/Meta-Llama-3.1-8B-Instruct --include "original/*" --local-dir Meta-Llama-3.1-8B-Instruct
171
+ ```
172
+
173
+ ## Hardware and Software
174
+
175
+ **Training Factors** We used custom training libraries, Meta's custom built GPU cluster, and production infrastructure for pretraining. Fine-tuning, annotation, and evaluation were also performed on production infrastructure.
176
+
177
+ **Training utilized a cumulative of** 39.3M GPU hours of computation on H100-80GB (TDP of 700W) type hardware, per the table below. Training time is the total GPU time required for training each model and power consumption is the peak power capacity per GPU device used, adjusted for power usage efficiency.
178
+
179
+
180
+ **Training Greenhouse Gas Emissions** Estimated total location-based greenhouse gas emissions were **11,390** tons CO2eq for training. Since 2020, Meta has maintained net zero greenhouse gas emissions in its global operations and matched 100% of its electricity use with renewable energy, therefore the total market-based greenhouse gas emissions for training were 0 tons CO2eq.
181
+
182
+
183
+ <table>
184
+ <tr>
185
+ <td>
186
+ </td>
187
+ <td><strong>Training Time (GPU hours)</strong>
188
+ </td>
189
+ <td><strong>Training Power Consumption (W)</strong>
190
+ </td>
191
+ <td><strong>Training Location-Based Greenhouse Gas Emissions</strong>
192
+ <p>
193
+ <strong>(tons CO2eq)</strong>
194
+ </td>
195
+ <td><strong>Training Market-Based Greenhouse Gas Emissions</strong>
196
+ <p>
197
+ <strong>(tons CO2eq)</strong>
198
+ </td>
199
+ </tr>
200
+ <tr>
201
+ <td>Llama 3.1 8B
202
+ </td>
203
+ <td>1.46M
204
+ </td>
205
+ <td>700
206
+ </td>
207
+ <td>420
208
+ </td>
209
+ <td>0
210
+ </td>
211
+ </tr>
212
+ <tr>
213
+ <td>Llama 3.1 70B
214
+ </td>
215
+ <td>7.0M
216
+ </td>
217
+ <td>700
218
+ </td>
219
+ <td>2,040
220
+ </td>
221
+ <td>0
222
+ </td>
223
+ </tr>
224
+ <tr>
225
+ <td>Llama 3.1 405B
226
+ </td>
227
+ <td>30.84M
228
+ </td>
229
+ <td>700
230
+ </td>
231
+ <td>8,930
232
+ </td>
233
+ <td>0
234
+ </td>
235
+ </tr>
236
+ <tr>
237
+ <td>Total
238
+ </td>
239
+ <td>39.3M
240
+ <td>
241
+ <ul>
242
+
243
+ </ul>
244
+ </td>
245
+ <td>11,390
246
+ </td>
247
+ <td>0
248
+ </td>
249
+ </tr>
250
+ </table>
251
+
252
+
253
+
254
+ The methodology used to determine training energy use and greenhouse gas emissions can be found [here](https://arxiv.org/pdf/2204.05149). Since Meta is openly releasing these models, the training energy use and greenhouse gas emissions will not be incurred by others.
255
+
256
+
257
+ ## Training Data
258
+
259
+ **Overview:** Llama 3.1 was pretrained on ~15 trillion tokens of data from publicly available sources. The fine-tuning data includes publicly available instruction datasets, as well as over 25M synthetically generated examples.
260
+
261
+ **Data Freshness:** The pretraining data has a cutoff of December 2023.
262
+
263
+
264
+ ## Benchmark scores
265
+
266
+ In this section, we report the results for Llama 3.1 models on standard automatic benchmarks. For all the evaluations, we use our internal evaluations library.
267
+
268
+ ### Base pretrained models
269
+
270
+
271
+ <table>
272
+ <tr>
273
+ <td><strong>Category</strong>
274
+ </td>
275
+ <td><strong>Benchmark</strong>
276
+ </td>
277
+ <td><strong># Shots</strong>
278
+ </td>
279
+ <td><strong>Metric</strong>
280
+ </td>
281
+ <td><strong>Llama 3 8B</strong>
282
+ </td>
283
+ <td><strong>Llama 3.1 8B</strong>
284
+ </td>
285
+ <td><strong>Llama 3 70B</strong>
286
+ </td>
287
+ <td><strong>Llama 3.1 70B</strong>
288
+ </td>
289
+ <td><strong>Llama 3.1 405B</strong>
290
+ </td>
291
+ </tr>
292
+ <tr>
293
+ <td rowspan="7" >General
294
+ </td>
295
+ <td>MMLU
296
+ </td>
297
+ <td>5
298
+ </td>
299
+ <td>macro_avg/acc_char
300
+ </td>
301
+ <td>66.7
302
+ </td>
303
+ <td>66.7
304
+ </td>
305
+ <td>79.5
306
+ </td>
307
+ <td>79.3
308
+ </td>
309
+ <td>85.2
310
+ </td>
311
+ </tr>
312
+ <tr>
313
+ <td>MMLU-Pro (CoT)
314
+ </td>
315
+ <td>5
316
+ </td>
317
+ <td>macro_avg/acc_char
318
+ </td>
319
+ <td>36.2
320
+ </td>
321
+ <td>37.1
322
+ </td>
323
+ <td>55.0
324
+ </td>
325
+ <td>53.8
326
+ </td>
327
+ <td>61.6
328
+ </td>
329
+ </tr>
330
+ <tr>
331
+ <td>AGIEval English
332
+ </td>
333
+ <td>3-5
334
+ </td>
335
+ <td>average/acc_char
336
+ </td>
337
+ <td>47.1
338
+ </td>
339
+ <td>47.8
340
+ </td>
341
+ <td>63.0
342
+ </td>
343
+ <td>64.6
344
+ </td>
345
+ <td>71.6
346
+ </td>
347
+ </tr>
348
+ <tr>
349
+ <td>CommonSenseQA
350
+ </td>
351
+ <td>7
352
+ </td>
353
+ <td>acc_char
354
+ </td>
355
+ <td>72.6
356
+ </td>
357
+ <td>75.0
358
+ </td>
359
+ <td>83.8
360
+ </td>
361
+ <td>84.1
362
+ </td>
363
+ <td>85.8
364
+ </td>
365
+ </tr>
366
+ <tr>
367
+ <td>Winogrande
368
+ </td>
369
+ <td>5
370
+ </td>
371
+ <td>acc_char
372
+ </td>
373
+ <td>-
374
+ </td>
375
+ <td>60.5
376
+ </td>
377
+ <td>-
378
+ </td>
379
+ <td>83.3
380
+ </td>
381
+ <td>86.7
382
+ </td>
383
+ </tr>
384
+ <tr>
385
+ <td>BIG-Bench Hard (CoT)
386
+ </td>
387
+ <td>3
388
+ </td>
389
+ <td>average/em
390
+ </td>
391
+ <td>61.1
392
+ </td>
393
+ <td>64.2
394
+ </td>
395
+ <td>81.3
396
+ </td>
397
+ <td>81.6
398
+ </td>
399
+ <td>85.9
400
+ </td>
401
+ </tr>
402
+ <tr>
403
+ <td>ARC-Challenge
404
+ </td>
405
+ <td>25
406
+ </td>
407
+ <td>acc_char
408
+ </td>
409
+ <td>79.4
410
+ </td>
411
+ <td>79.7
412
+ </td>
413
+ <td>93.1
414
+ </td>
415
+ <td>92.9
416
+ </td>
417
+ <td>96.1
418
+ </td>
419
+ </tr>
420
+ <tr>
421
+ <td>Knowledge reasoning
422
+ </td>
423
+ <td>TriviaQA-Wiki
424
+ </td>
425
+ <td>5
426
+ </td>
427
+ <td>em
428
+ </td>
429
+ <td>78.5
430
+ </td>
431
+ <td>77.6
432
+ </td>
433
+ <td>89.7
434
+ </td>
435
+ <td>89.8
436
+ </td>
437
+ <td>91.8
438
+ </td>
439
+ </tr>
440
+ <tr>
441
+ <td rowspan="4" >Reading comprehension
442
+ </td>
443
+ <td>SQuAD
444
+ </td>
445
+ <td>1
446
+ </td>
447
+ <td>em
448
+ </td>
449
+ <td>76.4
450
+ </td>
451
+ <td>77.0
452
+ </td>
453
+ <td>85.6
454
+ </td>
455
+ <td>81.8
456
+ </td>
457
+ <td>89.3
458
+ </td>
459
+ </tr>
460
+ <tr>
461
+ <td>QuAC (F1)
462
+ </td>
463
+ <td>1
464
+ </td>
465
+ <td>f1
466
+ </td>
467
+ <td>44.4
468
+ </td>
469
+ <td>44.9
470
+ </td>
471
+ <td>51.1
472
+ </td>
473
+ <td>51.1
474
+ </td>
475
+ <td>53.6
476
+ </td>
477
+ </tr>
478
+ <tr>
479
+ <td>BoolQ
480
+ </td>
481
+ <td>0
482
+ </td>
483
+ <td>acc_char
484
+ </td>
485
+ <td>75.7
486
+ </td>
487
+ <td>75.0
488
+ </td>
489
+ <td>79.0
490
+ </td>
491
+ <td>79.4
492
+ </td>
493
+ <td>80.0
494
+ </td>
495
+ </tr>
496
+ <tr>
497
+ <td>DROP (F1)
498
+ </td>
499
+ <td>3
500
+ </td>
501
+ <td>f1
502
+ </td>
503
+ <td>58.4
504
+ </td>
505
+ <td>59.5
506
+ </td>
507
+ <td>79.7
508
+ </td>
509
+ <td>79.6
510
+ </td>
511
+ <td>84.8
512
+ </td>
513
+ </tr>
514
+ </table>
515
+
516
+
517
+
518
+ ### Instruction tuned models
519
+
520
+
521
+ <table>
522
+ <tr>
523
+ <td><strong>Category</strong>
524
+ </td>
525
+ <td><strong>Benchmark</strong>
526
+ </td>
527
+ <td><strong># Shots</strong>
528
+ </td>
529
+ <td><strong>Metric</strong>
530
+ </td>
531
+ <td><strong>Llama 3 8B Instruct</strong>
532
+ </td>
533
+ <td><strong>Llama 3.1 8B Instruct</strong>
534
+ </td>
535
+ <td><strong>Llama 3 70B Instruct</strong>
536
+ </td>
537
+ <td><strong>Llama 3.1 70B Instruct</strong>
538
+ </td>
539
+ <td><strong>Llama 3.1 405B Instruct</strong>
540
+ </td>
541
+ </tr>
542
+ <tr>
543
+ <td rowspan="4" >General
544
+ </td>
545
+ <td>MMLU
546
+ </td>
547
+ <td>5
548
+ </td>
549
+ <td>macro_avg/acc
550
+ </td>
551
+ <td>68.5
552
+ </td>
553
+ <td>69.4
554
+ </td>
555
+ <td>82.0
556
+ </td>
557
+ <td>83.6
558
+ </td>
559
+ <td>87.3
560
+ </td>
561
+ </tr>
562
+ <tr>
563
+ <td>MMLU (CoT)
564
+ </td>
565
+ <td>0
566
+ </td>
567
+ <td>macro_avg/acc
568
+ </td>
569
+ <td>65.3
570
+ </td>
571
+ <td>73.0
572
+ </td>
573
+ <td>80.9
574
+ </td>
575
+ <td>86.0
576
+ </td>
577
+ <td>88.6
578
+ </td>
579
+ </tr>
580
+ <tr>
581
+ <td>MMLU-Pro (CoT)
582
+ </td>
583
+ <td>5
584
+ </td>
585
+ <td>micro_avg/acc_char
586
+ </td>
587
+ <td>45.5
588
+ </td>
589
+ <td>48.3
590
+ </td>
591
+ <td>63.4
592
+ </td>
593
+ <td>66.4
594
+ </td>
595
+ <td>73.3
596
+ </td>
597
+ </tr>
598
+ <tr>
599
+ <td>IFEval
600
+ </td>
601
+ <td>
602
+ </td>
603
+ <td>
604
+ </td>
605
+ <td>76.8
606
+ </td>
607
+ <td>80.4
608
+ </td>
609
+ <td>82.9
610
+ </td>
611
+ <td>87.5
612
+ </td>
613
+ <td>88.6
614
+ </td>
615
+ </tr>
616
+ <tr>
617
+ <td rowspan="2" >Reasoning
618
+ </td>
619
+ <td>ARC-C
620
+ </td>
621
+ <td>0
622
+ </td>
623
+ <td>acc
624
+ </td>
625
+ <td>82.4
626
+ </td>
627
+ <td>83.4
628
+ </td>
629
+ <td>94.4
630
+ </td>
631
+ <td>94.8
632
+ </td>
633
+ <td>96.9
634
+ </td>
635
+ </tr>
636
+ <tr>
637
+ <td>GPQA
638
+ </td>
639
+ <td>0
640
+ </td>
641
+ <td>em
642
+ </td>
643
+ <td>34.6
644
+ </td>
645
+ <td>30.4
646
+ </td>
647
+ <td>39.5
648
+ </td>
649
+ <td>41.7
650
+ </td>
651
+ <td>50.7
652
+ </td>
653
+ </tr>
654
+ <tr>
655
+ <td rowspan="4" >Code
656
+ </td>
657
+ <td>HumanEval
658
+ </td>
659
+ <td>0
660
+ </td>
661
+ <td>pass@1
662
+ </td>
663
+ <td>60.4
664
+ </td>
665
+ <td>72.6
666
+ </td>
667
+ <td>81.7
668
+ </td>
669
+ <td>80.5
670
+ </td>
671
+ <td>89.0
672
+ </td>
673
+ </tr>
674
+ <tr>
675
+ <td>MBPP ++ base version
676
+ </td>
677
+ <td>0
678
+ </td>
679
+ <td>pass@1
680
+ </td>
681
+ <td>70.6
682
+ </td>
683
+ <td>72.8
684
+ </td>
685
+ <td>82.5
686
+ </td>
687
+ <td>86.0
688
+ </td>
689
+ <td>88.6
690
+ </td>
691
+ </tr>
692
+ <tr>
693
+ <td>Multipl-E HumanEval
694
+ </td>
695
+ <td>0
696
+ </td>
697
+ <td>pass@1
698
+ </td>
699
+ <td>-
700
+ </td>
701
+ <td>50.8
702
+ </td>
703
+ <td>-
704
+ </td>
705
+ <td>65.5
706
+ </td>
707
+ <td>75.2
708
+ </td>
709
+ </tr>
710
+ <tr>
711
+ <td>Multipl-E MBPP
712
+ </td>
713
+ <td>0
714
+ </td>
715
+ <td>pass@1
716
+ </td>
717
+ <td>-
718
+ </td>
719
+ <td>52.4
720
+ </td>
721
+ <td>-
722
+ </td>
723
+ <td>62.0
724
+ </td>
725
+ <td>65.7
726
+ </td>
727
+ </tr>
728
+ <tr>
729
+ <td rowspan="2" >Math
730
+ </td>
731
+ <td>GSM-8K (CoT)
732
+ </td>
733
+ <td>8
734
+ </td>
735
+ <td>em_maj1@1
736
+ </td>
737
+ <td>80.6
738
+ </td>
739
+ <td>84.5
740
+ </td>
741
+ <td>93.0
742
+ </td>
743
+ <td>95.1
744
+ </td>
745
+ <td>96.8
746
+ </td>
747
+ </tr>
748
+ <tr>
749
+ <td>MATH (CoT)
750
+ </td>
751
+ <td>0
752
+ </td>
753
+ <td>final_em
754
+ </td>
755
+ <td>29.1
756
+ </td>
757
+ <td>51.9
758
+ </td>
759
+ <td>51.0
760
+ </td>
761
+ <td>68.0
762
+ </td>
763
+ <td>73.8
764
+ </td>
765
+ </tr>
766
+ <tr>
767
+ <td rowspan="4" >Tool Use
768
+ </td>
769
+ <td>API-Bank
770
+ </td>
771
+ <td>0
772
+ </td>
773
+ <td>acc
774
+ </td>
775
+ <td>48.3
776
+ </td>
777
+ <td>82.6
778
+ </td>
779
+ <td>85.1
780
+ </td>
781
+ <td>90.0
782
+ </td>
783
+ <td>92.0
784
+ </td>
785
+ </tr>
786
+ <tr>
787
+ <td>BFCL
788
+ </td>
789
+ <td>0
790
+ </td>
791
+ <td>acc
792
+ </td>
793
+ <td>60.3
794
+ </td>
795
+ <td>76.1
796
+ </td>
797
+ <td>83.0
798
+ </td>
799
+ <td>84.8
800
+ </td>
801
+ <td>88.5
802
+ </td>
803
+ </tr>
804
+ <tr>
805
+ <td>Gorilla Benchmark API Bench
806
+ </td>
807
+ <td>0
808
+ </td>
809
+ <td>acc
810
+ </td>
811
+ <td>1.7
812
+ </td>
813
+ <td>8.2
814
+ </td>
815
+ <td>14.7
816
+ </td>
817
+ <td>29.7
818
+ </td>
819
+ <td>35.3
820
+ </td>
821
+ </tr>
822
+ <tr>
823
+ <td>Nexus (0-shot)
824
+ </td>
825
+ <td>0
826
+ </td>
827
+ <td>macro_avg/acc
828
+ </td>
829
+ <td>18.1
830
+ </td>
831
+ <td>38.5
832
+ </td>
833
+ <td>47.8
834
+ </td>
835
+ <td>56.7
836
+ </td>
837
+ <td>58.7
838
+ </td>
839
+ </tr>
840
+ <tr>
841
+ <td>Multilingual
842
+ </td>
843
+ <td>Multilingual MGSM (CoT)
844
+ </td>
845
+ <td>0
846
+ </td>
847
+ <td>em
848
+ </td>
849
+ <td>-
850
+ </td>
851
+ <td>68.9
852
+ </td>
853
+ <td>-
854
+ </td>
855
+ <td>86.9
856
+ </td>
857
+ <td>91.6
858
+ </td>
859
+ </tr>
860
+ </table>
861
+
862
+ #### Multilingual benchmarks
863
+
864
+ <table>
865
+ <tr>
866
+ <td><strong>Category</strong>
867
+ </td>
868
+ <td><strong>Benchmark</strong>
869
+ </td>
870
+ <td><strong>Language</strong>
871
+ </td>
872
+ <td><strong>Llama 3.1 8B</strong>
873
+ </td>
874
+ <td><strong>Llama 3.1 70B</strong>
875
+ </td>
876
+ <td><strong>Llama 3.1 405B</strong>
877
+ </td>
878
+ </tr>
879
+ <tr>
880
+ <td rowspan="9" ><strong>General</strong>
881
+ </td>
882
+ <td rowspan="9" ><strong>MMLU (5-shot, macro_avg/acc)</strong>
883
+ </td>
884
+ <td>Portuguese
885
+ </td>
886
+ <td>62.12
887
+ </td>
888
+ <td>80.13
889
+ </td>
890
+ <td>84.95
891
+ </td>
892
+ </tr>
893
+ <tr>
894
+ <td>Spanish
895
+ </td>
896
+ <td>62.45
897
+ </td>
898
+ <td>80.05
899
+ </td>
900
+ <td>85.08
901
+ </td>
902
+ </tr>
903
+ <tr>
904
+ <td>Italian
905
+ </td>
906
+ <td>61.63
907
+ </td>
908
+ <td>80.4
909
+ </td>
910
+ <td>85.04
911
+ </td>
912
+ </tr>
913
+ <tr>
914
+ <td>German
915
+ </td>
916
+ <td>60.59
917
+ </td>
918
+ <td>79.27
919
+ </td>
920
+ <td>84.36
921
+ </td>
922
+ </tr>
923
+ <tr>
924
+ <td>French
925
+ </td>
926
+ <td>62.34
927
+ </td>
928
+ <td>79.82
929
+ </td>
930
+ <td>84.66
931
+ </td>
932
+ </tr>
933
+ <tr>
934
+ <td>Hindi
935
+ </td>
936
+ <td>50.88
937
+ </td>
938
+ <td>74.52
939
+ </td>
940
+ <td>80.31
941
+ </td>
942
+ </tr>
943
+ <tr>
944
+ <td>Thai
945
+ </td>
946
+ <td>50.32
947
+ </td>
948
+ <td>72.95
949
+ </td>
950
+ <td>78.21
951
+ </td>
952
+ </tr>
953
+ </table>
954
+
955
+
956
+
957
+ ## Responsibility & Safety
958
+
959
+ As part of our Responsible release approach, we followed a three-pronged strategy to managing trust & safety risks:
960
+
961
+
962
+
963
+ * Enable developers to deploy helpful, safe and flexible experiences for their target audience and for the use cases supported by Llama.
964
+ * Protect developers against adversarial users aiming to exploit Llama capabilities to potentially cause harm.
965
+ * Provide protections for the community to help prevent the misuse of our models.
966
+
967
+
968
+ ### Responsible deployment
969
+
970
+ Llama is a foundational technology designed to be used in a variety of use cases, examples on how Meta’s Llama models have been responsibly deployed can be found in our [Community Stories webpage](https://llama.meta.com/community-stories/). Our approach is to build the most helpful models enabling the world to benefit from the technology power, by aligning our model safety for the generic use cases addressing a standard set of harms. Developers are then in the driver seat to tailor safety for their use case, defining their own policy and deploying the models with the necessary safeguards in their Llama systems. Llama 3.1 was developed following the best practices outlined in our Responsible Use Guide, you can refer to the [Responsible Use Guide](https://llama.meta.com/responsible-use-guide/) to learn more.
971
+
972
+
973
+ #### Llama 3.1 instruct
974
+
975
+ Our main objectives for conducting safety fine-tuning are to provide the research community with a valuable resource for studying the robustness of safety fine-tuning, as well as to offer developers a readily available, safe, and powerful model for various applications to reduce the developer workload to deploy safe AI systems. For more details on the safety mitigations implemented please read the Llama 3 paper.
976
+
977
+ **Fine-tuning data**
978
+
979
+ We employ a multi-faceted approach to data collection, combining human-generated data from our vendors with synthetic data to mitigate potential safety risks. We’ve developed many large language model (LLM)-based classifiers that enable us to thoughtfully select high-quality prompts and responses, enhancing data quality control.
980
+
981
+ **Refusals and Tone**
982
+
983
+ Building on the work we started with Llama 3, we put a great emphasis on model refusals to benign prompts as well as refusal tone. We included both borderline and adversarial prompts in our safety data strategy, and modified our safety data responses to follow tone guidelines.
984
+
985
+
986
+ #### Llama 3.1 systems
987
+
988
+ **Large language models, including Llama 3.1, are not designed to be deployed in isolation but instead should be deployed as part of an overall AI system with additional safety guardrails as required.** Developers are expected to deploy system safeguards when building agentic systems. Safeguards are key to achieve the right helpfulness-safety alignment as well as mitigating safety and security risks inherent to the system and any integration of the model or system with external tools.
989
+
990
+ As part of our responsible release approach, we provide the community with [safeguards](https://llama.meta.com/trust-and-safety/) that developers should deploy with Llama models or other LLMs, including Llama Guard 3, Prompt Guard and Code Shield. All our [reference implementations](https://github.com/meta-llama/llama-agentic-system) demos contain these safeguards by default so developers can benefit from system-level safety out-of-the-box.
991
+
992
+
993
+ #### New capabilities
994
+
995
+ Note that this release introduces new capabilities, including a longer context window, multilingual inputs and outputs and possible integrations by developers with third party tools. Building with these new capabilities requires specific considerations in addition to the best practices that generally apply across all Generative AI use cases.
996
+
997
+ **Tool-use**: Just like in standard software development, developers are responsible for the integration of the LLM with the tools and services of their choice. They should define a clear policy for their use case and assess the integrity of the third party services they use to be aware of the safety and security limitations when using this capability. Refer to the Responsible Use Guide for best practices on the safe deployment of the third party safeguards.
998
+
999
+ **Multilinguality**: Llama 3.1 supports 7 languages in addition to English: French, German, Hindi, Italian, Portuguese, Spanish, and Thai. Llama may be able to output text in other languages than those that meet performance thresholds for safety and helpfulness. We strongly discourage developers from using this model to converse in non-supported languages without implementing finetuning and system controls in alignment with their policies and the best practices shared in the Responsible Use Guide.
1000
+
1001
+
1002
+ ### Evaluations
1003
+
1004
+ We evaluated Llama models for common use cases as well as specific capabilities. Common use cases evaluations measure safety risks of systems for most commonly built applications including chat bot, coding assistant, tool calls. We built dedicated, adversarial evaluation datasets and evaluated systems composed of Llama models and Llama Guard 3 to filter input prompt and output response. It is important to evaluate applications in context, and we recommend building dedicated evaluation dataset for your use case. Prompt Guard and Code Shield are also available if relevant to the application.
1005
+
1006
+ Capability evaluations measure vulnerabilities of Llama models inherent to specific capabilities, for which were crafted dedicated benchmarks including long context, multilingual, tools calls, coding or memorization.
1007
+
1008
+ **Red teaming**
1009
+
1010
+ For both scenarios, we conducted recurring red teaming exercises with the goal of discovering risks via adversarial prompting and we used the learnings to improve our benchmarks and safety tuning datasets.
1011
+
1012
+ We partnered early with subject-matter experts in critical risk areas to understand the nature of these real-world harms and how such models may lead to unintended harm for society. Based on these conversations, we derived a set of adversarial goals for the red team to attempt to achieve, such as extracting harmful information or reprogramming the model to act in a potentially harmful capacity. The red team consisted of experts in cybersecurity, adversarial machine learning, responsible AI, and integrity in addition to multilingual content specialists with background in integrity issues in specific geographic markets.
1013
+
1014
+
1015
+ ### Critical and other risks
1016
+
1017
+ We specifically focused our efforts on mitigating the following critical risk areas:
1018
+
1019
+ **1- CBRNE (Chemical, Biological, Radiological, Nuclear, and Explosive materials) helpfulness**
1020
+
1021
+ To assess risks related to proliferation of chemical and biological weapons, we performed uplift testing designed to assess whether use of Llama 3.1 models could meaningfully increase the capabilities of malicious actors to plan or carry out attacks using these types of weapons.
1022
+
1023
+
1024
+ **2. Child Safety**
1025
+
1026
+ Child Safety risk assessments were conducted using a team of experts, to assess the model’s capability to produce outputs that could result in Child Safety risks and inform on any necessary and appropriate risk mitigations via fine tuning. We leveraged those expert red teaming sessions to expand the coverage of our evaluation benchmarks through Llama 3 model development. For Llama 3, we conducted new in-depth sessions using objective based methodologies to assess the model risks along multiple attack vectors including the additional languages Llama 3 is trained on. We also partnered with content specialists to perform red teaming exercises assessing potentially violating content while taking account of market specific nuances or experiences.
1027
+
1028
+ **3. Cyber attack enablement**
1029
+
1030
+ Our cyber attack uplift study investigated whether LLMs can enhance human capabilities in hacking tasks, both in terms of skill level and speed.
1031
+
1032
+ Our attack automation study focused on evaluating the capabilities of LLMs when used as autonomous agents in cyber offensive operations, specifically in the context of ransomware attacks. This evaluation was distinct from previous studies that considered LLMs as interactive assistants. The primary objective was to assess whether these models could effectively function as independent agents in executing complex cyber-attacks without human intervention.
1033
+
1034
+ Our study of Llama-3.1-405B’s social engineering uplift for cyber attackers was conducted to assess the effectiveness of AI models in aiding cyber threat actors in spear phishing campaigns. Please read our Llama 3.1 Cyber security whitepaper to learn more.
1035
+
1036
+
1037
+ ### Community
1038
+
1039
+ Generative AI safety requires expertise and tooling, and we believe in the strength of the open community to accelerate its progress. We are active members of open consortiums, including the AI Alliance, Partnership on AI and MLCommons, actively contributing to safety standardization and transparency. We encourage the community to adopt taxonomies like the MLCommons Proof of Concept evaluation to facilitate collaboration and transparency on safety and content evaluations. Our Purple Llama tools are open sourced for the community to use and widely distributed across ecosystem partners including cloud service providers. We encourage community contributions to our [Github repository](https://github.com/meta-llama/PurpleLlama).
1040
+
1041
+ We also set up the [Llama Impact Grants](https://llama.meta.com/llama-impact-grants/) program to identify and support the most compelling applications of Meta’s Llama model for societal benefit across three categories: education, climate and open innovation. The 20 finalists from the hundreds of applications can be found [here](https://llama.meta.com/llama-impact-grants/#finalists).
1042
+
1043
+ Finally, we put in place a set of resources including an [output reporting mechanism](https://developers.facebook.com/llama_output_feedback) and [bug bounty program](https://www.facebook.com/whitehat) to continuously improve the Llama technology with the help of the community.
1044
+
1045
+
1046
+ ## Ethical Considerations and Limitations
1047
+
1048
+ The core values of Llama 3.1 are openness, inclusivity and helpfulness. It is meant to serve everyone, and to work for a wide range of use cases. It is thus designed to be accessible to people across many different backgrounds, experiences and perspectives. Llama 3.1 addresses users and their needs as they are, without insertion unnecessary judgment or normativity, while reflecting the understanding that even content that may appear problematic in some cases can serve valuable purposes in others. It respects the dignity and autonomy of all users, especially in terms of the values of free thought and expression that power innovation and progress.
1049
+
1050
+ But Llama 3.1 is a new technology, and like any new technology, there are risks associated with its use. Testing conducted to date has not covered, nor could it cover, all scenarios. For these reasons, as with all LLMs, Llama 3.1’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 3.1 models, developers should perform safety testing and tuning tailored to their specific applications of the model. Please refer to available resources including our [Responsible Use Guide](https://llama.meta.com/responsible-use-guide), [Trust and Safety](https://llama.meta.com/trust-and-safety/) solutions, and other [resources](https://llama.meta.com/docs/get-started/) to learn more about responsible development.