Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change --disable_group_texts default to True #747

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions src/lmflow/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,21 @@ class DatasetArguments:
}
)
disable_group_texts: bool = field(
default=False,
default=True,
metadata={
"help": (
"Whether we group original samples together to generate sample"
" sequences of length `block_size`. By default, we group every"
" 1000 tokenized sequences together, divide them into "
" [{total_num_tokens} / {block_size}] sequences, each with"
" `block_size` tokens (the remaining tokens are ommited."
" If this flag is set to True, we only group 1 tokenized"
" sequence, i.e. cutting long sequence into chunks."
"Whether we disable group of original samples together to"
" generate sample sequences of length `block_size`"
" By Default, it is True, which means the long samples"
" are truncated to `block_size` tokens"
" and short samples are padded to `block_size` tokens."
" If set to False, we group every 1000 tokenized"
" sequences together, divide them into"
" [{total_num_tokens} / {block_size}] sequences,"
" each with `block_size` tokens"
" (the remaining tokens are ommited."
" This group text behavior is useful"
" for continual pretrain or pretrain."
)
},
)
Expand Down
Loading