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

[Feature] Plan to add model_register #282

Open
XinDongol opened this issue Apr 28, 2024 · 1 comment
Open

[Feature] Plan to add model_register #282

XinDongol opened this issue Apr 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@XinDongol
Copy link

XinDongol commented Apr 28, 2024

Plan to add model_register? so users can add their own models

@wanchaol
Copy link
Contributor

@XinDongol I think that's a good idea, the way this could work is that register_model can insert new entries into various module's module level dict (i.e. this), there are couple of things required from user:

  1. user registered model must be a meta init ready model (with init_weights, from_model_args, etc.)
  2. user need to provide at least the parallelization method simiar to parallelize_llama so that torchtitan knows how to shard the model.

In this way any plugged model should be able to run with torchtitan. We don't have time at the moment to implement such a feature, but feel free to submit a PR and we can help review it :)

@tianyu-l tianyu-l added the enhancement New feature or request label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants