Fx cannot trace some BERT models

I met the ValueError: You cannot specify both input_ids and inputs_embeds at the same time error when I tried to quantize the BERT model using fx quantization. So I looked into the fx trace code and found that the forward args are automatically filled by proxies. However, some of the BERT models require that we cannot specify both args at the same time which results in the error. How could I solve it?

1 Like

@Zhihao_Zhang have you solved this issue?

Hi,

Also stuck in this problem, is there any suggestion?

have you solved this issue?