Skip to content

Commit

Permalink
hotfix for get_tokenizer (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
qbc2016 authored Sep 20, 2023
1 parent b963f62 commit 8da9f9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion federatedscope/llm/dataloader/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __call__(self, instances):
)


def get_tokenizer(model_name, cache_dir, tok_len=128, pkg='huggingface'):
def get_tokenizer(model_name, cache_dir, tok_len=128, pkg='huggingface_llm'):
"""
This function loads a tokenizer from a pretrained model name and adds some
default special tokens if they are not already defined. It also sets the
Expand Down
4 changes: 2 additions & 2 deletions federatedscope/llm/misc/fschat.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def __init__(self, config):
config: A FS configuration object that contains various settings
for the chatbot.
"""
model_name, _ = config.model.type.split('@')
model_name, model_hub = config.model.type.split('@')
self.tokenizer, _ = get_tokenizer(model_name, config.data.root,
config.llm.tok_len)
config.llm.tok_len, model_hub)
self.model = get_llm(config)

self.device = f'cuda:{config.device}'
Expand Down

0 comments on commit 8da9f9f

Please sign in to comment.