Skip to content

Commit

Permalink
clean up andromeda
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Aug 28, 2023
1 parent 77af88f commit c37d1cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Andromeda/configs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from Andromeda.model import AndromedaEmbedding, Andromeda
from Andromeda.model import Andromeda


Andromeda1Billion = Andromeda(
Expand Down
3 changes: 1 addition & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@


from Andromeda.utils.stable_adamw import StableAdamWUnfused
from Andromeda.core.transformer import Transformer, AndromedaEmbedding
from Andromeda.core.transformer import Transformer
# from Andromeda.model import Andromeda
from Andromeda.model import AndromedaEmbedding #, Andromeda
from Andromeda.configs import Andromeda1Billion

########### SETUP CONFIG
Expand Down
27 changes: 2 additions & 25 deletions train_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from Andromeda.model import Andromeda

from Andromeda.core.transformer import Decoder, AndromedaEmbedding, Transformer
from Andromeda.core.transformer import Decoder, Transformer
from Andromeda.core.autoregressive_wrapper import AutoregressiveWrapper
# constants

Expand Down Expand Up @@ -37,30 +37,7 @@ def decode_tokens(tokens):

# instantiate GPT-like decoder model

model = Transformer(
num_tokens=50432,
max_seq_len=8192,
use_abs_pos_emb=False,
embedding_provider=AndromedaEmbedding(),
attn_layers=Decoder(
dim=2560,
depth=32,
dim_head=128,
heads=24,
alibi_pos_bias=True,
alibi_num_heads=12,
rotary_xpos=True,
attn_flash=True,
# deepnorm=deepnorm,
# shift_tokens=shift_tokens,
attn_one_kv_head=True,
qk_norm=True,
attn_qk_norm=True,
attn_qk_norm_dim_scale=True
)
)

model = AutoregressiveWrapper(model)
model = Andromeda()

model.cuda()

Expand Down

0 comments on commit c37d1cb

Please sign in to comment.