feat(transformers): add Nougat example#1336
Conversation
Summary of ChangesHello @hadipash, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates a practical example for the Nougat model, a Vision Transformer designed for Optical Character Recognition (OCR) of academic documents, into the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds a well-documented example for the Nougat model, including a README.md with an overview and usage instructions. The example is clear and helpful. My only suggestion is to include the performance metrics from the pull request description in the README.md to provide users with a more complete picture of the model's capabilities.
| 11:39 a.m. | ||
| Coffee Break | ||
| 11:39 a. | ||
| ``` |
There was a problem hiding this comment.
This is a great example for the Nougat model. To make it even more complete, consider adding the performance metrics you've included in the pull request description to this README. This provides users with valuable information about the model's performance on specific hardware.
You can add the following section at the end of the file:
## Performance
The experiments were performed on Ascend Atlas 800T A2 hardware, utilizing MindSpore 2.6.0 in PyNative mode.
| Model | Precision | Weight loading (s) | Speed |
|---------------------------|:---------:|:------------------:|:----------:|
| VisionEncoderDecoderModel | FP32 | 18 | 22 token/s ||
pls resolve linting errors |
Relies of PR #1271
Add:
Usage:
Performance:
The experiments were performed on Ascend Atlas 800T A2 hardware, utilizing MindSpore 2.6.0 in PyNative mode.