Skip to content

[Speculative Decoding] Remove arctic_inference deps#7231

Merged
Jiang-Jia-Jun merged 1 commit intoPaddlePaddle:developfrom
Deleter-D:dev_remove_suffix_deps
Apr 8, 2026
Merged

[Speculative Decoding] Remove arctic_inference deps#7231
Jiang-Jia-Jun merged 1 commit intoPaddlePaddle:developfrom
Deleter-D:dev_remove_suffix_deps

Conversation

@Deleter-D
Copy link
Copy Markdown
Collaborator

Motivation

💡 If this PR is a Cherry Pick, the PR title needs to follow the format by adding the [Cherry-Pick] label at the very beginning and appending the original PR ID at the end. For example, [Cherry-Pick][CI] Add check trigger and logic(#5191)

💡 如若此PR是Cherry Pick,PR标题需遵循格式,在最开始加上[Cherry-Pick]标签,以及最后面加上原PR ID,例如[Cherry-Pick][CI] Add check trigger and logic(#5191)

Modifications

Usage or Command

Accuracy Tests

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link
Copy Markdown

paddle-bot bot commented Apr 8, 2026

Thanks for your contribution!

Copy link
Copy Markdown

@fastdeploy-bot fastdeploy-bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Code Review | 2026-04-08

📋 Review 摘要

PR 概述:将 arctic_inference 从硬依赖改为可选依赖,仅在 Suffix Decoding 功能使用时按需安装

变更范围fastdeploy/spec_decode/suffix.pyrequirements.txt

影响面 Tag[Speculative Decoding]


📝 PR 规范检查

  1. 标题:符合规范,包含 [Speculative Decoding] 标签
  2. 描述## Motivation## Modifications 段落为空,建议填写

描述模板(可直接复制):

## Motivation`arctic_inference` 从硬依赖改为可选依赖,减少不必要的依赖安装。只有使用 Suffix Decoding 功能时才需要安装此包。

## Modifications
- 从 requirements.txt 中移除 arctic_inference 硬依赖
- 更新 SuffixProposer 的错误提示,明确安装命令和版本号

问题

级别 文件 概述
🟡 建议 fastdeploy/spec_decode/suffix.py:46 版本号不一致:错误信息指定 0.1.2,但原依赖是 0.1.3

📄 文档建议(本次 PR 未包含)

虽然本次 PR 未修改文档文件,但建议后续更新文档说明 Suffix Decoding 的依赖安装:

  • docs/features/speculative_decoding.md: 在 "🌲 Using Suffix Decoding" 章节添加依赖说明
  • docs/zh/features/speculative_decoding.md: 在 "🌲 使用后缀解码" 章节添加依赖说明

建议添加内容:

> Note: Suffix Decoding requires the `arctic-inference` package. Install it with:
> ```bash
> pip install arctic-inference==<正确版本号>
> ```

总体评价

arctic_inference 从硬依赖改为可选依赖的方案合理,使用 try-except 导入模式优雅处理缺失依赖的情况。但存在版本号不一致的问题,建议确认正确的版本号并统一更新错误提示信息。

if SuffixDecodingCache is None:
raise ImportError(
"arctic_inference.suffix_decoding is not available. Please install arctic-inference package."
"arctic_inference.suffix_decoding is not available. Please install via `pip install arctic-inference==0.1.2`."
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 建议 版本号不一致:错误信息中指定的是 arctic-inference==0.1.2,但原 requirements.txt 使用的是 arctic_inference-0.1.3 版本。请确认正确的版本号并保持一致。

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@8496ec7). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #7231   +/-   ##
==========================================
  Coverage           ?   73.59%           
==========================================
  Files              ?      383           
  Lines              ?    53493           
  Branches           ?     8375           
==========================================
  Hits               ?    39367           
  Misses             ?    11381           
  Partials           ?     2745           
Flag Coverage Δ
GPU 73.59% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jiang-Jia-Jun Jiang-Jia-Jun merged commit aa23e0f into PaddlePaddle:develop Apr 8, 2026
51 of 56 checks passed
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.

5 participants