Skip to content

Conversation

@baek2sm
Copy link
Contributor

@baek2sm baek2sm commented Mar 6, 2025

Previously, the multi_head_attention_layer is seperated into a custom layer called custom_multi_head_attention_layer for refactoring purposes. At that time, the namespace of custom layer should be changed, but they were copied over as-is, causing duplication. I've renamed namespace.

This issue was discovered and reported by @gkisalapl . I always appreciate your efforts. thanks a lot!

Even after resolving this problem, the llama application still does not work properly now.
I'll try to resolve this issue as soon as possible.

Self evaluation:

  1. Build test: [X]Passed [ ]Failed [ ]Skipped
  2. Run test: [ ]Passed [ ]Failed [X]Skipped

@baek2sm baek2sm changed the title [application] resolve some problems in llama application [application] resolve some problems in llama application @open sesame 03/06 17:47 Mar 6, 2025
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@baek2sm baek2sm changed the title [application] resolve some problems in llama application @open sesame 03/06 17:47 [WIP][application] resolve some problems in llama application @open sesame 03/06 17:47 Mar 7, 2025
@baek2sm baek2sm added WIP and removed Need Review labels Mar 7, 2025
@baek2sm baek2sm changed the title [WIP][application] resolve some problems in llama application @open sesame 03/06 17:47 [WIP][application] resolve some problems in llama application @open sesame 03/07 15:57 Mar 7, 2025
@piotrrak
Copy link

piotrrak commented Mar 7, 2025

Just a thought, but it seems that instead of using qualified names ie. nntrainter::TensorDim

namespace custom {
using namespace nntrainer;
///... rest mostly without changes
}

And leaving this code with unqualified names should be sufficient, with little change/none of the code churn.

@baek2sm baek2sm force-pushed the llama_namespace branch 2 times, most recently from 08b37d1 to 6d7f896 Compare March 11, 2025 06:36
@baek2sm
Copy link
Contributor Author

baek2sm commented Mar 11, 2025

@piotrrak

Just a thought, but it seems that instead of using qualified names ie. nntrainter::TensorDim

namespace custom {
using namespace nntrainer;
///... rest mostly without changes
}

And leaving this code with unqualified names should be sufficient, with little change/none of the code churn.

I applied it, thanks :)

@baek2sm baek2sm changed the title [WIP][application] resolve some problems in llama application @open sesame 03/07 15:57 [application] resolve some problems in llama application @open sesame 03/07 15:57 Mar 11, 2025
@baek2sm baek2sm removed the WIP label Mar 11, 2025
@baek2sm baek2sm changed the title [application] resolve some problems in llama application @open sesame 03/07 15:57 [application] namespace duplications in llama application @open sesame 03/07 15:57 Mar 13, 2025
@baek2sm baek2sm changed the title [application] namespace duplications in llama application @open sesame 03/07 15:57 [application] namespace duplication in llama application @open sesame 03/07 15:57 Mar 13, 2025
Previously, the `multi_head_attention_layer` is seperated into a custom layer called `custom_multi_head_attention_layer` for refactoring purposes. At that time, the custom layer header macro and namespace should be changed, but they were copied over as-is, causing duplication. So I've removed the header macro and renamed namespace.

Even after resolving this problem, the llama application still does not work properly now. It seems that several issues have arisen due to the reflection of application refactoring and modifications to the nntrainer core. I will resolve these issues as soon as possible.

**Self evaluation:**
1. Build test:     [X]Passed [ ]Failed [ ]Skipped
2. Run test:     [ ]Passed [ ]Failed [X]Skipped

Signed-off-by: Seungbaek Hong <[email protected]>
Copy link
Contributor

@EunjuYang EunjuYang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@djeong20 djeong20 left a comment

Choose a reason for hiding this comment

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

LGTM :)

Copy link
Collaborator

@jijoongmoon jijoongmoon left a comment

Choose a reason for hiding this comment

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

LGTM

@jijoongmoon jijoongmoon merged commit 72106c0 into nnstreamer:main Mar 18, 2025
19 checks passed
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.

5 participants