-
Notifications
You must be signed in to change notification settings - Fork 65
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
rotary embedding api interface for llama #15
Conversation
src/layers/rotary_embedding_api.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like not formatted.
And, suggest separating .h and .cpp file.
Please use Camel case to rename variables and functions. |
include/rotary_embedding_api.h
Outdated
#include <iostream> | ||
|
||
namespace xft { | ||
void xftRotaryEmbeddingKernel(DataType dt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just name RotaryEmbeddingKernel
and used as xft::RotaryEmbeddingKernel
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep the api interface consistent, align with this PR,layernorm
: #31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that PR, changqing just use invokeLayerNorm
in namespace xft instead of xftinvokeLayerNorm
. Did I miss something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we want to maintain the consistency of the API interface to facilitate the users , such as 'Datatype' paramter. RotaryEmbedding added 'Datatype' parameter, and 'DataType' declare in in the namespace ‘xft ’,Thus RotaryEmbedding is also under the ‘xft’ namespace. This allows users to maintain a uniform approach when using Layernorm and RotaryEmbedding API
No description provided.