You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assertargs.ln_affine_merge, 'Graph rotation requires to merge LN/RMS norm affine parameters'
495
499
assertargs.replace_rmsnorm, 'Graph rotation requires to replace HF RMSNorm with PyTorch ones (torch 2.4+ require)'
496
500
assertargs.convert_layernorm_to_rmsnorm, 'Graph rotation requires to replace LayerNorm with RMSNorm'
501
+
# FX is not compatible with few-shot evaluation
502
+
assertargs.few_shot_evalisNone, "FX is not compatible with few shot evaluation, use fused_no_fx"
503
+
# Otherwise we might end up tracing through dynamo twice and other weird errors.
504
+
# Fused_no_fx takes care of all the rotations-related transformations
505
+
iffx_required(args):
506
+
assertargs.rotation!="fused_no_fx", "fused_no_fx is incompatible with any option that requires FX tracing"
497
507
elifargs.rotation=='fused_no_fx':
498
508
assertnotargs.convert_layernorm_to_rmsnorm, 'LayerNorm is automatically replaced with RMSNorm when running with --rotation=fused_no_fx. Remove the flag --convert-layernorm-to-rmsnorm'
499
509
assertargs.replace_rmsnorm, 'Graph rotation requires to replace HF RMSNorm with PyTorch ones (torch 2.4+ require)'
0 commit comments