Skip to content

Conversation

@Yank000
Copy link

@Yank000 Yank000 commented Dec 26, 2025

No description provided.

@XuZhang99 XuZhang99 changed the title docs: add code structure documentation docs: add code structure documentation. Dec 29, 2025
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add Chinese version.

@zhang-minchao
Copy link
Collaborator

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 introduces comprehensive documentation on the core modules and architecture of the xLLM system. The document is well-structured and detailed, providing a valuable technical overview. My review focuses on improving the clarity and accuracy of the information presented. I've pointed out a minor inconsistency in code paths within the summary table and a potential inaccuracy in a method name description for the Worker module. Overall, this is a great addition to the project's documentation.


| Module Name | Code Path | Core Functionality | Key Responsibilities |
| :--- | :--- | :--- | :--- |
| **APIService** | `api_service/` | External Interface Service | Receives external requests (e.g., OpenAI-compatible API calls), translates them into the internal request format, and forwards them to the Master. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency, it's better to use specific file paths in the 'Code Path' column of the table, rather than directory paths. The detailed description for APIService already points to api_service/api_service.cpp as the entry point.

Suggested change
| **APIService** | `api_service/` | External Interface Service | Receives external requests (e.g., OpenAI-compatible API calls), translates them into the internal request format, and forwards them to the Master. |
| **APIService** | `api_service/api_service.cpp` | External Interface Service | Receives external requests (e.g., OpenAI-compatible API calls), translates them into the internal request format, and forwards them to the Master. |


**Code Entry Point**: `core/runtime/llm_worker_impl.cpp`

* **Local Resource Management**: The Worker is responsible for allocating the local physical memory for the KV Cache (`allocate_kv_cache`) during its initialization phase.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation mentions that the Worker is responsible for allocating KV Cache via the allocate_kv_cache method. However, this method doesn't seem to exist in core/runtime/llm_worker_impl.cpp. Please verify if the method name is correct or if it belongs to a base class, and update the documentation accordingly for accuracy.

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

Successfully merging this pull request may close these issues.

3 participants