Skip to content

Commit

Permalink
WIP: add support for byt5 and mt5, closes #1655
Browse files Browse the repository at this point in the history
Signed-off-by: sam-writer <sam.havens@writer.com>
  • Loading branch information
sam-writer committed Dec 22, 2021
1 parent 34a1675 commit d2fa90b
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 73 deletions.
6 changes: 3 additions & 3 deletions demo/HuggingFace/T5/T5ModelConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __init__(self):

def get_python_requirements(self):
base_requirements = super().get_python_requirements()
base_requirements.append("transformers==4.6.1")
base_requirements.append("transformers>=4.8.0")
return base_requirements

def get_network_segments(self):
Expand All @@ -119,8 +119,8 @@ def get_network_segments(self):
return T5ModelTRTConfig.NETWORK_SEGMENTS

def get_metadata_string(self, metadata: NetworkMetadata) -> str:
# Remove redundant t5 name
metadata = metadata._replace(variant=metadata.variant.lstrip("t5-"))
# Remove redundant google/ if present
metadata = metadata._replace(variant=metadata.variant.lstrip("google/"))
return super().get_metadata_string(metadata)

@staticmethod
Expand Down

0 comments on commit d2fa90b

Please sign in to comment.