-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround selfhost Windows #14
Comments
I ran the method as written (but API server is external) and now I don't get any errors, but I only get the message below and it doesn't generate any code.
The request never arrived on the server. llm-vscode works fine, so it doesn't seem to be a server issue. Something doesn't seem to be sending the modifications to the server. |
Can you print the config? What appear in the llm-ls.log ? |
LlmSettingsPlugin.xml
Use port forwarding to forward requests to localhost to the server. Currently, the server is not receiving any requests. llm-ls.log
'파일 이름, 디렉터리 이름 또는 볼륨 레이블 구문이 잘못되었습니다.' is 'The filename, directory name, or volume label syntax is incorrect' in Korean Thanks to you, I found the error message. |
Hi I finally got it working and I'm going to share my step by step to make this work.
My system:
RTX 3060 12GB
CUDA 12.1
Windows 10
PHPSTORM 2023.2.4
Step 1 - Install TGI
Follow the step by step here: https://huggingface.co/docs/text-generation-inference/quicktour and make/test your docker
I'm using this rn:
docker run --gpus all --shm-size 1g -p 8080:80 -v C:/data:/data ghcr.io/huggingface/text-generation-inference:1.3 --model-id TheBloke/CodeLlama-7B-GPTQ --quantize gptq
Test it using:
curl http://127.0.0.1:8080/generate -X POST -d "{\"inputs\":\"What is Deep Learning?\",\"parameters\":{\"max_new_tokens\":20}}" -H "Content-Type: application/json"
Step 2 - Install the plugin
Install and configure, don't forget to update the model to the docker url:
Also set the log level to
info
.If something is missing/not working you can edit the config later here :
%appData%/JetBrains/ MY IDE /options/LlmSettingsPlugin.xml
Step 3 - PATH Hell
Right now the plugin ignore the llm-ls path setting on startup, so it always try to re-install from github, and to do so it is using some commands that not all windows machines have
llm-intellij/src/main/kotlin/co/huggingface/llmintellij/lsp/LlmLsLspServerDescriptor.kt
Lines 84 to 88 in 2972e33
So configure a new folder into your system path (mine C:/mybins/ )
Download/grab a random .exe ( please, don't use doom ), I grabbed the gzip windows bin here: https://gnuwin32.sourceforge.net/packages/gzip.htm .
And duplicate for these commands: chmod,gunzip,mv,rm Like this:
Step 4 - Restart the IDE and logs
Restart your IDE and open the logs:
%LOCALAPPDATA%/JetBrains/ MY IDE /log/idea.log
Look for something like this:
Get the file name (in this case
llm-ls-amd64-pc-windows-msvc-0.4.0
), rename the current llm-ls bin (the .exe file in the .zip) to match this file ( v0.4.0 Here ).Close the IDE, and put the new file in
%HOME%/.cache/llm_intellij/bin/
(or whatever path the log indicates )Step 5 - Open the IDE and test
Open a file, type something and wait ~3 seconds. It should trigger a request to the docker api.
You can check too in the llm-ls log
%HOME%/.cache/llm_ls/llm-ls.log
.It should look like this in the log:
And like this in the IDE:
Important notes
Right now there isn't so much info about the plugin, and this guide is a workaround for testing the plugin.
I didn't find a hotkey to ask to generate, or to make an manual input if you find it please tell me.
Good luck
The text was updated successfully, but these errors were encountered: