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

longlora-paddle #9939

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Conversation

micelvrice
Copy link

PR types

New features

PR changes

Models

Description

Paddle implementation of LongLoRA

Copy link

paddle-bot bot commented Feb 25, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Feb 25, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 83.07692% with 11 lines in your changes missing coverage. Please review.

Project coverage is 17.36%. Comparing base (0b26a02) to head (298e407).
Report is 12 commits behind head on develop.

Files with missing lines Patch % Lines
paddlenlp/transformers/longlora.py 82.53% 11 Missing ⚠️

❌ Your project check has failed because the head coverage (17.36%) is below the target coverage (58.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #9939       +/-   ##
============================================
- Coverage    51.33%   17.36%   -33.98%     
============================================
  Files          745      746        +1     
  Lines       118600   120302     +1702     
============================================
- Hits         60886    20888    -39998     
- Misses       57714    99414    +41700     

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

@@ -213,6 +213,111 @@ def parallel_matmul(x: Tensor, y: Tensor, transpose_y=False, tensor_parallel_out
return logits


def shift(qkv, bsz, q_len, group_size, num_heads, head_dim):
Copy link
Contributor

Choose a reason for hiding this comment

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

不要把longlora这部分写到llama的组网里面,可以考虑写到paddlenlp/transformers/longlora.py中,如果使用longlora那么调用replace函数,现在llama组网已经太复杂了,不要再往这里写了。https://github.com/dvlab-research/LongLoRA/blob/main/llama_attn_replace.py#L460


def run_predictor(self, config_params=None):
if config_params is None:
config_params = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

test longlora是不是可以直接写一个测试longlora函数是否能够跑通并且结果符合预期的测试就好,本身已经有一个longlora训练的测试了

@lugimzzz lugimzzz closed this Feb 27, 2025
@lugimzzz lugimzzz reopened this Feb 27, 2025
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.

3 participants