Conversation
Summary of ChangesHello @ouqingliang, 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 primarily introduces extensive documentation and support for running native precision models (BF16, FP8, INT4) within the KTransformers framework, leveraging SGLang and KT-Kernel. It includes a new, detailed tutorial covering setup, model inference, and technical considerations. Complementary code changes enhance the CPU backend's task distribution, improve the interactive chat client by displaying reasoning content, and ensure robust handling of FP8 model scales. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new tutorial for Native Precision Models with SGLang and KT-Kernel, along with updates to the README.md file. It also includes changes to the CPU worker pool logic, enhancements to the chat CLI for reasoning content, and a type conversion fix for FP8 scales. Overall, the changes are well-structured and add valuable documentation and functionality.
| } | ||
|
|
||
| int block = (rem + worker_count - 1) / worker_count; | ||
| block = 1; |
There was a problem hiding this comment.
Hardcoding block = 1 here overrides the previously calculated block size, which was determined based on the remaining tasks and worker count. This changes the work-stealing strategy from a guided approach (where block size dynamically adjusts) to a fixed block size of 1. This could potentially impact load balancing and overall performance, especially for tasks with varying granularities or when the number of workers is large. Please clarify the intent behind this change and its expected impact on performance.
|
|
||
| | Parameter | Description | | ||
| |-----------|-------------| | ||
| | `--kt-method` | Precision format: `BF16`, `FP8_PERCHANNEL`, `FP8`, `RAWINT4`, `AMXINT4` | |
There was a problem hiding this comment.
|
|
||
| ### Experts Scheduling | ||
|
|
||
| See [CPU-GPU Expert Scheduling Tutorial](./experts-sched-Tutorial.md) for details. |
There was a problem hiding this comment.
The link to the "CPU-GPU Expert Scheduling Tutorial" appears to be incorrect. It currently points to ./experts-sched-Tutorial.md, but based on the file structure, it should likely be ./CPU-GPU-Expert-Scheduling.md to correctly reference the file in the same directory.
| See [CPU-GPU Expert Scheduling Tutorial](./experts-sched-Tutorial.md) for details. | |
| See [CPU-GPU Expert Scheduling Tutorial](./CPU-GPU-Expert-Scheduling.md) for details. |
Removed GLM-4.7 Tutorial link from additional resources.
What does this PR do?
Add Native Precision Tutorial
update README.md
Before submitting