keep only a single bash script
This commit is contained in:
-22
@@ -1,22 +0,0 @@
|
|||||||
#!/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
|
|
||||||
+8
-6
@@ -62,12 +62,12 @@ RANDOM_SEED = 1234
|
|||||||
|
|
||||||
def finetune(
|
def finetune(
|
||||||
*,
|
*,
|
||||||
checkpoint_path: Annotated[
|
|
||||||
str, typer.Option(help="The path to the model checkpoint.")
|
|
||||||
] = None,
|
|
||||||
model_name: Annotated[
|
model_name: Annotated[
|
||||||
str, typer.Option(help="Specify the name of the huggingface model.")
|
str, typer.Option(help="Specify the name of the huggingface model.")
|
||||||
] = "google/timesfm-1.0-200m",
|
] = "google/timesfm-1.0-200m",
|
||||||
|
checkpoint_path: Annotated[
|
||||||
|
str, typer.Option(help="The path to the local model checkpoint.")
|
||||||
|
] = None,
|
||||||
datetime_col: Annotated[str, typer.Option(help="Column having datetime.")] = "ds",
|
datetime_col: Annotated[str, typer.Option(help="Column having datetime.")] = "ds",
|
||||||
ts_cols: Annotated[
|
ts_cols: Annotated[
|
||||||
list[str], typer.Option(help="Columns of time-series features.")
|
list[str], typer.Option(help="Columns of time-series features.")
|
||||||
@@ -115,7 +115,7 @@ def finetune(
|
|||||||
use_lora: Annotated[
|
use_lora: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
help="Train low rank adapters. Freeze all other params in model",
|
help="Train low rank adapters for stacked transformer block",
|
||||||
),
|
),
|
||||||
] = False,
|
] = False,
|
||||||
lora_rank: Annotated[
|
lora_rank: Annotated[
|
||||||
@@ -126,7 +126,9 @@ def finetune(
|
|||||||
] = 8,
|
] = 8,
|
||||||
lora_target_modules: Annotated[
|
lora_target_modules: Annotated[
|
||||||
str,
|
str,
|
||||||
typer.Option(help="LoRA target modules. Allowed values: [all, attention, mlp]"),
|
typer.Option(
|
||||||
|
help="LoRA target modules of the transformer block. Allowed values: [all, attention, mlp]"
|
||||||
|
),
|
||||||
] = "all",
|
] = "all",
|
||||||
use_dora: Annotated[
|
use_dora: Annotated[
|
||||||
bool,
|
bool,
|
||||||
@@ -137,7 +139,7 @@ def finetune(
|
|||||||
use_linear_probing: Annotated[
|
use_linear_probing: Annotated[
|
||||||
bool,
|
bool,
|
||||||
typer.Option(
|
typer.Option(
|
||||||
help="Linear Probing. Train only input/output and embedding params. Freeze params in self attention modules.",
|
help="Linear Probing. Train only input/output and embedding params. Freeze params in stack transformer block.",
|
||||||
),
|
),
|
||||||
] = False,
|
] = False,
|
||||||
checkpoint_dir: Annotated[
|
checkpoint_dir: Annotated[
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script to finetune a model with specific configurations
|
||||||
|
# Adjust the parameters below as needed. For a full list of options and descriptions, run the script with the --help flag.
|
||||||
|
|
||||||
export TF_CPP_MIN_LOG_LEVEL=2 XLA_PYTHON_CLIENT_PREALLOCATE=false
|
export TF_CPP_MIN_LOG_LEVEL=2 XLA_PYTHON_CLIENT_PREALLOCATE=false
|
||||||
|
|
||||||
python3 finetune.py \
|
python3 finetune.py \
|
||||||
--model-name="google/timesfm-1.0-200m" \
|
--model-name="google/timesfm-1.0-200m" \
|
||||||
--backend="gpu" \
|
--backend="cpu" \
|
||||||
--horizon-len=128 \
|
--horizon-len=128 \
|
||||||
--context-len=512 \
|
--context-len=512 \
|
||||||
--freq="15min" \
|
--freq="15min" \
|
||||||
@@ -15,7 +18,6 @@ python3 finetune.py \
|
|||||||
--adam-clip-threshold=1e2 \
|
--adam-clip-threshold=1e2 \
|
||||||
--early-stop-patience=10 \
|
--early-stop-patience=10 \
|
||||||
--datetime-col="date" \
|
--datetime-col="date" \
|
||||||
--boundaries=34560 46080 57600 \
|
|
||||||
--use-lora \
|
--use-lora \
|
||||||
--lora-rank=1 \
|
--lora-rank=1 \
|
||||||
--lora-target-modules="all" \
|
--lora-target-modules="all" \
|
||||||
@@ -24,3 +26,6 @@ python3 finetune.py \
|
|||||||
--cos-decay-steps=40000 \
|
--cos-decay-steps=40000 \
|
||||||
--cos-final-decay-value=1e-5 \
|
--cos-final-decay-value=1e-5 \
|
||||||
--ema-decay=0.9999
|
--ema-decay=0.9999
|
||||||
|
|
||||||
|
# To see all available options and their descriptions, use the --help flag
|
||||||
|
# python3 finetune.py --help
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/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
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/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
|
|
||||||
Reference in New Issue
Block a user