From c883e8c6a2ff6a60b07f0f8006ce0208f41317f3 Mon Sep 17 00:00:00 2001 From: Xu Song Date: Fri, 15 Sep 2023 21:51:00 +0800 Subject: [PATCH] Add llama generation script (#1030) --- configs/llama/README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/configs/llama/README.md b/configs/llama/README.md index 59fdd4af3..48f5ae0d8 100644 --- a/configs/llama/README.md +++ b/configs/llama/README.md @@ -1,9 +1,23 @@ -# Llama -These configs contain the architecture settings required to run inference/training/finetuning on the [Llama](https://huggingface.co/docs/transformers/main/model_doc/llama) model suite. +# LLaMA -Llama finetuning can be launched with +## Training and Finetuning + +These configs contain the architecture settings required to run inference/training/finetuning on the [LLaMA](https://huggingface.co/docs/transformers/main/model_doc/llama) model suite. + +LLaMA finetuning can be launched with ```sh -python ./deepy.py ./train.py ./configs/llama/7B.yml ./configs/llama/train_config.yml ./configs/local_setup.yml +python ./deepy.py ./train.py -d configs llama/7B.yml llama/train_config.yml local_setup.yml ``` -If training from scratch, set `finetune=False` in `./configs/llama/train_config.yml` +If training from scratch, set `finetune=False` in `./configs/llama/train_config.yml`. + + +## Inference + + +LLaMA generation can be launched with +```sh +python ./deepy.py ./generate.py -d configs \ + llama/7B.yml llama/train_config.yml local_setup.yml text_generation.yml \ + -i input_prompt.txt -o prompt_out.txt +```