Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llama.cpp 2950 (New formula) #172186

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,7 @@ literate-git
little-cms2
livekit
livekit-cli
llama-cpp
llm
llvm
lmdb
Expand Down
41 changes: 41 additions & 0 deletions Formula/l/llama.cpp.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
class LlamaCpp < Formula
desc "LLM inference in C/C++"
homepage "https://github.com/ggerganov/llama.cpp"
# pull from git tag to get submodules
url "https://github.com/ggerganov/llama.cpp.git",
tag: "b2963",
revision: "95fb0aefab568348da159efdd370e064d1b35f97"
license "MIT"

livecheck do
throttle 10
end
Vaibhavs10 marked this conversation as resolved.
Show resolved Hide resolved

depends_on xcode: ["15.0", :build]
depends_on arch: :arm64
depends_on macos: :ventura
Comment on lines +10 to +12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are these requirements documented?

depends_on :macos
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
depends_on :macos

This doesn't seem correct.

uses_from_macos "curl"
Vaibhavs10 marked this conversation as resolved.
Show resolved Hide resolved

def install
system "make", "LLAMA_FATAL_WARNINGS=ON", "LLAMA_METAL_EMBED_LIBRARY=ON", "LLAMA_CURL=ON"

bin.install "./main" => "llama-cli"
bin.install "./server" => "llama-server"
Vaibhavs10 marked this conversation as resolved.
Show resolved Hide resolved
Vaibhavs10 marked this conversation as resolved.
Show resolved Hide resolved
end

test do
llama_cli_command = ["llama-cli",
"--hf-repo",
"ggml-org/tiny-llamas",
"-m",
"stories15M-q4_0.gguf",
"-n",
"400",
"-p",
"I",
"-ngl",
"0"].join(" ")
assert_includes shell_output(llama_cli_command), "<s>"
Vaibhavs10 marked this conversation as resolved.
Show resolved Hide resolved
end
end
Loading