文件最后提交记录最后更新时间
[Feature][Doc] Add AI QoS module, tuning tool, and user guide (#8706) ### What this PR does / why we need it? This PR adds **AI QoS** support for operator-facing tuning on Ascend: a **Python tool** to apply/undo and print UB switch–style configuration, **unit tests**, and an **English** user guide with platform and software constraints. - **csrc/ai_qos**: Exposes set_qos / get_qos, set_bw / get_bw, and fuse/global config helpers via **pybind11**; integrated into the build (**CMake** / **setup.py** as applicable in this tree). - **tools/ai_qos.py**: apply to snapshot baseline and program QoS state; unset to restore and remove state; supports auto/manual traffic priorities and prints command for UB switch configuration. - **tests/ut/test_ai_qos_tool.py**: Mocks torch.npu and vllm_ascend.ai_qos; covers device list, first-apply baseline reuse, and unset/restore. - **Docs** (`docs/source/user_guide/feature_guide/AI QoS Introduction_en.md`): Background, Auto/Manual usage, how to disable; **Usage constraints** including: - **AIV H2D / AIV D2D** host QoS: not effective with the current driver stack; delivery planned via module upgrade after driver support lands. - **Software**: **Ascend HDK 26.0.0+**, **LingQu**-based **UB switch** version as listed in the doc table. ### Does this PR introduce _any_ user-facing change? **Yes.** Operators get a new optional pre-inference step (`python tools/ai_qos.py / unset`) and a published English guide with version and **constraint** information. ### How was this patch tested? - pytest -sv tests/ut/test_ai_qos_tool.py (or full `pytest -sv tests/ut` as required by the project) - vLLM version: v0.19.0 - vLLM main: https://github.com/vllm-project/vllm/commit/6f786f2c506cb07f4566771fdc62e640e2c4a176 --------- Signed-off-by: gtl <gaotianlong6@h-partners.com> Co-authored-by: gtl <gaotianlong6@h-partners.com>22 天前
[Lint] Adapt lint tools for windows (#6727) ### What this PR does / why we need it? If users run bash format.sh with git bash on windows system, there exists Executable /bin/bash not found error. This is because in Windows Git Bash environment, the Bash executable is actually located at /usr/bin/bash, while the /bin directory may not exist, or may be just an empty directory or a broken symlink that does not contain bash. ### Does this PR introduce _any_ user-facing change? None ### How was this patch tested? With this PR and pre-commit installed, windows coders can directly run bash format.sh to clean lint issues. - vLLM version: v0.15.0 - vLLM main: https://github.com/vllm-project/vllm/commit/9562912cead1f11e8540fb91306c5cbda66f0007 Signed-off-by: whx-sjtu <2952154980@qq.com>3 个月前
[Feature][Doc] Add AI QoS module, tuning tool, and user guide (#8706) ### What this PR does / why we need it? This PR adds **AI QoS** support for operator-facing tuning on Ascend: a **Python tool** to apply/undo and print UB switch–style configuration, **unit tests**, and an **English** user guide with platform and software constraints. - **csrc/ai_qos**: Exposes set_qos / get_qos, set_bw / get_bw, and fuse/global config helpers via **pybind11**; integrated into the build (**CMake** / **setup.py** as applicable in this tree). - **tools/ai_qos.py**: apply to snapshot baseline and program QoS state; unset to restore and remove state; supports auto/manual traffic priorities and prints command for UB switch configuration. - **tests/ut/test_ai_qos_tool.py**: Mocks torch.npu and vllm_ascend.ai_qos; covers device list, first-apply baseline reuse, and unset/restore. - **Docs** (`docs/source/user_guide/feature_guide/AI QoS Introduction_en.md`): Background, Auto/Manual usage, how to disable; **Usage constraints** including: - **AIV H2D / AIV D2D** host QoS: not effective with the current driver stack; delivery planned via module upgrade after driver support lands. - **Software**: **Ascend HDK 26.0.0+**, **LingQu**-based **UB switch** version as listed in the doc table. ### Does this PR introduce _any_ user-facing change? **Yes.** Operators get a new optional pre-inference step (`python tools/ai_qos.py / unset`) and a published English guide with version and **constraint** information. ### How was this patch tested? - pytest -sv tests/ut/test_ai_qos_tool.py (or full `pytest -sv tests/ut` as required by the project) - vLLM version: v0.19.0 - vLLM main: https://github.com/vllm-project/vllm/commit/6f786f2c506cb07f4566771fdc62e640e2c4a176 --------- Signed-off-by: gtl <gaotianlong6@h-partners.com> Co-authored-by: gtl <gaotianlong6@h-partners.com>22 天前
[CI] add nightly case: Kimi-K2.5-W4A8, Qwen3.5-122B-A10B-w8a8 (#8790) ### What this PR does / why we need it? We run the nightly test case at a fixed period. add nightly case: Kimi-K2.5-W4A8, Qwen3.5-122B-A10B-w8a8 - vLLM version: v0.19.1 - vLLM main: https://github.com/vllm-project/vllm/commit/6f786f2c506cb07f4566771fdc62e640e2c4a176 --------- Signed-off-by: chen-commits <1636718796@qq.com> Signed-off-by: chen <1636718796@qq.com>27 天前
[Misc][Upgrade] Upgrade CANN to 9.0.0 and triton-ascend to 3.2.1 (#9085) Upgrade CANN to 9.0.0 and triton-ascend to 3.2.1 - vLLM version: v0.20.1 - vLLM main: https://github.com/vllm-project/vllm/commit/c7aa186d67b6f051680831418e957c67f34ba7a2 Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>16 天前
[CI] Solve the problems of slow download speed and UV (#9304) ### What this PR does / why we need it? 1. Replace triton-ascend source. 2. Add uv. ### Does this PR introduce _any_ user-facing change? Speed ​​up PR execution. ### How was this patch tested? Check the installation time of vllm-ascend in the pr. - vLLM version: v0.20.2 - vLLM main: https://github.com/vllm-project/vllm/commit/0d4d334eaa583b9c09aa4eb7538c22db99fd84b310 天前
[Lint]Add lint hooks for clang-format, shellcheck, forbidden imports, and boolean context manager checks (#7511) ### What this PR does / why we need it? This PR introduces several upstream vllm-aligned lint hooks into vllm-ascend and makes them part of the actual pre-commit flow. Main changes in this PR: - add check-boolean-context-manager to catch boolean expressions in with statements - add check-forbidden-imports to forbid direct re imports and disallowed direct triton imports - enable shell script linting through tools/shellcheck.sh - add root .clang-format aligned with upstream vllm, enable clang-format in pre-commit, temporarily **exclude all csrc/**** from clang-format to avoid bringing a large native code reformat into this PR This PR focuses on landing the smaller and immediately useful lint alignment first, without mixing in the larger requirements-management migration. ### Does this PR introduce _any_ user-facing change? No. This PR only updates repository lint configuration, static checks, and internal import/style enforcement. It does not change runtime behavior or public interfaces. ### How was this patch tested? Tested locally in the project virtual environment. Commands used: ```bash bash format.sh ``` Verified checks passed: ``` bash ruff check...............................................................Passed ruff format..............................................................Passed codespell................................................................Passed typos....................................................................Passed clang-format.............................................................Passed Lint GitHub Actions workflow files.......................................Passed Lint shell scripts.......................................................Passed Lint PNG exports from excalidraw.........................................Passed Check for spaces in all filenames........................................Passed Enforce __init__.py in Python packages...................................Passed Check for forbidden imports..............................................Passed Check for boolean ops in with-statements.................................Passed Suggestion...............................................................Passed - hook id: suggestion - duration: 0s To bypass pre-commit hooks, add --no-verify to git commit. ``` **note:** clang-format is enabled but currently excludes all csrc/** - vLLM version: v0.17.0 - vLLM main: https://github.com/vllm-project/vllm/commit/8b6325758cce5f9c36d38f2462edbd368b97a07c --------- Signed-off-by: MrZ20 <2609716663@qq.com>2 个月前
[CI] Add docs/yaml sync validation for model tutorial snippets (#7891) ### What this PR does / why we need it? This PR introduces a lightweight sync-check workflow to keep model tutorial snippets consistent with the YAML configuration files for model testing. This prevents model tutorial code snippets from becoming outdated or unusable over time. Specifically, it: - adds tools/check_docs_yaml_sync.py to validate {test} code blocks in model tutorial Markdown files against linked YAML targets for both environment variables and vllm serve commands - wires the checker into pre-commit as check-docs-yaml-sync - registers the test directive in Sphinx so the new metadata-bearing code blocks can still render correctly in docs; - migrates docs/source/tutorials/models/Kimi-K2-Thinking.md to the new sync-block format and links it to tests/e2e/nightly/single_node/models/configs/Kimi-K2-Thinking.yaml - adds a temporary exclude list in pyproject.toml for tutorial docs that have not been migrated yet #### Introduction of changes - Developers should write test cases concurrently with documentation and link them within the documentation using the following method: ```` ```{test} bash :sync-yaml: tests/e2e/nightly/single_node/models/configs/Kimi-K2-Thinking.yaml :sync-target: test_cases[0].envs :sync-class: env # it only compares environment variables that start with "export" export HCCL_BUFFSIZE=1024 # code comments do not affect the comparison results ``` ```` In the cmd module, sync_target can have multiple arguments, which will be concatenated into a single, continuous command. ```` ```{test} bash :sync-yaml: tests/e2e/nightly/single_node/models/configs/Kimi-K2-Thinking.yaml :sync-target: test_cases[0].model test_cases[0].server_cmd :sync-class: cmd vllm serve "moonshotai/Kimi-K2-Thinking" \ --tensor-parallel-size 16 \ --port $SERVER_PORT ``` ```` - If no corresponding test cases exist, the documentation should be added to the exclude list of pyproject.toml::[tool.check_docs_yaml_sync]. ``` bash [tool.check_docs_yaml_sync] exclude = [ "docs/source/tutorials/models/DeepSeek-R1.md", "docs/source/tutorials/models/DeepSeek-V3.1.md", ] ``` #### Test method ``` bash python3 check_docs_yaml_sync.py docs/*.md ``` or ``` bash pip install -r requirements-lint.txt bash format.sh ``` #### Falsed test example: <img width="1535" height="492" alt="image" src="https://github.com/user-attachments/assets/0e84710f-229f-46a3-9ed4-2f2101c3a606" /> #### Script Architecture The code is clearly broken down into 6 core modules + scheduling + CLI entry point: 1. **Core Data Types**: Defines synchronization blocks, error messages, and comparison data structures. 2. **Diagnostics and Reporting**: Color-coded logs and formatted error messages. 3. **Markdown Block Extraction**: Extracts code blocks with validation tags from .md files. 4. **Loading YAML and Locating configuration**: Reads YAML and parses paths to locate configuration items. 5. **Env Conversion/Command Conversion**: Converts documents/YAML to a unified comparison format (environment variables/command line). 6. **Data Comparison**: Compares the document and YAML content for consistency. 7. **Orchestration and Scheduling**: Integrate the entire process and schedule according to the sync_class type. 8. **CLI Entry**: Command-line invocation, passing in the .md file to be validated. ``` bash main └─ SyncLinter ├─ MarkdownBlockExtractor # Extract code blocks from an MD file ├─ SyncHandlerRegistry # Register two handlers—env and cmd—including converters and comparators. │ ├─ env -> SyncHandler │ │ ├─ DocEnvConverter # Convert Doc to a Unified Comparison Format │ │ ├─ YamlEnvConverter # Convert YAML to a Unified Comparison Format │ │ │ ├─ YamlDocumentLoader # Load and cache YAML files │ │ │ └─ YamlTargetResolver # Parse the path—for example, test_case[0].env │ │ └─ EnvComparator # Compare parameters in DOC and YAML files │ └─ cmd -> SyncHandler │ ├─ DocCmdConverter │ │ └─ VllmServeCommandParser │ ├─ YamlCmdConverter │ │ ├─ YamlDocumentLoader │ │ ├─ YamlTargetResolver │ │ └─ VllmServeCommandParser │ └─ CmdComparator └─ Diagnostic / merge_diagnostics_by_block / format # Terminal Output ``` ### Does this PR introduce _any_ user-facing change? No. This PR only adds internal documentation validation tooling and updates documentation authoring format. It does not change runtime behavior, APIs, or model execution logic. ### How was this patch tested? - vLLM version: v0.18.0 - vLLM main: https://github.com/vllm-project/vllm/commit/35141a7eeda941a60ad5a4956670c60fd5a77029 --------- Signed-off-by: MrZ20 <2609716663@qq.com>1 个月前
[Lint]Add lint hooks for clang-format, shellcheck, forbidden imports, and boolean context manager checks (#7511) ### What this PR does / why we need it? This PR introduces several upstream vllm-aligned lint hooks into vllm-ascend and makes them part of the actual pre-commit flow. Main changes in this PR: - add check-boolean-context-manager to catch boolean expressions in with statements - add check-forbidden-imports to forbid direct re imports and disallowed direct triton imports - enable shell script linting through tools/shellcheck.sh - add root .clang-format aligned with upstream vllm, enable clang-format in pre-commit, temporarily **exclude all csrc/**** from clang-format to avoid bringing a large native code reformat into this PR This PR focuses on landing the smaller and immediately useful lint alignment first, without mixing in the larger requirements-management migration. ### Does this PR introduce _any_ user-facing change? No. This PR only updates repository lint configuration, static checks, and internal import/style enforcement. It does not change runtime behavior or public interfaces. ### How was this patch tested? Tested locally in the project virtual environment. Commands used: ```bash bash format.sh ``` Verified checks passed: ``` bash ruff check...............................................................Passed ruff format..............................................................Passed codespell................................................................Passed typos....................................................................Passed clang-format.............................................................Passed Lint GitHub Actions workflow files.......................................Passed Lint shell scripts.......................................................Passed Lint PNG exports from excalidraw.........................................Passed Check for spaces in all filenames........................................Passed Enforce __init__.py in Python packages...................................Passed Check for forbidden imports..............................................Passed Check for boolean ops in with-statements.................................Passed Suggestion...............................................................Passed - hook id: suggestion - duration: 0s To bypass pre-commit hooks, add --no-verify to git commit. ``` **note:** clang-format is enabled but currently excludes all csrc/** - vLLM version: v0.17.0 - vLLM main: https://github.com/vllm-project/vllm/commit/8b6325758cce5f9c36d38f2462edbd368b97a07c --------- Signed-off-by: MrZ20 <2609716663@qq.com>2 个月前
[CI] Add pre-commit check for patch logger (#7446) ### What this PR does / why we need it? See https://github.com/vllm-project/vllm-ascend/pull/7402, pre-commit hook will forbid init_logger(__name__) in vllm_ascend patch modules - vLLM version: v0.17.0 - vLLM main: https://github.com/vllm-project/vllm/commit/8a680463fab3bc9e6760417cd5c0a6aa58283065 --------- Signed-off-by: wangli <wangli858794774@gmail.com>2 个月前
[CI][Lint] Restrict python-init check to tracked package directories (#7939) ### What this PR does / why we need it? This PR fixes a false positive in the python-init pre-commit hook by changing it to validate only Git-tracked Python package directories. Previously, tools/check_python_src_init.py walked all directories under the source tree. That included ignored or generated vendor paths, which could trigger failures for directories that are not part of the tracked source. For example, after running pip install -e ., some scripts are added under vllm_ascend/_cann_ops_custom, which causes `pre-commit run --all-files` to throw: ```bash Enforce __init__.py in Python packages....................................Failed - hook id: python-init - exit code: 1 ❌ Missing '__init__.py' files in the following Python package directories: - vllm_ascend/_cann_ops_custom/vendors/vllm-ascend/op_impl/ai_core/tbe/vllm-ascend_impl/dynamic ``` The hook now: - Collects tracked files using git ls-files for the target source directory. - Derives candidate package directories from tracked .py files. - Checks only those directories for missing init.py. - Keeps the previous os.walk fallback when git metadata is unavailable. This makes the hook consistent with repository tracking rules and avoids blocking commits on ignored/generated content. - vLLM version: v0.18.0 - vLLM main: https://github.com/vllm-project/vllm/commit/35141a7eeda941a60ad5a4956670c60fd5a77029 --------- Signed-off-by: Sijie Fu <fusijie@huawei.com> Signed-off-by: Sijie Fu <90576149+SijieFu@users.noreply.github.com> Co-authored-by: Sijie Fu <fusijie@huawei.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 个月前
[Lint] Adapt lint tools for windows (#6727) ### What this PR does / why we need it? If users run bash format.sh with git bash on windows system, there exists Executable /bin/bash not found error. This is because in Windows Git Bash environment, the Bash executable is actually located at /usr/bin/bash, while the /bin directory may not exist, or may be just an empty directory or a broken symlink that does not contain bash. ### Does this PR introduce _any_ user-facing change? None ### How was this patch tested? With this PR and pre-commit installed, windows coders can directly run bash format.sh to clean lint issues. - vLLM version: v0.15.0 - vLLM main: https://github.com/vllm-project/vllm/commit/9562912cead1f11e8540fb91306c5cbda66f0007 Signed-off-by: whx-sjtu <2952154980@qq.com>3 个月前
[CI][Docs] Add scheduled Sphinx link check for docs (#8273) ### What this PR does / why we need it? This PR adds a scheduled documentation link check workflow to catch broken links and unexpected redirects in the Sphinx docs on a regular basis. Main changes: - add a GitHub Actions workflow to run make -C docs linkcheck weekly and on manual trigger - configure Sphinx linkcheck options in docs/source/conf.py to reduce flaky CI failures - document how to run the docs link check locally and where to find the generated reports - fix link in docs This helps us detect documentation link issues earlier and makes docs maintenance more proactive and repeatable. In docs/source/community/**contributors.md**, delete: ``` | 17 | [@dependabot[bot]](https://github.com/dependabot[bot]) | 2025/02/27 | [a5564ed](https://github.com/vllm-project/vllm-ascend/commit/a5564ed5d8fd9818936a22d9ea35951a27513b4c) | | 149 | [@invalid-email-address](https://github.com/invalid-email-address) | 2025/09/14 | [c9da5de](https://github.com/vllm-project/vllm-ascend/commit/c9da5dea5c271187c0119848ede9c0518a0c41b2) | | 207 | [@Copilot](https://github.com/Copilot) | 2025/11/11 | [24bca67](https://github.com/vllm-project/vllm-ascend/commit/24bca674412b56418c94bda7d659105315505a8e) | | 292 | [@nomewang](https://github.com/nomewang) | 2026/01/12 | [348cdf9](https://github.com/vllm-project/vllm-ascend/commit/348cdf98aad7ae9b399bf8481fcf2bb3baa6a636) | ``` ### Does this PR introduce _any_ user-facing change? No user-facing runtime change. This only affects documentation validation and contributor workflow. ### How was this patch tested? - Verified the workflow definition and Sphinx linkcheck-related configuration changes - Added local usage instructions in: - docs/source/developer_guide/contribution/testing.md If needed, the check can be run locally with: ```bash make -C docs linkcheck SPHINXOPTS="-W --keep-going" ``` - vLLM version: - vLLM main: https://github.com/vllm-project/vllm/commit/v0.19.0 --------- Signed-off-by: MrZ20 <2609716663@qq.com>1 个月前
[Lint]Add lint hooks for clang-format, shellcheck, forbidden imports, and boolean context manager checks (#7511) ### What this PR does / why we need it? This PR introduces several upstream vllm-aligned lint hooks into vllm-ascend and makes them part of the actual pre-commit flow. Main changes in this PR: - add check-boolean-context-manager to catch boolean expressions in with statements - add check-forbidden-imports to forbid direct re imports and disallowed direct triton imports - enable shell script linting through tools/shellcheck.sh - add root .clang-format aligned with upstream vllm, enable clang-format in pre-commit, temporarily **exclude all csrc/**** from clang-format to avoid bringing a large native code reformat into this PR This PR focuses on landing the smaller and immediately useful lint alignment first, without mixing in the larger requirements-management migration. ### Does this PR introduce _any_ user-facing change? No. This PR only updates repository lint configuration, static checks, and internal import/style enforcement. It does not change runtime behavior or public interfaces. ### How was this patch tested? Tested locally in the project virtual environment. Commands used: ```bash bash format.sh ``` Verified checks passed: ``` bash ruff check...............................................................Passed ruff format..............................................................Passed codespell................................................................Passed typos....................................................................Passed clang-format.............................................................Passed Lint GitHub Actions workflow files.......................................Passed Lint shell scripts.......................................................Passed Lint PNG exports from excalidraw.........................................Passed Check for spaces in all filenames........................................Passed Enforce __init__.py in Python packages...................................Passed Check for forbidden imports..............................................Passed Check for boolean ops in with-statements.................................Passed Suggestion...............................................................Passed - hook id: suggestion - duration: 0s To bypass pre-commit hooks, add --no-verify to git commit. ``` **note:** clang-format is enabled but currently excludes all csrc/** - vLLM version: v0.17.0 - vLLM main: https://github.com/vllm-project/vllm/commit/8b6325758cce5f9c36d38f2462edbd368b97a07c --------- Signed-off-by: MrZ20 <2609716663@qq.com>2 个月前
[Lint] Adapt lint tools for windows (#6727) ### What this PR does / why we need it? If users run bash format.sh with git bash on windows system, there exists Executable /bin/bash not found error. This is because in Windows Git Bash environment, the Bash executable is actually located at /usr/bin/bash, while the /bin directory may not exist, or may be just an empty directory or a broken symlink that does not contain bash. ### Does this PR introduce _any_ user-facing change? None ### How was this patch tested? With this PR and pre-commit installed, windows coders can directly run bash format.sh to clean lint issues. - vLLM version: v0.15.0 - vLLM main: https://github.com/vllm-project/vllm/commit/9562912cead1f11e8540fb91306c5cbda66f0007 Signed-off-by: whx-sjtu <2952154980@qq.com>3 个月前
[Lint] Adapt lint tools for windows (#6727) ### What this PR does / why we need it? If users run bash format.sh with git bash on windows system, there exists Executable /bin/bash not found error. This is because in Windows Git Bash environment, the Bash executable is actually located at /usr/bin/bash, while the /bin directory may not exist, or may be just an empty directory or a broken symlink that does not contain bash. ### Does this PR introduce _any_ user-facing change? None ### How was this patch tested? With this PR and pre-commit installed, windows coders can directly run bash format.sh to clean lint issues. - vLLM version: v0.15.0 - vLLM main: https://github.com/vllm-project/vllm/commit/9562912cead1f11e8540fb91306c5cbda66f0007 Signed-off-by: whx-sjtu <2952154980@qq.com>3 个月前
[Lint] Adapt lint tools for windows (#6727) ### What this PR does / why we need it? If users run bash format.sh with git bash on windows system, there exists Executable /bin/bash not found error. This is because in Windows Git Bash environment, the Bash executable is actually located at /usr/bin/bash, while the /bin directory may not exist, or may be just an empty directory or a broken symlink that does not contain bash. ### Does this PR introduce _any_ user-facing change? None ### How was this patch tested? With this PR and pre-commit installed, windows coders can directly run bash format.sh to clean lint issues. - vLLM version: v0.15.0 - vLLM main: https://github.com/vllm-project/vllm/commit/9562912cead1f11e8540fb91306c5cbda66f0007 Signed-off-by: whx-sjtu <2952154980@qq.com>3 个月前
[CI][Misc] Use offline mode for model downloads (#7179) ### What this PR does / why we need it? 1. For all parts of the current test module involving the millisecond download model, add the local_file_only parameter to specify offline mode; this ensures that CI will not fail due to network instability. 2. Install modelscope from a fixed commit until it next release ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? check if the env or arg local_files_only works 1) set the env: ```shell export HF_HUB_OFFLINE=1 ``` 2) run the script ```python from transformers import PretrainedConfig import huggingface_hub from modelscope.utils.hf_util import patch_hub patch_hub() model="Qwen/Qwen3-0.6B" kwargs = {} config_dict, _ = PretrainedConfig.get_config_dict( model, trust_remote_code=True, local_files_only=huggingface_hub.constants.HF_HUB_OFFLINE, **kwargs, ) print(config_dict) ``` it works well: ```shell 2026-03-06 06:40:12,546 - modelscope - WARNING - We can not confirm the cached file is for revision: master The argument trust_remote_code is to be used with Auto classes. It has no effect here and is ignored. {'architectures': ['Qwen3ForCausalLM'], 'attention_bias': False, 'attention_dropout': 0.0, 'bos_token_id': 151643, 'eos_token_id': 151645, 'head_dim': 128, 'hidden_act': 'silu', 'hidden_size': 1024, 'initializer_range': 0.02, 'intermediate_size': 3072, 'max_position_embeddings': 40960, 'max_window_layers': 28, 'model_type': 'qwen3', 'num_attention_heads': 16, 'num_hidden_layers': 28, 'num_key_value_heads': 8, 'rms_norm_eps': 1e-06, 'rope_scaling': None, 'rope_theta': 1000000, 'sliding_window': None, 'tie_word_embeddings': True, 'torch_dtype': 'bfloat16', 'transformers_version': '4.51.0', 'use_cache': True, 'use_sliding_window': False, 'vocab_size': 151936, '_commit_hash': None} ``` 3) test the model repo does not cached locally when the env HF_HUB_OFFLINE==True ```python from transformers import PretrainedConfig import huggingface_hub from modelscope.utils.hf_util import patch_hub patch_hub() model="FireRedTeam/FireRed-OCR" kwargs = {} config_dict, _ = PretrainedConfig.get_config_dict( model, trust_remote_code=True, local_files_only=huggingface_hub.constants.HF_HUB_OFFLINE, **kwargs, ) print(config_dict) ``` and the result is as expected: ```shell File "/workspace/demo.py", line 12, in <module> config_dict, _ = PretrainedConfig.get_config_dict( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/python3.11.14/lib/python3.11/site-packages/modelscope/utils/hf_util/patcher.py", line 189, in patch_get_config_dict model_dir = get_model_dir(pretrained_model_name_or_path, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/python3.11.14/lib/python3.11/site-packages/modelscope/utils/hf_util/patcher.py", line 164, in get_model_dir model_dir = snapshot_download( ^^^^^^^^^^^^^^^^^^ File "/usr/local/python3.11.14/lib/python3.11/site-packages/modelscope/hub/snapshot_download.py", line 137, in snapshot_download return _snapshot_download( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/python3.11.14/lib/python3.11/site-packages/modelscope/hub/snapshot_download.py", line 283, in _snapshot_download raise ValueError( ValueError: Cannot find the requested files in the cached path and outgoing traffic has been disabled. To enable look-ups and downloads online, set 'local_files_only' to False ``` - vLLM version: v0.16.0 - vLLM main: https://github.com/vllm-project/vllm/commit/15d76f74e2fdb12a95ea00f0ca283acf6219a2b7 --------- Signed-off-by: wangli <wangli858794774@gmail.com>2 个月前
[Lint]Style: Convert root, benchmarks, tools and docs to ruff format (#5843) ### What this PR does / why we need it? Description This PR fixes linting issues in the root directory, benchmarks/, tools/ and docs/ to align with the project's Ruff configuration. This is part of a gradual effort to enable full linting coverage across the repository. The corresponding paths have been removed from the exclude list in pyproject.toml. ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.13.0 - vLLM main: https://github.com/vllm-project/vllm/commit/2f4e6548efec402b913ffddc8726230d9311948d --------- Signed-off-by: root <root@LAPTOP-VQKDDVMG.localdomain> Co-authored-by: root <root@LAPTOP-VQKDDVMG.localdomain>4 个月前
[Lint]Add lint hooks for clang-format, shellcheck, forbidden imports, and boolean context manager checks (#7511) ### What this PR does / why we need it? This PR introduces several upstream vllm-aligned lint hooks into vllm-ascend and makes them part of the actual pre-commit flow. Main changes in this PR: - add check-boolean-context-manager to catch boolean expressions in with statements - add check-forbidden-imports to forbid direct re imports and disallowed direct triton imports - enable shell script linting through tools/shellcheck.sh - add root .clang-format aligned with upstream vllm, enable clang-format in pre-commit, temporarily **exclude all csrc/**** from clang-format to avoid bringing a large native code reformat into this PR This PR focuses on landing the smaller and immediately useful lint alignment first, without mixing in the larger requirements-management migration. ### Does this PR introduce _any_ user-facing change? No. This PR only updates repository lint configuration, static checks, and internal import/style enforcement. It does not change runtime behavior or public interfaces. ### How was this patch tested? Tested locally in the project virtual environment. Commands used: ```bash bash format.sh ``` Verified checks passed: ``` bash ruff check...............................................................Passed ruff format..............................................................Passed codespell................................................................Passed typos....................................................................Passed clang-format.............................................................Passed Lint GitHub Actions workflow files.......................................Passed Lint shell scripts.......................................................Passed Lint PNG exports from excalidraw.........................................Passed Check for spaces in all filenames........................................Passed Enforce __init__.py in Python packages...................................Passed Check for forbidden imports..............................................Passed Check for boolean ops in with-statements.................................Passed Suggestion...............................................................Passed - hook id: suggestion - duration: 0s To bypass pre-commit hooks, add --no-verify to git commit. ``` **note:** clang-format is enabled but currently excludes all csrc/** - vLLM version: v0.17.0 - vLLM main: https://github.com/vllm-project/vllm/commit/8b6325758cce5f9c36d38f2462edbd368b97a07c --------- Signed-off-by: MrZ20 <2609716663@qq.com>2 个月前
[Lint] Adapt lint tools for windows (#6727) ### What this PR does / why we need it? If users run bash format.sh with git bash on windows system, there exists Executable /bin/bash not found error. This is because in Windows Git Bash environment, the Bash executable is actually located at /usr/bin/bash, while the /bin directory may not exist, or may be just an empty directory or a broken symlink that does not contain bash. ### Does this PR introduce _any_ user-facing change? None ### How was this patch tested? With this PR and pre-commit installed, windows coders can directly run bash format.sh to clean lint issues. - vLLM version: v0.15.0 - vLLM main: https://github.com/vllm-project/vllm/commit/9562912cead1f11e8540fb91306c5cbda66f0007 Signed-off-by: whx-sjtu <2952154980@qq.com>3 个月前
[Refactor][Misc] Use lazy formatting for log (#8756) ### What this PR does / why we need it? This PR replaces eager log message formatting with lazy logging formatting across the repository. - Converts logger.*(f"...") and logging.*(f"...") calls to lazy %-style logging arguments. - Replaces deprecated logger.warn(...) usage with logger.warning(...). - Adds logger.isEnabledFor(logging.DEBUG) guards for debug logs whose arguments include function or method calls. - Enables Ruff G004 enforcement by removing it from ignore and registering vllm.logger.logger as a logger object. This avoids unnecessary string formatting and expensive argument evaluation when the corresponding log level is disabled. ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.19.0 - vLLM main: https://github.com/vllm-project/vllm/commit/6f786f2c506cb07f4566771fdc62e640e2c4a176 --------- Signed-off-by: MrZ20 <2609716663@qq.com>1 个月前