Skip to content

Commit 4da744d

Browse files
authored
Merge branch 'main' into chester-azure-update
2 parents 261f1d2 + f531d17 commit 4da744d

File tree

4 files changed

+36
-31
lines changed

4 files changed

+36
-31
lines changed

.github/scripts/spellcheck_conf/wordlist.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,4 +1432,4 @@ CPUs
14321432
modelUpgradeExample
14331433
guardrailing
14341434
MaaS
1435-
1435+
MFU

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Llama Recipes: Examples to get started using the Llama models from Meta
22
<!-- markdown-link-check-disable -->
3-
The 'llama-recipes' repository is a companion to the [Meta Llama](https://github.com/meta-llama/llama-models) models. We support the latest version, [Llama 3.1](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md), in this repository. The goal is to provide a scalable library for fine-tuning Meta Llama models, along with some example scripts and notebooks to quickly get started with using the models in a variety of use-cases, including fine-tuning for domain adaptation and building LLM-based applications with Llama and other tools in the LLM ecosystem. The examples here showcase how to run Llama locally, in the cloud, and on-prem.
3+
The 'llama-recipes' repository is a companion to the [Meta Llama](https://github.com/meta-llama/llama-models) models. We support the latest version, [Llama 3.1](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md), in this repository. The goal is to provide a scalable library for fine-tuning Meta Llama models, along with some example scripts and notebooks to quickly get started with using the models in a variety of use-cases, including fine-tuning for domain adaptation and building LLM-based applications with Llama and other tools in the LLM ecosystem. The examples here showcase how to run Llama locally, in the cloud, and on-prem.
44

55
<!-- markdown-link-check-enable -->
66
> [!IMPORTANT]
@@ -31,7 +31,7 @@ The 'llama-recipes' repository is a companion to the [Meta Llama](https://github
3131
> ```
3232
> Each message gets trailed by an `<|eot_id|>` token before a new header is started, signaling a role change.
3333
>
34-
> More details on the new tokenizer and prompt template can be found [here](https://llama.meta.com/docs/model-cards-and-prompt-formats/llama3_1).
34+
> More details on the new tokenizer and prompt template can be found [here](https://llama.meta.com/docs/model-cards-and-prompt-formats/llama3_1).
3535
3636
>
3737
> [!NOTE]
@@ -55,6 +55,7 @@ The 'llama-recipes' repository is a companion to the [Meta Llama](https://github
5555
- [Repository Organization](#repository-organization)
5656
- [`recipes/`](#recipes)
5757
- [`src/`](#src)
58+
- [Supported Features](#supported-features)
5859
- [Contributing](#contributing)
5960
- [License](#license)
6061
@@ -160,6 +161,30 @@ Contains modules which support the example recipes:
160161
| [utils](src/llama_recipes/utils/) | Utility files for:<br/> - `train_utils.py` provides training/eval loop and more train utils.<br/> - `dataset_utils.py` to get preprocessed datasets.<br/> - `config_utils.py` to override the configs received from CLI.<br/> - `fsdp_utils.py` provides FSDP wrapping policy for PEFT methods.<br/> - `memory_utils.py` context manager to track different memory stats in train loop. |
161162

162163

164+
## Supported Features
165+
The recipes and modules in this repository support the following features:
166+
167+
| Feature | |
168+
| ---------------------------------------------- | - |
169+
| HF support for inference ||
170+
| HF support for finetuning ||
171+
| PEFT ||
172+
| Deferred initialization ( meta init) ||
173+
| Low CPU mode for multi GPU ||
174+
| Mixed precision ||
175+
| Single node quantization ||
176+
| Flash attention ||
177+
| Activation checkpointing FSDP ||
178+
| Hybrid Sharded Data Parallel (HSDP) ||
179+
| Dataset packing & padding ||
180+
| BF16 Optimizer (Pure BF16) ||
181+
| Profiling & MFU tracking ||
182+
| Gradient accumulation ||
183+
| CPU offloading ||
184+
| FSDP checkpoint conversion to HF for inference ||
185+
| W&B experiment tracker ||
186+
187+
163188
## Contributing
164189

165190
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

recipes/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This folder contains examples organized by topic:
44

55
| Subfolder | Description |
66
|---|---|
7-
[quickstart](./quickstart)|The "Hello World" of using Llama 3, start here if you are new to using Llama 3
8-
[use_cases](./use_cases)|Scripts showing common applications of Llama 3
9-
[3p_integrations](./3p_integrations)|Partner-owned folder showing Meta Llama 3 usage along with third-party tools
7+
[quickstart](./quickstart)|The "Hello World" of using Llama, start here if you are new to using Llama
8+
[use_cases](./use_cases)|Scripts showing common applications of Llama
9+
[3p_integrations](./3p_integrations)|Partner-owned folder showing Llama usage along with third-party tools
1010
[responsible_ai](./responsible_ai)|Scripts to use PurpleLlama for safeguarding model outputs
11-
[experimental](./experimental)|Meta Llama implementations of experimental LLM techniques
11+
[experimental](./experimental)| Llama implementations of experimental LLM techniques

recipes/quickstart/README.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,8 @@
22

33
If you are new to developing with Meta Llama models, this is where you should start. This folder contains introductory-level notebooks across different techniques relating to Meta Llama.
44

5-
* The [Running_Llama3_Anywhere](./Running_Llama3_Anywhere/) notebooks demonstrate how to run Llama inference across Linux, Mac and Windows platforms using the appropriate tooling.
6-
* The [Prompt_Engineering_with_Llama_3](./Prompt_Engineering_with_Llama_3.ipynb) notebook showcases the various ways to elicit appropriate outputs from Llama. Take this notebook for a spin to get a feel for how Llama responds to different inputs and generation parameters.
5+
* The [Running_Llama_Anywhere](./Running_Llama3_Anywhere/) notebooks demonstrate how to run Llama inference across Linux, Mac and Windows platforms using the appropriate tooling.
6+
* The [Prompt_Engineering_with_Llama](./Prompt_Engineering_with_Llama_3.ipynb) notebook showcases the various ways to elicit appropriate outputs from Llama. Take this notebook for a spin to get a feel for how Llama responds to different inputs and generation parameters.
77
* The [inference](./inference/) folder contains scripts to deploy Llama for inference on server and mobile. See also [3p_integrations/vllm](../3p_integrations/vllm/) and [3p_integrations/tgi](../3p_integrations/tgi/) for hosting Llama on open-source model servers.
8-
* The [RAG](./RAG/) folder contains a simple Retrieval-Augmented Generation application using Llama 3.
9-
* The [finetuning](./finetuning/) folder contains resources to help you finetune Llama 3 on your custom datasets, for both single- and multi-GPU setups. The scripts use the native llama-recipes finetuning code found in [finetuning.py](../../src/llama_recipes/finetuning.py) which supports these features:
10-
11-
| Feature | |
12-
| ---------------------------------------------- | - |
13-
| HF support for finetuning ||
14-
| Deferred initialization ( meta init) ||
15-
| HF support for inference ||
16-
| Low CPU mode for multi GPU ||
17-
| Mixed precision ||
18-
| Single node quantization ||
19-
| Flash attention ||
20-
| PEFT ||
21-
| Activation checkpointing FSDP ||
22-
| Hybrid Sharded Data Parallel (HSDP) ||
23-
| Dataset packing & padding ||
24-
| BF16 Optimizer ( Pure BF16) ||
25-
| Profiling & MFU tracking ||
26-
| Gradient accumulation ||
27-
| CPU offloading ||
28-
| FSDP checkpoint conversion to HF for inference ||
29-
| W&B experiment tracker ||
8+
* The [RAG](./RAG/) folder contains a simple Retrieval-Augmented Generation application using Llama.
9+
* The [finetuning](./finetuning/) folder contains resources to help you finetune Llama on your custom datasets, for both single- and multi-GPU setups. The scripts use the native llama-recipes finetuning code found in [finetuning.py](../../src/llama_recipes/finetuning.py) which supports these features:

0 commit comments

Comments
 (0)