diff --git a/scripts/ablation/delta/mscr-sjd/mscr_sjd_0.008.sh b/scripts/ablation/delta/mscr-sjd/mscr_sjd_0.008.sh new file mode 100644 index 0000000000000000000000000000000000000000..dbb735d1a9d214ca10ec5dba2391d50a9ac81df4 --- /dev/null +++ b/scripts/ablation/delta/mscr-sjd/mscr_sjd_0.008.sh @@ -0,0 +1,33 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +groupsum_delta=0.008 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/delta/mscr-sjd/mscr_sjd_${groupsum_delta} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +model_path=Alpha-VLLM/Lumina-mGPT-7B-768 +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --model_path=$model_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=768 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/delta/mscr-sjd/mscr_sjd_0.01.sh b/scripts/ablation/delta/mscr-sjd/mscr_sjd_0.01.sh new file mode 100644 index 0000000000000000000000000000000000000000..f1d3406aa9c6d67b7ed0e49d32f52d1d8857a727 --- /dev/null +++ b/scripts/ablation/delta/mscr-sjd/mscr_sjd_0.01.sh @@ -0,0 +1,33 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +groupsum_delta=0.01 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/delta/mscr-sjd/mscr_sjd_${groupsum_delta} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +model_path=Alpha-VLLM/Lumina-mGPT-7B-768 +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --model_path=$model_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=768 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/delta/mscr-sjd/mscr_sjd_0.1.sh b/scripts/ablation/delta/mscr-sjd/mscr_sjd_0.1.sh new file mode 100644 index 0000000000000000000000000000000000000000..f5351a9af8c62a37b4c3904c77ad3554a1547c62 --- /dev/null +++ b/scripts/ablation/delta/mscr-sjd/mscr_sjd_0.1.sh @@ -0,0 +1,33 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +groupsum_delta=0.1 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/delta/mscr-sjd/mscr_sjd_${groupsum_delta} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +model_path=Alpha-VLLM/Lumina-mGPT-7B-768 +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --model_path=$model_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=768 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/delta/mscr-sjd/mscr_sjd_1.sh b/scripts/ablation/delta/mscr-sjd/mscr_sjd_1.sh new file mode 100644 index 0000000000000000000000000000000000000000..aae7c5860c0b87fbe6bf026838196096d104b9f0 --- /dev/null +++ b/scripts/ablation/delta/mscr-sjd/mscr_sjd_1.sh @@ -0,0 +1,33 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +groupsum_delta=1 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/delta/mscr-sjd/mscr_sjd_${groupsum_delta} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +model_path=Alpha-VLLM/Lumina-mGPT-7B-768 +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --model_path=$model_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=768 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num/sjdtree_4.sh b/scripts/ablation/group_num/sjdtree_4.sh new file mode 100644 index 0000000000000000000000000000000000000000..0d69c64b7bfca55d14a21f3dd91483e1945f5295 --- /dev/null +++ b/scripts/ablation/group_num/sjdtree_4.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +tree_type=Grouped_Tree_4 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num/sjdtree_6.sh b/scripts/ablation/group_num/sjdtree_6.sh new file mode 100644 index 0000000000000000000000000000000000000000..3ec54bfe041ddfc040c157657117d797679ea3d3 --- /dev/null +++ b/scripts/ablation/group_num/sjdtree_6.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +tree_type=Grouped_Tree_6 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num/sjdtree_8.sh b/scripts/ablation/group_num/sjdtree_8.sh new file mode 100644 index 0000000000000000000000000000000000000000..2d29f64470f29c37d4662ceab3851d0658c7253a --- /dev/null +++ b/scripts/ablation/group_num/sjdtree_8.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +tree_type=Grouped_Tree_8 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_10.sh b/scripts/ablation/group_num_short/sjdtree_10.sh new file mode 100644 index 0000000000000000000000000000000000000000..27a4dc8b32aebe98c6967d710e88fc1bc91353fa --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_10.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_10 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_11.sh b/scripts/ablation/group_num_short/sjdtree_11.sh new file mode 100644 index 0000000000000000000000000000000000000000..bbf98e547a74ac633132b341595ffc37c372e0d8 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_11.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_11 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_11_10.sh b/scripts/ablation/group_num_short/sjdtree_11_10.sh new file mode 100644 index 0000000000000000000000000000000000000000..d791788e6505d3cf081a04a3d3e27c945302675c --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_11_10.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_11_10 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_11_6.sh b/scripts/ablation/group_num_short/sjdtree_11_6.sh new file mode 100644 index 0000000000000000000000000000000000000000..10740995da08cfb2cf8cfc78495689e0e060d2a7 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_11_6.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_11_6 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_11_8.sh b/scripts/ablation/group_num_short/sjdtree_11_8.sh new file mode 100644 index 0000000000000000000000000000000000000000..5b5d235f87b9e5849733bb4b09fb84dde294c1b2 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_11_8.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_11_8 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_12.sh b/scripts/ablation/group_num_short/sjdtree_12.sh new file mode 100644 index 0000000000000000000000000000000000000000..89a99c15b15e227ed97fbc7f5e0229af93c235bb --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_12.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_12 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_2.sh b/scripts/ablation/group_num_short/sjdtree_2.sh new file mode 100644 index 0000000000000000000000000000000000000000..cc48e152f2d3afdfffe3352e35fc507639acbff1 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_2.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_2 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_3.sh b/scripts/ablation/group_num_short/sjdtree_3.sh new file mode 100644 index 0000000000000000000000000000000000000000..2d229dd743d95cc3f398f92c1bb50f02fa156e67 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_3.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_3 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_4.sh b/scripts/ablation/group_num_short/sjdtree_4.sh new file mode 100644 index 0000000000000000000000000000000000000000..89ba5b5d7bb261822141eb33e33b36bd01c56598 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_4.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_4 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_5.sh b/scripts/ablation/group_num_short/sjdtree_5.sh new file mode 100644 index 0000000000000000000000000000000000000000..2b5d3cc6984a07d348437d5b968a3adf556b780c --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_5.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_5 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_5_10.sh b/scripts/ablation/group_num_short/sjdtree_5_10.sh new file mode 100644 index 0000000000000000000000000000000000000000..19d401a65dcbe5c0d58610c8df0722a942f664e3 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_5_10.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_5_10 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_6.sh b/scripts/ablation/group_num_short/sjdtree_6.sh new file mode 100644 index 0000000000000000000000000000000000000000..250384a2f7b5eeb1c4cd10fc6b4b07d8516e106c --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_6.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_6 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_6_10.sh b/scripts/ablation/group_num_short/sjdtree_6_10.sh new file mode 100644 index 0000000000000000000000000000000000000000..432a938f0ea953684f98f0727fa2ee6e884424f5 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_6_10.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_6_10 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_6_14.sh b/scripts/ablation/group_num_short/sjdtree_6_14.sh new file mode 100644 index 0000000000000000000000000000000000000000..7c2fe9ecd867acbce4a284ccc7b2844018022dec --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_6_14.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_6_14 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_7.sh b/scripts/ablation/group_num_short/sjdtree_7.sh new file mode 100644 index 0000000000000000000000000000000000000000..078d6930421a7fb10036b72e05e6e7b0efcfe758 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_7.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_7 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_8.sh b/scripts/ablation/group_num_short/sjdtree_8.sh new file mode 100644 index 0000000000000000000000000000000000000000..dd64e62a25e1c1ee355d696ab0db9cc7941c36ce --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_8.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_8 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/sjdtree_9.sh b/scripts/ablation/group_num_short/sjdtree_9.sh new file mode 100644 index 0000000000000000000000000000000000000000..946674bd8d0204d66dc3f96aa4959cb6b8553ff6 --- /dev/null +++ b/scripts/ablation/group_num_short/sjdtree_9.sh @@ -0,0 +1,30 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +tree_type=Grouped_Tree_9 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/group_num/sjd_test_${tree_type} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + --gres=gpu:1 \ + -p DataFrontier_Knowledge \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --tree_choices=$tree_type > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/group_num_short/slurm-6200549.out b/scripts/ablation/group_num_short/slurm-6200549.out new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/scripts/ablation/group_num_short/slurm-6200585.out b/scripts/ablation/group_num_short/slurm-6200585.out new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/scripts/ablation/group_num_short/slurm-6200599.out b/scripts/ablation/group_num_short/slurm-6200599.out new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/scripts/ablation/group_num_short/slurm-6201430.out b/scripts/ablation/group_num_short/slurm-6201430.out new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/scripts/ablation/sematic/ms_sjd_random/ms_sjd_random.sh b/scripts/ablation/sematic/ms_sjd_random/ms_sjd_random.sh new file mode 100644 index 0000000000000000000000000000000000000000..3aa9ed6524399698774500851351c66e4b2a2285 --- /dev/null +++ b/scripts/ablation/sematic/ms_sjd_random/ms_sjd_random.sh @@ -0,0 +1,31 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi_random' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-100' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/sematic/ms_sjd_random +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +model_path=Alpha-VLLM/Lumina-mGPT-7B-768 +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --model_path=$model_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=768 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/sematic/ms_sjd_re_1/ms_sjd_re.sh b/scripts/ablation/sematic/ms_sjd_re_1/ms_sjd_re.sh new file mode 100644 index 0000000000000000000000000000000000000000..ad6929f7f53d2a576c7916a4ce442e211c5a9b08 --- /dev/null +++ b/scripts/ablation/sematic/ms_sjd_re_1/ms_sjd_re.sh @@ -0,0 +1,31 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/sjdtree +isp='random' +method='speculative_jacobi_replace' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='1301-1600' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/ablation/sematic/ms_sjd_re +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +model_path=Alpha-VLLM/Lumina-mGPT-7B-768 +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python /mnt/petrelfs/leihaodong/ICLR25/sjdtree/main.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --model_path=$model_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=768 \ + --tree_choices=Grouped_Tree_6 > ${output_path}_${slice}.log 2>&1 \ No newline at end of file diff --git a/scripts/ablation/test_fast.sh b/scripts/ablation/test_fast.sh new file mode 100644 index 0000000000000000000000000000000000000000..abd0c054279e352f097f9a97c68a976d1a777464 --- /dev/null +++ b/scripts/ablation/test_fast.sh @@ -0,0 +1,9 @@ +cd /mnt/petrelfs/leihaodong/ICLR25/scripts/ablation/group_num_short +# echo 11 +# bash sjdtree_11.sh +echo 6 +# sbatch --quotatype=auto sjdtree_12.sh +sbatch \ + -p DataFrontier_Knowledge \ + --gres=gpu:1 \ + sjdtree_12.sh \ No newline at end of file diff --git a/scripts/emu3/MSCOCO/base.sh b/scripts/emu3/MSCOCO/base.sh new file mode 100644 index 0000000000000000000000000000000000000000..411f5d4d2883fe7523ac3c80d2312f0de3c6b740 --- /dev/null +++ b/scripts/emu3/MSCOCO/base.sh @@ -0,0 +1,26 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +isp='random' +method='speculative_jacobi' +num_init_new_token=1 +benchmark_way='order' +prompt="MSCOCO2017Val" +num_images=4000 +slice='0-4000' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/base +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/MSCOCO/gsd.sh b/scripts/emu3/MSCOCO/gsd.sh new file mode 100644 index 0000000000000000000000000000000000000000..f7fb82045099a4dc371481789488ba7a612403cb --- /dev/null +++ b/scripts/emu3/MSCOCO/gsd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='group_speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="MSCOCO2017Val" +num_images=4000 +slice='485-4000' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/gsd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/MSCOCO/jd.sh b/scripts/emu3/MSCOCO/jd.sh new file mode 100644 index 0000000000000000000000000000000000000000..49e209de40d97929a295b365aa02050446437441 --- /dev/null +++ b/scripts/emu3/MSCOCO/jd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="MSCOCO2017Val" +num_images=4000 +slice='0-1' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/sjd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/MSCOCO/lantern.sh b/scripts/emu3/MSCOCO/lantern.sh new file mode 100644 index 0000000000000000000000000000000000000000..bd29eb50057672d8d0396c8183ab5816e0a0a2e1 --- /dev/null +++ b/scripts/emu3/MSCOCO/lantern.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='lantern' +num_init_new_token=16 +benchmark_way='order' +prompt="MSCOCO2017Val" +num_images=4000 +slice='485-4000' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/lantern +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/MSCOCO/ms_sjd.sh b/scripts/emu3/MSCOCO/ms_sjd.sh new file mode 100644 index 0000000000000000000000000000000000000000..43a7e97e52e434fea43afd011c18f389a838a8ca --- /dev/null +++ b/scripts/emu3/MSCOCO/ms_sjd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="MSCOCO2017Val" +num_images=4000 +slice='0-4000' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/ms_sjd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/MSCOCO/mscr_gsd.sh b/scripts/emu3/MSCOCO/mscr_gsd.sh new file mode 100644 index 0000000000000000000000000000000000000000..1f6e9548a8645dd70224c011a1e445eb17da5402 --- /dev/null +++ b/scripts/emu3/MSCOCO/mscr_gsd.sh @@ -0,0 +1,31 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='group_speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="MSCOCO2017Val" +num_images=4000 +slice='485-4000' +groupsum_delta=0.008 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/mscr_gsd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/MSCOCO/mscr_gsd1.sh b/scripts/emu3/MSCOCO/mscr_gsd1.sh new file mode 100644 index 0000000000000000000000000000000000000000..567a5011bda9a1fd7764836537129e149d14b122 --- /dev/null +++ b/scripts/emu3/MSCOCO/mscr_gsd1.sh @@ -0,0 +1,31 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='group_speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="MSCOCO2017Val" +num_images=4000 +slice='0-4000' +groupsum_delta=0.005 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/mscr_gsd_${groupsum_delta} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/MSCOCO/mscr_sjd.sh b/scripts/emu3/MSCOCO/mscr_sjd.sh new file mode 100644 index 0000000000000000000000000000000000000000..b7883db03fbfc749da8a227af7f38c82618b8c3b --- /dev/null +++ b/scripts/emu3/MSCOCO/mscr_sjd.sh @@ -0,0 +1,31 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="MSCOCO2017Val" +num_images=4000 +slice='0-4000' +groupsum_delta=0.05 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/mscr_sjd_${groupsum_delta} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/MSCOCO/sjd.sh b/scripts/emu3/MSCOCO/sjd.sh new file mode 100644 index 0000000000000000000000000000000000000000..5b7119ed7bc32c0b7d510c462d9ef4498885efcc --- /dev/null +++ b/scripts/emu3/MSCOCO/sjd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="MSCOCO2017Val" +num_images=4000 +slice='485-4000' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/sjd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/PP/base.sh b/scripts/emu3/PP/base.sh new file mode 100644 index 0000000000000000000000000000000000000000..8b5bb17680496cf31a5a4078ee80a22ffc36e6c3 --- /dev/null +++ b/scripts/emu3/PP/base.sh @@ -0,0 +1,37 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +isp='random' +method='speculative_jacobi' +num_init_new_token=1 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/base +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice > ${output_path}.log 2>&1 + +# python main_emu3.py \ +# --tokenizer_path=$tokenizer_path \ +# --output_path=$output_path \ +# --isp=$isp \ +# --method=$method \ +# --num_init_new_token=$num_init_new_token \ +# --benchmark_way=$benchmark_way \ +# --prompt=$prompt \ +# --num_images=$num_images \ +# --slice=$slice > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/PP/gsd.sh b/scripts/emu3/PP/gsd.sh new file mode 100644 index 0000000000000000000000000000000000000000..f90d797d89878e12b23dab3fcf192ab0860be076 --- /dev/null +++ b/scripts/emu3/PP/gsd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='group_speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='485-1600' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/gsd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/PP/jd.sh b/scripts/emu3/PP/jd.sh new file mode 100644 index 0000000000000000000000000000000000000000..f60c5ca4b4b1d4a1eacc0f817b80cadc71ec354c --- /dev/null +++ b/scripts/emu3/PP/jd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/sjd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/PP/lantern.sh b/scripts/emu3/PP/lantern.sh new file mode 100644 index 0000000000000000000000000000000000000000..238811b7f5144c5bb508495246074eaad00b178a --- /dev/null +++ b/scripts/emu3/PP/lantern.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='lantern' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='485-1600' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/lantern +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/PP/ms_sjd.sh b/scripts/emu3/PP/ms_sjd.sh new file mode 100644 index 0000000000000000000000000000000000000000..60a54d28b93eca2a2033e90c782ed4a38f95d2ad --- /dev/null +++ b/scripts/emu3/PP/ms_sjd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/ms_sjd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/PP/mscr_gsd.sh b/scripts/emu3/PP/mscr_gsd.sh new file mode 100644 index 0000000000000000000000000000000000000000..9a493eebb46f6a1720c54f3994c7bd4febdaa200 --- /dev/null +++ b/scripts/emu3/PP/mscr_gsd.sh @@ -0,0 +1,31 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='group_speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +groupsum_delta=0.008 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/mscr_gsd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/PP/mscr_sjd.sh b/scripts/emu3/PP/mscr_sjd.sh new file mode 100644 index 0000000000000000000000000000000000000000..2b942d0f891948a9a1aa64d69b34b62aa4ebb57d --- /dev/null +++ b/scripts/emu3/PP/mscr_sjd.sh @@ -0,0 +1,47 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +groupsum_delta=0.05 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/mscr_sjd_${groupsum_delta} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 + +# python main_emu3.py \ +# --tokenizer_path=$tokenizer_path \ +# --output_path=$output_path \ +# --model_path=$model_path \ +# --isp=$isp \ +# --method=$method \ +# --num_init_new_token=$num_init_new_token \ +# --benchmark_way=$benchmark_way \ +# --prompt=$prompt \ +# --num_images=$num_images \ +# --slice=$slice \ +# --static_tree \ +# --groupsum_delta=$groupsum_delta \ +# --target_size=720 \ +# --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/PP/sjd.sh b/scripts/emu3/PP/sjd.sh new file mode 100644 index 0000000000000000000000000000000000000000..98525ceb099f98921aec15c9921e89d1c7e53981 --- /dev/null +++ b/scripts/emu3/PP/sjd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="PartiPrompts" +num_images=1600 +slice='0-1600' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/sjd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/T2ICompBench/base.sh b/scripts/emu3/T2ICompBench/base.sh new file mode 100644 index 0000000000000000000000000000000000000000..7cba09d963bc1d3de89282692dcf739c39a7c046 --- /dev/null +++ b/scripts/emu3/T2ICompBench/base.sh @@ -0,0 +1,26 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +isp='random' +method='speculative_jacobi' +num_init_new_token=1 +benchmark_way='order' +prompt="T2ICompBenchVal" +num_images=2400 +slice='0-2400' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/base +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/T2ICompBench/gsd.sh b/scripts/emu3/T2ICompBench/gsd.sh new file mode 100644 index 0000000000000000000000000000000000000000..c7918d08aeee53af593c45ff8e6a928e1624f08a --- /dev/null +++ b/scripts/emu3/T2ICompBench/gsd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='group_speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="T2ICompBenchVal" +num_images=2400 +slice='485-2400' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/gsd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/T2ICompBench/jd.sh b/scripts/emu3/T2ICompBench/jd.sh new file mode 100644 index 0000000000000000000000000000000000000000..e30b17d74af177447deb116c051c5305857c3e58 --- /dev/null +++ b/scripts/emu3/T2ICompBench/jd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="T2ICompBenchVal" +num_images=2400 +slice='0-1' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/sjd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/T2ICompBench/lantern.sh b/scripts/emu3/T2ICompBench/lantern.sh new file mode 100644 index 0000000000000000000000000000000000000000..ba743b367e7246c858180b7a9179699f35cc804d --- /dev/null +++ b/scripts/emu3/T2ICompBench/lantern.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='lantern' +num_init_new_token=16 +benchmark_way='order' +prompt="T2ICompBenchVal" +num_images=2400 +slice='485-2400' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/lantern +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/T2ICompBench/ms_sjd.sh b/scripts/emu3/T2ICompBench/ms_sjd.sh new file mode 100644 index 0000000000000000000000000000000000000000..8dbfcd55b7c6972feea7d21fdbb2b5bab7db0ab3 --- /dev/null +++ b/scripts/emu3/T2ICompBench/ms_sjd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="T2ICompBenchVal" +num_images=2400 +slice='0-2400' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/ms_sjd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/T2ICompBench/mscr_gsd.sh b/scripts/emu3/T2ICompBench/mscr_gsd.sh new file mode 100644 index 0000000000000000000000000000000000000000..dd3257c1ea5f3edd23e39872187bdfc4156b5c15 --- /dev/null +++ b/scripts/emu3/T2ICompBench/mscr_gsd.sh @@ -0,0 +1,31 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='group_speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="T2ICompBenchVal" +num_images=2400 +slice='0-2400' +groupsum_delta=0.008 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/mscr_gsd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/T2ICompBench/mscr_sjd.sh b/scripts/emu3/T2ICompBench/mscr_sjd.sh new file mode 100644 index 0000000000000000000000000000000000000000..367afd4f5a18847c4734f75307e629bd1cea7594 --- /dev/null +++ b/scripts/emu3/T2ICompBench/mscr_sjd.sh @@ -0,0 +1,31 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='speculative_jacobi_groupsum' +num_init_new_token=16 +benchmark_way='order' +prompt="T2ICompBenchVal" +num_images=2400 +slice='0-2400' +groupsum_delta=0.05 +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/mscr_sjd_${groupsum_delta} +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --groupsum_delta=$groupsum_delta \ + --target_size=720 \ + --tree_choices=Grouped_Tree_6 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/emu3/T2ICompBench/sjd.sh b/scripts/emu3/T2ICompBench/sjd.sh new file mode 100644 index 0000000000000000000000000000000000000000..152d8ffd7eac624cdeabcd0fbf3fd51e26351935 --- /dev/null +++ b/scripts/emu3/T2ICompBench/sjd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/sjdtree +isp='random' +method='speculative_jacobi' +num_init_new_token=16 +benchmark_way='order' +prompt="T2ICompBenchVal" +num_images=2400 +slice='0-2400' +output_path=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/${prompt}/sjd +tokenizer_path=/mnt/petrelfs/leihaodong/local_model/chameleon/tokenizer +mkdir -p ${output_path} + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python main_emu3.py \ + --tokenizer_path=$tokenizer_path \ + --output_path=$output_path \ + --isp=$isp \ + --method=$method \ + --num_init_new_token=$num_init_new_token \ + --benchmark_way=$benchmark_way \ + --prompt=$prompt \ + --num_images=$num_images \ + --slice=$slice \ + --static_tree \ + --target_size=720 \ + --tree_choices=Line_16 > ${output_path}.log 2>&1 \ No newline at end of file diff --git a/scripts/eval/eval.sh b/scripts/eval/eval.sh new file mode 100644 index 0000000000000000000000000000000000000000..8c039e5d0bc21506557e6a44d0aa070d8bdf39a3 --- /dev/null +++ b/scripts/eval/eval.sh @@ -0,0 +1,40 @@ + +# sbatch \ +# -p DataFrontier_Knowledge \ +# --gres=gpu:1 \ +# /mnt/petrelfs/leihaodong/ICLR25/scripts/eval/eval_pp.sh + +# sbatch \ +# -p DataFrontier_Knowledge \ +# --gres=gpu:1 \ +# /mnt/petrelfs/leihaodong/ICLR25/scripts/eval/eval_pp1.sh + +# sbatch \ +# -p DataFrontier_Knowledge \ +# --gres=gpu:1 \ +# /mnt/petrelfs/leihaodong/ICLR25/scripts/eval/eval_pp2.sh + +# sbatch \ +# -p DataFrontier_Knowledge \ +# --gres=gpu:1 \ +# /mnt/petrelfs/leihaodong/ICLR25/scripts/eval/eval_pp3.sh + +sbatch \ + -p DataFrontier_Knowledge \ + --gres=gpu:1 \ + /mnt/petrelfs/leihaodong/ICLR25/scripts/eval/eval_pp4.sh + +sbatch \ + -p DataFrontier_Knowledge \ + --gres=gpu:1 \ + /mnt/petrelfs/leihaodong/ICLR25/scripts/lumina_gpt/T2ICompBench/ms_sjd.sh + +# sbatch \ +# -p DataFrontier_Knowledge \ +# --gres=gpu:1 \ +# /mnt/petrelfs/leihaodong/ICLR25/scripts/eval/eval_pp5.sh + +# sbatch \ +# -p DataFrontier_Knowledge \ +# --gres=gpu:1 \ +# /mnt/petrelfs/leihaodong/ICLR25/scripts/eval/eval_pp6.sh diff --git a/scripts/eval/eval_mscoco.sh b/scripts/eval/eval_mscoco.sh new file mode 100644 index 0000000000000000000000000000000000000000..056cf4f5292f8e9feb0b9e15dac3aa195e6a63f0 --- /dev/null +++ b/scripts/eval/eval_mscoco.sh @@ -0,0 +1,15 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/captions_val2017.json +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Lumina-mGPT-7B-768_MSCOCO2017Val/base/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --coco_gt_path /mnt/petrelfs/leihaodong/local_dataset/val2017 \ + --dataset_name coco \ + --n_images 0 \ No newline at end of file diff --git a/scripts/eval/eval_mscoco1.sh b/scripts/eval/eval_mscoco1.sh new file mode 100644 index 0000000000000000000000000000000000000000..1ae438b4499cff1830fa2cf7350403564a8a2804 --- /dev/null +++ b/scripts/eval/eval_mscoco1.sh @@ -0,0 +1,15 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/captions_val2017.json +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/MSCOCO2017Val/base/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --coco_gt_path /mnt/petrelfs/leihaodong/local_dataset/val2017 \ + --dataset_name coco \ + --n_images 0 \ No newline at end of file diff --git a/scripts/eval/eval_mscoco2.sh b/scripts/eval/eval_mscoco2.sh new file mode 100644 index 0000000000000000000000000000000000000000..7a5d1f3bbbc20ce8cbb1cfb6974867ca142526ec --- /dev/null +++ b/scripts/eval/eval_mscoco2.sh @@ -0,0 +1,15 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/captions_val2017.json +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/MSCOCO2017Val/gsd/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --coco_gt_path /mnt/petrelfs/leihaodong/local_dataset/val2017 \ + --dataset_name coco \ + --n_images 0 \ No newline at end of file diff --git a/scripts/eval/eval_mscoco3.sh b/scripts/eval/eval_mscoco3.sh new file mode 100644 index 0000000000000000000000000000000000000000..f949d646c2f26f65b488b65b3ed7e4858f92fbb9 --- /dev/null +++ b/scripts/eval/eval_mscoco3.sh @@ -0,0 +1,15 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/captions_val2017.json +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/MSCOCO2017Val/lantern/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --coco_gt_path /mnt/petrelfs/leihaodong/local_dataset/val2017 \ + --dataset_name coco \ + --n_images 0 \ No newline at end of file diff --git a/scripts/eval/eval_mscoco4.sh b/scripts/eval/eval_mscoco4.sh new file mode 100644 index 0000000000000000000000000000000000000000..2419ec780383595fec2650ac1b74b19e1c97dd74 --- /dev/null +++ b/scripts/eval/eval_mscoco4.sh @@ -0,0 +1,15 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/captions_val2017.json +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/MSCOCO2017Val/ms_sjd/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --coco_gt_path /mnt/petrelfs/leihaodong/local_dataset/val2017 \ + --dataset_name coco \ + --n_images 0 \ No newline at end of file diff --git a/scripts/eval/eval_mscoco5.sh b/scripts/eval/eval_mscoco5.sh new file mode 100644 index 0000000000000000000000000000000000000000..a40e9d7f40436371632eb521e47ec818cabd2176 --- /dev/null +++ b/scripts/eval/eval_mscoco5.sh @@ -0,0 +1,15 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/captions_val2017.json +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/MSCOCO2017Val/mscr_gsd/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --coco_gt_path /mnt/petrelfs/leihaodong/local_dataset/val2017 \ + --dataset_name coco \ + --n_images 0 \ No newline at end of file diff --git a/scripts/eval/eval_mscoco6.sh b/scripts/eval/eval_mscoco6.sh new file mode 100644 index 0000000000000000000000000000000000000000..8eed46fd26a402c85da9a5582c5bd930722d45f9 --- /dev/null +++ b/scripts/eval/eval_mscoco6.sh @@ -0,0 +1,15 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/captions_val2017.json +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Emu3/MSCOCO2017Val/mscr_sjd_0.05/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --coco_gt_path /mnt/petrelfs/leihaodong/local_dataset/val2017 \ + --dataset_name coco \ + --n_images 0 \ No newline at end of file diff --git a/scripts/eval/eval_pp2.sh b/scripts/eval/eval_pp2.sh new file mode 100644 index 0000000000000000000000000000000000000000..9789c969e54c1fc689b589a5f6ef591a7e8a908a --- /dev/null +++ b/scripts/eval/eval_pp2.sh @@ -0,0 +1,14 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/PartiPrompts.tsv +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Lumina-mGPT-7B-768_PartiPrompts/mscr_sjd_0.05/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --dataset_name parti_cocoformat \ + --n_images 0 \ No newline at end of file diff --git a/scripts/eval/eval_pp3.sh b/scripts/eval/eval_pp3.sh new file mode 100644 index 0000000000000000000000000000000000000000..67244663a4dc888e5a07d24b7557a1d00bcf2e5c --- /dev/null +++ b/scripts/eval/eval_pp3.sh @@ -0,0 +1,14 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/PartiPrompts.tsv +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Lumina-mGPT-7B-768_PartiPrompts/mscr_sjd_0.1/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --dataset_name parti_cocoformat \ + --n_images 0 \ No newline at end of file diff --git a/scripts/eval/eval_pp4.sh b/scripts/eval/eval_pp4.sh new file mode 100644 index 0000000000000000000000000000000000000000..04b0664fe36f45c5837546ed1baface2f9c7d680 --- /dev/null +++ b/scripts/eval/eval_pp4.sh @@ -0,0 +1,14 @@ +#!/bin/sh +cd /mnt/petrelfs/leihaodong/ICLR25/eval +# HF_ENDPOINT=https://hf-mirror.com +dataset_anno_file=/mnt/petrelfs/leihaodong/ICLR25/sjdtree/data/prompts/PartiPrompts.tsv +workdir=/mnt/petrelfs/leihaodong/ICLR25/exp/Lumina-mGPT-7B-768_PartiPrompts/mscr_sjd_1/img + +srun \ + -N 1 \ + --ntasks-per-node 1 \ + python evaluation_metrics.py \ + --workdir $workdir \ + --dataset_anno_file $dataset_anno_file \ + --dataset_name parti_cocoformat \ + --n_images 0 \ No newline at end of file diff --git a/scripts/opt_tree copy.err b/scripts/opt_tree copy.err new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/scripts/opt_tree copy.out b/scripts/opt_tree copy.out new file mode 100644 index 0000000000000000000000000000000000000000..89ddebfddf13623a1917a70a9d017dd54c2dee10 --- /dev/null +++ b/scripts/opt_tree copy.out @@ -0,0 +1,23 @@ +Optimization terminated successfully (Exit mode 0) + Current function value: -78.27635288719443 + Iterations: 31 + Function evaluations: 218 + Gradient evaluations: 31 +最优节点分配(连续解): +层 1: 2.86 个节点 +层 2: 6.64 个节点 +层 3: 12.90 个节点 +层 4: 20.62 个节点 +层 5: 35.99 个节点 +层 6: 1.00 个节点 + +最大值: 78.2764 + +近似最优整数解: +层 1: 0 个节点 +层 2: 7 个节点 +层 3: 13 个节点 +层 4: 22 个节点 +层 5: 38 个节点 +层 6: 0 个节点 +整数值: 79.3618 diff --git a/scripts/opt_tree.err b/scripts/opt_tree.err new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/scripts/opt_tree.out b/scripts/opt_tree.out new file mode 100644 index 0000000000000000000000000000000000000000..2bb8bdea93627b257c114b0f07a4793d1adb6af6 --- /dev/null +++ b/scripts/opt_tree.out @@ -0,0 +1,39 @@ +Optimization terminated successfully (Exit mode 0) + Current function value: -78.2763528868222 + Iterations: 31 + Function evaluations: 218 + Gradient evaluations: 31 +最优节点分配(连续解): +层 1: 2.86 个节点 +层 2: 6.64 个节点 +层 3: 12.90 个节点 +层 4: 20.62 个节点 +层 5: 35.99 个节点 +层 6: 1.00 个节点 + +最大值: 78.2764 + +近似最优整数解: +层 1: 3 个节点 +层 2: 7 个节点 +层 3: 13 个节点 +层 4: 20 个节点 +层 5: 36 个节点 +层 6: 1 个节点 +整数值: 78.2736 + +验证: +总和: 80 +所有节点 ≥ 1: True + + +备选:使用动态规划寻找最优整数解... + +优化后的整数解: +层 1: 3 个节点 +层 2: 7 个节点 +层 3: 13 个节点 +层 4: 20 个节点 +层 5: 36 个节点 +层 6: 1 个节点 +优化整数值: 78.2736 diff --git a/scripts/opt_tree.py b/scripts/opt_tree.py new file mode 100644 index 0000000000000000000000000000000000000000..89f1a73feda19f3c1056ab4bd580266a160334d3 --- /dev/null +++ b/scripts/opt_tree.py @@ -0,0 +1,65 @@ +import numpy as np +from scipy.optimize import minimize + +# 参数 +p = np.array([0.8, 0.5, 0.3, 0.2, 0.12, 0.07]) +q = 1 - p # 失效概率 +N_total = 80 + +def objective(n): + """目标函数:Σ n_i * [1 - q_i^{n_i}]""" + return np.sum(n * (1 - q**n)) + +# 约束条件 +constraints = [ + {'type': 'eq', 'fun': lambda n: np.sum(n) - N_total}, + {'type': 'ineq', 'fun': lambda n: n-1} # n_i >= 0 +] + +# 初始猜测(均匀分配) +n0 = np.ones(6) * N_total / 6 +n0 = np.maximum(n0, 1) # 确保初始值 >=1 + +# 优化(使用连续实数) +res = minimize(lambda n: -objective(n), n0, + constraints=constraints, + bounds=[(0, N_total)]*6, + method='SLSQP', + options={'maxiter': 50, # 修改最大迭代次数为 20(原默认 100) + 'ftol': 1e-6, # 函数容差(可调小到 1e-8 以增加迭代) + 'disp': True}) # 打印迭代日志) +n_opt = res.x +max_value = objective(n_opt) + +print("最优节点分配(连续解):") +for i in range(6): + print(f"层 {i+1}: {n_opt[i]:.2f} 个节点") +print(f"\n最大值: {max_value:.4f}") + +# 检查整数解 +from itertools import product +import math + +# 搜索附近整数解(简单网格) +def integer_search(center, radius=2): + best_val = -1 + best_n = None + + # 生成附近整数组合 + ranges = [range(max(0, int(center[i])-radius), + int(center[i])+radius+1) for i in range(6)] + + # 限制组合数量,实际可更精细 + for combo in product(*ranges): + if sum(combo) == N_total and all(x >= 0 for x in combo): + val = objective(np.array(combo)) + if val > best_val: + best_val = val + best_n = combo + return best_n, best_val + +int_n, int_val = integer_search(n_opt, radius=3) +print("\n近似最优整数解:") +for i in range(6): + print(f"层 {i+1}: {int_n[i]} 个节点") +print(f"整数值: {int_val:.4f}") \ No newline at end of file diff --git a/scripts/opt_tree.sh b/scripts/opt_tree.sh new file mode 100644 index 0000000000000000000000000000000000000000..68ce534ba4fa78203f717c6824966b2afcd7d0fd --- /dev/null +++ b/scripts/opt_tree.sh @@ -0,0 +1,7 @@ +#!/bin/bash +#SBATCH -N 1 # 节点数(可改成多节点) +#SBATCH --job-name=opt # 可选:任务名,便于查看 +# ==================== 真正要跑的程序 ==================== + +# python /mnt/petrelfs/leihaodong/ICLR25/scripts/opt_tree.py +python /mnt/petrelfs/leihaodong/ICLR25/scripts/opt_tree1.py \ No newline at end of file diff --git a/scripts/opt_tree1.py b/scripts/opt_tree1.py new file mode 100644 index 0000000000000000000000000000000000000000..994751fbc9aad39e2c3512cf3dab207007d9b13d --- /dev/null +++ b/scripts/opt_tree1.py @@ -0,0 +1,156 @@ +import numpy as np +from scipy.optimize import minimize + +# 参数 +p = np.array([0.8, 0.5, 0.3, 0.2, 0.12, 0.07]) +q = 1 - p # 失效概率 +N_total = 80 + +def objective(n): + """目标函数:Σ n_i * [1 - q_i^{n_i}]""" + return np.sum(n * (1 - q**n)) + +# 修正约束条件 +constraints = [ + {'type': 'eq', 'fun': lambda n: np.sum(n) - N_total} +] + +# 设置边界为至少1个节点 +bounds = [(1, N_total)] * 6 + +# 初始猜测(均匀分配) +n0 = np.ones(6) * N_total / 6 +n0 = np.maximum(n0, 1) # 确保初始值 >=1 + +# 优化(使用连续实数) +res = minimize(lambda n: -objective(n), n0, + bounds=bounds, + constraints=constraints, + method='SLSQP', + options={'maxiter': 50, + 'ftol': 1e-6, + 'disp': True}) +n_opt = res.x +max_value = objective(n_opt) + +print("最优节点分配(连续解):") +for i in range(6): + print(f"层 {i+1}: {n_opt[i]:.2f} 个节点") +print(f"\n最大值: {max_value:.4f}") + +# 检查整数解 +from itertools import product + +def integer_search(center, radius=3): + best_val = -1 + best_n = None + + # 生成附近整数组合(确保每个值至少为1) + ranges = [] + for i in range(6): + start = max(1, int(center[i]) - radius) # 至少为1 + end = min(N_total, int(center[i]) + radius) # 最多N_total + ranges.append(range(start, end + 1)) + + # 限制搜索范围,避免组合爆炸 + count = 0 + max_combinations = 100000 # 限制搜索组合数 + + for combo in product(*ranges): + count += 1 + if count > max_combinations: + break + + if sum(combo) == N_total and all(x >= 1 for x in combo): + val = objective(np.array(combo)) + if val > best_val: + best_val = val + best_n = combo + + # 如果没找到合适的解,尝试更简单的启发式搜索 + if best_n is None: + print("直接搜索未找到合适解,使用四舍五入法...") + # 四舍五入并调整到总和为80 + rounded = np.round(n_opt).astype(int) + diff = N_total - np.sum(rounded) + + # 调整差值 + if diff > 0: + # 从最小值开始加 + sorted_idx = np.argsort(n_opt - rounded) + for i in range(diff): + rounded[sorted_idx[i]] += 1 + elif diff < 0: + # 从最大值开始减 + sorted_idx = np.argsort(rounded - n_opt)[::-1] + for i in range(-diff): + if rounded[sorted_idx[i]] > 1: # 确保至少为1 + rounded[sorted_idx[i]] -= 1 + + # 确保所有值至少为1 + rounded = np.maximum(rounded, 1) + best_n = tuple(rounded) + best_val = objective(np.array(best_n)) + + return best_n, best_val + +int_n, int_val = integer_search(n_opt, radius=3) +print("\n近似最优整数解:") +for i in range(6): + print(f"层 {i+1}: {int_n[i]} 个节点") +print(f"整数值: {int_val:.4f}") + +# 验证 +print(f"\n验证:") +print(f"总和: {sum(int_n)}") +print(f"所有节点 ≥ 1: {all(x >= 1 for x in int_n)}") + +# 附加:使用更智能的整数搜索方法 +print("\n\n备选:使用动态规划寻找最优整数解...") + +# 由于节点数较少,可以尝试更系统的方法 +def find_optimal_integer(): + from itertools import combinations_with_replacement + import math + + best_val = -1 + best_n = None + + # 使用星棒法生成所有可能的组合 + # C(N_total-1, 6-1) = C(79, 5) ≈ 2.3 million 仍然很大 + # 使用更高效的方法:从连续解开始,在附近搜索 + + # 生成所有6个数字总和为80的组合,每个至少为1 + # 这相当于找5个切割点 + + # 由于组合数仍然较大,我们使用更智能的剪枝 + + # 简化的搜索:先固定前5层,最后一层由总和决定 + candidates = [] + + # 放宽搜索半径 + radius = 4 + center = np.round(n_opt).astype(int) + + for n1 in range(max(1, center[0]-radius), center[0]+radius+1): + for n2 in range(max(1, center[1]-radius), center[1]+radius+1): + for n3 in range(max(1, center[2]-radius), center[2]+radius+1): + for n4 in range(max(1, center[3]-radius), center[3]+radius+1): + for n5 in range(max(1, center[4]-radius), center[4]+radius+1): + n6 = N_total - (n1+n2+n3+n4+n5) + if n6 >= 1: + combo = (n1, n2, n3, n4, n5, n6) + # 检查是否在合理范围内 + if all(abs(combo[i] - center[i]) <= radius+2 for i in range(6)): + val = objective(np.array(combo)) + if val > best_val: + best_val = val + best_n = combo + + return best_n, best_val + +opt_int_n, opt_int_val = find_optimal_integer() +print("\n优化后的整数解:") +for i in range(6): + print(f"层 {i+1}: {opt_int_n[i]} 个节点") +print(f"优化整数值: {opt_int_val:.4f}") \ No newline at end of file diff --git a/scripts/task_alot.sh b/scripts/task_alot.sh new file mode 100644 index 0000000000000000000000000000000000000000..a4e6d8ffa27d65a15bbf77702166c193d55e0d17 --- /dev/null +++ b/scripts/task_alot.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# sbatch \ +# -p DataFrontier_Knowledge \ +# --gres=gpu:1 \ +# /mnt/petrelfs/leihaodong/ICLR25/scripts/lumina_gpt/MSCOCO/sjd++.sh + +# sbatch \ +# -p DataFrontier_Knowledge \ +# --gres=gpu:1 \ +# /mnt/petrelfs/leihaodong/ICLR25/scripts/lumina_gpt/MSCOCO/caccl+sjd++.sh + + +sbatch \ + -p DataFrontier_Knowledge \ + --gres=gpu:0 \ + -o /mnt/petrelfs/leihaodong/ICLR25/scripts/opt_tree.out \ + -e /mnt/petrelfs/leihaodong/ICLR25/scripts/opt_tree.err \ + /mnt/petrelfs/leihaodong/ICLR25/scripts/opt_tree.sh \ No newline at end of file