Skip to content

Commit

Permalink
Fix tokenizer type
Browse files Browse the repository at this point in the history
  • Loading branch information
ProbablyFaiz committed Jun 4, 2024
1 parent f907366 commit 80b8e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rl/llm/token_utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import more_itertools as mit
from transformers import PreTrainedTokenizer
from transformers import PreTrainedTokenizerFast


def token_chunk(
text: str,
*,
chunk_size: int,
stride: int | None = None,
tokenizer: PreTrainedTokenizer,
tokenizer: PreTrainedTokenizerFast,
) -> list[str]:
"""Tokenize a long text into chunks of a specified number of tokens."""
if stride is None:
Expand Down

0 comments on commit 80b8e0b

Please sign in to comment.