Commit b8ea565
committed
fix: add is_compileable attribute to HFInferenceParams for transformers 5.4+
transformers >= 5.4 checks cache.is_compileable in generate(). The custom
HFInferenceParams class (TE-based cache) did not implement this attribute,
causing AttributeError during test_generate_with_cache tests.
Set is_compileable = False since this cache type is not compatible with
torch.compile generate().
Tested locally:
- models/mixtral: 52 passed, 3 skipped, 26 xfailed (3 local-only OOM on 32GB GPU, pass on CI L4)
- recipes/mixtral_native_te: 7 passed
- recipes/opengenome2_mixtral_native_te: 20 passed
Signed-off-by: svc-bionemo <267129667+svc-bionemo@users.noreply.github.com>1 parent 5609f30 commit b8ea565
3 files changed
Lines changed: 12 additions & 0 deletions
File tree
- bionemo-recipes
- models/mixtral
- recipes
- mixtral_native_te
- opengenome2_mixtral_native_te
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
875 | 879 | | |
876 | 880 | | |
877 | 881 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
881 | 885 | | |
882 | 886 | | |
883 | 887 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
878 | 878 | | |
879 | 879 | | |
880 | 880 | | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
881 | 885 | | |
882 | 886 | | |
883 | 887 | | |
| |||
0 commit comments