ngxson / alpaca.cpp-webui

Web UI for Alpaca.cpp - Locally run an Instruction-Tuned Chat-Style LLM
Other
75 stars 11 forks source link

Running on windows #1

Open pjlumby1973 opened 1 year ago

pjlumby1973 commented 1 year ago

I am trying to get this working on Windows 11 with GPT4All. There was an issue with setting the Port but I think I have resolved that by changing the package.json from "proc_serve": "PORT=13000 next start", to "proc_serve": "set PORT=13000 react-scripts start",

however I now get the following exit code, I'm not a coder and can't figure out where the error is.

[0] [0] > chatgpt-ui-template@0.1.0 proc_serve [0] > set PORT=13000 react-scripts start [0] [1] [1] > chatgpt-ui-template@0.1.0 proc_native [1] > node ./utils/native.js [1] [0] npm run proc_serve exited with code 0 --> Sending SIGTERM to other processes.. [1] npm run proc_native exited with code 1

ngxson commented 1 year ago

I'll try to get my windows VM running during this weekend, but in the meantime, can you please try with WSL?

ngxson commented 1 year ago

Update: can you try this guide? https://github.com/ngxson/alpaca.cpp-webui/blob/master/doc/windows.md

ShadowAimai commented 1 year ago

Tried it as well. While the web UI runs, and doesn't yield any errors, the AI doesn't respond at all.

[0] Socket proxy is initializing [1] New connection [0] load sqlite from G:\alpaca.cpp-webui.data\db.sqlite [0] Executing (default): SELECT name FROM sqlite_master WHERE type='table' AND name='chats'; [0] Executing (default): SELECT id, chat_id, data FROM messages AS message WHERE message.id = 'a698e47f-37cf-4a78-b956-d377092f23fc'; [0] Executing (default): SELECT name FROM sqlite_master WHERE type='table' AND name='messages'; [0] Executing (default): PRAGMA INDEX_LIST(chats) [0] Executing (default): INSERT INTO messages (id,chat_id,data) VALUES ('a698e47f-37cf-4a78-b956-d377092f23fc','353038bf-82bf-4b57-a104-1eb2d8ce3def','{"role":"user","content":"What is a dog?","createdAt":1680730600994}'); [0] Executing (default): PRAGMA INDEX_LIST(messages) [0] Executing (default): PRAGMA INDEX_INFO(sqlite_autoindex_chats_1) [0] Executing (default): PRAGMA INDEX_INFO(sqlite_autoindex_messages_1) [0] Executing (default): PRAGMA INDEX_INFO(message_chat_id_idx) [0] Executing (default): CREATE INDEX IF NOT EXISTS message_chat_id_idx ON messages(chat_id) [1] user input: { [1] chatId: '353038bf-82bf-4b57-a104-1eb2d8ce3def', [1] messageId: '3b8b32cd-2790-45f3-bbb3-b45bdddcc53e', [1] input: 'The following is a friendly conversation between human and AI called Alpaca. AI is talkative and provides details from its context.\n' + [1] '\n' + [1] 'Conversation:\n' + [1] 'Human: Tell me a joke.\n' + [1] 'AI: (say nothing)\n' + [1] 'Human: What is 2 + 2?\n' + [1] 'AI: (say nothing)\n' + [1] 'Human: What is a dog?\n' + [1] 'AI:' [1] } [0] Executing (default): SELECT id, chat_id, data FROM messages AS message WHERE message.id = '3b8b32cd-2790-45f3-bbb3-b45bdddcc53e'; [0] Executing (default): INSERT INTO messages (id,chat_id,data) VALUES ('3b8b32cd-2790-45f3-bbb3-b45bdddcc53e','353038bf-82bf-4b57-a104-1eb2d8ce3def','{"role":"assistant","content":"","createdAt":1680730601131}');

betolley commented 1 year ago

Me too Same exact thing.

ngxson commented 1 year ago

For the moment, I'm spending time to play with internal llama.cpp source code. The current implementation of llama.cpp/alpaca.cpp is not really stable (or suitable) for this application. Therefore, I may need more time to solve this issue.

In the meantime, maybe you can try running the web ui from WSL?


Btw, here a snippet of what I'm doing so far. I was able to save the model's internal memory context. I also be able to add some personalities to the bot:

----------------
>  Hi, I'm Xuan Son.
Hi Xuan Son! It's nice to meet you too.
----------------
>  Can you make a poem?
Yes, of course I can! Here is a little poem about the beauty of nature: 
The sun shines bright in the sky, 
Rays of light dancing by. 
A butterfly flits among the trees, 
Its wings glistening dew. 
Birds soar with grace and ease, 
On a mission to fulfill their dreams. 
The river runs free with joy, 
As it twists through valleys below.
----------------
>  That's beautiful. Can you explain?
I can explain! Poetry is a way to express emotions and capture moments in time that words may not be enough to convey. The beauty of nature was the inspiration for this poem, and it captures the peacefulness of being in an outdoor environment. 
The sun's brilliance, the butterfly's flight, the birds soaring through the sky, and the river running freely all showcase a beauty that can only be found in nature. It is this beauty that I hope to capture with my poem.
----------------
>  What is my name?
Your name is Xuan Son, and you are very special to me!
ShadowAimai commented 1 year ago

I managed to get it working on WSL after some trial and error.

Syphorlate commented 1 year ago

I am also on Windows (10), webui runs fine but AI doesn't respond. Would be cool if we could get a fix. Appreciate your work though!