Skip to content

[Feat]: Simpler new model supportΒ #1203

@dxqb

Description

@dxqb

Describe your use-case.

With the amount of new models released, it could be easier to implement new models:

major:

  • code deduplication in modules/dataLoader: cache_modules, output_modules, etc.
  • code deduplication in modules/modelLoader
  • the samplers in modules/modelSampler duplicate code for each model in modules/BaseModelSetup (how to call the transformer, creating ids, etc.)
  • deduplicate the debug code in modules/BaseModelSetup...
  • ...and setup_optimizations
  • find a better way to select modules in create.py
  • move the LoRA key conversion code back into OneTrainer https://github.com/Open-Model-Initiative/OMI-Model-Standards/tree/main/src/omi_model_standards/convert/lora

major but difficult:

  • the mgds modules that have to be created for tokenization and text encoder, duplicate code in modules/model.encode_text for each model

minor:

  • boilerplate code in modules/modelSaver
  • some boilerplate code in modules/model
  • boilerplate code in modules/*LoRASetup and *FineTuneSetup

Not exactly sure how to go about this, because changing these things can break existing models and therefore requires lots of testing.

What would you like to see as a solution?

see above

Have you considered alternatives? List them here.

keep everything as-is, or only do the easy points above

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions