Repository navigation
Update TRL documentation - #9
Open
qgallouedec wants to merge 4 commits into
Open
qgallouedec wants to merge 4 commits into
qgallouedec wants to merge 4 commits into
Conversation
qgallouedec
requested review from
MaartenGr,
bebechien and
osanseviero
as code owners
October 16, 2026 18:00
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey, TRL maintainer here 👋
This PR updates everything related to TRL to be more aligned with the current TRL API and the new best practices.
skip_prepare_dataset,remove_unused_columns=False) goes away.SFTTrainergets the model id plusquantization_configand loads and quantizes the model itself, sofrom_pretrainedandprepare_model_for_kbit_traininggo away too.-ittokenizer, becausegoogle/gemma-4-E2Bships no chat template. It's the tokenizer rather than the processor because, with the processor, TRL wraps string content into lists, and Gemma 4's template then adds a trailing space to the system turn that inference never sees.SFTTrainerand the pipelines take model ids.dataset_kwargs={"add_special_tokens": ..., "append_concat_token": ...}, which TRL removed in ⚰️ Remove deprecated huggingface/trl#3704 and now ignores.Both pages ran end to end on an H100 with a 3-step training run.