Repository navigation
Add table-transformer to NormalizedConfigManager - #2511
Open
kratos0718 wants to merge 1 commit into
Open
kratos0718 wants to merge 1 commit into
kratos0718 wants to merge 1 commit into
Conversation
table-transformer has an ONNX export config but was missing from NormalizedConfigManager. Same situation as DETR (it's DETR-based): the config exposes hidden_size, num_attention_heads and num_hidden_layers through its own attribute_map, so plain NormalizedTextConfig resolves them with no custom optimum-side mapping needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #351. table-transformer already has an ONNX export config but was missing from
NormalizedConfigManager, soORTOptimizercan't run on it yet."table-transformer": NormalizedTextConfigto_conf(alphabetically, betweensplinterandt5)table-transformerfrom theTODO: missing normalized configscomment above itSame situation as DETR (#2510, also open on this issue): table-transformer is DETR-based, so its config stores transformer stats under
d_model/encoder_attention_heads/encoder_layers, butTableTransformerConfig.attribute_mapalready aliases these tohidden_size/num_attention_heads/num_hidden_layers, so plainNormalizedTextConfigresolves them with no customwith_args(...)mapping needed.Test plan
tests/utils/test_normalized_config.py: one confirmingtable-transformerresolves toNormalizedTextConfig, and one instantiating a realTableTransformerConfig()and asserting the normalizedhidden_size/num_attention_heads/num_layersmatchd_model/encoder_attention_heads/encoder_layerstransformers.TableTransformerConfig(not mocked) — both pass