Repository navigation
docs: add java-llama.cpp to README.md - #2935
Conversation
|
Wow this is so cool, I also made a Java binding for LLaMa.cpp independently, here is the link to my repo. The idea is basically the same, using JNI for accessing the native library. However, instead of manually writing the JNI glue codes (which is very boring and hard to keep up with the ⚡️ update speed of LLaMA.cpp 😃), I used the awesome javacpp project to generate them automatically. Everything works fine on my Mac with the latest GGUF model and GPU support. If possible, I wish we could collaborate and build some cool stuff 😎 |
|
Hey @Peng-YM I would love to work together! I know javacpp but am not really familiar with it. However, I think there is value in having different Java bindings:
I really appreciate your work and would like to acknowledge it somehow. However, at this point I think my repository is more suitable to include in the readme, as it implements more features and is publicly available via Maven. I absolutely welcome you to collaborate on the repository or hope we can find another solution (mabye list both in readme like the node bindings?). What do you think? |
Yes, as you have mentioned, I think we just choose different trade-off. Very well done job! Would love to see more exciting things on LLMs for the Java ecosystem! |
Since not much has happened on the Java side so far, I'd like to add my repository. Hopefully as a starting point for further collaboration. It exposes the entire C API and for the major part Java glue code exists, including grammar parsing and sampling.
I decided to implement the binding using JNA. In general, JNI exists as an alternative, but this usually comes with increased deployment effort, which is somewhat against the philosophy of the project. There is also project panama, which looks awesome, but so far is only an early access feature.