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

Clarifiy se_atten_v2 compression doc #3727

Merged
merged 2 commits into from
May 5, 2024
Merged

Conversation

nahso
Copy link
Collaborator

@nahso nahso commented Apr 30, 2024

#3643

Summary by CodeRabbit

  • Documentation
    • Simplified the description for the number of attention layers in the code documentation.
    • Added a notice about model compression compatibility for se_atten_v2 descriptor in the documentation.

Copy link
Contributor

coderabbitai bot commented Apr 30, 2024

Walkthrough

Walkthrough

The recent changes focus on enhancing clarity in the DeePMD-kit documentation regarding attention layers. The updates streamline descriptions by removing specific conditions for model compression and introduce guidance for effectively using model compression with the se_atten_v2 descriptor.

Changes

File Path Change Summary
deepmd/utils/argcheck.py Refine documentation for attention layers, simplifying the description by removing a specific condition related to model compression.
doc/freeze/compress.md Add a notice about model compression requirements for the se_atten_v2 descriptor when the attn_layer training parameter is set to 0.
doc/model/train-se-atten.md Introduce guidance on model compression for se_atten_v2 descriptor with attn_layer set to 0.

Possibly related issues


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between c465038 and 9c2d789.
Files selected for processing (2)
  • doc/freeze/compress.md (1 hunks)
  • doc/model/train-se-atten.md (1 hunks)
Additional Context Used
LanguageTool (13)
doc/freeze/compress.md (6)

Near line 47: Unpaired symbol: ‘'’ seems to be missing
Context: ...,l+1}-y_{m,l}$. $y_{m,l} = y_m(x_l)$, $y'_{m,l} = y'm(x_l)$ and $y''{m,l} = y''...


Near line 47: Unpaired symbol: ‘'’ seems to be missing
Context: ...l}$. $y_{m,l} = y_m(x_l)$, $y'_{m,l} = y'm(x_l)$ and $y''{m,l} = y''_m(x_l)$ ar...


Near line 47: Unpaired symbol: ‘'’ seems to be missing
Context: ...y_m(x_l)$, $y'_{m,l} = y'm(x_l)$ and $y''{m,l} = y''_m(x_l)$ are the value, the...


Near line 47: Unpaired symbol: ‘'’ seems to be missing
Context: ...y'_{m,l} = y'm(x_l)$ and $y''{m,l} = y''_m(x_l)$ are the value, the first-order...


Near line 50: This word is normally spelled as one.
Context: ...ice memories, which usually becomes the bottle-neck of the computation due to the relativel...


Near line 57: It’s possible that the countable noun ‘pad’ after the verb ‘are’ is an error. You may have meant to use the plural form, or an article may be missing.
Context: ...esponding positions of the matrices are pad with zeros. In practice, if the real nu...

doc/model/train-se-atten.md (7)

Near line 110: Possible missing comma found.
Context: ...size of the embedding net. From left to right the members denote the sizes of each hi...


Near line 111: Unpaired symbol: ‘]’ seems to be missing
Context: ...ix, the axis matrix as explained in the [DeepPot-SE paper](https://arxiv.org/abs/...


Near line 116: Possible missing comma found.
Context: ...r to mask the diagonal in the attention weights and False is recommended. - {ref}`attn_...


Near line 142: Possible missing comma found.
Context: ...size of the embedding net. From left to right the members denote the sizes of each hi...


Near line 144: Unpaired symbol: ‘]’ seems to be missing
Context: ...ix, the axis matrix as explained in the [DeepPot-SE paper](https://arxiv.org/abs/...


Near line 147: Possible missing comma found.
Context: ...r to mask the diagonal in the attention weights and False is recommended. - {ref}`attn_...


Near line 224: This noun is normally spelled as one word.
Context: ...----- | | / | Atom type indexes (place holder) | type.raw | Required ...

Additional comments not posted (2)
doc/freeze/compress.md (1)

155-156: The added notice clearly specifies the conditions for model compression with se_atten_v2. This enhances the documentation's clarity and usefulness.

doc/model/train-se-atten.md (1)

166-167: The added notice clearly specifies the conditions for model compression with se_atten_v2. This enhances the documentation's clarity and usefulness.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.19%. Comparing base (49f17cc) to head (9c2d789).
Report is 7 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #3727      +/-   ##
==========================================
+ Coverage   82.15%   82.19%   +0.04%     
==========================================
  Files         511      513       +2     
  Lines       47364    47642     +278     
  Branches     2953     2982      +29     
==========================================
+ Hits        38910    39159     +249     
- Misses       7561     7572      +11     
- Partials      893      911      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@njzjz njzjz added this to the v2.2.11 milestone Apr 30, 2024
doc/freeze/compress.md Outdated Show resolved Hide resolved
doc/model/train-se-atten.md Outdated Show resolved Hide resolved
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz enabled auto-merge May 5, 2024 19:49
@njzjz njzjz added this pull request to the merge queue May 5, 2024
Merged via the queue into deepmodeling:devel with commit 62832e8 May 5, 2024
60 checks passed
njzjz added a commit to njzjz/deepmd-kit that referenced this pull request Jul 2, 2024
deepmodeling#3643

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- **Documentation**
- Simplified the description for the number of attention layers in the
code documentation.
- Added a notice about model compression compatibility for `se_atten_v2`
descriptor in the documentation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
(cherry picked from commit 62832e8)
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz mentioned this pull request Jul 2, 2024
njzjz added a commit that referenced this pull request Jul 3, 2024
#3643

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

- **Documentation**
- Simplified the description for the number of attention layers in the
code documentation.
- Added a notice about model compression compatibility for `se_atten_v2`
descriptor in the documentation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
(cherry picked from commit 62832e8)
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
mtaillefumier pushed a commit to mtaillefumier/deepmd-kit that referenced this pull request Sep 18, 2024
deepmodeling#3643

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Documentation**
- Simplified the description for the number of attention layers in the
code documentation.
- Added a notice about model compression compatibility for `se_atten_v2`
descriptor in the documentation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"RuntimeError: can not compress model when attention layer is not 0." when using se_atten_v2
2 participants