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
ResNet50_tensorflow
Commits
5067ae5d
Commit
5067ae5d
authored
Jan 07, 2021
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 350648045
parent
ace53b59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
official/nlp/projects/tn_bert/README.md
official/nlp/projects/tn_bert/README.md
+31
-0
No files found.
official/nlp/projects/tn_bert/README.md
0 → 100644
View file @
5067ae5d
# TN-BERT (TensorNetwork BERT)
TN-BERT is a modification of the BERT-base architecture that greatly compresses
the original BERT model using tensor networks. The dense feedforward layers are
replaced with Expand / Condense tn layers tuned to the TPU architecture.
This work is based on research conducted during the development of the
[
TensorNetwork
](
https://arxiv.org/abs/1905.01330
)
Library. Check it out on
[
github
](
https://github.com/google/TensorNetwork
)
.
TN-BERT achieves the following improvements:
*
69M params, or 37% fewer than the original BERT base.
*
22% faster inference than the baseline model on TPUs.
*
Pre-training time under 8 hours on an 8x8 pod of TPUs.
*
15% less energy consumption by accellerators
For more information go to the TF Hub model page
[
here
](
https://tfhub.dev/tensorflow/tn_bert/1
)
### Implementation
The expand_condense and transformer layers are the only components that differ
from the reference BERT implementation. These layers can be viewed at:
*
[
tn_transformer_expand_condense.py
](
https://github.com/tensorflow/models/blob/master/official/nlp/modeling/layers/tn_transformer_expand_condense.py
)
*
[
tn_expand_condense.py
](
https://github.com/tensorflow/models/blob/master/official/nlp/modeling/layers/tn_expand_condense.py
)
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