AnswerDotAI / AnswerDotAI/ModernBERT

BackendCompilerFailed

Open
#198 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
145
PR merge metrics
No merged PRs in 30d

Description

Running modernbert within transformer Trainer class, with torch_compile=False, I get the following error:

```
raise AssertionError(
torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
AssertionError: Please convert all Tensors to FakeTensors first or instantiate FakeTensorMode with 'allow_non_fake_inputs'. Found in aten.embedding.default(tensor([...], device='cuda:0', size=(50368, 768), grad_fn=), FakeTensor(..., device='cuda:0', size=(1, s1), dtype=torch.int64), 50283)
```

torch version: '2.4.1+cu121'
transformers version: '4.48.3'

I am not sure what the problem is here.

Contributor guide

No contributing guide indexed for this repository

Research direction

No project files or tests are named. Start by reproducing the ModernBERT Trainer run with torch 2.4.1+cu121 and transformers 4.48.3, recording whether torch_compile is actually disabled; done means the reported BackendCompilerFailed error is isolated to a reproducible project path or resolved with a verified regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.