Skip to content

Commit 081ddeb

Browse files
committed
fix precommit
1 parent 7a82f2e commit 081ddeb

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

tests/utils/test_flops_counter.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,30 @@ def __init__(self, config_dict):
220220
"num_experts_per_tok": 4,
221221
"sliding_window": 128,
222222
"layer_types": [
223-
"sliding_attention", "full_attention", "sliding_attention", "full_attention",
224-
"sliding_attention", "full_attention", "sliding_attention", "full_attention",
225-
"sliding_attention", "full_attention", "sliding_attention", "full_attention",
226-
"sliding_attention", "full_attention", "sliding_attention", "full_attention",
227-
"sliding_attention", "full_attention", "sliding_attention", "full_attention",
228-
"sliding_attention", "full_attention", "sliding_attention", "full_attention"
223+
"sliding_attention",
224+
"full_attention",
225+
"sliding_attention",
226+
"full_attention",
227+
"sliding_attention",
228+
"full_attention",
229+
"sliding_attention",
230+
"full_attention",
231+
"sliding_attention",
232+
"full_attention",
233+
"sliding_attention",
234+
"full_attention",
235+
"sliding_attention",
236+
"full_attention",
237+
"sliding_attention",
238+
"full_attention",
239+
"sliding_attention",
240+
"full_attention",
241+
"sliding_attention",
242+
"full_attention",
243+
"sliding_attention",
244+
"full_attention",
245+
"sliding_attention",
246+
"full_attention",
229247
],
230248
},
231249
"batch_seqlens_tuple": ([512, 1024, 2048], [4096, 4096, 4096]),

verl/utils/flops_counter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ def _estimate_apertus_flops(config, tokens_sum, batch_seqlens, delta_time):
313313
flops_achieved = flops_all_token * (1.0 / delta_time) / 1e12
314314
return flops_achieved
315315

316+
316317
def _estimate_gpt_oss_flops(config, tokens_sum, batch_seqlens, delta_time):
317318
hidden_size = config.hidden_size
318319
vocab_size = config.vocab_size
@@ -383,6 +384,7 @@ def _estimate_gpt_oss_flops(config, tokens_sum, batch_seqlens, delta_time):
383384
flops_achieved = flops_all_token * (1.0 / delta_time) / 1e12
384385
return flops_achieved
385386

387+
386388
def _estimate_unknown_flops(config, tokens_sum, batch_seqlens, delta_time):
387389
return 0
388390

0 commit comments

Comments
 (0)