Skip to content

[DO NOT MERGE] Avoid default external prefill chunking for Nemotron Bolt - #1312

Open
bmehta001 wants to merge 1 commit into
mainfrom
fix/bolt-prefill-default
Open

bmehta001 wants to merge 1 commit into
mainfrom
fix/bolt-prefill-default

Conversation

@bmehta001

Copy link
Copy Markdown
Contributor

Summary

Do not inject the default external chunk_size=2048 for model.type="nemotron_bolt". Bolt manages prefill internally, and ORT GenAI rejects external chunking when creating its generator.

Preserve explicitly configured chunking and the existing defaults for other model types. Add focused regression tests using the checked-in tiny CPU model, without GPU dependencies, model downloads, or skipped cases.

Validation

  • Linux Release: ./foundry_local_tests '--gtest_filter=ChunkedPrefillOptionsTest.*:SearchOptionsParsingTest.*:DynamicEngineChatTest.*' — 41 passed, zero skipped/disabled.
  • Windows RelWithDebInfo, Visual Studio 2026, compatible cached SDK CI dependencies: .\foundry_local_tests.exe '--gtest_filter=ChunkedPrefillOptionsTest.*:SearchOptionsParsingTest.*:DynamicEngineChatTest.*' — 41 passed, zero skipped/disabled.
  • Negative regression: the new Bolt test fails against the unmodified implementation because the resulting chunk size is 2048 rather than zero.
  • Changed-range clang-format --dry-run --Werror checks and git diff --check — passed.
  • H100 integration with [TEST ONLY] Consolidated Bolt stack for Microsoft benchmarking onnxruntime#33991 and Test: consolidate Bolt onnxruntime-genai#2911: an unchanged Bolt model configuration completed a 21-token reply with finishReason="stop".

Scope

The H100 smoke used greedy decoding and the standalone CUDA EP. The custom launcher also disabled cuDNN flash attention to avoid a separate allocation-during-CUDA-graph-capture failure. This PR changes only Foundry's default prefill policy and its tests; it does not change CUDA packaging, attention dispatch, or sampling defaults.

Bolt manages prefill internally and rejects external chunk_size settings.
Preserve its model default while retaining explicit settings and the existing
default chunking policy for other decoder types.

Files changed:
- sdk_v2/cpp/src/inferencing/generative/chat/search_options.cc
- sdk_v2/cpp/test/internal_api/chat/search_options_test.cc

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3b7a6cfe-bac8-4d81-a588-6eb681fdf36d
Copilot AI balanced review requested due to automatic review settings November 10, 2026 03:00
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
foundry-local Ready Ready Preview Nov 10, 2026 3:00am UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the changes to Nemotron Bolt’s prefill defaults.

No open issues 🎉

What changed in this PR

This PR adjusts Foundry Local’s prefill defaults for Nemotron Bolt, which manages prefill internally and rejects external chunking.

Changes:

  • Avoid injecting the default chunk_size=2048 for nemotron_bolt.
  • Preserve positive, explicitly configured chunk sizes and existing defaults for other model types.
  • Add focused regression tests using the checked-in tiny CPU model, without GPU dependencies or model downloads.
File Description
sdk_v2/​cpp/​test/​internal_api/​chat/​search_options_test.cc Adds CPU-backed tests for Bolt, other-model defaults, and explicit chunk sizes.
sdk_v2/​cpp/​src/​inferencing/​generative/​chat/​search_options.cc Excludes Bolt from default external prefill chunking.

Review effort: Balanced

@bmehta001 bmehta001 changed the title Avoid default external prefill chunking for Nemotron Bolt [DO NOT MERGE] Avoid default external prefill chunking for Nemotron Bolt Nov 10, 2026
@rui-ren
Rui Ren (rui-ren) self-requested a review November 10, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 48145e5c Deployed Nov 10, 2026 by vercel[bot]
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.

2 participants