File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/llama_recipes/inference Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 8
8
import sys
9
9
import yaml
10
10
11
- from transformers import LlamaTokenizer
11
+ from transformers import AutoTokenizer
12
12
13
13
from llama_recipes .inference .model_utils import load_llama_from_config
14
14
@@ -56,7 +56,7 @@ def main(
56
56
model = load_sharded_model_single_gpu (model_def , fsdp_checkpoint_path )
57
57
print ("model is loaded from FSDP checkpoints" )
58
58
#loading the tokenizer form the model_path
59
- tokenizer = LlamaTokenizer .from_pretrained (HF_model_path_or_name )
59
+ tokenizer = AutoTokenizer .from_pretrained (HF_model_path_or_name )
60
60
tokenizer .save_pretrained (consolidated_model_path )
61
61
#save the FSDP sharded checkpoints in HF format
62
62
model .save_pretrained (consolidated_model_path )
You can’t perform that action at this time.
0 commit comments