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

Add contribution guide for Neuron exporter #461

Merged
merged 12 commits into from
Feb 8, 2024
Merged

Conversation

JingyaHuang
Copy link
Collaborator

  • Exporter guide
  • Example for ESM
  • Next step: open first good issue

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@dacorvo dacorvo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull-request. This applies only to models exported using the tracing API. I haven't yet find a good way to reflect that in the documentation, but we need to make sure someone does not try to contribute an unsupported causal model that way.

@JingyaHuang
Copy link
Collaborator Author

Thanks for the pull-request. This applies only to models exported using the tracing API. I haven't yet find a good way to reflect that in the documentation, but we need to make sure someone does not try to contribute an unsupported causal model that way.

@dacorvo Added a note to clarify that the contribution guide does not apply causal tasks model supported through transformers_neuronx!

docs/source/community/contributing.mdx Outdated Show resolved Hide resolved
docs/source/community/contributing.mdx Outdated Show resolved Hide resolved

Here we take the support of [ESM models](https://huggingface.co/docs/transformers/model_doc/esm#esm) as an example. Let's create an `EsmNeuronConfig` class in the `optimum/exporters/neuron/model_configs.py`.

When an Esm model interprets as a text encoder, we are able to inherit from the middle-end class [`TextEncoderNeuronConfig`](https://github.com/huggingface/optimum-neuron/blob/v0.0.18/optimum/exporters/neuron/config.py#L36).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about the phrasing here. You want mean "when an ESM model acts a text encoder" because it can act as something else?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically, it could act as a decoder as well according to the doc of ESM. But I did not see seq2seq modeling yet implemented in transformers although there seems to be some placeholders for it.

JingyaHuang and others added 3 commits February 7, 2024 11:03
Co-authored-by: David Corvoysier <david@huggingface.co>
Co-authored-by: Michael Benayoun <mickbenayoun@gmail.com>
Co-authored-by: Michael Benayoun <mickbenayoun@gmail.com>
@JingyaHuang JingyaHuang merged commit 1b7d07d into main Feb 8, 2024
11 checks passed
@JingyaHuang JingyaHuang deleted the add-contribution-guide branch February 8, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants