Open IvanYashchuk opened 1 week ago
Thank you @IvanYashchuk
@IvanYashchuk what transformers version are you using? I'm getting an indexing error with 4.43-ish and a different assertion error (but needs fixing, too) with 4.46.2.
So with 4.46.2 and the following lookaside, things seem to work:
from transformers.modeling_utils import PreTrainedModel
@thunder.core.jit_ext.register_general_jit_lookaside(PreTrainedModel.loss_function.fget)
@thunder.core.jit_ext.interpreter_needs_wrap
def fn(*args, **kwargs):
return PreTrainedModel.loss_function.fget(*args, **kwargs)
The loss_function
property uses the Python re
module to parse the loss function config, I wonder if we should allow marking modules as "treat everything here as opaque". Dangerous tool, but I think it might be more reasonable than relying on the internals of transformers
.
@lantiga for UX thoughts
I get this error with transformers version of 4.45.2
🐛 Bug
I get the following assertion error from Thunder JIT:
using the following script:
The
transformers
version is 4.45.2