mirror of
https://github.com/Hopiu/llm.git
synced 2026-05-04 20:04:44 +00:00
Homebrew PyTorch warning, closes #397
This commit is contained in:
parent
46763326ed
commit
2b92756046
2 changed files with 25 additions and 3 deletions
|
|
@ -25,15 +25,19 @@ For more check out [the llm tag](https://simonwillison.net/tags/llm/) on my blog
|
|||
|
||||
## Quick start
|
||||
|
||||
First, install LLM using `pip` or Homebrew:
|
||||
First, install LLM using `pip` or Homebrew or `pipx`:
|
||||
|
||||
```bash
|
||||
pip install llm
|
||||
```
|
||||
Or with Homebrew:
|
||||
Or with Homebrew (see {ref}`warning note <homebrew-warning>`):
|
||||
```bash
|
||||
brew install llm
|
||||
```
|
||||
Or with [pipx](https://pypa.github.io/pipx/):
|
||||
```bash
|
||||
pipx install llm
|
||||
```
|
||||
If you have an [OpenAI API key](https://platform.openai.com/api-keys) key you can run this:
|
||||
```bash
|
||||
# Paste your OpenAI API key into this
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Or using [pipx](https://pypa.github.io/pipx/):
|
|||
```bash
|
||||
pipx install llm
|
||||
```
|
||||
Or using [Homebrew](https://brew.sh/):
|
||||
Or using [Homebrew](https://brew.sh/) (see {ref}`warning note <homebrew-warning>`):
|
||||
```bash
|
||||
brew install llm
|
||||
```
|
||||
|
|
@ -34,6 +34,24 @@ If the latest version is not yet available on Homebrew you can upgrade like this
|
|||
llm install -U llm
|
||||
```
|
||||
|
||||
(homebrew-warning)=
|
||||
## A note about Homebrew and PyTorch
|
||||
|
||||
The version of LLM packaged for Homebrew currently uses Python 3.12. The PyTorch project do not yet have a stable release of PyTorch for that version of Python.
|
||||
|
||||
This means that LLM plugins that depend on PyTorch such as [llm-sentence-transformers](https://github.com/simonw/llm-sentence-transformers) may not install cleanly with the Homebrew version of LLM.
|
||||
|
||||
You can workaround this by manually installing PyTorch before installing `llm-sentence-transformers`:
|
||||
|
||||
```bash
|
||||
llm install llm-python
|
||||
llm python -m pip install \
|
||||
--pre torch torchvision \
|
||||
--index-url https://download.pytorch.org/whl/nightly/cpu
|
||||
llm install llm-sentence-transformers
|
||||
```
|
||||
This should produce a working installation of that plugin.
|
||||
|
||||
## Installing plugins
|
||||
|
||||
{ref}`plugins` can be used to add support for other language models, including models that can run on your own device.
|
||||
|
|
|
|||
Loading…
Reference in a new issue