Skip to content

Commit

Permalink
Add llama3.1 to readme (#4378) (#4403)
Browse files Browse the repository at this point in the history
Summary:
#4376

Pull Request resolved: #4378

Reviewed By: kirklandsign

Differential Revision: D60177343

Pulled By: lucylq

fbshipit-source-id: f8197e7af18785bfcca3c5c2980ec1bd7acdaf9d
(cherry picked from commit d6d691e)

Co-authored-by: lucylq <lucyqiu16@gmail.com>
  • Loading branch information
pytorchbot and lucylq authored Jul 24, 2024
1 parent fb2a1a7 commit 0d0f580
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion examples/models/llama2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ For more details, see [Llama 2 repo](https://github.com/facebookresearch/llama)

Pretrained models are not included in this repo. Users are suggested to download them [here](https://ai.meta.com/resources/models-and-libraries/llama-downloads/).

# What are Llama 2 and 3?
# What is Llama?
Llama is a collection of large language models that use publicly available data for training. These models are based on the transformer architecture, which allows it to process input sequences of arbitrary length and generate output sequences of variable length. One of the key features of Llama models is its ability to generate coherent and contextually relevant text. This is achieved through the use of attention mechanisms, which allow the model to focus on different parts of the input sequence as it generates output. Additionally, Llama models use a technique called “masked language modeling” to pre-train the model on a large corpus of text, which helps it learn to predict missing words in a sentence.

Llama models have shown to perform well on a variety of natural language processing tasks, including language translation, question answering, and text summarization and are also capable of generating human-like text, making Llama models a useful tool for creative writing and other applications where natural language generation is important.
Expand Down Expand Up @@ -47,6 +47,20 @@ Llama 2 7B performance was measured on the Samsung Galaxy S22, S24, and OnePlus
|Galaxy S24 | 10.66 tokens/second | 11.26 tokens/second |
|OnePlus 12 | 11.55 tokens/second | 11.6 tokens/second |

### Llama3 8B
Llama 3 8B performance was measured on the Samsung Galaxy S22, S24, and OnePlus 12 devices. The performance measurement is expressed in terms of tokens per second using an [adb binary-based approach](#step-5-run-benchmark-on).

Note that since Llama3's vocabulary size is 4x that of Llama2, we had to quantize embedding lookup table as well. For these results embedding lookup table was groupwise quantized with 4-bits and group size of 32.

|Device | Groupwise 4-bit (128) | Groupwise 4-bit (256)
|--------| ---------------------- | ---------------
|Galaxy S22 | 7.85 tokens/second | 8.4 tokens/second |
|Galaxy S24 | 10.91 tokens/second | 11.21 tokens/second |
|OnePlus 12 | 10.85 tokens/second | 11.02 tokens/second |

### Llama3.1
> :warning: **use the main branch**: Llama3.1 is supported on the ExecuTorch main branch (not release 0.3).
# Instructions

## Tested on
Expand Down

0 comments on commit 0d0f580

Please sign in to comment.