-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexp_compare_flash2.sh
86 lines (64 loc) · 2.69 KB
/
exp_compare_flash2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#PROMPT_LENGTHS=(8192 )
PROMPT_LENGTHS=(16384 )
PARALLEL_SAMPLES=(1 2 4 8 16 32 64 128 256 512 1024 2048)
export GROUP_NAME="bifurcated_results"
for prompt_len in "${PROMPT_LENGTHS[@]}"; do
for parallel_sample in "${PARALLEL_SAMPLES[@]}"; do
# SDPA
python generate.py --prompt_len $prompt_len --parallel_samples $parallel_sample \
--use_flash2_prefill 1 \
--gqa_aware 0 --bifurcated_attn 0 --use_flash2_decode 0
done
done
for prompt_len in "${PROMPT_LENGTHS[@]}"; do
for parallel_sample in "${PARALLEL_SAMPLES[@]}"; do
python generate.py --prompt_len $prompt_len --parallel_samples $parallel_sample \
--use_flash2_prefill 1 \
--gqa_aware 0 --bifurcated_attn 0 --use_flash2_decode 1
done
done
for prompt_len in "${PROMPT_LENGTHS[@]}"; do
for parallel_sample in "${PARALLEL_SAMPLES[@]}"; do
python generate.py --prompt_len $prompt_len --parallel_samples $parallel_sample \
--use_flash2_prefill 1 \
--gqa_aware 0 --bifurcated_attn 1 --use_flash2_decode 0
done
done
for prompt_len in "${PROMPT_LENGTHS[@]}"; do
for parallel_sample in "${PARALLEL_SAMPLES[@]}"; do
python generate.py --prompt_len $prompt_len --parallel_samples $parallel_sample \
--use_flash2_prefill 1 \
--gqa_aware 1 --bifurcated_attn 0 --use_flash2_decode 1
done
done
for prompt_len in "${PROMPT_LENGTHS[@]}"; do
for parallel_sample in "${PARALLEL_SAMPLES[@]}"; do
python generate.py --prompt_len $prompt_len --parallel_samples $parallel_sample \
--use_flash2_prefill 1 \
--gqa_aware 1 --bifurcated_attn 1 --use_flash2_decode 0
done
done
for prompt_len in "${PROMPT_LENGTHS[@]}"; do
for parallel_sample in "${PARALLEL_SAMPLES[@]}"; do
# SDPA + compile
python generate.py --prompt_len $prompt_len --parallel_samples $parallel_sample \
--use_flash2_prefill 1 \
--gqa_aware 0 --bifurcated_attn 0 --use_flash2_decode 0 --compile
done
done
for prompt_len in "${PROMPT_LENGTHS[@]}"; do
for parallel_sample in "${PARALLEL_SAMPLES[@]}"; do
# Bifurcated + MHA
python generate.py --prompt_len $prompt_len --parallel_samples $parallel_sample \
--use_flash2_prefill 1 \
--gqa_aware 0 --bifurcated_attn 1 --use_flash2_decode 0 --compile
done
done
for prompt_len in "${PROMPT_LENGTHS[@]}"; do
for parallel_sample in "${PARALLEL_SAMPLES[@]}"; do
# Bifurcated + GQA
python generate.py --prompt_len $prompt_len --parallel_samples $parallel_sample \
--use_flash2_prefill 1 \
--gqa_aware 1 --bifurcated_attn 1 --use_flash2_decode 0 --compile
done
done