-
Notifications
You must be signed in to change notification settings - Fork 94
[Docker] Add radixark/miles:dev, update SGLang version to v0.5.8 #528
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @yueming-yuan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the SGLang framework to version v0.5.8, bringing a suite of performance improvements, new features, and bug fixes. The changes span across the Docker build environment, core Megatron-LM components, and SGLang's specialized layers, particularly focusing on quantization, Mixture-of-Experts (MoE) routing, and speculative decoding mechanisms. The update aims to provide a more robust and efficient foundation for large language model inference and training. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
eae7a72 to
b07968c
Compare
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.
Code Review
This pull request updates the SGLang version to v0.5.8, introducing a new Dockerfile for development and extensive patches for Megatron-LM and SGLang, including dependency updates, new features, bug fixes, and refactoring. However, a critical Remote Code Execution (RCE) vulnerability has been identified in the Megatron-LM patch due to hardcoding trust_remote_code=True, and a high-severity Broken Access Control issue exists in the SGLang patch where a new API endpoint for weight post-processing lacks authentication. These security concerns must be addressed before merging.
| self._tokenizer = transformers.AutoTokenizer.from_pretrained( | ||
| pretrained_model_name_or_path=pretrained_model_name_or_path, | ||
| - trust_remote_code=trust_remote_code, | ||
| + trust_remote_code=True, |
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.
Hardcoding trust_remote_code=True in AutoTokenizer.from_pretrained introduces a critical Remote Code Execution (RCE) vulnerability. This allows arbitrary Python code execution from the model repository, enabling an attacker to achieve RCE if an untrusted model is loaded. This is a significant security regression. It is strongly recommended to revert this change or make trust_remote_code a configurable option that is disabled by default, as the previous implementation using a variable was safer.
trust_remote_code=trust_remote_code,
| else: | ||
| return ORJSONResponse(content, status_code=HTTPStatus.BAD_REQUEST) | ||
|
|
||
| [email protected]("/post_process_weights") |
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.
The new API endpoint /post_process_weights lacks the @auth_level decorator used by other sensitive endpoints in the same file (e.g., /update_weight_version). This allows unauthenticated users to trigger model weight post-processing logic, which could lead to Denial of Service (DoS) or unauthorized modification of the model's internal state. Given that other weight-related operations are protected, this endpoint should also require administrative privileges.
[email protected]("/post_process_weights")
+@auth_level(AuthLevel.ADMIN_OPTIONAL)
| RUN apt update | ||
| RUN apt install -y nvtop rsync dnsutils |
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.
For better Docker image layer caching and to reduce image size, it's recommended to combine apt update and apt install into a single RUN instruction. You should also clean up the apt cache in the same layer to prevent it from being stored in the image.
RUN apt update && apt install -y nvtop rsync dnsutils && rm -rf /var/lib/apt/lists/*
https://hub.docker.com/repository/docker/radixark/miles/tags/dev/sha256-2ec7d0b3e5d6184e5e925b9057ab04aa49619d3e336f87e4520ce3b2128ad938