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

Improve argument validation for Flash-attn + SWA #1162

Merged
merged 8 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
apply precommit
  • Loading branch information
haileyschoelkopf committed Mar 1, 2024
commit 11a2e9b14cafc66d79db72c66bfdef2947d84699
2 changes: 1 addition & 1 deletion configs/mistral/7B.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"num_kv_heads": 8,
# per Mistral, Mistral-7B-v0.1 was pretrained with 8192 seqlen
# and instruction tuned to 16384 seqlen, all with 4096 sliding window
"seq_length": 8192,
"seq_length": 8192,
"sliding_window_width": 4096,
"max_position_embeddings": 131072,
"pos_emb": "rotary",
Expand Down
7 changes: 3 additions & 4 deletions configs/neox_arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ Text Generation arguments

- **prompt_end**: str

Default =
Default =


a single prompt's end. Defaults to newline
Expand Down Expand Up @@ -1100,7 +1100,7 @@ Text Generation arguments

- **eval_results_prefix**: str

Default =
Default =

prefix to which to save evaluation results - final fp will be {eval_results_prefix}_eval_results_yy-mm-dd-HH-MM.json

Expand Down Expand Up @@ -1844,7 +1844,7 @@ Args for deepspeed config

Default = None





Expand Down Expand Up @@ -2144,4 +2144,3 @@ Args for deepspeed runner (deepspeed.launcher.runner).
Default = None

Adds a `--account` to the DeepSpeed launch command. In DeeperSpeed this is passed on to the SlurmLauncher as well. Sometimes necessary for cluster rules, or so I've heard.

6 changes: 2 additions & 4 deletions megatron/model/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,12 +595,10 @@ def flash_attention(self, query_layer, key_layer, value_layer):

# only pass in window_size kwarg to flash-attn
# if we use Sliding Window Attention.
# Flash attn defaults to (-1,-1), or
# Flash attn defaults to (-1,-1), or
# does not have this kwarg prior to v2.3.0
extra_kwargs = (
{
"window_size": (self.sliding_window_width, -1)
}
{"window_size": (self.sliding_window_width, -1)}
if self.sliding_window_width is not None
else {}
)
Expand Down
Loading