[PoC] HF exporters #41992
initial poc
4721d30f
support exporting causal models
448206d8
fix cache recreation issue
46ef4493
group utils
23d96d95
dynamic axis on a best effort basis
e37cf458
allow user to pass their own pkv
75529648
Merge branch 'main' into hf-exporters
5857f101
misc
fba576d5
cascading exports
c4a3a2d0
add encoder decoder cache support
25904a12
add testing for dynamo exporter
3f951934
fix cases that are easy to fix
f07de577
disable torch export for some models using custom caches
7a9e3f77
fix more models
ba02172c
solve issue in model return fake tensors
ba7b4b80
disable more models with custom caches
ad732714
fix biogpt
6b838d92
biogpt
8488793e
style
41dda353
error on generative encoder decoders and process attention mask for c…
c157f033
prepare_cache_inputs_for_export helper method
6eaa9f12
add comments about non-tested models
9c4afb58
style
cfa69771
fix bamba export
e58aca3d
paligemma
d2184fe0
deepseek and zamba
14ea0d25
skip reformer for its custom cache
a08b6634
avoid the vlm tokens check during export
49db1825
fix-copies
223037d6
add support for many MoEs
8c3795eb
skip some custom MoEs that are not worth the effort or now
7394559c
zamba and zamba2
56598a59
comments
f8b172f3
monolith encoder-decoder export is possible
26418a05
Merge branch 'main' into hf-exporters
8a89c96a
comments
c31154ca
Merge branch 'hf-exporters' of https://github.com/huggingface/transfo…
2b07f0a1
catch cryptic torch assertion error
552fd13b
revert moe changes
d758aa38
patch moes during the export
6e997609
revert unnecessary changes
43114b0c
fix idefics2
3021194a
fix bidirectional attention mask causing the cryptic export error
d7942bb1
fix granitemoehybrid
982aba52
fix bidirectional
9d542e9e
skip qwen 2.5 omni as it has data dependent input processing
293db77a
fix idefic
3d6e4b9b
skip omdet turbo as it uses a custom cache class
6bdbca71
fix a bunch of seq2seqLM models
cdc38dd7
skip some models with highly data-dependent helper methods
f11b7acd
make FalconH1 and qwen3_next exportable
abd43a50
skip emu3
6a2be431
fix some vlms
a7400bfa
fix emot and evolla
d7eae951
fix qwen2 audio and vits
c6942127
create list of unsupported models and raise not implemented
ff975775
fix timesfm and eomt
62ee8ddf
revert ibert
178c7cc3
remove test_torch_exportable flag replaced by the list of unsupported…
a8fe5af3
cleanup
11b28e20
make d-fine exportable
f79a7687
make many more models and vlms exportable
f71019f7
make jamba exportable except its cache class
018879af
make grounding dino exportable
ffb25df5
make more models exportable (led, reformer, videomae, idefics, idefics3)
16738b68
set use_cache to false for models with unsupported cache classes
eaae3637
skip random LSH attention
e435da22
fix docstring
b6cdce88
Merge branch 'main' into hf-exporters
9b45a555
Merge branch 'main' into hf-exporters
bea176df
untangle inputs preparation
82dbfc8e
auto dynamic shapes for int/float/bool
0c749aba
some fixes for dynamic export
a87a39a4
fixes for dynamic export
4066acb8
Merge branch 'main' into hf-exporters
8d3f9565
make the same exporter re-usable and remove PreTrainedModel integration
14cff62f
remove print
c4cc0668
remove warn_on_unsupported_cache_class
321bd1e7
better onnx exporter support and more lenient testing for now
5cf47509
make more models exportable
1d447c9f
skip LSH attention closeness test
c76059a2
list all failing models and omit them for now
7525035b
make seq2seq lm models exportable
366de2a5
fix patch
14cfe34e
fix
425c4554
xenova
commented
on 2025-11-18
xenova
commented
on 2025-11-18
xenova
commented
on 2025-11-18
custom testing for onnx (more lenient)
9a7801b6
separate patch utils file
b31b621b
fix
a05717bb
make siglip2 and lfm2_vl dynamo and onnx exportable
87e56e1f
Merge branch 'main' into hf-exporters
1f726f9d
revert modeling changes
48b25be6
revert examples changes
40ae5649
revert a test
0d676623
remove patching
4517aef0
update with latest dynamo compatibility
817c172e
fix idefics tracing
080d7888
make all cache subclasses exportable with a serialization recipe
eeb1aef2
full export support
b43fa07f
fix a lot of onnx non-exportable models
19c9ccda
skip bigbird pegasus
fb5737ee
fix
10e74009
fix bigbird
360ff6ca
updates
7a1d79d7
more onnx fixes
d9edfab1
init executorch
bf77b2aa
executorch test
d93bdf36
executorch cuda recipe
8c87491d
patch rms norm
0954ac6c
first model to pass executorch cuda recipe :)
a7b9be8b
move onnx specific torch patching to onnx
8fb62b1b
executorch patching
05614fb7
fixes
273c1156
json dumpable serialization
bffbd8ee
more onnx compatible exports
4af1159f
reverts
854e28b8
fix
18cd3a9f
simplify
84fc73d1
Merge branch 'main' into hf-exporters
5318ca05
onnxscript
f27212f5
style
1e5e1838
fix
94330d4c
revert unnecesaary
d1528efd
fixes
25cd56ee
dia
6dbdff67
Merge branch 'main' into hf-exporters
a20d7d6b
revert
3b32a738
fix
482ed9ca
better
3bb74af0
style
a42c2b05
fix idefics
5c722167
style
9ddbe863
fix flava
de777f3e
simpler post export fixes
19e3a4b8
fix
5b6a9286
fix
4328e25f
complete rewrite of the onnx exporter in 4 stages - all models are to…
016abf9a
Merge branch 'main' into hf-exporters
e8f8e0a6
revert changes in modeling in favor of patches
13680057
fix
e1a80321
revert and patch masked mean/var
387561b7
more modeling reverts
5a88d63a
revert
47b5e34b
simplify inputs prepartion
90ac060a
stage-specific full export testing (forward, prefill, decode) !
9ea28f57
fix for mllama
6ab1bd5a
docstrings and comments
a16df254
naming
34d07bdb
parametrize tests for auto dynamic export and testing later
1bf9cac2
fix pp doc layout v2
3091fb62
updates
b0a887fc
most of dynamic export passes
6cd3ce72
generic vlm models decomposition
44181082
awesome onnx fix
e7e80a13
final onnx patches and fixes
1155918b
docs
a9fb2605
allow doctest of some stuff (dynamo specifically)
17e894bf
Merge branch 'main' into hf-exporters
656161b7
style
0ad9382e
revert deepseek
eb1712ba
style
67a4d30f
fix style
85de2da8
fix lfm cache
4c949072
revert idefics
47fb0a5a
revert idefics
59044fd8
revert deepseek vl
0886f388
better leaf tensors handling
24d4735f
revert patchtsmixer
4eee8182
fix in onnx exporter order and executorch backend preparation
7c87d353
Merge branch 'main' into hf-exporters
a9bed196
fix get_rope_index models and chunked vision attn models
b9a547d3
fix annotation
a2d1e8c8
skip video llama 3
b6d68e58
skip ernie vl as well
17156c0f
introduce dynamo patches and make prepare_for_export the least impact…
969dbc30
Merge branch 'main' into hf-exporters
eaabee69
Merge branch 'hf-exporters' of https://github.com/huggingface/transfo…
b21385e8
Merge branch 'main' into hf-exporters
b75ce435
fix after merge
ff50ce8d
ultimatevlm fix (precompute stuff)
1d81213f
fix vlm encoders export through optional precomputed inputs
2fe1d11b
more vlms passing (t5 gemma and paddle ocr)
16cbe4d3
fix qwen omni and paddle ocr export
96e74bc3
fix docs
4a1303e1
fix torch dep
e814592c
annotations
a6bcb66d
revert change
a955ae56
missing licence
3bf6a90a
attempt fix styling
35b4db7f
Merge branch 'main' into hf-exporters
753e70e1
fix torch leak
c508d22f
fix
6a087a51
style
0a196a2d
fix
2b928ae7
style
ee8c7b02
guard
c3a0f24c
same name for torch patches
87b2ca8b
fix detectron failure
f024c9d7
Merge branch 'main' into hf-exporters
adf90da2
fix musicflamingo
16720f9c
fix
4ad2a991
fix
1ac2de80
support and fix gemma4
770cc2e8
update docs
5072edb0
update docs
5ac0267c
make qwen omni audio encoders exportable
27ccc0f7
docs
5364d989
Merge branch 'main' into hf-exporters
0a7baff2
get cu seqlens
9bcca9de
leave paddle ocr
ca6cfdbc
skip paddle ocr
d52bd2e6
fix
efafb3c1
fix layoutlmv2 onnx export
70862cec
fix idefics3 on cpu
0cc6e427
Merge branch 'main' into hf-exporters
ba8f7302
fix falcon_mamba and other idefics
7f9382c9
Merge branch 'main' into hf-exporters
e2e951dc
style and docs
e44c5aec
dict decomposition
1a7e7905
remove deferred
677a90d7
executorch fixes
dab2d144
dynamo doctests passing *-*
6ec03ba5
clean title
5eba3d5e
update
c5c7020d
normalize qwen omni
679eb1b1
only pure functions
ff66d956
patch views for exeuctorch
f0080026
better vision dynamic tensors pre computation
aef0409c
audio functions
2ae78c7d
Merge branch 'main' into hf-exporters
e3e66c6e
fix
d8432a54
fix
234f7eb0
define vision modeling utils
aa220b70
Assignees
No one assigned
Login to write a write a comment.
Login via GitHub