Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
LLama_fastertransformer
Commits
d42788f0
Commit
d42788f0
authored
Sep 04, 2023
by
zhuwenwen
Browse files
modify cpp_benchmark.sh
parent
aa9b300a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
benchmarks/gpt/cpp_benchmark.sh
benchmarks/gpt/cpp_benchmark.sh
+9
-8
No files found.
benchmarks/gpt/cpp_benchmark.sh
View file @
d42788f0
...
@@ -33,20 +33,21 @@ echo -e "| model size | Batch Size | Input length | Output length | Decode value
...
@@ -33,20 +33,21 @@ echo -e "| model size | Batch Size | Input length | Output length | Decode value
echo
-e
"|:----------:|:----------:|:------------:|:-------------:|:------------:|:---------:|:---------------:|"
>>
$all_log
echo
-e
"|:----------:|:----------:|:------------:|:-------------:|:------------:|:---------:|:---------------:|"
>>
$all_log
cat
/proc/cpuinfo
>
${
logdir
}
/cpuinfo.txt
cat
/proc/cpuinfo
>
${
logdir
}
/cpuinfo.txt
nvidia
-smi
>
${
logdir
}
/gpuinfo.txt
rocm
-smi
>
${
logdir
}
/gpuinfo.txt
for
model_size
in
"345m"
"5b"
;
# for model_size in "345m" "5b";
for
model_size
in
"345m"
;
do
do
if
[
"
$model_size
"
=
"345m"
]
;
then
if
[
"
$model_size
"
=
"345m"
]
;
then
head_num
=
16
head_num
=
16
size_per_head
=
64
size_per_head
=
64
inter_size
=
$(
echo
"scale=2;
$head_num
*
${
size_per_head
}
* 4 "
| bc
)
inter_size
=
$(
echo
"scale=2;
$head_num
*
${
size_per_head
}
* 4 "
| bc
)
num_layer
=
24
num_layer
=
24
elif
[
"
$model_size
"
=
"5b"
]
;
then
#
elif [ "$model_size" = "5b" ]; then
head_num
=
32
#
head_num=32
size_per_head
=
128
#
size_per_head=128
inter_size
=
$(
echo
"scale=2;
$head_num
*
${
size_per_head
}
* 4 "
| bc
)
#
inter_size=$(echo "scale=2; $head_num * ${size_per_head} * 4 " | bc)
num_layer
=
24
#
num_layer=24
fi
fi
for
decode_type
in
"beamsearch"
"sampling"
;
for
decode_type
in
"beamsearch"
"sampling"
;
...
@@ -93,7 +94,7 @@ python ../examples/pytorch/gpt/utils/generate_gpt_config.py \
...
@@ -93,7 +94,7 @@ python ../examples/pytorch/gpt/utils/generate_gpt_config.py \
--size_per_head
${
size_per_head
}
\
--size_per_head
${
size_per_head
}
\
--inter_size
${
inter_size
}
\
--inter_size
${
inter_size
}
\
--num_layer
${
num_layer
}
\
--num_layer
${
num_layer
}
\
-v
5
1200
\
-v
5
0304
\
-d
fp16
\
-d
fp16
\
-topk
${
topk
}
\
-topk
${
topk
}
\
-topp
${
topp
}
\
-topp
${
topp
}
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment