mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-23 17:01:04 +02:00
tiny exp
This commit is contained in:
parent
21d8beb65d
commit
43f47d40ad
19 changed files with 192 additions and 71 deletions
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
#SBATCH --job-name=ctxlora
|
||||
#SBATCH --nodes=1
|
||||
#SBATCH --partition=a3
|
||||
#SBATCH --gpus=4
|
||||
#SBATCH --output=slurm_logs/%x-%j.out
|
||||
#SBATCH --error=slurm_logs/%x-%j.out
|
||||
|
||||
port=$((10000 + ($SLURM_JOBID % 50000)))
|
||||
echo "Using port: $port"
|
||||
|
||||
# --gradient_accumulation_steps=8 --gradient_clipping=1.0
|
||||
uv run accelerate launch --main_process_port $port \
|
||||
--num_processes=4 --gpu_ids all intx_sft.py $1 \
|
||||
--model_name_or_path=google/gemma-2-2b-it \
|
||||
--max_steps=12_000 \
|
||||
--per_device_train_batch_size=-1 \
|
||||
--gradient_accumulation_steps=2 \
|
||||
--per_device_eval_batch_size=64 \
|
||||
--target_modules=down_proj \
|
||||
--num_self_attends_per_block=8 \
|
||||
--n_cross_attn_layers=8 \
|
||||
--concat_latents_context=True \
|
||||
--num_latent_factor=1 \
|
||||
--num_pre_head_layers=1 \
|
||||
--lora_r=8 \
|
||||
--eval_steps=1000 \
|
||||
--save_steps=1000 \
|
||||
--learning_rate=4e-5 \
|
||||
--lora_dropout=0.0 \
|
||||
--neftune_noise_alpha=5 \
|
||||
--add_negative_prompt=False \
|
||||
--add_repeat_prompt=False \
|
||||
--use_sequence_packing=True \
|
||||
--max_packed_inp_len=8192 \
|
||||
--max_packed_ctx_len=16384 \
|
||||
--per_rank_gen=True \
|
||||
--per_layer_processing=True \
|
||||
--gen_lora_l1_reg_coef=0.1 \
|
||||
--logging_steps=50
|
||||
39
scripts/short_ctx/gemma_qa_short_ctx_exp_default.sh
Normal file
39
scripts/short_ctx/gemma_qa_short_ctx_exp_default.sh
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
#SBATCH --job-name=ctxlora
|
||||
#SBATCH --nodes=1
|
||||
#SBATCH --partition=a3
|
||||
#SBATCH --gpus=4
|
||||
#SBATCH --output=slurm_logs/%x-%j.out
|
||||
#SBATCH --error=slurm_logs/%x-%j.out
|
||||
|
||||
port=$((10000 + ($SLURM_JOBID % 50000)))
|
||||
echo "Using port: $port"
|
||||
|
||||
# --gradient_accumulation_steps=8 --gradient_clipping=1.0
|
||||
uv run accelerate launch --main_process_port $port \
|
||||
--num_processes=4 --gpu_ids all intx_sft.py $1 \
|
||||
--model_name_or_path=google/gemma-2-2b-it \
|
||||
--max_steps=12_000 \
|
||||
--per_device_train_batch_size=-1 \
|
||||
--gradient_accumulation_steps=2 \
|
||||
--per_device_eval_batch_size=64 \
|
||||
--target_modules=down_proj \
|
||||
--num_self_attends_per_block=8 \
|
||||
--n_cross_attn_layers=8 \
|
||||
--num_latent_factor=1 \
|
||||
--num_pre_head_layers=1 \
|
||||
--lora_r=8 \
|
||||
--eval_steps=1000 \
|
||||
--save_steps=1000 \
|
||||
--learning_rate=4e-5 \
|
||||
--lora_dropout=0.0 \
|
||||
--neftune_noise_alpha=5 \
|
||||
--add_negative_prompt=False \
|
||||
--add_repeat_prompt=False \
|
||||
--use_sequence_packing=True \
|
||||
--max_packed_inp_len=8192 \
|
||||
--max_packed_ctx_len=16384 \
|
||||
--per_rank_gen=True \
|
||||
--per_layer_processing=True \
|
||||
--gen_lora_l1_reg_coef=0.1 \
|
||||
--logging_steps=50
|
||||
39
scripts/short_ctx/gemma_qa_short_ctx_exp_self_attn.sh
Normal file
39
scripts/short_ctx/gemma_qa_short_ctx_exp_self_attn.sh
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
#SBATCH --job-name=ctxlora
|
||||
#SBATCH --nodes=1
|
||||
#SBATCH --partition=a3
|
||||
#SBATCH --gpus=4
|
||||
#SBATCH --output=slurm_logs/%x-%j.out
|
||||
#SBATCH --error=slurm_logs/%x-%j.out
|
||||
|
||||
port=$((10000 + ($SLURM_JOBID % 50000)))
|
||||
echo "Using port: $port"
|
||||
|
||||
# --gradient_accumulation_steps=8 --gradient_clipping=1.0
|
||||
uv run accelerate launch --main_process_port $port \
|
||||
--num_processes=4 --gpu_ids all intx_sft.py $1 \
|
||||
--model_name_or_path=google/gemma-2-2b-it \
|
||||
--max_steps=12_000 \
|
||||
--per_device_train_batch_size=-1 \
|
||||
--gradient_accumulation_steps=2 \
|
||||
--per_device_eval_batch_size=64 \
|
||||
--target_modules=down_proj \
|
||||
--num_self_attends_per_block=8 \
|
||||
--n_cross_attn_layers=1 \
|
||||
--num_latent_factor=1 \
|
||||
--num_pre_head_layers=1 \
|
||||
--lora_r=8 \
|
||||
--eval_steps=1000 \
|
||||
--save_steps=1000 \
|
||||
--learning_rate=4e-5 \
|
||||
--lora_dropout=0.0 \
|
||||
--neftune_noise_alpha=5 \
|
||||
--add_negative_prompt=False \
|
||||
--add_repeat_prompt=False \
|
||||
--use_sequence_packing=True \
|
||||
--max_packed_inp_len=8192 \
|
||||
--max_packed_ctx_len=16384 \
|
||||
--per_rank_gen=True \
|
||||
--per_layer_processing=True \
|
||||
--gen_lora_l1_reg_coef=0.1 \
|
||||
--logging_steps=50
|
||||
48
scripts/submit_tiny_exp_jobs.sh
Executable file
48
scripts/submit_tiny_exp_jobs.sh
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to submit SLURM jobs for all configs in configs/tiny_exp/
|
||||
# with random sleep intervals between submissions
|
||||
|
||||
CONFIG_DIR="configs/tiny_exp"
|
||||
SCRIPT_PATH="scripts/short_ctx/gemma_qa_short_ctx_exp_default.sh"
|
||||
|
||||
# Check if config directory exists
|
||||
if [ ! -d "$CONFIG_DIR" ]; then
|
||||
echo "Error: Config directory $CONFIG_DIR does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if script exists
|
||||
if [ ! -f "$SCRIPT_PATH" ]; then
|
||||
echo "Error: Script $SCRIPT_PATH does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get all yaml config files
|
||||
configs=($(find "$CONFIG_DIR" -name "*.yaml" -type f))
|
||||
|
||||
if [ ${#configs[@]} -eq 0 ]; then
|
||||
echo "No .yaml config files found in $CONFIG_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Found ${#configs[@]} config files:"
|
||||
for config in "${configs[@]}"; do
|
||||
echo " - $config"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Starting job submissions..."
|
||||
|
||||
# Submit jobs with random sleep intervals
|
||||
for config in "${configs[@]}"; do
|
||||
echo "Submitting job for config: $config"
|
||||
sbatch "$SCRIPT_PATH" "$config"
|
||||
|
||||
# Random sleep between 3-30 seconds
|
||||
sleep_time=$((3 + RANDOM % 28))
|
||||
echo "Waiting $sleep_time seconds before next submission..."
|
||||
sleep $sleep_time
|
||||
done
|
||||
|
||||
echo "All jobs submitted!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue