rustformers / llm

[Unmaintained, see README] An ecosystem of Rust libraries for working with large language models

Home Page:https://docs.rs/llm/latest/llm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation of CLI on macOS

twardoch opened this issue · comments

Feel free to add this somewhere:

Installation on macOS

  1. Install Rust from the official website
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Navigate to a folder of your choice and clone the llm repo:
git clone --recurse-submodules https://github.com/rustformers/llm
cd llm
  1. If you already have rust installed and the llm repo cloned, then update everything:
git pull && git submodule update --remote --merge && rustup update && cargo update
  1. Finally, build and install the binaries:
cargo build --release --features=metal && cargo install --bins --path=./binaries/llm-cli/

That should install the llm CLI tool into ~/.cargo/bin/llm.

  1. Use it in Terminal with just llm or ~/.cargo/bin/llm

Thank you for writing this up, but I suspect cargo install --git https://github.com/rustformers/llm.git --features metal llm-cli should behave identically without requiring the intermediate steps 😅

Can you check if that works for you?

I've updated the README to indicate that you should use cargo install --git - hope that resolves this!