Skip to content

Instantly share code, notes, and snippets.

@AIAnytime
Created April 10, 2024 08:01
Show Gist options
  • Save AIAnytime/2a6b6e580d901325b671107ac5e8ae75 to your computer and use it in GitHub Desktop.
Save AIAnytime/2a6b6e580d901325b671107ac5e8ae75 to your computer and use it in GitHub Desktop.
Training Arguments
training_arguments = TrainingArguments(
output_dir="./results",
per_device_train_batch_size=4,
per_device_eval_batch_size=4,
gradient_accumulation_steps=2,
optim="adamw_8bit",
logging_steps=50,
learning_rate=1e-4,
evaluation_strategy="steps",
do_eval=True,
eval_steps=50,
save_steps=100,
fp16= not torch.cuda.is_bf16_supported(),
bf16= torch.cuda.is_bf16_supported(),
num_train_epochs=3,
weight_decay=0.0,
warmup_ratio=0.1,
lr_scheduler_type="linear",
gradient_checkpointing=True,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment