transformers
fde2b96b - [PoC] HF exporters (#41992)

Commit
9 days ago
[PoC] HF exporters (#41992) * style * revert deepseek * style * fix style * fix lfm cache * revert idefics * revert idefics * revert deepseek vl * better leaf tensors handling * revert patchtsmixer * fix in onnx exporter order and executorch backend preparation * fix get_rope_index models and chunked vision attn models * fix annotation * skip video llama 3 * skip ernie vl as well * introduce dynamo patches and make prepare_for_export the least impactful possible * fix after merge * ultimatevlm fix (precompute stuff) * fix vlm encoders export through optional precomputed inputs * more vlms passing (t5 gemma and paddle ocr) * fix qwen omni and paddle ocr export * fix docs * fix torch dep * annotations * revert change * missing licence * attempt fix styling * fix torch leak * fix * style * fix * style * guard * same name for torch patches * fix detectron failure * fix musicflamingo * fix * fix * support and fix gemma4 * update docs * update docs * make qwen omni audio encoders exportable * docs * get cu seqlens * leave paddle ocr * skip paddle ocr * fix * fix layoutlmv2 onnx export * fix idefics3 on cpu * fix falcon_mamba and other idefics * style and docs * dict decomposition * remove deferred * executorch fixes * dynamo doctests passing *-* * clean title * update * normalize qwen omni * only pure functions * patch views for exeuctorch * better vision dynamic tensors pre computation * audio functions * fix * fix * define vision modeling utils * fix docs * style * fix repo * update skips * fixes and skips * fix repo * exportable/compilable paddleocr vl * onnx parity * more docs * style * move * avoid lens * timesfm minicpmv46 canine colqwen2 * fix test * executorch fixes * executorch fixes * more executorch fixes * more executorch patches * fix * more fixes * Update src/transformers/exporters/exporter_dynamo.py Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> * stadarize the patching and fixing api more * fix get_encoder is some models * fix style * fix qwen omni get decoder and export * fix xlstm export * per model type inputs preparation registery * standarize torch and library (onnx, executorch) patching and fx program and graph fixes * style * fix gemma4 unified test * add export for generation pipeline * decompose for generation helper function * style * onnx fixes * two pat fix * vectorized swin attention * vectorized big bird block sparse attn * avoid dino timeouts * big bird and pegasus * fixed unified gemma4 * sam fixes and simplifications * fix repo * fix style * unify model instance patches with the rest of the patching api * change in api to allow exporting multiple models with diff configs * accept dicts * docs review comments * address comments * fix clvp by not using datasets and vectorizing loops * style * handle moe per backend and better (e.g. onnx translation) * better export workflow, no dict constraint on inputs, less enforcing impl in prepare_for_export * modeling fixes not honoring config.use_cache * style * style * easier to mantain inputs preparation * fix chunk on cuda only * onnx fixes * drop cpu gpu sync in mask update * lower onnx export time for some models by disabling optimize * fix executorch * added version drift warnings * fix more exeutorch * remove "legacy" name * model fixes for export compatibility * add minicpmv vision utils * can compile * make ssms fully compilable * more ssms * address new comments * fast ci fixes * address comments * fix minimax * fix the last falcon fast ci failure * more comments addressed * attention * reference attn * cleanup * use can_return_tuple in patchmixer * proper gqa expalanation * avoid 5D attention * granite export fix * address modeling comments * update * address more comments, unify linear attention and make more models support full graph compile * style * style * modeling changes for attn impl compatibility * no need for patch * fix * patch is kenrels available * fixes * fix lfm2 conv errors * diffllama is exportable now * enable more models * address most of anton's review comments * address cyril's comments * revert conv rename * simpler modular * keep max_batch_size check * fixes * fix moshi cuda graphs * fix * added layer type class attr in mixers * fix repo * fix * address comments * address comments * address comments * Merge branch 'main' into hf-exporters-models * fix merge * claude review findings * docs comments * address comments * style * claude review * small fix caught by copilot * misc fixes after merge * onnx fixes * fix cpu sdpa tripping * only on cpu * fix merge * fix * address comments * more comments * nemotron asr * fix m3 * style * add tests for utils * utils testing * style * update deprecation * trim tests * style * skips for executorch --------- Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> Co-authored-by: Anton Vlasjuk <73884904+vasqu@users.noreply.github.com>
Parents
Loading