Git Product home page Git Product logo

Comments (8)

totoCZ avatar totoCZ commented on May 30, 2024 2

As a workaround just change the default here
https://github.com/cocktailpeanut/dalai/blob/main/bin/web/views/index.ejs#L115

from dalai.

xiscoding avatar xiscoding commented on May 30, 2024

I am garbage at node.js but if it looks like the query is incorrect. Do you know how to change the query?

Server running on http://localhost:3000/

query: { method: 'installed' }
modelsPath /home/xdoestech/llama.cpp/models
{ modelFolders: [ '13B', '30B', '65B', '7B' ] }
exists 65B
query: {
seed: -1,
threads: 4,
n_predict: 1000,
model: '7B', THIS SHOULD BE 65B
top_k: 40,
top_p: 0.9,
temp: 0.8,
repeat_last_n: 64,
repeat_penalty: 1.3,
models: [ '65B' ],
prompt: 'the fuck'
}

from dalai.

xiscoding avatar xiscoding commented on May 30, 2024

ok so this runs in the terminal but does not run in the webUI... I know am missing something basic here

const Dalai = require('dalai');

new Dalai().request({
model: "65B",
prompt: "The following is a conversation between a boy and a girl:",
}, (token) => {
process.stdout.write(token)
})

new Dalai().serve(3000)

from dalai.

10nis avatar 10nis commented on May 30, 2024

I am garbage at node.js but if it looks like the query is incorrect. Do you know how to change the query?

Server running on http://localhost:3000/

query: { method: 'installed' }
modelsPath /home/xdoestech/llama.cpp/models
{ modelFolders: [ '13B', '30B', '65B', '7B' ] }
exists 65B
query: {
seed: -1,
threads: 4,
n_predict: 1000,
model: '7B', THIS SHOULD BE 65B
top_k: 40,
top_p: 0.9,
temp: 0.8,
repeat_last_n: 64,
repeat_penalty: 1.3,
models: [ '65B' ],
prompt: 'the fuck'
}

I can confirm that this is what my queries look like as well.
A quick fix is to simply also install the 7B model. I can confirm that after I installed the 7B model, and select 65B from the web ui the queries then come through successfully.

Seems like there is some form of bug where if there is only one model installed it assumes that the model is 7B.

Unfortunately I haven't had time to dig through the code and figure out why this is happening or how to fix the query

from dalai.

prism2001 avatar prism2001 commented on May 30, 2024

i wonder if making a symlink to the 30B/65B/etc folder would work instead? haven't tried it myself but as long as it's not expecting an exact match of the model's files it might be worth a shot as a temporary workaround at least

from dalai.

Buildstarted avatar Buildstarted commented on May 30, 2024

The issue is the website defaults to 7B and only updates the value when you have a change event on the drop down. Since there's only one item in the drop down a change event will never fire and never update the model.

from dalai.

xiscoding avatar xiscoding commented on May 30, 2024

No the code I posted above works just the webui does not work with it. There are instructions to make the webui but I do not have time to learn socket.io until this weekend. The api works try the code above.

from dalai.

xiscoding avatar xiscoding commented on May 30, 2024

The issue is the website defaults to 7B and only updates the value when you have a change event on the drop down. Since there's only one item in the drop down a change event will never fire and never update the model.

Do you know how to access the code to change this? Ive looked throught the github and dont see anything (I have no idea what I am doing however). I have no storage for another model at this point

from dalai.

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.