forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 1
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
2024OSPP——基于AI网关实现AI模型的轻量化部署 #1
Merged
johnlanni
merged 11 commits into
higress-group:envoy-1.27
from
YJQ1101:yuanjq/envoy1.27/llm_inference_filter
Oct 8, 2024
Merged
2024OSPP——基于AI网关实现AI模型的轻量化部署 #1
johnlanni
merged 11 commits into
higress-group:envoy-1.27
from
YJQ1101:yuanjq/envoy1.27/llm_inference_filter
Oct 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
johnlanni
reviewed
Sep 11, 2024
johnlanni
reviewed
Sep 11, 2024
johnlanni
reviewed
Sep 11, 2024
johnlanni
reviewed
Sep 11, 2024
contrib/llm_inference/filters/http/source/llm_inference_filter.cc
Outdated
Show resolved
Hide resolved
johnlanni
reviewed
Sep 11, 2024
johnlanni
reviewed
Sep 11, 2024
…f request interrupt kvcache release twice
johnlanni
requested changes
Sep 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以加个 README.md 说明下 filter 的配置使用方式,使用注意事项等。性能也建议和ollama对比一下,看下相同模型相同问题相同并发下的资源开销对比,响应延时对比。
contrib/llm_inference/filters/http/source/inference/inference_context.cc
Outdated
Show resolved
Hide resolved
…and LoadEmbedding, Change LOG_INFO to ENVOY_LOG
johnlanni
requested changes
Sep 27, 2024
johnlanni
requested changes
Sep 27, 2024
johnlanni
approved these changes
Oct 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
简介
该功能实现在诸如个人电脑、普通的云主机上基于AI模型提供AI Web应用能力,具体来说,支持从本地文件加载模型,并解析HTTP请求,调用模型生成结果响应。https://summer-ospp.ac.cn/org/prodetail/241f80032?lang=zh&list=pro
实现
实现了一个 HTTP Filter,该filter会解析推理请求,并调用异步推理线程实现推理过程,同时给该异步线程一个回调函数,实现envoy的流式传输。
编译与运行
配置使用
filter级配置:
n_threads: 表示推理线程能用的最大线程数
n_parallel: 表示推理服务的最大并行请求数
chat_modelpath: 表示chat模型本地路径
embedding_modelpath: 表示embedding模型本地路径
router级配置:
usemodel: 表示使用的模型,模型名字与modelpath里面设置的要对应
first_byte_timeout: 表示首字节超时时间
inference_timeout: 表示总推理超时时间
支持模型
效果图