Merge 7757e91c9e into 52609fb890
This commit is contained in:
commit
6d2666023e
1 changed files with 15 additions and 2 deletions
|
|
@ -769,8 +769,21 @@ def _patch_sft_trainer_auto_packing(trl_module):
|
|||
reason = "hybrid linear-attention model"
|
||||
elif is_unsupported_model:
|
||||
reason = f"unsupported model type(s): {', '.join(model_types)}"
|
||||
message = f"Unsloth: Sample packing skipped ({reason} detected)."
|
||||
print(message)
|
||||
max_len = getattr(config_arg, "max_seq_length", None) or getattr(
|
||||
config_arg, "max_length", None
|
||||
)
|
||||
limit = (
|
||||
f"the {max_len}-token max sequence length" if max_len else "the max sequence length"
|
||||
)
|
||||
message = (
|
||||
f"Unsloth: Sample packing skipped ({reason} detected) even though "
|
||||
f"packing=True was requested. Sequences longer than {limit} will be "
|
||||
f"TRUNCATED rather than split into additional sequences, which can silently "
|
||||
f"drop a large fraction of tokens from long samples. If your dataset has long "
|
||||
f"documents (e.g. raw-text CPT), pre-split or pre-pack them before training to "
|
||||
f"avoid data loss."
|
||||
)
|
||||
logger.warning(message)
|
||||
|
||||
packing_active = False
|
||||
if _should_pack(config_arg) and not blocked:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue