RuntimeError: Detected that you are using FX to symbolically trace a dynamo-optimized function. This is not supported at the moment.

#14
by fernandogd97 - opened

Anybody is getting this error, trying to finetune it (in my case, using a similar approach to SapBERT): RuntimeError: Detected that you are using FX to symbolically trace a dynamo-optimized function. This is not supported at the moment.

Answer.AI org

You should be able to specify reference_compile=False in the from_pretrained("answerdotai/ModernBERT-base", reference_compile=False). In short, the reference implementation uses torch.compile for some components of the model. This is not compatible with FX, so we also give you the option to disable the compile.

  • Tom Aarsen
Answer.AI org

Hey! To add to @tomaarsen 's comment, if you are using multi-GPU with a HuggingFace trainer, this can sometimes be resolved by using accelerate to handle the multi-GPU aspect.

Thank you, Tom. Now it is working perfectly.

fernandogd97 changed discussion status to closed

Sign up or log in to comment