[Frontend] Remove the slow tokenizer mode (#58545)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
344fcc252a
commit
d636456b1f
@@ -966,8 +966,7 @@ class HfRenderer(BaseRenderer[HfTokenizer]):
|
||||
)
|
||||
|
||||
def _can_produce_offsets(self) -> bool:
|
||||
# HF tokenizers may be slow (use_fast=False); only fast tokenizers
|
||||
# expose offset_mapping.
|
||||
# Only fast tokenizers expose offset_mapping.
|
||||
return self.tokenizer is not None and self.tokenizer.is_fast
|
||||
|
||||
def render_messages(
|
||||
|
||||
Reference in New Issue
Block a user