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

[Model/Layer] New forward to support CB (CommonDecoder->DecoderBlock->DecoderLayer->Attention/MLP) #375

Merged
merged 40 commits into from
May 9, 2024

Conversation

pujiang2018
Copy link
Contributor

No description provided.

changqi1 and others added 30 commits April 25, 2024 14:08
@pujiang2018
Copy link
Contributor Author

@abenmao @Duyi-Wang pls help to review.

@Duyi-Wang Duyi-Wang added the enhancement New feature or request label May 8, 2024
@@ -265,10 +254,6 @@ class CommonDecoder : public AbstractDecoder {
if (this->attnMask) free(this->attnMask);

delete this->predictor;

Copy link
Contributor

Choose a reason for hiding this comment

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

Free the decoderBlock here?

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

@@ -0,0 +1,348 @@
// Copyright (c) 2023 Intel Corporation
Copy link
Contributor

Choose a reason for hiding this comment

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

2024

totInSeqLen += seqs[i]->getInputSeqLen();
}

kvCacheMgr.prepareCache(seqIDs);
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer to prepare KVCache at a high level api.
We can assume all seqs' KVCache is ready.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

commented and added TODO

@Duyi-Wang Duyi-Wang merged commit 77dd36b into cb_dev May 9, 2024
Duyi-Wang pushed a commit that referenced this pull request May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants