Summary
TransformerBridge.generate() works for most autoregressive HF models, but some bridge models (e.g. encoder-only architectures, certain multimodal models) currently fall through to an AttributeError/RuntimeError. The compatibility test silently skips when this happens, hiding the gap.
Affected test
tests/unit/model_bridge/compatibility/test_utils.py:104 has inline pytest.skip("Generation not supported for this TransformerBridge model") inside an except (AttributeError, RuntimeError):
What the test verifies
That model.generate(prompt, max_new_tokens=5) returns one of (str, list, torch.Tensor) for every parameterized model.
Acceptance criteria
Where to start
- Find the parameterized model set (
@pytest.mark.parametrize or params= on the fixture).
- Categorize each by whether generation is supported. Filter the non-supporting ones out at parametrize time.
- Investigate and fix models that should support generation, but currently raise.
Summary
TransformerBridge.generate()works for most autoregressive HF models, but some bridge models (e.g. encoder-only architectures, certain multimodal models) currently fall through to anAttributeError/RuntimeError. The compatibility test silently skips when this happens, hiding the gap.Affected test
tests/unit/model_bridge/compatibility/test_utils.py:104has inlinepytest.skip("Generation not supported for this TransformerBridge model")inside anexcept (AttributeError, RuntimeError):What the test verifies
That
model.generate(prompt, max_new_tokens=5)returns one of(str, list, torch.Tensor)for every parameterized model.Acceptance criteria
except + skip.except + pytest.skipis removed.Where to start
@pytest.mark.parametrizeorparams=on the fixture).