• NielsRogge's avatar
    Add UDOP (#22940) · 836921fd
    NielsRogge authored
    
    
    * First draft
    
    * More improvements
    
    * More improvements
    
    * More fixes
    
    * Fix copies
    
    * More improvements
    
    * More fixes
    
    * More improvements
    
    * Convert checkpoint
    
    * More improvements, set up tests
    
    * Fix more tests
    
    * Add UdopModel
    
    * More improvements
    
    * Fix equivalence test
    
    * More fixes
    
    * Redesign model
    
    * Extend conversion script
    
    * Use real inputs for conversion script
    
    * Add image processor
    
    * Improve conversion script
    
    * Add UdopTokenizer
    
    * Add fast tokenizer
    
    * Add converter
    
    * Update README's
    
    * Add processor
    
    * Add fully fledged tokenizer
    
    * Add fast tokenizer
    
    * Use processor in conversion script
    
    * Add tokenizer tests
    
    * Fix one more test
    
    * Fix more tests
    
    * Fix tokenizer tests
    
    * Enable fast tokenizer tests
    
    * Fix more tests
    
    * Fix additional_special_tokens of fast tokenizer
    
    * Fix tokenizer tests
    
    * Fix more tests
    
    * Fix equivalence test
    
    * Rename image to pixel_values
    
    * Rename seg_data to bbox
    
    * More renamings
    
    * Remove vis_special_token
    
    * More improvements
    
    * Add docs
    
    * Fix copied from
    
    * Update slow tokenizer
    
    * Update fast tokenizer design
    
    * Make text input optional
    
    * Add first draft of processor tests
    
    * Fix more processor tests
    
    * Fix decoder_start_token_id
    
    * Fix test_initialization
    
    * Add integration test
    
    * More improvements
    
    * Improve processor, add test
    
    * Add more copied from
    
    * Add more copied from
    
    * Add more copied from
    
    * Add more copied from
    
    * Remove print statement
    
    * Update README and auto mapping
    
    * Delete files
    
    * Delete another file
    
    * Remove code
    
    * Fix test
    
    * Fix docs
    
    * Remove asserts
    
    * Add doc tests
    
    * Include UDOP in exotic model tests
    
    * Add expected tesseract decodings
    
    * Add sentencepiece
    
    * Use same design as T5
    
    * Add UdopEncoderModel
    
    * Add UdopEncoderModel to tests
    
    * More fixes
    
    * Fix fast tokenizer
    
    * Fix one more test
    
    * Remove parallelisable attribute
    
    * Fix copies
    
    * Remove legacy file
    
    * Copy from T5Tokenizer
    
    * Fix rebase
    
    * More fixes, copy from T5
    
    * More fixes
    
    * Fix init
    
    * Use ArthurZ/udop for tests
    
    * Make all model tests pass
    
    * Remove UdopForConditionalGeneration from auto mapping
    
    * Fix more tests
    
    * fixups
    
    * more fixups
    
    * fix the tokenizers
    
    * remove un-necessary changes
    
    * nits
    
    * nits
    
    * replace truncate_sequences_boxes with truncate_sequences for fix-copies
    
    * nit current path
    
    * add a test for input ids
    
    * ids that we should get taken from c9f7a32f57440d90ff79890270d376a1cc0acb68
    
    * nits converting
    
    * nits
    
    * apply ruff
    
    * nits
    
    * nits
    
    * style
    
    * fix slow order of addition
    
    * fix udop fast range as well
    
    * fixup
    
    * nits
    
    * Add docstrings
    
    * Fix gradient checkpointing
    
    * Update code examples
    
    * Skip tests
    
    * Update integration test
    
    * Address comment
    
    * Make fixup
    
    * Remove extra ids from tokenizer
    
    * Skip test
    
    * Apply suggestions from code review
    
    Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
    
    * Update year
    
    * Address comment
    
    * Address more comments
    
    * Address comments
    
    * Add copied from
    
    * Update CI
    
    * Rename script
    
    * Update model id
    
    * Add AddedToken, skip tests
    
    * Update CI
    
    * Fix doc tests
    
    * Do not use Tesseract for the doc tests
    
    * Remove kwargs
    
    * Add original inputs
    
    * Update casting
    
    * Fix doc test
    
    * Update question
    
    * Update question
    
    * Use LayoutLMv3ImageProcessor
    
    * Update organization
    
    * Improve docs
    
    * Update forward signature
    
    * Make images optional
    
    * Remove deprecated device argument
    
    * Add comment, add add_prefix_space
    
    * More improvements
    
    * Remove kwargs
    
    ---------
    
    Co-authored-by: default avatarArthurZucker <arthur.zucker@gmail.com>
    Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
    836921fd