-
Notifications
You must be signed in to change notification settings - Fork 390
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
Configs for LUMI ablations #324
Draft
epwalsh
wants to merge
8
commits into
main
Choose a base branch
from
petew/LUMI-configs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f4678dc
Configs for LUMI ablations
epwalsh e08768c
fix # of nodes
epwalsh ce9c4b4
Merge branch 'main' into petew/LUMI-configs
epwalsh 7cdc053
fix data path
epwalsh d652c04
add dirk-run-no-weight-tying
ibeltagy c72a5a0
Merge branch 'main' into petew/LUMI-configs
epwalsh 084f586
Merge branch 'main' into petew/LUMI-configs
epwalsh 6498d0a
by block for OOM
ibeltagy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
run_name: v1_5-mix-medium-run-001 | ||
seed: 6198 | ||
dry_run: false | ||
|
||
wandb: | ||
name: ${run_name} | ||
project: olmo-medium | ||
group: v1_5-mix | ||
|
||
model: | ||
d_model: 4096 | ||
n_heads: 16 | ||
n_layers: 30 | ||
mlp_ratio: 8 | ||
weight_tying: false # disable weight tying | ||
alibi: true | ||
alibi_bias_max: 8.0 | ||
flash_attention: false # not available on AMD | ||
attention_dropout: 0.0 | ||
attention_layer_norm: true | ||
multi_query_attention: true | ||
include_bias: false | ||
block_type: sequential | ||
layer_norm_type: amd_compatible | ||
layer_norm_with_affine: false | ||
bias_for_layer_norm: false | ||
activation_type: swiglu | ||
residual_dropout: 0.0 | ||
embedding_dropout: 0.0 | ||
max_sequence_length: 2048 | ||
vocab_size: 50280 | ||
embedding_size: 50304 | ||
eos_token_id: 0 | ||
pad_token_id: 1 | ||
init_device: meta | ||
init_fn: normal | ||
|
||
compile: null # causes instability on AMD GPUs | ||
|
||
optimizer: | ||
name: adamw | ||
learning_rate: 3.0e-4 | ||
weight_decay: 0.1 | ||
betas: | ||
- 0.9 | ||
- 0.95 | ||
metrics_log_interval: 10 | ||
|
||
scheduler: | ||
name: cosine_with_warmup | ||
t_warmup: 5000 | ||
alpha_f: 0.1 | ||
|
||
tokenizer: | ||
identifier: tokenizers/allenai_eleuther-ai-gpt-neox-20b-pii-special.json | ||
truncate_direction: right | ||
|
||
save_folder: ${path.choose:${oc.env:FLASH_DIR,no_exist}/checkpoints,/results}/${oc.env:SLURM_JOB_ID,${run_name}} | ||
save_overwrite: false | ||
# Sharded checkpoints (best for restarts) | ||
save_interval: 1000 | ||
save_num_checkpoints_to_keep: -1 | ||
# Unsharded checkpoints (for final storage) | ||
save_interval_unsharded: null # getting errors on LUMI right now | ||
save_num_unsharded_checkpoints_to_keep: -1 | ||
|
||
load_path: null | ||
|
||
max_duration: 476837 # 2T tokens | ||
global_train_batch_size: 2048 | ||
device_train_microbatch_size: 2 | ||
|
||
precision: amp_bf16 | ||
|
||
fsdp: | ||
wrapping_strategy: by_block | ||
precision: mixed | ||
|
||
max_grad_norm: 1.0 | ||
max_grad_norm_ratio: 1.5 | ||
|
||
speed_monitor: | ||
window_size: 20 | ||
|
||
eval_interval: ${save_interval} | ||
eval_subset_num_batches: -1 | ||
device_eval_batch_size: ${device_train_microbatch_size} | ||
evaluators: | ||
- label: all-small-ppl-validation | ||
data: | ||
num_workers: 0 | ||
drop_last: true | ||
# pin_memory: true | ||
# prefetch_factor: 1 | ||
# persistent_workers: false | ||
# timeout: 0 | ||
datasets: | ||
4chan-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/4chan/val.npy | ||
c4_100_domains-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/c4_100_domains/val.npy | ||
c4_en-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/c4_en/val.npy | ||
gab-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/gab/val.npy | ||
ice-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/ice/val.npy | ||
m2d2_s2orc-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/m2d2_s2orc/val.npy | ||
m2d2_wiki-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/m2d2_wiki/val.npy | ||
manosphere-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/manosphere/val.npy | ||
mc4_en-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/mc4_en/val.npy | ||
pile-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/pile/val.npy | ||
ptb-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/ptb/val.npy | ||
twitterAEE-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/twitterAEE/val.npy | ||
wikitext_103-validation: | ||
- ${path.choose:${oc.env:SCRATCH_DIR,no_exist},/net/nfs.cirrascale/allennlp/llm-data}/eval-data/perplexity/v2_small_gptneox20b/wikitext_103/val.npy | ||
|
||
########################## | ||
# Downstream evaluations # | ||
########################## | ||
- label: piqa | ||
type: downstream | ||
|
||
- label: hellaswag | ||
type: downstream | ||
|
||
- label: winogrande | ||
type: downstream | ||
|
||
- label: openbook_qa | ||
type: downstream | ||
|
||
# - label: boolq # requires implemention of the pmi_dc matrix | ||
# type: downstream | ||
|
||
- label: sciq | ||
type: downstream | ||
|
||
- label: arc_easy | ||
type: downstream | ||
|
||
# - label: arc_challenge # requires implemention of the pmi_dc matrix | ||
# type: downstream | ||
|
||
- label: copa | ||
type: downstream | ||
|
||
- label: rte | ||
type: downstream | ||
|
||
- label: commitment_bank | ||
type: downstream | ||
|
||
- label: mrpc | ||
type: downstream | ||
|
||
- label: sst2 | ||
type: downstream | ||
|
||
data: | ||
paths: ${path.glob:${oc.env:FLASH_DIR,no_exist}/preprocessed/olmo-mix/v1_5-sample/gpt-neox-20b-pii-special/*.npy} | ||
pad_direction: right | ||
num_workers: 0 | ||
drop_last: true | ||
pin_memory: true | ||
prefetch_factor: 16 | ||
persistent_workers: true | ||
timeout: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
#SBATCH --job-name=olmo-medium | ||
#SBATCH --account=project_462000229 | ||
#SBATCH --output=/pfs/lustref1/flash/project_462000229/logs/%j.log | ||
#SBATCH --nodes=128 # Total number of nodes | ||
#SBATCH --ntasks-per-node=8 | ||
#SBATCH --gpus-per-node=8 # Allocate one gpu per MPI rank | ||
#SBATCH --cpus-per-task=6 | ||
#SBATCH --time=48:00:00 | ||
#SBATCH --time-min=24:00:00 | ||
#SBATCH --mem=0 # All memory on the node | ||
#SBATCH --partition=standard-g | ||
|
||
module load LUMI/22.08 partition/G | ||
|
||
export OLMO_CONTAINER=llm-lumi_latest.sif | ||
|
||
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK | ||
export MPICH_GPU_SUPPORT_ENABLED=1 | ||
export NCCL_SOCKET_IFNAME=hsn | ||
export NCCL_NET_GDR_LEVEL=3 | ||
export MIOPEN_USER_DB_PATH=/tmp/${USER}-miopen-cache-${SLURM_JOB_ID} | ||
export MIOPEN_CUSTOM_CACHE_DIR=${MIOPEN_USER_DB_PATH} | ||
export CXI_FORK_SAFE=1 | ||
export CXI_FORK_SAFE_HP=1 | ||
export FI_CXI_DISABLE_CQ_HUGETLB=1 | ||
|
||
# We need to set this to avoid "Cassini Event Queue overflow detected." errors. | ||
export FI_CXI_DEFAULT_CQ_SIZE=131072 | ||
|
||
#export NCCL_DEBUG=INFO | ||
export PYTHONPATH=.:${PYTHONPATH} | ||
export ROCM_PATH=/opt/rocm | ||
export SINGULARITYENV_LD_LIBRARY_PATH=/usr/local/lib:/opt/cray/libfabric/1.15.2.0/lib64 | ||
|
||
# Try playing with max_split_size_mb if you run into OOM errors. | ||
#export PYTORCH_HIP_ALLOC_CONF=max_split_size_mb:128 | ||
|
||
srun \ | ||
--cpus-per-task=$SLURM_CPUS_PER_TASK \ | ||
--distribution=block:block \ | ||
--kill-on-bad-exit \ | ||
scripts/run_with_environment.sh \ | ||
singularity exec \ | ||
-B"$PROJECT_DIR:$PROJECT_DIR" \ | ||
-B"$FLASH_DIR:$FLASH_DIR" \ | ||
-B"$SCRATCH_DIR:$SCRATCH_DIR" \ | ||
-B /opt/cray:/opt/cray \ | ||
-B /usr/lib64/libcxi.so.1:/usr/lib64/libcxi.so.1 \ | ||
-B /usr/lib64/libjson-c.so.3:/usr/lib64/libjson-c.so.3 \ | ||
$PROJECT_DIR/containers/$OLMO_CONTAINER \ | ||
python scripts/train.py ${@} --run_name=${SLURM_JOB_ID} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
doubling this?
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'm going to test that out first. If it works I'll update.
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.
You can't double that unless you set a micro batch of 1.