Git Product home page Git Product logo

homebrew-llm's Introduction

homebrew-llm

Homebrew formulas for installing the LLM family of tools.

If you have previously installed packages from this repository you may need to run brew update to ensure you have the latest versions of the formulas:

brew update

Installing llm

LLM lets you run prompts against large language models from the command-line.

brew install simonw/llm/llm

Example:

llm 'Ten great names for a pet pelican'

Installing strip-tags

strip-tags strip tags from HTML, useful for feeding content to a large language model while keeping the token count down.

brew install simonw/llm/strip-tags

Example:

curl -s 'https://www.nytimes.com/' | strip-tags | llm --system 'Summarize headlines'

Installing symbex

symbex is a tool for finding Python functions and classes within a codebase. It can also output just the signatures or docstrings of code that it finds.

brew install simonw/llm/symbex

Example - this finds the def inspect_hash() function and explains what it does:

symbex inspect_hash | llm --system 'explain this code'

Installing ttok

ttok is a tool for counting tokens. This is useful if you want to check that your content is not going to exceed the size limits for different LLM models.

brew install simonw/llm/ttok

This installation will also bring in a copy of Rust, if one is not yet available in your Homebrew setup.

Example, counting the total number of tokens in all of your test functions.

symbex 'test_*' | ttok

homebrew-llm's People

Contributors

simonw avatar

Stargazers

Ahmad Syazwan avatar Woodrow Pearson avatar Devon 'fire' Adkisson avatar Andres Araujo avatar Vikram Saraph avatar jinzaizhichi avatar Benjamin Doherty avatar Jaime Bueza avatar

Watchers

 avatar  avatar

Forkers

dictcp

homebrew-llm's Issues

Response got chunked off halfway.

Hi there, I'm new to the llm tool. I installed llama2 through replicate as in the tutorial and I noticed that the answer clearly got chunked off halfway when asking e.g. llm -m llama2 "Ten great names for a pet pelican" and then llm -c "Five more and make them more nautical". The last line of the response read I hope these additional names help you find the.
I searched the llm docs but didn't find a flag for specifying long response. Do you have any solutions to this problem?
Screenshot 2023-07-20 at 09 40 47

Fail to install llm 0.5. failed to upgrade too. unistalled, tried to reinstall, same error

Last 15 lines from /Users/peternou/Library/Logs/Homebrew/llm/17.pip:

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /opt/homebrew/Cellar/llm/0.5/libexec/bin/python3.11 /opt/homebrew/Cellar/llm/0.5/libexec/lib/python3.11/site-packages/pip/pip-runner.py install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-k7hf01/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'maturin>=1,<2' 'typing-extensions >=4.6.0,!=4.7.0'
cwd: [inherit]
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

Get ttok formula working

I tried this just now but got this error:

brew install simonw/llm/ttok
==> Fetching simonw/llm/ttok
==> Downloading https://files.pythonhosted.org/packages/93/71/752f7a4dd4c20d6b12341ed1732368546bc0
Already downloaded: /Users/simon/Library/Caches/Homebrew/downloads/b37c416da7593b3b6ed40ad9f7cdf2d5cb8f5f843964cb033e31ccd305624d0a--certifi-2023.5.7.tar.gz
# ... 
==> Installing ttok from simonw/llm
==> python3 -m venv --system-site-packages /opt/homebrew/Cellar/ttok/0.1/libexec
==> /opt/homebrew/Cellar/ttok/0.1/libexec/bin/pip install -v --no-deps --no-binary :all: --use-fea
# ...
Last 15 lines from /Users/simon/Library/Logs/Homebrew/ttok/08.pip:
  
  × Building wheel for tiktoken (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /opt/homebrew/Cellar/ttok/0.1/libexec/bin/python3.11 /opt/homebrew/Cellar/ttok/0.1/libexec/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /private/tmp/tmpd6snlqbj
  cwd: /private/tmp/ttok--tiktoken-20230621-34195-1e3u4x/tiktoken-0.4.0
  Building wheel for tiktoken (pyproject.toml): finished with status 'error'
  ERROR: Failed building wheel for tiktoken
Failed to build tiktoken
ERROR: Could not build wheels for tiktoken, which is required to install pyproject.toml-based projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.