Skip to content
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
9 changes: 4 additions & 5 deletions examples/kfto-sft-llm/sft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"# Model\n",
"model_name_or_path: Meta-Llama/Meta-Llama-3.1-8B-Instruct\n",
"model_revision: main\n",
"torch_dtype: bfloat16\n",
"dtype: bfloat16\n",
"attn_implementation: flash_attention_2 # one of eager (default), sdpa or flash_attention_2\n",
"use_liger: false # use Liger kernels\n",
"use_liger_kernel: false # use Liger kernels\n",
"\n",
"# PEFT / LoRA\n",
"use_peft: true\n",
Expand All @@ -69,8 +69,7 @@
" append_concat_token: false # add additional separator token\n",
"\n",
"# SFT\n",
"max_seq_length: 1024 # max sequence length for model and packing of the dataset\n",
"dataset_batch_size: 1000 # samples to tokenize per batch\n",
"max_length: 1024 # max sequence length for model and packing of the dataset\n",
"packing: false\n",
"\n",
"# Training\n",
Expand Down Expand Up @@ -175,7 +174,7 @@
" revision=model_args.model_revision,\n",
" trust_remote_code=model_args.trust_remote_code,\n",
" attn_implementation=model_args.attn_implementation,\n",
" torch_dtype=model_args.torch_dtype,\n",
" dtype=model_args.dtype,\n",
" use_cache=False if training_args.gradient_checkpointing or\n",
" training_args.fsdp_config.get(\"activation_checkpointing\",\n",
" False) else True,\n",
Expand Down