Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 3265a3f

Browse files
Transformers changing scripts & adding analysis
1 parent 4fb26f5 commit 3265a3f

File tree

19 files changed

+241
-31
lines changed

19 files changed

+241
-31
lines changed

tftrt/examples/transformers/scripts/base_script.sh renamed to tftrt/examples/transformers/base_run_inference.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ fi
144144

145145
# %%%%%%%%%%%%%%%%%%%%%%% ARGUMENT VALIDATION %%%%%%%%%%%%%%%%%%%%%%% #
146146

147-
BENCH_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." >/dev/null 2>&1 && pwd )"
147+
BENCH_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/" >/dev/null 2>&1 && pwd )"
148148
cd ${BENCH_DIR}
149149

150150
# Execute the example
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
3+
4+
signature_def['__saved_model_init_op']:
5+
The given SavedModel SignatureDef contains the following input(s):
6+
The given SavedModel SignatureDef contains the following output(s):
7+
outputs['__saved_model_init_op'] tensor_info:
8+
dtype: DT_INVALID
9+
shape: unknown_rank
10+
name: NoOp
11+
Method name is:
12+
13+
signature_def['serving_default']:
14+
The given SavedModel SignatureDef contains the following input(s):
15+
inputs['input_ids'] tensor_info:
16+
dtype: DT_INT32
17+
shape: (-1, -1)
18+
name: serving_default_input_ids:0
19+
The given SavedModel SignatureDef contains the following output(s):
20+
outputs['encoder_last_hidden_state'] tensor_info:
21+
dtype: DT_FLOAT
22+
shape: (-1, -1, 768)
23+
name: StatefulPartitionedCall:0
24+
outputs['logits'] tensor_info:
25+
dtype: DT_FLOAT
26+
shape: (-1, -1, 50265)
27+
name: StatefulPartitionedCall:1
28+
Method name is: tensorflow/serving/predict
29+
30+
Concrete Functions:
31+
Function Name: 'serving'
32+
Option #1
33+
Callable with:
34+
Argument #1
35+
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."
4+
5+
bash ${BASE_DIR}/base_run_inference.sh --model_name="bart_base" ${@}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
3+
4+
signature_def['__saved_model_init_op']:
5+
The given SavedModel SignatureDef contains the following input(s):
6+
The given SavedModel SignatureDef contains the following output(s):
7+
outputs['__saved_model_init_op'] tensor_info:
8+
dtype: DT_INVALID
9+
shape: unknown_rank
10+
name: NoOp
11+
Method name is:
12+
13+
signature_def['serving_default']:
14+
The given SavedModel SignatureDef contains the following input(s):
15+
inputs['input_ids'] tensor_info:
16+
dtype: DT_INT32
17+
shape: (-1, -1)
18+
name: serving_default_input_ids:0
19+
The given SavedModel SignatureDef contains the following output(s):
20+
outputs['encoder_last_hidden_state'] tensor_info:
21+
dtype: DT_FLOAT
22+
shape: (-1, -1, 1024)
23+
name: StatefulPartitionedCall:0
24+
outputs['logits'] tensor_info:
25+
dtype: DT_FLOAT
26+
shape: (-1, -1, 50265)
27+
name: StatefulPartitionedCall:1
28+
Method name is: tensorflow/serving/predict
29+
30+
Concrete Functions:
31+
Function Name: 'serving'
32+
Option #1
33+
Callable with:
34+
Argument #1
35+
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."
4+
5+
bash ${BASE_DIR}/base_run_inference.sh --model_name="bart_large" ${@}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
3+
4+
signature_def['__saved_model_init_op']:
5+
The given SavedModel SignatureDef contains the following input(s):
6+
The given SavedModel SignatureDef contains the following output(s):
7+
outputs['__saved_model_init_op'] tensor_info:
8+
dtype: DT_INVALID
9+
shape: unknown_rank
10+
name: NoOp
11+
Method name is:
12+
13+
signature_def['serving_default']:
14+
The given SavedModel SignatureDef contains the following input(s):
15+
inputs['input_ids'] tensor_info:
16+
dtype: DT_INT32
17+
shape: (-1, -1)
18+
name: serving_default_input_ids:0
19+
The given SavedModel SignatureDef contains the following output(s):
20+
outputs['prediction_logits'] tensor_info:
21+
dtype: DT_FLOAT
22+
shape: (-1, -1, 28996)
23+
name: StatefulPartitionedCall:0
24+
outputs['seq_relationship_logits'] tensor_info:
25+
dtype: DT_FLOAT
26+
shape: (-1, 2)
27+
name: StatefulPartitionedCall:1
28+
Method name is: tensorflow/serving/predict
29+
30+
Concrete Functions:
31+
Function Name: 'serving'
32+
Option #1
33+
Callable with:
34+
Argument #1
35+
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."
4+
5+
bash ${BASE_DIR}/base_run_inference.sh --model_name="bert_base_cased" ${@}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
3+
4+
signature_def['__saved_model_init_op']:
5+
The given SavedModel SignatureDef contains the following input(s):
6+
The given SavedModel SignatureDef contains the following output(s):
7+
outputs['__saved_model_init_op'] tensor_info:
8+
dtype: DT_INVALID
9+
shape: unknown_rank
10+
name: NoOp
11+
Method name is:
12+
13+
signature_def['serving_default']:
14+
The given SavedModel SignatureDef contains the following input(s):
15+
inputs['input_ids'] tensor_info:
16+
dtype: DT_INT32
17+
shape: (-1, -1)
18+
name: serving_default_input_ids:0
19+
The given SavedModel SignatureDef contains the following output(s):
20+
outputs['prediction_logits'] tensor_info:
21+
dtype: DT_FLOAT
22+
shape: (-1, -1, 30522)
23+
name: StatefulPartitionedCall:0
24+
outputs['seq_relationship_logits'] tensor_info:
25+
dtype: DT_FLOAT
26+
shape: (-1, 2)
27+
name: StatefulPartitionedCall:1
28+
Method name is: tensorflow/serving/predict
29+
30+
Concrete Functions:
31+
Function Name: 'serving'
32+
Option #1
33+
Callable with:
34+
Argument #1
35+
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."
4+
5+
bash ${BASE_DIR}/../../base_run_inference.sh --model_name="bert_base_uncased" ${@}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
3+
4+
signature_def['__saved_model_init_op']:
5+
The given SavedModel SignatureDef contains the following input(s):
6+
The given SavedModel SignatureDef contains the following output(s):
7+
outputs['__saved_model_init_op'] tensor_info:
8+
dtype: DT_INVALID
9+
shape: unknown_rank
10+
name: NoOp
11+
Method name is:
12+
13+
signature_def['serving_default']:
14+
The given SavedModel SignatureDef contains the following input(s):
15+
inputs['input_ids'] tensor_info:
16+
dtype: DT_INT32
17+
shape: (-1, -1)
18+
name: serving_default_input_ids:0
19+
The given SavedModel SignatureDef contains the following output(s):
20+
outputs['prediction_logits'] tensor_info:
21+
dtype: DT_FLOAT
22+
shape: (-1, -1, 28996)
23+
name: StatefulPartitionedCall:0
24+
outputs['seq_relationship_logits'] tensor_info:
25+
dtype: DT_FLOAT
26+
shape: (-1, 2)
27+
name: StatefulPartitionedCall:1
28+
Method name is: tensorflow/serving/predict
29+
30+
Concrete Functions:
31+
Function Name: 'serving'
32+
Option #1
33+
Callable with:
34+
Argument #1
35+
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')

0 commit comments

Comments
 (0)