update examples after ruff being updated (#36972)
* update * update --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -438,7 +438,7 @@ def main():
|
||||
else:
|
||||
model = AutoModelForCausalLM.from_config(config, trust_remote_code=model_args.trust_remote_code)
|
||||
n_params = sum({p.data_ptr(): p.numel() for p in model.parameters()}.values())
|
||||
logger.info(f"Training new model from scratch - Total size={n_params/2**20:.2f}M params")
|
||||
logger.info(f"Training new model from scratch - Total size={n_params / 2**20:.2f}M params")
|
||||
|
||||
# We resize the embeddings only when necessary to avoid index errors. If you are creating a model from scratch
|
||||
# on a small vocab and want a smaller embedding size, remove this test.
|
||||
|
||||
@@ -265,8 +265,7 @@ class DataTrainingArguments:
|
||||
default="<fim_pad>",
|
||||
metadata={
|
||||
"help": (
|
||||
"Fill-in-Middle Pad token. Used only when 'truncate_or_pad' is set to True. "
|
||||
"Defaults to '<fim_pad>'."
|
||||
"Fill-in-Middle Pad token. Used only when 'truncate_or_pad' is set to True. Defaults to '<fim_pad>'."
|
||||
)
|
||||
},
|
||||
)
|
||||
@@ -514,7 +513,7 @@ def main():
|
||||
attn_implementation=model_args.attn_implementation,
|
||||
)
|
||||
n_params = sum({p.data_ptr(): p.numel() for p in model.parameters()}.values())
|
||||
logger.info(f"Training new model from scratch - Total size={n_params/2**20:.2f}M params")
|
||||
logger.info(f"Training new model from scratch - Total size={n_params / 2**20:.2f}M params")
|
||||
|
||||
# Add the new FIM tokens to the tokenizer and resize model's vocab embeddings
|
||||
special_tokens = [data_args.fim_prefix_token, data_args.fim_middle_token, data_args.fim_suffix_token]
|
||||
|
||||
@@ -234,9 +234,7 @@ def parse_args():
|
||||
"--fim_pad_token",
|
||||
type=str,
|
||||
default="<fim_pad>",
|
||||
help=(
|
||||
"Fill-in-Middle Pad token. Used only when 'truncate_or_pad' is set to True." " Defaults to '<fim_pad>'."
|
||||
),
|
||||
help=("Fill-in-Middle Pad token. Used only when 'truncate_or_pad' is set to True. Defaults to '<fim_pad>'."),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--preprocessing_num_workers",
|
||||
|
||||
Reference in New Issue
Block a user