Giter Club home page Giter Club logo

Comments (6)

mrddter avatar mrddter commented on June 7, 2024

Just out of curiosity, have you tried using the Docker version of node:18 (non-alpine)?

from node-llama-cpp.

giladgd avatar giladgd commented on June 7, 2024

@igorjos From the details you provided, I can easily spot this issue:
modelPath: __dirname - you try to load a folder instead of providing a path to a specific model.

Also, please provide the specific node-llama-cpp version you use

from node-llama-cpp.

wiwiwuwuwa avatar wiwiwuwuwa commented on June 7, 2024

@igorjos, I resolved this issue by using Ubuntu distro instead of Alpine. Perhaps this is related to prebuild binaries.

from node-llama-cpp.

igorjos avatar igorjos commented on June 7, 2024

Hi @giladgd I'm using v2.8.6, the path is correct within the docker, also accessible, I tried to run simple operations e.g file exist, file open etc, it worked well, but the llama fails to open it.

@mrddter I did tried with full node without alpine as well, it didn't worked. Same result with node-20, node-22

@wiwiwuwuwa I didn't tried full ubuntu, but that is big overhead in this case, instead of having 200MB image size + the model from external path, I will have 10GB+ image. But I agree is one of the possible solutions.

Additionally i tried to increase the memory used and swap memory to the docker image, to use 24GB ram and 200GB swap, but that didn't helped as well.

I can't find anything in the logs that might point to the issue, I just get the error mentioned in my original comment.

My assumption would be that it requires the C libraries to be installed to be able to run, as per @wiwiwuwuwa comment - if it works with Ubuntu image.

from node-llama-cpp.

giladgd avatar giladgd commented on June 7, 2024

@igorjos I found the issue and included the fix in #175, I'll release it in the next beta version.

From my investigation, there's no benefit to using Alpine Linux together with a GPU, as it only makes it more complicated to get everything to work well with GPU drivers due to linker differences and some other differences in this distro.
Also, since running an LLM is not a lightweight task, having a more robust image with optimizations targeted for the long run and not only to startup times contributes to better performance overall, so it would be a better choice.

I recommend you to use the default node image without -alpine, for example node:20 or node:lts.

When version 3.0 is officially released, I'll include more in-depth explanations and examples of how to run node-llama-cpp in a docker image.

from node-llama-cpp.

github-actions avatar github-actions commented on June 7, 2024

🎉 This issue has been resolved in version 3.0.0-beta.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

from node-llama-cpp.

Related Issues (20)

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.