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

Rust Bindings #248

Closed
jack-michaud opened this issue Mar 18, 2023 · 6 comments
Closed

Rust Bindings #248

jack-michaud opened this issue Mar 18, 2023 · 6 comments

Comments

@jack-michaud
Copy link

jack-michaud commented Mar 18, 2023

I saw that similar bindings were created for whisper.cpp in whisper-rs (https://github.com/tazz4843/whisper-rs), and I think it would be great to have similar bindings for llama.cpp as well.

As a Rust developer, I would use these to create an inference and embeeddings HTTP server and eventual create a Langchain binding for this (langchain-ai/langchain#1473).

I'd be willing to help with the bindings in any way I can. I'll be using whisper-rs as the template.

@Ronsor
Copy link
Contributor

Ronsor commented Mar 18, 2023

You may want to see #77 and #171 about an external C/C++ API. Rust bindings could be based on those.

@jack-michaud
Copy link
Author

Thanks for the heads up. I've already started setting up the rust bindgen code pointing at utils.h to get a proof of concept, but it should point at a stable API.

@karelnagel
Copy link

I found this repo rustformers/llm#4 and also a discord https://discord.com/invite/GBTh6HeG/login about llama rust

@setzer22
Copy link

setzer22 commented Mar 18, 2023

I came here to do a shameless plug, but someone already beat me to it 😄

The repo isn't bindings, it's a port of the C++ codebase, but we're keeping up with upstream updates. We're still using ggml underneath so it is just as fast. We also have a few nice things like a discord bot library, a command-line REPL to chat with Alpaca and a working implementation for #64! The whole codebase has also been "library-fied" and it's easier to build your own applications on top of it.

@jack-michaud
Copy link
Author

Hey @setzer22, that's awesome. That scratches this issue's itch for me. I'll close this up. Thanks for your shameless plug!

@jack-michaud jack-michaud closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2023
Deadsg pushed a commit to Deadsg/llama.cpp that referenced this issue Dec 19, 2023
make git module accessible anonymously
@linonetwo
Copy link

linonetwo commented Feb 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants