dalai icon indicating copy to clipboard operation
dalai copied to clipboard

No Model selectable - req.model.split(".") ERROR

Open FreshImmuc opened this issue 1 year ago • 14 comments

I can't select a model on the web-gui. How do i fix that? Here is my web gui: Screenshot_20230331_125207_Chrome

And here is the log when i try to submit a prompt: Screenshot_20230331_104512_Termius

FreshImmuc avatar Mar 31 '23 10:03 FreshImmuc

When I follow the instructions to run dailai on docker i can see the model but I have the same error it seems to come from socket.io

Azilone avatar Mar 31 '23 11:03 Azilone

I had the same problem, bypassed it by installing a second model.

lucas-strummer avatar Mar 31 '23 15:03 lucas-strummer

@lucas-strummer wich models did you install? I installed llama 7B and 13B and it doesnt work...

FreshImmuc avatar Mar 31 '23 18:03 FreshImmuc

I get this too. I once ran it ok a few weeks ago on another Mac (intel) but now trying on my M1 Mac I get

/Users/andy/.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/andy/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:219:35)
    at Socket.<anonymous> (/Users/andy/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:534:20)
    at Socket.emit (node:events:513:28)
    at Socket.emitUntyped (/Users/andy/.npm/_npx/3c737cbb02d79cc9/node_modules/socket.io/dist/typed-events.js:69:22)
    at /Users/andy/.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

Could it be the model isn't downloaded properly? My ~/dalai directory is not filled with gigabytes of model data. So I ran npx dalai alpaca install 7B and now something big is downloading...

abulka avatar Mar 31 '23 23:03 abulka

I have this exact same Error.

Hayden2018 avatar Apr 01 '23 15:04 Hayden2018

same error in Windows and in vm linux ubuntu

Mikecodex avatar Apr 05 '23 08:04 Mikecodex

I have the same issue. Hardcoded the Core and Model variables in the index.js file to bypass it (line 219). For instance, if you installed llama 7B:

let [Core, Model] = ['llama', '7B']

EnguerrandDeclercq avatar Apr 06 '23 10:04 EnguerrandDeclercq

This is the one that is working for me.

I have the same issue. Hardcoded the Core and Model variables in the index.js file to bypass it (line 219). For instance, if you installed llama 7B:

let [Core, Model] = ['llama', '7B']

Although, remember to switch "llama" to alpaca if you are using. Worked a charm, thanks man.

Wagner-Peter avatar Apr 07 '23 22:04 Wagner-Peter

If you have installed at least two models, the normal line 219 in index.js works

let [Core, Model] = req.model.split(".")

If you only have one model installed, you should edit the line to

let [Core, Model] = req.models[0].split(".")

Hardcoding the models is not a good solution I think and also didn't work for me, as long as I remember correctly

Llama/Alpaca still doesn't work cause it doesn't give me results, it just calculates 'till death. Or..untill I hit the Stop button. But the model problem is fixed. It's said that the models are corrupt, which explains the problem of no results (https://github.com/cocktailpeanut/dalai/issues/432) already mentioned by joelduerksen

Also didn't work with other models...

d-tool avatar May 22 '23 16:05 d-tool

I had one model and none of the solutions worked for me. After hardcoding the model and core it did not show any error when running but it never finished. Now I installed a second model and yet I get the same error. I think the primary cause of error is that the GUI does not receive correctly the installed models so one can't select it, which can be seen in the log in the query, the "models" param is empty.

xero-q avatar Jul 07 '23 12:07 xero-q

@lucas-strummer wich models did you install? I installed llama 7B and 13B and it doesnt work...

@FreshImmuc have you been able to solve this??, I also installed those two same models and I can't put it to work.

xero-q avatar Jul 07 '23 14:07 xero-q

After changing to let [Core, Model] = req.model[0].split(".") I experienced a new issue:

    let [Core, Model] = req.model[0].split(".")
                                 ^

TypeError: Cannot read properties of undefined (reading '0')
    at Dalai.query (/Users/xxee/.npm/_npx/3c737cbb02d79cc9/node_modules/dalai/index.js:219:34)

it looks like my model is empty, my first time using the app, and I'm not sure what goes wrong.

Also, my model dropdown is empty in the UI: Screen Shot 2023-07-09 at 9 32 21 AM

gavin1818 avatar Jul 09 '23 16:07 gavin1818

Same happens to me, no model appears in the UI.

xero-q avatar Jul 09 '23 18:07 xero-q

Fixed is on my end for Windows. It turned out to me that my llama model was not installed (quantize) correctly. After I applied the fix here, this error was gone for me https://github.com/cocktailpeanut/dalai/issues/241

LizsDing avatar Aug 28 '23 21:08 LizsDing