Skip to content

Commit

Permalink
fix: (issue #32124) Exception raised when running `transformers/examp…
Browse files Browse the repository at this point in the history
…les/flax/language-modeling/t5_tokenizer_model.py`. (#32157)

fix: Exception raised when running .
  • Loading branch information
fshp971 authored Aug 3, 2024
1 parent c1aa0ed commit 7c31d05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/flax/language-modeling/t5_tokenizer_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ def __init__(
tokenizer.pre_tokenizer = pre_tokenizers.Sequence(
[
pre_tokenizers.Metaspace(
replacement=replacement, add_prefix_space="always" if add_prefix_space else "never"
replacement=replacement, prepend_scheme="always" if add_prefix_space else "never"
),
pre_tokenizers.Digits(individual_digits=True),
pre_tokenizers.Punctuation(),
]
)
tokenizer.decoder = decoders.Metaspace(
replacement=replacement, add_prefix_space="always" if add_prefix_space else "never"
replacement=replacement, prepend_scheme="always" if add_prefix_space else "never"
)

tokenizer.post_processor = TemplateProcessing(
Expand Down

0 comments on commit 7c31d05

Please sign in to comment.