Skip to content

[User] Producing tokenizer.model from transformers tokenizers.json #2443

Closed
@BaiqingL

Description

@BaiqingL

I have a Llama 2 7b model fine tuned for a downstream task and stored in transformers format, i.e. my model file structure looks like this:

-a---           7/28/2023  4:30 PM            623 config.json
-a---           7/28/2023  4:30 PM            160 generation_config.json
-a---           7/27/2023  4:00 AM     9976672446 pytorch_model-00001-of-00002.bin
-a---           7/27/2023  4:00 AM     3500355411 pytorch_model-00002-of-00002.bin
-a---           7/27/2023  4:00 AM          26788 pytorch_model.bin.index.json
-a---           7/27/2023  4:00 AM            576 special_tokens_map.json
-a---           7/27/2023  4:00 AM            698 tokenizer_config.json
-a---           7/27/2023  4:00 AM        1843709 tokenizer.json
-a---           7/27/2023  4:00 AM           6011 training_args.bin

I know the convert.py file expects the original Llama 2 structure, how would I modify it to make this work? I'm not too sure what the tokenizer.model file format is like, or how to convert the tokenizer.json file into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions