Skip to content

Update OpenAI GPT model card #37255

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

Merged
merged 25 commits into from
Apr 4, 2025

Conversation

linnettuscano
Copy link
Contributor

@linnettuscano linnettuscano commented Apr 3, 2025

What does this PR do?

This PR updates the OpenAI GPT model card documentation to better reflect recent improvements and clarifications.

Before submitting

  • [✔️ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [ ✔️] Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • [✔️] Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Documentation: @stevhliu

@github-actions github-actions bot marked this pull request as draft April 3, 2025 16:28
Copy link
Contributor

github-actions bot commented Apr 3, 2025

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@linnettuscano linnettuscano marked this pull request as ready for review April 3, 2025 16:43
@github-actions github-actions bot requested a review from stevhliu April 3, 2025 16:43
Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Great start! However, I think its a bit too much info so we should take the extra stuff out and only add the really important stuff, which is the code examples demonstrating the Pipeline, AutoModel and transformers-cli.

approach on a wide range of benchmarks for natural language understanding. Our general task-agnostic model outperforms
discriminatively trained models that use architectures specifically crafted for each task, significantly improving upon
the state of the art in 9 out of the 12 tasks studied.*
In comparison to previous discriminative models, GPT achieves significant gains by utilizing a generative pretraining approach on a large, diverse corpus of unlabeled text, followed by fine-tuning for specific tasks. It achieves state-of-the-art results in a variety of benchmarks.
Copy link
Member

Choose a reason for hiding this comment

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

We can remove this paragraph

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


This model was contributed by [thomwolf](https://huggingface.co/thomwolf). The original code can be found [here](https://github.com/openai/finetune-transformer-lm).

## Usage tips
Copy link
Member

Choose a reason for hiding this comment

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

We can remove everything else after this as its out-of-scope and a bit overwhelming. Take a look at the Llama doc for how this section should be formatted.

It should basically look like the example below. Include code snippets for using GPT with Pipeline, AutoModel and from the command line. Then add a ## Notes section after it.

<hfoptions id="usage">
<hfoption id="Pipeline">
...
...
...
</hfoption>
</hfoptions>

## Notes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@linnettuscano
Copy link
Contributor Author

@stevhliu i've made all the changes as you suggested. please check and let me know if i should modify anything else.

@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.

@linnettuscano
Copy link
Contributor Author

Hi @stevhliu , I've made the suggested changes and also added the missing badges. Let me know if there's anything else I should update. Thanks!

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Nice job, thanks again! 🎉

@stevhliu stevhliu merged commit 0ef339f into huggingface:main Apr 4, 2025
10 checks passed
yuchenxie4645 pushed a commit to yuchenxie4645/transformers that referenced this pull request Apr 5, 2025
* Update OpenAI GPT model card

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update OpenAI GPT model card: add usage examples and notes section

* Add API autodoc tags after Notes section for OpenAI GPT model

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Added missing badges

---------

Co-authored-by: Steven Liu <[email protected]>
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 2025
* Update OpenAI GPT model card

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update OpenAI GPT model card: add usage examples and notes section

* Add API autodoc tags after Notes section for OpenAI GPT model

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Update docs/source/en/model_doc/openai-gpt.md

Co-authored-by: Steven Liu <[email protected]>

* Added missing badges

---------

Co-authored-by: Steven Liu <[email protected]>
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.

3 participants