Skip to content

Commit

Permalink
fix tokenizer in example
Browse files Browse the repository at this point in the history
  • Loading branch information
xly committed Jan 18, 2025
1 parent 218f152 commit 7aade14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/interface_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import multiprocessing as mp
from transformers import AutoTokenizer, TextStreamer, LlamaTokenizerFast
from moe_infinity import MoE
from moe_infinity.models.arctic import ArcticTokenizer
from moe_infinity.models.modeling_arctic import ArcticTokenizer

parser = argparse.ArgumentParser()
parser.add_argument("--model_name_or_path", type=str, required=True)
Expand All @@ -27,7 +27,7 @@
elif "arctic" in args.model_name_or_path.lower():
tokenizer = ArcticTokenizer.from_pretrained(args.model_name_or_path)
else:
tokenizer = AutoTokenizer.from_pretrained(args.model_name_or_path, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(args.model_name_or_path, trust_remote_code=True, use_fast=False)
streamer = TextStreamer(tokenizer)

dataset_name = "tasksource/bigbench"
Expand Down

0 comments on commit 7aade14

Please sign in to comment.