@@ -61,38 +61,31 @@ jit_initializers: True
6161# Set true to load weights from pytorch
6262from_pt : True
6363split_head_dim : True
64- attention : ' flash' # Supported attention: dot_product, flash, cudnn_flash_te
64+ attention : ' ulysses_custom' # Supported attention: dot_product, flash, cudnn_flash_te, ulysses_custom
65+ use_base2_exp : True
66+ use_experimental_scheduler : True
6567# If mask_padding_tokens is True, we pass in segment ids to splash attention to avoid attending to padding tokens.
6668# Else we do not pass in segment ids and on vpu bound hardware like trillium this is faster.
6769# However, when padding tokens are significant, this will lead to worse quality and should be set to True.
68- mask_padding_tokens : True
70+ mask_padding_tokens : False
6971# Maxdiffusion has 2 types of attention sharding strategies:
7072# 1. attention_sharding_uniform = True : same sequence sharding rules applied for q in both (self and cross attention)
7173# 2. attention_sharding_uniform = False : Heads are sharded uniformly across devices for self attention while sequence is sharded
7274# in cross attention q.
7375attention_sharding_uniform : True
76+ # Use the following flash_block_sizes on v6e (Trillium) due to larger vmem.
7477flash_block_sizes : {
75- " block_q" : 256,
76- " block_kv_compute" : 256,
77- " block_kv" : 256,
78- " block_q_dkv" : 256,
79- " block_kv_dkv" : 256,
80- " block_kv_dkv_compute" : 256,
81- " block_q_dq" : 256,
82- " block_kv_dq" : 256
78+ " block_q" : 4864,
79+ " block_kv_compute" : 1024,
80+ " block_kv" : 1024,
81+ " block_kv_compute_in" : 1024,
82+ " heads_per_tile" : 3,
83+ " block_q_dkv" : 4864,
84+ " block_kv_dkv" : 1024,
85+ " block_kv_dkv_compute" : 1024,
86+ " block_q_dq" : 4864,
87+ " block_kv_dq" : 1024
8388}
84-
85- # Use the following flash_block_sizes on v6e (Trillium).
86- # flash_block_sizes: {
87- # "block_q" : 2176,
88- # "block_kv_compute" : 2176,
89- # "block_kv" : 2176,
90- # "block_q_dkv" : 2176,
91- # "block_kv_dkv" : 2176,
92- # "block_kv_dkv_compute" : 2176,
93- # "block_q_dq" : 2176,
94- # "block_kv_dq" : 2176
95- # }
9689# GroupNorm groups
9790norm_num_groups : 32
9891
@@ -166,7 +159,7 @@ logical_axis_rules: [
166159 ['out_channels', 'tensor'],
167160 ['conv_out', 'fsdp'],
168161 ]
169- data_sharding : [['data', 'fsdp', 'context', 'tensor' ]]
162+ data_sharding : [['data', 'fsdp']]
170163
171164# One axis for each parallelism type may hold a placeholder (-1)
172165# value to auto-shard based on available slices and devices.
@@ -227,7 +220,7 @@ max_train_steps: 200
227220num_train_epochs : 1
228221seed : 0
229222output_dir : ' sdxl-model-finetuned'
230- per_device_batch_size : 1
223+ per_device_batch_size : 1.0
231224
232225warmup_steps_fraction : 0.0
233226learning_rate_schedule_steps : -1 # By default the length of the schedule is set to the number of steps.
0 commit comments