Skip to content

Remove max_prompt_length from experimental BCO#4964

Merged
albertvillanova merged 6 commits intohuggingface:mainfrom
albertvillanova:rm-max-prompt-length-bco
Feb 5, 2026
Merged

Remove max_prompt_length from experimental BCO#4964
albertvillanova merged 6 commits intohuggingface:mainfrom
albertvillanova:rm-max-prompt-length-bco

Conversation

@albertvillanova
Copy link
Member

Remove max_prompt_length from experimental BCO.

This PR removes the max_prompt_length parameter from the BCO training pipeline, simplifying both the configuration and the tokenization logic.

Follow-up to:

Configuration and Argument Cleanup

  • Removed the max_prompt_length argument from the BCOConfig class and its documentation, as well as from all related code paths and warnings. This reduces user confusion and simplifies configuration.

Tokenization and Preprocessing Logic

  • Updated the _process_tokens function to eliminate prompt truncation based on max_prompt_length. Now, only the response is truncated if the total sequence exceeds max_length, and prompt tokenization no longer uses a prompt length limit.
  • Removed the passing of max_prompt_length in dataset mapping and processing, ensuring consistent use of the new logic across training and evaluation.

Example and Script Updates

  • Cleaned up example scripts by removing --max_prompt_length from CLI arguments, aligning usage examples with the new configuration.

Testing updates:

  • Removed all uses of max_prompt_length from test cases.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@qgallouedec qgallouedec left a comment

Choose a reason for hiding this comment

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

yes looks good

@albertvillanova albertvillanova merged commit 50e35de into huggingface:main Feb 5, 2026
12 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.

3 participants