mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-23 17:01:04 +02:00
Perceiver blocks + layer-to-layer (#4)
This commit is contained in:
parent
43f47d40ad
commit
9613c65c20
10 changed files with 303 additions and 254 deletions
|
|
@ -31,6 +31,7 @@ uv run accelerate launch --main_process_port $port \
|
|||
--add_negative_prompt=False \
|
||||
--add_repeat_prompt=False \
|
||||
--use_sequence_packing=True \
|
||||
--max_qas_len=2048 \
|
||||
--max_packed_inp_len=8192 \
|
||||
--max_packed_ctx_len=16384 \
|
||||
--per_rank_gen=True \
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ uv run accelerate launch --main_process_port $port \
|
|||
--add_negative_prompt=False \
|
||||
--add_repeat_prompt=False \
|
||||
--use_sequence_packing=True \
|
||||
--max_qas_len=2048 \
|
||||
--max_packed_inp_len=8192 \
|
||||
--max_packed_ctx_len=16384 \
|
||||
--per_rank_gen=True \
|
||||
|
|
|
|||
|
|
@ -18,10 +18,9 @@ uv run accelerate launch --main_process_port $port \
|
|||
--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_blocks=4 \
|
||||
--num_self_attn_per_block=3 \
|
||||
--n_latent_queries=208 \
|
||||
--num_pre_head_layers=1 \
|
||||
--lora_r=8 \
|
||||
--eval_steps=1000 \
|
||||
|
|
@ -32,6 +31,7 @@ uv run accelerate launch --main_process_port $port \
|
|||
--add_negative_prompt=False \
|
||||
--add_repeat_prompt=False \
|
||||
--use_sequence_packing=True \
|
||||
--max_qas_len=2048 \
|
||||
--max_packed_inp_len=8192 \
|
||||
--max_packed_ctx_len=16384 \
|
||||
--per_rank_gen=True \
|
||||
41
scripts/short_ctx/gemma_qa_short_ctx_perceiver_l2l.sh
Normal file
41
scripts/short_ctx/gemma_qa_short_ctx_perceiver_l2l.sh
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#!/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=4 \
|
||||
--per_device_eval_batch_size=32 \
|
||||
--target_modules=down_proj \
|
||||
--num_blocks=4 \
|
||||
--num_self_attn_per_block=3 \
|
||||
--ctx_encoder_type=per_layer_activations \
|
||||
--n_latent_queries=8 \
|
||||
--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_qas_len=2048 \
|
||||
--max_packed_inp_len=4096 \
|
||||
--max_packed_ctx_len=8192 \
|
||||
--per_rank_gen=True \
|
||||
--per_layer_processing=True \
|
||||
--gen_lora_l1_reg_coef=0.1 \
|
||||
--logging_steps=50
|
||||
Loading…
Add table
Add a link
Reference in a new issue