Skip to content

[Model] EN Comment Translation#33

Open
pkuyihangji wants to merge 1 commit intoMixture-AI:mainfrom
pkuyihangji:yihang_model1
Open

[Model] EN Comment Translation#33
pkuyihangji wants to merge 1 commit intoMixture-AI:mainfrom
pkuyihangji:yihang_model1

Conversation

@pkuyihangji
Copy link
Copy Markdown
Contributor

Description

Checklist

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • I've leverage the lint.sh to beautify the python and c++ code.
  • The PR is complete and small, read the Google eng practice (CL equals to PR) to understand more about small PR. In DGL, we consider PRs with less than 200 lines of core code change are small (example, test and documentation could be exempted).
  • Code is well-documented.

Changes

@keli-wen keli-wen requested review from NANWOOD and keli-wen July 20, 2024 15:53
"""
# Perform RMSNorm normalization.
output = self._norm(x.float()).type_as(x)
# Multiply the result by the learned scaling factor to complete the RMSNorm.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe apply the RMSNorm?

# This converts each grouped 2D tensor d = [d1, d2]^T into a complex number d1 + i d2.
# Use complex multiplication with the corresponding complex frequency e^{iθ}, then convert back
# to real numbers,
# achieving R(θ)d, which rotates each grouped 2D tensor by the corresponding angle, thereby implementing
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Check the usage of "achieving".


def repeat_kv(x: torch.Tensor, n_rep: int) -> torch.Tensor:
"""torch.repeat_interleave(x, dim=2, repeats=n_rep)."""
"""在 n_kv_heads 维度上重复扩展 key 或 query 张量.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TBD.

@NANWOOD NANWOOD self-requested a review July 30, 2024 02:44
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.

[Model] EN Comment Translation.

2 participants