Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert-hf : reduce repeated boilerplate from write_tensors #7031

Closed
wants to merge 19 commits into from

Commits on Apr 30, 2024

  1. Configuration menu
    Copy the full SHA
    47e02eb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d720ac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c33775b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    698f0b3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cde9ea6 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2024

  1. Configuration menu
    Copy the full SHA
    56f60f5 View commit details
    Browse the repository at this point in the history
  2. convert-hf : allow unusual model part names

    For example, loading `model-00001-of-00001.safetensors` now works.
    
    * convert-hf : fix stacking MoE expert tensors
    
    `torch.stack` and `torch.cat` don't do the same thing.
    
    * convert-hf : fix Mamba conversion
    
    Tested to work even with a SentencePiece-based tokenizer.
    compilade committed May 1, 2024
    Configuration menu
    Copy the full SHA
    3870164 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dcd8dfa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    21068b6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    639b374 View commit details
    Browse the repository at this point in the history
  6. convert-hf : sort model part names

    `os.listdir` is said to list files in arbitrary order.
    Sorting the file names should let "model-00009-of-00042.safetensors"
    be loaded before "model-00010-of-00042.safetensors".
    compilade committed May 1, 2024
    Configuration menu
    Copy the full SHA
    644c269 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. convert-hf : use an ABC for Model again

    It seems Protocol can't be used as a statically type-checked ABC,
    because its subclasses also can't be instantiated. (why did it seem to work?)
    
    At least there's still a way to throw an error when forgetting to define
    the `model_arch` property of any registered Model subclasses.
    compilade committed May 2, 2024
    Configuration menu
    Copy the full SHA
    ce067af View commit details
    Browse the repository at this point in the history
  2. convert-hf : use a plain class for Model, and forbid direct instantia…

    …tion
    
    There are no abstract methods used anyway,
    so using ABC isn't really necessary.
    compilade committed May 2, 2024
    Configuration menu
    Copy the full SHA
    13f4cf7 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. Configuration menu
    Copy the full SHA
    6a54973 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e5e0dc View commit details
    Browse the repository at this point in the history

Commits on May 4, 2024

  1. Configuration menu
    Copy the full SHA
    98f2d0e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f2099c5 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2024

  1. Configuration menu
    Copy the full SHA
    215a0d3 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2024

  1. Configuration menu
    Copy the full SHA
    c32d39c View commit details
    Browse the repository at this point in the history