Skip to content
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

通过 Open-WebUI 使用 KTransformer #578

Open
TTThanos opened this issue Feb 21, 2025 · 3 comments
Open

通过 Open-WebUI 使用 KTransformer #578

TTThanos opened this issue Feb 21, 2025 · 3 comments

Comments

@TTThanos
Copy link

TTThanos commented Feb 21, 2025

请问这个无法选择模型是什么情况?
Image

外部链接已经设置成 http://localhost:8000/v1

Image

后端kTransformer服务启动命令:
USE_NUMA=1 python3 ./ktransformers/server/main.py --model_path /root/DeepSeek-R1-GGUF --gguf_path /root/DeepSeek-R1-GGUF/DeepSeek-R1-Q4_K_M/ --model_name deepseek_r1 --cpu_infer 65 --max_new_tokens 1000 --port 8000 --cache_lens 12288 --force_think true

WebUI docker创建命令:

docker run -it --net=host --ipc=host
-e ENABLE_OLLAMA_API=False
-e 0PENAI_API_BASE_URL=http://127.0.0.1:8000/v1
--name open-webui
ghcr.io/open-webui/open-webui:main

@TTThanos TTThanos changed the title 通过 WebUI 使用 KTransformer 通过 Open-WebUI 使用 KTransformer Feb 21, 2025
@manhere
Copy link

manhere commented Feb 21, 2025

应该是没实现模型列表接口

@yeungtuzi
Copy link

docker 里面访问不能使用localhost,注意kt要监听0.0.0.0,然后open-webui里面访问 http://host.docker.internal:8000/v1

@ginghalo
Copy link

ginghalo commented Feb 21, 2025

换成openai api ,然后再在ktransformers_root/ktransformers/server/api/openai/endpoints/chat.py 里改成comp = ChatCompletionObject(id=id,object='chat.completion',created=int(time()))
因为open-webui默认用的不是stream,而非stream模式在ollama api里目前不支持,且目前的openai api的非steam模式也有bug,要改一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants