From 45be1aac0c143116035a3e96742cd656a864fd96 Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Fri, 20 Jun 2025 16:48:14 +0800 Subject: [PATCH] [CI] Add codespell check for doc (#1314) Add codespell check test for doc only PR Signed-off-by: wangxiyuan --- .github/doc_codespell.yaml | 33 ++++++++++++++++++++++++++ docs/source/user_guide/quantization.md | 8 +++---- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 .github/doc_codespell.yaml diff --git a/.github/doc_codespell.yaml b/.github/doc_codespell.yaml new file mode 100644 index 0000000..3b7a9d2 --- /dev/null +++ b/.github/doc_codespell.yaml @@ -0,0 +1,33 @@ + +name: 'doc-codespell' + +on: + pull_request: + branches: + - 'main' + - '*-dev' + paths: + - 'docs/**' + +jobs: + codespell: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements-lint.txt + - name: Run codespell check + run: | + CODESPELL_EXCLUDES=('--skip' 'tests/prompts/**,./benchmarks/sonnet.txt,*tests/lora/data/**,build/**,./vllm_ascend.egg-info/**') + CODESPELL_IGNORE_WORDS=('-L' 'CANN,cann,NNAL,nnal,ASCEND,ascend,EnQue,CopyIn') + + codespell --toml pyproject.toml "${CODESPELL_EXCLUDES[@]}" "${CODESPELL_IGNORE_WORDS[@]}" diff --git a/docs/source/user_guide/quantization.md b/docs/source/user_guide/quantization.md index 1e759e5..e203e66 100644 --- a/docs/source/user_guide/quantization.md +++ b/docs/source/user_guide/quantization.md @@ -8,7 +8,7 @@ Since 0.9.0rc2 version, quantization feature is experimentally supported in vLLM To quantize a model, users should install [ModelSlim](https://gitee.com/ascend/msit/blob/master/msmodelslim/README.md) which is the Ascend compression and acceleration tool. It is an affinity-based compression tool designed for acceleration, using compression as its core technology and built upon the Ascend platform. -Currently, only the specific tag [modelslim-VLLM-8.1.RC1.b020_001](https://gitee.com/ascend/msit/blob/modelslim-VLLM-8.1.RC1.b020_001/msmodelslim/README.md) of modelslim works with vLLM Ascend. Please do not install other version until modelslim master version is avaliable for vLLM Ascend in the future. +Currently, only the specific tag [modelslim-VLLM-8.1.RC1.b020_001](https://gitee.com/ascend/msit/blob/modelslim-VLLM-8.1.RC1.b020_001/msmodelslim/README.md) of modelslim works with vLLM Ascend. Please do not install other version until modelslim master version is available for vLLM Ascend in the future. Install modelslim: ```bash @@ -34,7 +34,7 @@ You can also download the quantized model that we uploaded. Please note that the Once convert action is done, there are two important files generated. -1. [confg.json](https://www.modelscope.cn/models/vllm-ascend/DeepSeek-V2-Lite-W8A8/file/view/master/config.json?status=1). Please make sure that there is no `quantization_config` field in it. +1. [config.json](https://www.modelscope.cn/models/vllm-ascend/DeepSeek-V2-Lite-W8A8/file/view/master/config.json?status=1). Please make sure that there is no `quantization_config` field in it. 2. [quant_model_description.json](https://www.modelscope.cn/models/vllm-ascend/DeepSeek-V2-Lite-W8A8/file/view/master/quant_model_description.json?status=1). All the converted weights info are recorded in this file. @@ -77,7 +77,7 @@ sampling_params = SamplingParams(temperature=0.6, top_p=0.95, top_k=40) llm = LLM(model="{quantized_model_save_path}", max_model_len=2048, trust_remote_code=True, - # Enable quantization by specifing `quantization="ascend"` + # Enable quantization by specifying `quantization="ascend"` quantization="ascend") outputs = llm.generate(prompts, sampling_params) @@ -90,7 +90,7 @@ for output in outputs: ### Online inference ```bash -# Enable quantization by specifing `--quantization ascend` +# Enable quantization by specifying `--quantization ascend` vllm serve {quantized_model_save_path} --served-model-name "deepseek-v2-lite-w8a8" --max-model-len 2048 --quantization ascend --trust-remote-code ```