Skip to content

Commit

Permalink
Transformers changing scripts & adding analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
DEKHTIARJonathan committed Mar 8, 2022
1 parent 4fb26f5 commit 3265a3f
Show file tree
Hide file tree
Showing 19 changed files with 241 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fi

# %%%%%%%%%%%%%%%%%%%%%%% ARGUMENT VALIDATION %%%%%%%%%%%%%%%%%%%%%%% #

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

# Execute the example
Expand Down
35 changes: 35 additions & 0 deletions tftrt/examples/transformers/models/bart_base/analysis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:

signature_def['__saved_model_init_op']:
The given SavedModel SignatureDef contains the following input(s):
The given SavedModel SignatureDef contains the following output(s):
outputs['__saved_model_init_op'] tensor_info:
dtype: DT_INVALID
shape: unknown_rank
name: NoOp
Method name is:

signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['input_ids'] tensor_info:
dtype: DT_INT32
shape: (-1, -1)
name: serving_default_input_ids:0
The given SavedModel SignatureDef contains the following output(s):
outputs['encoder_last_hidden_state'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, 768)
name: StatefulPartitionedCall:0
outputs['logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, 50265)
name: StatefulPartitionedCall:1
Method name is: tensorflow/serving/predict

Concrete Functions:
Function Name: 'serving'
Option #1
Callable with:
Argument #1
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
5 changes: 5 additions & 0 deletions tftrt/examples/transformers/models/bart_base/run_inference.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."

bash ${BASE_DIR}/base_run_inference.sh --model_name="bart_base" ${@}
35 changes: 35 additions & 0 deletions tftrt/examples/transformers/models/bart_large/analysis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:

signature_def['__saved_model_init_op']:
The given SavedModel SignatureDef contains the following input(s):
The given SavedModel SignatureDef contains the following output(s):
outputs['__saved_model_init_op'] tensor_info:
dtype: DT_INVALID
shape: unknown_rank
name: NoOp
Method name is:

signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['input_ids'] tensor_info:
dtype: DT_INT32
shape: (-1, -1)
name: serving_default_input_ids:0
The given SavedModel SignatureDef contains the following output(s):
outputs['encoder_last_hidden_state'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, 1024)
name: StatefulPartitionedCall:0
outputs['logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, 50265)
name: StatefulPartitionedCall:1
Method name is: tensorflow/serving/predict

Concrete Functions:
Function Name: 'serving'
Option #1
Callable with:
Argument #1
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."

bash ${BASE_DIR}/base_run_inference.sh --model_name="bart_large" ${@}
35 changes: 35 additions & 0 deletions tftrt/examples/transformers/models/bert_base_cased/analysis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:

signature_def['__saved_model_init_op']:
The given SavedModel SignatureDef contains the following input(s):
The given SavedModel SignatureDef contains the following output(s):
outputs['__saved_model_init_op'] tensor_info:
dtype: DT_INVALID
shape: unknown_rank
name: NoOp
Method name is:

signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['input_ids'] tensor_info:
dtype: DT_INT32
shape: (-1, -1)
name: serving_default_input_ids:0
The given SavedModel SignatureDef contains the following output(s):
outputs['prediction_logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, 28996)
name: StatefulPartitionedCall:0
outputs['seq_relationship_logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 2)
name: StatefulPartitionedCall:1
Method name is: tensorflow/serving/predict

Concrete Functions:
Function Name: 'serving'
Option #1
Callable with:
Argument #1
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."

bash ${BASE_DIR}/base_run_inference.sh --model_name="bert_base_cased" ${@}
35 changes: 35 additions & 0 deletions tftrt/examples/transformers/models/bert_base_uncased/analysis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:

signature_def['__saved_model_init_op']:
The given SavedModel SignatureDef contains the following input(s):
The given SavedModel SignatureDef contains the following output(s):
outputs['__saved_model_init_op'] tensor_info:
dtype: DT_INVALID
shape: unknown_rank
name: NoOp
Method name is:

signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['input_ids'] tensor_info:
dtype: DT_INT32
shape: (-1, -1)
name: serving_default_input_ids:0
The given SavedModel SignatureDef contains the following output(s):
outputs['prediction_logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, 30522)
name: StatefulPartitionedCall:0
outputs['seq_relationship_logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 2)
name: StatefulPartitionedCall:1
Method name is: tensorflow/serving/predict

Concrete Functions:
Function Name: 'serving'
Option #1
Callable with:
Argument #1
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."

bash ${BASE_DIR}/../../base_run_inference.sh --model_name="bert_base_uncased" ${@}
35 changes: 35 additions & 0 deletions tftrt/examples/transformers/models/bert_large_cased/analysis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:

signature_def['__saved_model_init_op']:
The given SavedModel SignatureDef contains the following input(s):
The given SavedModel SignatureDef contains the following output(s):
outputs['__saved_model_init_op'] tensor_info:
dtype: DT_INVALID
shape: unknown_rank
name: NoOp
Method name is:

signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['input_ids'] tensor_info:
dtype: DT_INT32
shape: (-1, -1)
name: serving_default_input_ids:0
The given SavedModel SignatureDef contains the following output(s):
outputs['prediction_logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, 28996)
name: StatefulPartitionedCall:0
outputs['seq_relationship_logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 2)
name: StatefulPartitionedCall:1
Method name is: tensorflow/serving/predict

Concrete Functions:
Function Name: 'serving'
Option #1
Callable with:
Argument #1
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."

bash ${BASE_DIR}/base_run_inference.sh --model_name="bert_large_cased" ${@}
35 changes: 35 additions & 0 deletions tftrt/examples/transformers/models/bert_large_uncased/analysis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:

signature_def['__saved_model_init_op']:
The given SavedModel SignatureDef contains the following input(s):
The given SavedModel SignatureDef contains the following output(s):
outputs['__saved_model_init_op'] tensor_info:
dtype: DT_INVALID
shape: unknown_rank
name: NoOp
Method name is:

signature_def['serving_default']:
The given SavedModel SignatureDef contains the following input(s):
inputs['input_ids'] tensor_info:
dtype: DT_INT32
shape: (-1, -1)
name: serving_default_input_ids:0
The given SavedModel SignatureDef contains the following output(s):
outputs['prediction_logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, -1, 30522)
name: StatefulPartitionedCall:0
outputs['seq_relationship_logits'] tensor_info:
dtype: DT_FLOAT
shape: (-1, 2)
name: StatefulPartitionedCall:1
Method name is: tensorflow/serving/predict

Concrete Functions:
Function Name: 'serving'
Option #1
Callable with:
Argument #1
input_ids: TensorSpec(shape=(None, None), dtype=tf.int32, name='input_ids')
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../.."

bash ${BASE_DIR}/base_run_inference.sh --model_name="bert_large_uncased" ${@}
5 changes: 0 additions & 5 deletions tftrt/examples/transformers/scripts/bart_base.sh

This file was deleted.

5 changes: 0 additions & 5 deletions tftrt/examples/transformers/scripts/bart_large.sh

This file was deleted.

5 changes: 0 additions & 5 deletions tftrt/examples/transformers/scripts/bert_base_cased.sh

This file was deleted.

5 changes: 0 additions & 5 deletions tftrt/examples/transformers/scripts/bert_base_uncased.sh

This file was deleted.

5 changes: 0 additions & 5 deletions tftrt/examples/transformers/scripts/bert_large_cased.sh

This file was deleted.

5 changes: 0 additions & 5 deletions tftrt/examples/transformers/scripts/bert_large_uncased.sh

This file was deleted.

0 comments on commit 3265a3f

Please sign in to comment.