-
Notifications
You must be signed in to change notification settings - Fork 283
Update model contribution guide #2254
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
base: master
Are you sure you want to change the base?
Update model contribution guide #2254
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Left some comments.
CONTRIBUTING_MODELS.md
Outdated
|
||
- [ ] Open an issue or find an issue to contribute a backbone model. | ||
|
||
### Step 2: PR #1 - Add XXBackbone | ||
### Step 2: PR #1 - Model Folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this many PRs? Might be better to ask for a single PR with backbone, initial task, and colab showing usage and results. Less likely to have incomplete model contributions.
I'd say definitely not this, we don't want people opening up PRs just to create empty model folders. That is just more review for us (with nothing of value in the PR).
CONTRIBUTING_MODELS.md
Outdated
|
||
### Step 4: PR #3 - Add XX Presets | ||
### Step 5: PR #3 - Add `XX` Tasks and Preprocessors (Optional) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to consider saying at least one task is not optional.
CONTRIBUTING_MODELS.md
Outdated
|
||
#### Unit Tests | ||
[Example](https://github.com/keras-team/keras-hub/blob/master/keras_hub/src/models/distil_bert/distil_bert_backbone.py#L187-L189) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are adding a lot of outdated code links that no longer work. Please check all these!
and return the dictionary in the form expected by the model. | ||
- New Task Models (e.g., TokenClassifier, ImageSegmentation) | ||
- Parameter-Efficient Fine-Tuning (LoRA support) | ||
- Quantization (QLoRA support) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do we expect to be added for lora and qlora support? this seems kinda ill defined
CONTRIBUTING_MODELS.md
Outdated
- [ ] Add `xx/xx_presets.py` with links to weights uploaded to Kaggle KerasHub | ||
[Example](https://github.com/keras-team/keras-hub/blob/master/keras_hub/src/models/distil_bert/distil_bert_presets.py) | ||
|
||
- [ ] Stage the model presets on KerasHub’s [Kaggle org page](https://www.kaggle.com/organizations/kerashub) using this [invite link](https://kaggle.com/organizations/kerashub/invite/c4b8baa532b8436e8df8f1ed641b9cb5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might not want to make this invite link public. Won't anyone be able to join the org with this? What kind of permissions does this get you (model creation? model deletion?).
|
||
### Step 4: PR #3 - Add XX Presets | ||
#### Checkpoint Conversion Script (tools/checkpoint_conversion/convert_your_model_checkpoints.py) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should mention timm/huggingface converters. And show one of those as the primary example.
Basically, we should say that is our preferred mode of checkpoint is to go from a supported conversion source (timm, transformers) and write a built in library converted. Then the convert checkpoint tool is just a thin wrapper around this converter.
Alternately (and more advanced) would be to write a converted from another format, directly in the tools/
script.
|
||
##### Implementation | ||
|
||
- **Text**: `XXTokenizer`, subclassing from KerasHub tokenizers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should link these code files (tokenizer, imageconverter, audioconverter).
Since KerasHub has evolved, updating the model contribution guides. This will make contributions consistent and lower review time.
Markdown preview here
https://github.com/divyashreepathihalli/keras-nlp/blob/contributing_guide/CONTRIBUTING_MODELS.md