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

Fixing model export breakage. #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mesh_tensorflow/transformer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ def _verify_feature_exists(feature_name, should_exist):

# Detokenize in the graph if supported by vocabulary and accelerator.
def _maybe_detokenize(ids, vocab):
if not use_tpu and hasattr(vocab, "decode_tf"):
return vocab.decode_tf(ids)
if not use_tpu and hasattr(vocab, "tf_tokenizer"):
return vocab.tf_tokenizer.detokenize(ids)
return ids
if mode == "score":
# compute log-likelihoods per sequence
Expand Down