You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add a mechanism for allowing more max tokens (#662)
<!-- SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION
& AFFILIATES. All rights reserved. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->
<!-- Thank you for contributing to Safe Synthesizer! -->
# Summary
<!-- Brief description of changes -->
## Pre-Review Checklist
<!-- These checks should be completed before a PR is reviewed, -->
<!-- but you can submit a draft early to indicate that the issue is
being worked on. -->
Ensure that the following pass:
- [ ] `mise run format && mise run check` or via prek validation.
- [ ] `mise run test` passes locally
- [ ] `mise run test:e2e` passes locally
- [ ] `mise run test:ci-container` passes locally (recommended)
- [ ] GPU CI status check passes -- comment `/sync` on this PR to
trigger a run (auto-triggers on ready-for-review)
## Pre-Merge Checklist
<!-- These checks need to be completed before a PR is merged, -->
<!-- but as PRs often change significantly during review, -->
<!-- it's OK for them to be incomplete when review is first requested.
-->
- [ ] New or updated tests for any fix or new behavior
- [ ] Updated documentation for new features and behaviors, including
docstrings for API docs.
## Other Notes
<!-- Please add the issue number that should be closed when this PR is
merged. -->
- Closes #<issue>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added `max_tokens_multiplier` to control the per-request generation
token budget, defaulting to **1.2**.
* Enforced validation to allow only finite values strictly **greater
than 0**.
* **Bug Fixes**
* Improved consistency of max-token budgeting across generation backends
by applying the configured multiplier while keeping existing
context-window clamping behavior.
* **Tests**
* Added unit tests for the new multiplier field (default, valid/invalid
values including non-finite cases) and for multiplier behavior
(including clamping).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
0 commit comments