dalai icon indicating copy to clipboard operation
dalai copied to clipboard

Error when run inference

Open Maxdesigna7x opened this issue 2 years ago • 7 comments

I'm new to this, I downloaded the separate model and put it in the folder it goes to. And it opens the interface perfectly, but when I click autocomplete, I get that error:

$ npx dalai serve mkdir C:\Users\randy.riverol\dalai Server running on http://localhost:3000/

query: { method: 'installed' } modelsPath C:\Users\randy.riverol\dalai\alpaca\models { modelFolders: [ '7B' ] } modelsPath C:\Users\randy.riverol\dalai\llama\models { modelFolders: [] } query: { seed: -1, threads: 4, n_predict: 200, top_k: 40, top_p: 0.9, temp: 0.1, repeat_last_n: 64, repeat_penalty: 1.3, debug: false, models: [], prompt: 'como se vive en cuba?', id: 'TS-1679240822736-16864' } C:\Users\randy.riverol\node_modules\dalai\index.js:158 let [Core, Model] = req.model.split(".") ^

TypeError: Cannot read properties of undefined (reading 'split') at Dalai.query (C:\Users\randy.riverol\node_modules\dalai\index.js:158:35) at Socket. (C:\Users\randy.riverol\node_modules\dalai\index.js:398:20) at Socket.emit (node:events:513:28) at Socket.emitUntyped (C:\Users\randy.riverol\node_modules\socket.io\dist\typed-events.js:69:22) at C:\Users\randy.riverol\node_modules\socket.io\dist\socket.js:703:39 at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Node.js v18.15.0

Maxdesigna7x avatar Mar 19 '23 15:03 Maxdesigna7x

the model is in the folder, however, it does not appear in the selection menu. dada

Maxdesigna7x avatar Mar 19 '23 16:03 Maxdesigna7x

modelsPath C:\Users\randy.riverol\dalai\llama\models
{ modelFolders: [] }

^^ this appears to be the problem.

let [Core, Model] = req.model.split(".")
^
TypeError: Cannot read properties of undefined (reading 'split')

^^ this means that req.model is undefined, which means that the you didn't provide a (proper) model Are you sure that you provided the correct model name and that it does indeed exist? I ran into an issue at the beginning too requesting for my model ('7B'), but it was supposed to be ('alpaca.7B') (readme was wrong)

keldenl avatar Mar 19 '23 19:03 keldenl

  seed: -1,
  threads: 4,
  n_predict: 200,
  top_k: 40,
  top_p: 0.9,
  temp: 0.8,
  repeat_last_n: 64,
  repeat_penalty: 1.3,
  debug: false,
  models: [ 'alpaca.7B' ],
  prompt: 'Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n' +
    '\n' +
    '### Instruction:\n' +
    '>PROMPT\n' +
    '\n' +
    '### Response:\n',
  id: 'TS-1679542627337-64104'
}
/Users/nikunj.goel/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:219
    let [Core, Model] = req.model.split(".")
                                  ^

TypeError: Cannot read properties of undefined (reading 'split')
    at Dalai.query (/Users/nikunj.goel/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:219:35)
    at Socket.<anonymous> (/Users/nikunj.goel/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:534:20)
    at Socket.emit (node:events:513:28)
    at Socket.emitUntyped (/Users/nikunj.goel/.npm/_npx/3c737cbb02d79cc9/node_modules/socket.io/dist/typed-events.js:69:22)
    at /Users/nikunj.goel/.npm/_npx/3c737cbb02d79cc9/node_modules/socket.io/dist/socket.js:703:39
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Node.js v18.15.0

Same error with me here

nikunjgoel95 avatar Mar 23 '23 03:03 nikunjgoel95

@nikunjgoel95 Your logs show that models are being detected successfully. If you are using Firefox, try another browser. See https://github.com/cocktailpeanut/dalai/issues/164

udit avatar Mar 23 '23 14:03 udit

I am using Google chrome,is that having issues as well?

nikunjgoel95 avatar Mar 23 '23 16:03 nikunjgoel95

Works in chrome too. Try in private tab. If it still does not work it might be some other issue.

udit avatar Mar 23 '23 17:03 udit

i've ggot the same issue.. not working in private tab :/

AllanGabay avatar Mar 24 '23 15:03 AllanGabay

Deleting my localstorage fixed the issue for me.

BMorearty avatar Mar 29 '23 22:03 BMorearty