Skip to content

Preserve Nemotron Bolt's configured greedy default - #1315

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

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

Conversation

@bmehta001

Copy link
Copy Markdown
Contributor

Why

Nemotron Bolt's decoder supports greedy search, and its model configuration sets do_sample=false. When a caller omits temperature, Foundry's Generator path nevertheless sets do_sample=true, overriding that supported model default and causing generation to fail.

Changes

Preserve the model's sampling default for nemotron_bolt when the caller leaves sampling policy unspecified. An omitted or neutral temperature=1 therefore no longer enables sampling. Explicit non-neutral temperatures are still forwarded and remain subject to GenAI validation; other models retain Foundry's established sampling default.

Add three regression tests using the checked-in tiny CPU decoder: omitted/neutral temperature, explicit sampling, and unchanged defaults for other models. No downloads or GPU are required.

This is independent of #1296 and #1312: it does not change native tool protocols or prefill chunking. The nullable-schema issue introduced by the native projection is documented separately in this comment.

Validation

Fresh main-based builds, rather than only the combined Bolt integration branch:

Used the existing cached CI dependencies on Windows and custom runtime dependencies on Linux; no dependency pins changed.

Platform Result
Linux Release 52 focused tests passed; zero skipped or disabled
Windows RelWithDebInfo, Visual Studio 2026 52 focused tests passed; zero skipped or disabled

From the corresponding test binary directory:

.\foundry_local_tests.exe --gtest_filter="ModelSamplingOptionsTest.*:SamplingPlanTest.*:SearchOptionsParsingTest.*:DynamicEngineChatTest.*"
./foundry_local_tests --gtest_filter="ModelSamplingOptionsTest.*:SamplingPlanTest.*:SearchOptionsParsingTest.*:DynamicEngineChatTest.*"

On Linux, the new default-policy test was also run before applying the production fix: it failed for both omitted and neutral temperature because do_sample became true. After the fix, all three new tests and the related sampling/parser/Engine tests passed.

Changed-range clang-format 20 and git diff --check passed. No warning suppressions or test exclusions were added. The full model-dependent suite was not run.

An initial Windows Debug attempt was blocked by the existing cpp-httplib C4702 diagnostic (unreachable fallback after a throw with exceptions enabled). The normal RelWithDebInfo configuration was used instead, without disabling warnings.

Avoid enabling unsupported sampling when callers leave sampling policy unset.
Keep explicit sampling requests and other models' existing defaults unchanged.

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
@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 8:46am 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 were identified for the change preserving Nemotron Bolt’s configured greedy-search default.

No open issues 🎉

What changed in this PR

Preserves Nemotron Bolt’s configured greedy-search default in the C++ SDK’s Generator path when temperature is omitted or neutral (1), avoiding an unintended switch to unsupported sampling.

Changes:

  • Keeps explicit non-neutral temperature handling and other models’ sampling defaults unchanged.
  • Adds three regression tests using the checked-in tiny CPU decoder, requiring no downloads or GPU.
File Description
sdk_v2/​cpp/​test/​internal_api/​chat/​search_options_test.cc Tests Bolt’s default policy, explicit sampling, and unchanged defaults for other models.
sdk_v2/​cpp/​src/​inferencing/​generative/​chat/​search_options.cc Preserves nemotron_bolt’s configured sampling default when no caller policy is specified.

Review effort: Balanced

This branch was successfully deployed

1 active deployment
Preview — 422394e9 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