diff --git a/peft/fft.sh b/peft/fft.sh new file mode 100644 index 0000000..ed2eb5e --- /dev/null +++ b/peft/fft.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +export TF_CPP_MIN_LOG_LEVEL=2 XLA_PYTHON_CLIENT_PREALLOCATE=false + +python3 finetune.py \ + --model-name="google/timesfm-1.0-200m" \ + --backend="gpu" \ + --horizon-len=128 \ + --context-len=512 \ + --freq="15min" \ + --data-path="../datasets/ETT-small/ETTm1.csv" \ + --num-epochs=1 \ + --learning-rate=1e-3 \ + --adam-epsilon=1e-7 \ + --adam-clip-threshold=1e2 \ + --early-stop-patience=10 \ + --datetime-col="date" \ + --boundaries=34560 46080 57600 \ + --cos-initial-decay-value=1e-4 \ + --cos-decay-steps=40000 \ + --cos-final-decay-value=1e-5 \ + --ema-decay=0.9999 \ No newline at end of file diff --git a/peft/finetune.py b/peft/finetune.py index d239530..176db9a 100644 --- a/peft/finetune.py +++ b/peft/finetune.py @@ -235,10 +235,10 @@ def finetune( @pax_fiddle.auto_config def build_learner() -> learners.Learner: - bprop_variable_inclusion = None - bprop_variable_exclusion = None + bprop_variable_inclusion = [] + bprop_variable_exclusion = [] if use_lora: - bprop_variable_inclusion = [r"^.*lora.*$"] + bprop_variable_inclusion.append(r"^.*lora.*$") if use_dora: bprop_variable_inclusion.append(r"^.*dora.*$") elif use_linear_probing: diff --git a/peft/linear_probing.sh b/peft/linear_probing.sh new file mode 100644 index 0000000..c46ee79 --- /dev/null +++ b/peft/linear_probing.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +export TF_CPP_MIN_LOG_LEVEL=2 XLA_PYTHON_CLIENT_PREALLOCATE=false + +python3 finetune.py \ + --model-name="google/timesfm-1.0-200m" \ + --backend="gpu" \ + --horizon-len=128 \ + --context-len=512 \ + --freq="15min" \ + --data-path="../datasets/ETT-small/ETTm1.csv" \ + --num-epochs=100 \ + --learning-rate=1e-2 \ + --adam-epsilon=1e-7 \ + --adam-clip-threshold=1e2 \ + --early-stop-patience=10 \ + --datetime-col="date" \ + --boundaries=1000 46080 57600 \ + --use-linear-probing \ + --cos-initial-decay-value=1e-4 \ + --cos-decay-steps=40000 \ + --cos-final-decay-value=1e-5 \ + --ema-decay=0.9999 \ No newline at end of file diff --git a/peft/lora.sh b/peft/lora.sh new file mode 100644 index 0000000..6927deb --- /dev/null +++ b/peft/lora.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +export TF_CPP_MIN_LOG_LEVEL=2 XLA_PYTHON_CLIENT_PREALLOCATE=false + +python3 finetune.py \ + --model-name="google/timesfm-1.0-200m" \ + --backend="gpu" \ + --horizon-len=128 \ + --context-len=512 \ + --freq="15min" \ + --data-path="../datasets/ETT-small/ETTm1.csv" \ + --num-epochs=100 \ + --learning-rate=1e-3 \ + --adam-epsilon=1e-7 \ + --adam-clip-threshold=1e2 \ + --early-stop-patience=10 \ + --datetime-col="date" \ + --boundaries=34560 46080 57600 \ + --use-lora \ + --lora-rank=1 \ + --lora-target-modules="all" \ + --cos-initial-decay-value=1e-4 \ + --cos-decay-steps=40000 \ + --cos-final-decay-value=1e-5 \ + --ema-decay=0.9999 \ No newline at end of file