-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Benchmarking Compatibility to PaddingFree Plugin (#66)
* add benchmarking on orca-math Signed-off-by: 1000850000 user <[email protected]> * modifications to address PR changes Signed-off-by: 1000850000 user <[email protected]> * additional fixes to scenarios template Signed-off-by: 1000850000 user <[email protected]> * Apply suggestions from code review Co-authored-by: Yu Chin Fabian Lim <[email protected]> Signed-off-by: 1000850000 user <[email protected]> * renamed scenarios template to specify dataset Signed-off-by: 1000850000 user <[email protected]> * added orca benchmarks as ref Signed-off-by: 1000850000 user <[email protected]> --------- Signed-off-by: 1000850000 user <[email protected]> Co-authored-by: Yu Chin Fabian Lim <[email protected]>
- Loading branch information
Showing
16 changed files
with
579 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
sample-configurations/accelerated-peft-autogptq-foak-padding-free-sample-configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# FMS Acceleration Plugin Configuration. | ||
# | ||
# Each stanza incorporates various configurations for | ||
# different fine-tuning / training tasks. | ||
plugins: | ||
# Configurations to accelerate data packing/padding in training | ||
training: | ||
|
||
# attention module configurations | ||
# e.g. padding-free modifications to attention layer | ||
attention: | ||
|
||
# this controls the confgurations for padding free computation of flash attention | ||
padding_free: | ||
method: huggingface | ||
peft: | ||
|
||
# quantization-releated acceleration | ||
# e.g., kernels for quantized base weights | ||
quantization: | ||
|
||
# AutoGPTQ quantized base weights. | ||
auto_gptq: | ||
|
||
# Kernel to be used for GPTQ linear laeyer | ||
# NOTE: Not all kernels are suitable for PEFT training; need to use | ||
# kernels that support autograd forward / backward. The best | ||
# recommendation at the moment is "triton_v2". | ||
kernel: triton_v2 | ||
|
||
# If true, then will already expect quantized checkpoint | ||
# passed into TrainingArguments.model_name_or_path | ||
from_quantized: true | ||
|
||
# Setting to false, will create GPTQ-LORA using the local autogptq package. | ||
# if true, will create legacy implementation of GPTQ-LORA using external | ||
# `auto_gptq`. Refer to README for installation instructions | ||
use_external_lib: false | ||
fused_ops_and_kernels: | ||
|
||
# load unsloth optimizations for these 4bit base layer weights. | ||
# currently only support "auto_gptq" and "bitsandbytes" | ||
base_layer: auto_gptq | ||
|
||
# activate various unsloth optimizations | ||
# NOTE: currently supports only all-or-nothing. | ||
|
||
# fused kernels for lora linear layers | ||
fused_lora: true | ||
|
||
# fast loss triton kernels | ||
fast_loss: true | ||
|
||
# fast rms norm triton kernels | ||
fast_rsm_layernorm: true | ||
|
||
# fast RoPE embedding triton kernels | ||
fast_rope_embeddings: true |
38 changes: 38 additions & 0 deletions
38
sample-configurations/accelerated-peft-autogptq-padding-free-sample-configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# FMS Acceleration Plugin Configuration. | ||
# | ||
# Each stanza incorporates various configurations for | ||
# different fine-tuning / training tasks. | ||
plugins: | ||
# Configurations to accelerate data packing/padding in training | ||
training: | ||
|
||
# attention module configurations | ||
# e.g. padding-free modifications to attention layer | ||
attention: | ||
|
||
# this controls the confgurations for padding free computation of flash attention | ||
padding_free: | ||
method: huggingface | ||
peft: | ||
|
||
# quantization-releated acceleration | ||
# e.g., kernels for quantized base weights | ||
quantization: | ||
|
||
# AutoGPTQ quantized base weights. | ||
auto_gptq: | ||
|
||
# Kernel to be used for GPTQ linear laeyer | ||
# NOTE: Not all kernels are suitable for PEFT training; need to use | ||
# kernels that support autograd forward / backward. The best | ||
# recommendation at the moment is "triton_v2". | ||
kernel: triton_v2 | ||
|
||
# If true, then will already expect quantized checkpoint | ||
# passed into TrainingArguments.model_name_or_path | ||
from_quantized: true | ||
|
||
# Setting to false, will create GPTQ-LORA using the local autogptq package. | ||
# if true, will create legacy implementation of GPTQ-LORA using external | ||
# `auto_gptq`. Refer to README for installation instructions | ||
use_external_lib: false |
53 changes: 53 additions & 0 deletions
53
sample-configurations/accelerated-peft-bnb-nf4-foak-padding-free-sample-configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# FMS Acceleration Plugin Configuration. | ||
# | ||
# Each stanza incorporates various configurations for | ||
# different fine-tuning / training tasks. | ||
plugins: | ||
# Configurations to accelerate data packing/padding in training | ||
training: | ||
|
||
# attention module configurations | ||
# e.g. padding-free modifications to attention layer | ||
attention: | ||
|
||
# this controls the confgurations for padding free computation of flash attention | ||
padding_free: | ||
method: huggingface | ||
peft: | ||
|
||
# quantization-releated acceleration | ||
# e.g., kernels for quantized base weights | ||
quantization: | ||
|
||
# For loading BitsAndBytes quantized layers | ||
# to serve as 4bit base-weights for LoRA PEFT-tuning. | ||
# NOTE: currently AutoGPTQ is not properly integrated into huggingface / | ||
# bitsandbytes, thus recommended quant_type to be either "nf4" | ||
# or "fp4". | ||
# bitsandbytes: | ||
bitsandbytes: | ||
quant_type: nf4 | ||
|
||
# If True, then no get_peft_model and prepare_model_for_kbit_training | ||
# will be called. | ||
no_peft_model: false | ||
fused_ops_and_kernels: | ||
|
||
# load unsloth optimizations for these 4bit base layer weights. | ||
# currently only support "auto_gptq" and "bitsandbytes" | ||
base_layer: bitsandbytes | ||
|
||
# activate various unsloth optimizations | ||
# NOTE: currently supports only all-or-nothing. | ||
|
||
# fused kernels for lora linear layers | ||
fused_lora: true | ||
|
||
# fast loss triton kernels | ||
fast_loss: true | ||
|
||
# fast rms norm triton kernels | ||
fast_rsm_layernorm: true | ||
|
||
# fast RoPE embedding triton kernels | ||
fast_rope_embeddings: true |
33 changes: 33 additions & 0 deletions
33
sample-configurations/accelerated-peft-bnb-nf4-padding-free-sample-configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# FMS Acceleration Plugin Configuration. | ||
# | ||
# Each stanza incorporates various configurations for | ||
# different fine-tuning / training tasks. | ||
plugins: | ||
# Configurations to accelerate data packing/padding in training | ||
training: | ||
|
||
# attention module configurations | ||
# e.g. padding-free modifications to attention layer | ||
attention: | ||
|
||
# this controls the confgurations for padding free computation of flash attention | ||
padding_free: | ||
method: huggingface | ||
peft: | ||
|
||
# quantization-releated acceleration | ||
# e.g., kernels for quantized base weights | ||
quantization: | ||
|
||
# For loading BitsAndBytes quantized layers | ||
# to serve as 4bit base-weights for LoRA PEFT-tuning. | ||
# NOTE: currently AutoGPTQ is not properly integrated into huggingface / | ||
# bitsandbytes, thus recommended quant_type to be either "nf4" | ||
# or "fp4". | ||
# bitsandbytes: | ||
bitsandbytes: | ||
quant_type: nf4 | ||
|
||
# If True, then no get_peft_model and prepare_model_for_kbit_training | ||
# will be called. | ||
no_peft_model: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.