Skip to content

LLamaSharp, Unity and GPU #1108

Answered by Lyrcaxis
footh asked this question in Q&A
Feb 21, 2025 · 1 comments · 1 reply

You must be logged in to vote

I got it working by doing the following steps:

  1. Install the NuGetForUnity package via git link
  2. Use it to install LLamaSharp and the backend of my choice
  3. Copy the ggml-cpu.dll over from the Backend.Cpu folder to the actual backend's folder
  4. Delete the Backend.Cpu folder completely
  5. (Optional) uninstall NuGetForUnity to prevent it from re-downloading the Cpu backend as dependency.

And this'll use the backend you downloaded -- the only one available. No WithLibary() nor WithCuda() needed!
If you wanna ship to multiple platforms, just use different configs before building and ship with the appropriate DLLs.
It's only a little problematic if other people in your team use different OS's.

So yeah…

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@footh

Answer selected by footh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants