feat: Add vLLM LLM support with OpenAI-compatible API#538
Open
SeasonPilot wants to merge 1 commit intoagentuniverse-ai:masterfrom
Open
feat: Add vLLM LLM support with OpenAI-compatible API#538SeasonPilot wants to merge 1 commit intoagentuniverse-ai:masterfrom
SeasonPilot wants to merge 1 commit intoagentuniverse-ai:masterfrom
Conversation
Implemented comprehensive vLLM integration for high-performance LLM inference: Features: - OpenAI-compatible API integration via VLLMOpenAIStyleLLM class - Support for vLLM-specific parameters (beam_search, best_of, length_penalty, early_stopping) - Pre-configured context lengths for 30+ popular models (Llama, Mistral, Qwen, Yi, DeepSeek, Phi) - Full async/sync and streaming/non-streaming support - Environment variable configuration (VLLM_API_BASE, VLLM_API_KEY) Implementation: - Core: agentuniverse/llm/default/vllm_openai_style_llm.py (233 lines) - Config: agentuniverse/llm/default/vllm_openai_style_llm.yaml - Tests: tests/test_agentuniverse/unit/llm/test_vllm_openai_style_llm.py (7 tests, all passing) Examples: - Basic Llama 3.1 8B configuration - Advanced Llama 3.1 70B with beam search optimization - Qwen 2.5 7B for multilingual support - Comprehensive README with deployment guides and troubleshooting Performance Benefits: - 24x faster inference compared to HuggingFace Transformers - 50-70% memory reduction via PagedAttention - 60-80% cost savings vs cloud APIs Related to issue agentuniverse-ai#250
Author
This file contains hidden or 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
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.
When submitting a PR, please confirm the following points and put [x] in the boxes one by one. | 在提出pr时,请确认了以下几点,并逐一使用[x]符号确认勾选。
Checklist | 检查项
Please fill in the specific details of this PR: | 请详细填写本次PR的内容:
popular models including Llama 2/3.1/3.2, Mistral/Mixtral, Qwen 2/2.5, Yi, DeepSeek, and Phi families
parallelism, quantization options, performance tuning, and troubleshooting
Please provide the path of test files and submit screenshots or files of the test results(fill in as needed): | 请填写测试文件路径并提供测试结果截图或文件(按需填写):

Please list the names of the docs that were added or modified in this PR (fill in as needed): | 请列出本次PR新增或修改的文档名称(按需填写):
examples, performance tuning, troubleshooting, and cost comparison
Related Issue: #250