Skip to content

[None][docs] add required --model_dir and --spec_decode_algo to ngram README - #18566

Open
imitater-dou wants to merge 1 commit into
NVIDIA:mainfrom
imitater-dou:docs/fix-ngram-readme-usage
Open

[None][docs] add required --model_dir and --spec_decode_algo to ngram README#18566
imitater-dou wants to merge 1 commit into
NVIDIA:mainfrom
imitater-dou:docs/fix-ngram-readme-usage

Conversation

@imitater-dou

@imitater-dou imitater-dou commented Sep 2, 2026

Copy link
Copy Markdown

Summary

The NGram example README Usage command for examples/llm-api/quickstart_advanced.py was missing required --model_dir and did not set --spec_decode_algo NGRAM, so copy-pasting the snippet fails argparse and never enables NGram (algo defaults to None).

Repro

  1. On current main, open examples/ngram/README.md Usage bash block: it only passes --spec_decode_max_draft_len, --max_matching_ngram_size, and two disable flags.
  2. In examples/llm-api/quickstart_advanced.py, --model_dir is required=True.
  3. --spec_decode_algo defaults to None; NGram is only configured when spec_decode_algo == "NGRAM".
  4. Running the documented command therefore errors on missing --model_dir, and even with a model path would not select NGram.

Change

Update the Usage command to include --model_dir <MODEL_DIR> and --spec_decode_algo NGRAM.

Test plan

  • Confirmed README Usage lacked both flags vs CLI on HEAD
  • Confirmed NGRAM branch in quickstart_advanced.py builds NGramDecodingConfig
  • Docs-only; no runtime suite required

Dev Engineer Review

  • Updated examples/ngram/README.md with required --model_dir <MODEL_DIR>.
  • Set --spec_decode_algo NGRAM explicitly.
  • The documented command now passes argument parsing and enables NGram decoding.
  • No API, configuration, performance, or error-handling changes.

QA Engineer Review

No test changes.

… README

Signed-off-by: ADou <ikun3.1415927@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7a8db4da-46d5-456d-b0f8-a6debe72e033

📥 Commits

Reviewing files that changed from the base of the PR and between 181f726 and b1725ef.

📒 Files selected for processing (1)
  • examples/ngram/README.md

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

The NGram README command now includes explicit --model_dir <MODEL_DIR> and --spec_decode_algo NGRAM arguments.

Changes

NGram example documentation

Layer / File(s) Summary
Update NGram example command
examples/ngram/README.md
The example command specifies the model directory and selects the NGram speculative decoding algorithm.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to b1725

This documentation-only change makes the NGram example command runnable and ensures it selects the intended algorithm; no actionable merge-blocking risk remains.

Suggested reviewers: bowenfu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies a documentation change that adds the required NGram command arguments. It follows the repository format with [None][docs].
Description check ✅ Passed The description clearly explains the issue, the affected command, the exact documentation change, and the test plan. It does not reproduce the template headings or checklist, but it provides the requi…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the issue, the affected command, the exact documentation change, and the test plan. It does not reproduce the template headings or checklist, but it provides the required context and is sufficiently complete for this documentation-only change.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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.

1 participant