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

update 7b config #27

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions configs/7B/H100.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ name_model = "7B"
project = "debug_7B_zero_band"

[train]
micro_bs = 6
micro_bs = 1
sharding_strategy = "SHARD_GRAD_OP"

[optim]
batch_size = 3840
batch_size = 1024 #2M tokens bs
warmup_steps = 1000
total_steps = 88_000
lr = 6e-4
lr = 3e-4

[data]
seq_length = 2048
3 changes: 2 additions & 1 deletion src/zeroband/models/llama/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
}


def get_model(name_model: str, type_model: str, vocab_size: int) -> tuple[Transformer, ModelArgs]:
def get_model(name_model: str, type_model: str, vocab_size: int, seq_length: int) -> tuple[Transformer, ModelArgs]:
"""get the transformer model"""

if type_model == "llama2":
Expand All @@ -72,4 +72,5 @@ def get_model(name_model: str, type_model: str, vocab_size: int) -> tuple[Transf
raise ValueError(f"Model type {type_model} not supported")

config.vocab_size = vocab_size
config.max_seq_len = seq_length
return Transformer(config), config
1 change: 1 addition & 0 deletions src/zeroband/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def train(config: Config):
vocab_size=tokenizer.vocab_size
if config.name_model != "debugmodel" or not config.data.fake
else TEST_VOCAB_SIZE,
seq_length=config.data.seq_length,
)

if config.train.log_model_hash:
Expand Down