From db5d7ab3f71d2de74c130893b1860cb7b1383a73 Mon Sep 17 00:00:00 2001 From: Aniket Date: Thu, 10 Aug 2023 09:49:14 -0400 Subject: [PATCH] Adding more information in the README to use conversion tool. --- examples/convert-llama2c-to-ggml/README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/examples/convert-llama2c-to-ggml/README.md b/examples/convert-llama2c-to-ggml/README.md index da9b51a51..868f57d6d 100644 --- a/examples/convert-llama2c-to-ggml/README.md +++ b/examples/convert-llama2c-to-ggml/README.md @@ -1,13 +1,26 @@ ## Convert llama2.c model to ggml -This example reads weights from project [llama2.c](https://github.com/karpathy/llama2.c) and saves them in ggml compatible format. +This example reads weights from project [llama2.c](https://github.com/karpathy/llama2.c) and saves them in ggml compatible format. The vocab that is available in `models/ggml-vocab.bin` is used by default. To convert the model first download the models from the [llma2.c](https://github.com/karpathy/llama2.c) repository: `$ make -j` -`$ ./convert-llama2c-to-ggml --vocab-model --llama2c-model --llama2c-output-model ` +After successful compilation, following usage options are available: +``` +usage: ./convert-llama2c-to-ggml [options] -Now you can use the model with command: +options: + -h, --help show this help message and exit + --copy-vocab-from-model FNAME model path from which to copy vocab (default 'models/ggml-vocab.bin') + --llama2c-model FNAME [REQUIRED] model path from which to load Karpathy's llama2.c model + --llama2c-output-model FNAME model path to save the converted llama2.c model (default ak_llama_model.bin') +``` + +An example command is as follows: + +`$ ./convert-llama2c-to-ggml --copy-vocab-from-model --llama2c-model --llama2c-output-model ` + +Now you can use the model with command like: `$ ./main -m -p "One day, Lily met a Shoggoth" -n 500 -c 256 -eps 1e-5`