From 687bbf1249bd3002cb67e8de8f923582d4ba785c Mon Sep 17 00:00:00 2001 From: Mikko Juola Date: Mon, 13 Mar 2023 21:59:45 -0700 Subject: [PATCH] Add instructions on how to use OpenCL in the README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index a28a109..b1d3653 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,19 @@ cast to 32-bit floats. You can use `--temperature`, `--top-p` and `--top-k` to adjust token sampler settings. +# How to turn on OpenCL + +Use `opencl` Cargo feature. + +``` +cargo run --release --features opencl -- --tokenizer-model /path/to/tokenizer.model --model-path /path/to/LLaMA/7B --param-path /path/to/LLaMA/7B/params.json --prompt "The meaning of life is" +``` + +With `opencl` feature, there is also another argument, `--opencl-device` that +takes a number. That number selects Nth OpenCL device found on the system. You +can see the devices in the output when you run the program (e.g. see the +screenshot below). + # Screenshot ![Screenshot of RLLaMA in action](rllama.png)