-
Notifications
You must be signed in to change notification settings - Fork 4
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
Addressed missed out comments in PR #1 #3
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,21 +5,21 @@ | |
from typing import Tuple | ||
|
||
# Third Party | ||
from torch.nn import Linear # replaces ParameterizedLinear | ||
from transformers import DynamicCache | ||
import torch | ||
import torch.nn.functional as F | ||
|
||
# Local | ||
from ...config import CommonConfig | ||
from ...enums import AttentionHeadType, PositionEmbeddingType | ||
from ..linear import Linear | ||
from ...models.gpt_dolomite.config import GPTDolomiteConfig | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see comment above |
||
from ..position_embedding import apply_rotary_pos_emb | ||
from .utils import repeat_key_value | ||
|
||
|
||
class Attention(torch.nn.Module): | ||
def __init__( | ||
self, config: CommonConfig, causal: bool, layer_idx: int = None | ||
self, config: GPTDolomiteConfig, causal: bool, layer_idx: int = None | ||
) -> None: | ||
super().__init__() | ||
|
||
|
This file was deleted.
This file was deleted.
This file was deleted.
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.
I think this might give circular import error due to stuff from this file being imported in the model class
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.
it was fine I have tested training the refactored codel
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.
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.
But if you like, i have moved the config to a top-level
config.py
in 8afe81d