InternLM / InternEvo

InternEvo is an open-sourced lightweight training framework aims to support model pre-training without the need for extensive dependencies.
https://internevo.readthedocs.io/zh-cn/latest/?badge=latest
Apache License 2.0
310 stars 52 forks source link

feat(usability): Refine model inject helper to support huggingface models #331

Closed zigzagcai closed 2 months ago

zigzagcai commented 2 months ago

Motivation

Improve usability:

  1. Add pack_sample_into_one=True mode for streaming dataloader. (Completed)
    • For the purpose of long sequence training verification
  2. Refine model_inject_helper to support more general modeling files (such like huggingface) without even one line of code change. (Completed)
    • For easier adaption for third-party models, to demonstrate InternEvo usability
    • model_inject_helper support pipeline parallel mode
  3. Refine and optimize the implementation of MockedDataset. (Completed)
    • added sanity check to ensure global_bsz and data equivalence between loaded/saved data

Related repo:

https://github.com/InternLM/InternEvo-HFModels

Examples:

Modification

internlm/train/pipeline.py

BC-breaking (Optional)

None

Use cases (Optional)

None

Checklist

Before PR:

After PR: