1. 20 Sep, 2023 6 commits
    • fxmarty's avatar
      fix deepspeed available detection (#26252) · 24553206
      fxmarty authored
      24553206
    • Matt's avatar
      Rewrite for custom code warning messages (#26291) · f29fe745
      Matt authored
      Quick britpicking for some warning messages!
      f29fe745
    • Funtowicz Morgan's avatar
      Integrate AMD GPU in CI/CD environment (#26007) · 2d71307d
      Funtowicz Morgan authored
      
      
      * Add a Dockerfile for PyTorch + ROCm based on official AMD released artifact
      
      * Add a new artifact single-amdgpu testing on main
      
      * Attempt to test the workflow without merging.
      
      * Changed BERT to check if things are triggered
      
      * Meet the dependencies graph on workflow
      
      * Revert BERT changes
      
      * Add check_runners_amdgpu to correctly mount and check availability
      
      * Rename setup to setup_gpu for CUDA and add setup_amdgpu for AMD
      
      * Fix all the needs.setup -> needs.setup_[gpu|amdgpu] dependencies
      
      * Fix setup dependency graph to use check_runner_amdgpu
      
      * Let's do the runner status check only on AMDGPU target
      
      * Update the Dockerfile.amd to put ourselves in / rather than /var/lib
      
      * Restore the whole setup for CUDA too.
      
      * Let's redisable them
      
      * Change BERT to trigger tests
      
      * Restore BERT
      
      * Add torchaudio with rocm 5.6 to AMD Dockerfile (#26050)
      
      fix dockerfile
      Co-authored-by: default avatarFelix Marty <felix@hf.co>
      
      * Place AMD GPU tests in a separate workflow (correct branch) (#26105)
      
      AMDGPU CI lives in an other workflow
      
      * Fix invalid job name is dependencies.
      
      * Remove tests multi-amdgpu for now.
      
      * Use single-amdgpu
      
      * Use --net=host for now.
      
      * Remote host networking.
      
      * Removed duplicated check_runners_amdgpu step
      
      * Let's tag machine-types with mi210 for now.
      
      * Machine type should be only mi210
      
      * Remove unnecessary push.branches item
      
      * Apply review suggestions moving from `x-amdgpu` to `x-gpu` introducing `amd-gpu` and `miXXX` labels.
      
      * Remove amdgpu from step names.
      
      * finalize
      
      * delete
      
      ---------
      Co-authored-by: default avatarfxmarty <9808326+fxmarty@users.noreply.github.com>
      Co-authored-by: default avatarFelix Marty <felix@hf.co>
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      2d71307d
    • Jinho Park's avatar
      Update bros checkpoint (#26277) · 37c205eb
      Jinho Park authored
      * fix bros integration test
      
      * update bros checkpoint
      37c205eb
    • Sourab Mangrulkar's avatar
      fix name error when accelerate is not available (#26278) · 86ffd5ff
      Sourab Mangrulkar authored
      * fix name error when accelerate is not available
      
      * fix `is_fsdp_available`
      86ffd5ff
    • Sourab Mangrulkar's avatar
      FSDP tests and checkpointing fixes (#26180) · 382ba670
      Sourab Mangrulkar authored
      
      
      * add fsdp tests
      
      * Update test_fsdp.py
      
      * Update test_fsdp.py
      
      * fixes
      
      * checks
      
      * Update trainer.py
      
      * fix
      
      * fixes for saving/resuming checkpoints
      
      * fixes
      
      * add tests and delete debug statements
      
      * fixing tests
      
      * Update test_fsdp.py
      
      * fix tests
      
      * fix tests
      
      * minor nits
      
      * fix code style and quality
      
      * refactor and modularize test code
      
      * reduce the time of tests
      
      * reduce the test time
      
      * fix test
      
      * reduce test time
      
      * reduce test time
      
      * fix failing tests
      
      * fix
      
      * Apply suggestions from code review
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * resolve comments
      
      ---------
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      382ba670
  2. 19 Sep, 2023 6 commits
  3. 18 Sep, 2023 18 commits
  4. 15 Sep, 2023 7 commits
  5. 14 Sep, 2023 3 commits
    • Leo Tronchon's avatar
      IDEFICS: allow interpolation of vision's pos embeddings (#26029) · 869733ab
      Leo Tronchon authored
      
      
      * add pos embed interpolation for vision encoder
      
      * style
      
      * update config with interpolate_pos_encoding arg
      
      * fix imports formatting
      
      * take off copied from on vision embeddings
      
      * add test for image embeddings interpolation
      
      * add credit for interpolation code
      
      * Update src/transformers/models/idefics/configuration_idefics.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/idefics/vision.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * fix condition to check nbr image patches match shape of pos embeddings
      
      * use kwargs in the forward methods for interpolation
      
      * fix tests
      
      * have interpolate_pos_encoding default to False instead of None
      
      * Update tests/models/idefics/test_modeling_idefics.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update tests/models/idefics/test_modeling_idefics.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update tests/models/idefics/test_modeling_idefics.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/idefics/configuration_idefics.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * take off for loop meant to print k,v
      
      * add interpolate_pos_encoding arg in prepare_inputs_for_generation
      
      * add test for interpolated generation
      
      * fix edge case num_patches == num_positions and height == width
      
      * add test for edge case
      
      * fix pos_embed in interpolate
      
      * allow interpolation in bf16 with upcasting
      
      * Update src/transformers/models/idefics/vision.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/idefics/vision.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * add multiple images tests for interpolation and generation
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      869733ab
    • NielsRogge's avatar
      [BLIP-2] Improve conversion script (#24854) · 5469c187
      NielsRogge authored
      * Improve conversion script
      
      * Add int8 code example
      
      * Update tip
      
      * Fix code
      
      * Fix code snippet
      
      * Add nucleus sampling
      
      * More improvements
      
      * Address comments
      
      * Address comments
      5469c187
    • Jinho Park's avatar
      Add BROS (#23190) · 17fdd354
      Jinho Park authored
      
      
      * add Bros boilerplate
      
      * copy and pasted modeling_bros.py from official Bros repo
      
      * update copyright of bros files
      
      * copy tokenization_bros.py from official repo and update import path
      
      * copy tokenization_bros_fast.py from official repo and update import path
      
      * copy configuration_bros.py from official repo and update import path
      
      * remove trailing period in copyright line
      
      * copy and paste bros/__init__.py from official repo
      
      * save formatting
      
      * remove unused unnecessary pe_type argument - using only crel type
      
      * resolve import issue
      
      * remove unused model classes
      
      * remove unnecessary tests
      
      * remove unused classes
      
      * fix original code's bug - layer_module's argument order
      
      * clean up modeling auto
      
      * add bbox to prepare_config_and_inputs
      
      * set temporary value to hidden_size (32 is too low because of the of the
      Bros' positional embedding)
      
      * remove decoder test, update create_and_check* input arguemnts
      
      * add missing variable to model tests
      
      * do make fixup
      
      * update bros.mdx
      
      * add boilerate plate for no_head inference test
      
      * update BROS_PRETRAINED_MODEL_ARCHIVE_LIST (add naver-clova-ocr prefix)
      
      * add prepare_bros_batch_inputs function
      
      * update modeling_common to add bbox inputs in Bros Model Test
      
      * remove unnecessary model inference
      
      * add test case
      
      * add model_doc
      
      * add test case for token_classification
      
      * apply fixup
      
      * update modeling code
      
      * update BrosForTokenClassification loss calculation logic
      
      * revert logits preprocessing logic to make sure logits have original shape
      
      * - update class name
      
      * - add BrosSpadeOutput
      - update BrosConfig arguments
      
      * add boilerate plate for no_head inference test
      
      * add prepare_bros_batch_inputs function
      
      * add test case
      
      * add test case for token_classification
      
      * update modeling code
      
      * update BrosForTokenClassification loss calculation logic
      
      * revert logits preprocessing logic to make sure logits have original shape
      
      * apply masking on the fly
      
      * add BrosSpadeForTokenLinking
      
      * update class name
      put docstring to the beginning of the file
      
      * separate the logits calculation logic and loss calculation logic
      
      * update logic for loss calculation so that logits shape doesn't change
      when return
      
      * update typo
      
      * update prepare_config_and_inputs
      
      * update dummy node initialization
      
      * update last_hidden_states getting logic to consider when return_dict is False
      
      * update box first token mask param
      
      * bugfix: remove random attention mask generation
      
      * update keys to ignore on load missing
      
      * run make style and quality
      
      * apply make style and quality of other codes
      
      * update box_first_token_mask to bool type
      
      * update index.md
      
      * apply make style and quality
      
      * apply make fix-copies
      
      * pass check_repo
      
      * update bros model doc
      
      * docstring bugfix fix
      
      * add checkpoint for doc, tokenizer for doc
      
      * Update README.md
      
      * Update docs/source/en/model_doc/bros.md
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update bros.md
      
      * Update src/transformers/__init__.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update docs/source/en/model_doc/bros.md
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Apply suggestions from code review
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * apply suggestions from code review
      
      * apply suggestions from code review
      
      * revert test_processor_markuplm.py
      
      * Update test_processor_markuplm.py
      
      * apply suggestions from code review
      
      * apply suggestions from code review
      
      * apply suggestions from code review
      
      * update BrosSpadeELForTokenClassification head name to entity linker
      
      * add doc string for config params
      
      * update class, var names to more explicit and apply suggestions from code review
      
      * remove unnecessary keys to ignore
      
      * update relation extractor to be initialized with config
      
      * add bros processor
      
      * apply make style and quality
      
      * update bros.md
      
      * remove bros tokenizer, add bros processor that wraps bert tokenizer
      
      * revert change
      
      * apply make fix-copies
      
      * update processor code, update itc -> initial token, stc -> subsequent token
      
      * add type hint
      
      * remove unnecessary condition branches in embedding forward
      
      * fix auto tokenizer fail
      
      * update docstring for each classes
      
      * update bbox input dimension as standard 2 points and convert them to 4
      points in forward pass
      
      * update bros docs
      
      * apply suggestions from code review : update Bros -> BROS in bros.md
      
      * 1. box prefix var -> bbox
      2. update variable names to be more explicit
      
      * replace einsum with torch matmul
      
      * apply style and quality
      
      * remove unused argument
      
      * remove unused arguments
      
      * update docstrings
      
      * apply suggestions from code review: add BrosBboxEmbeddings, replace
      einsum with classical matrix operations
      
      * revert einsum update
      
      * update bros processor
      
      * apply suggestions from code review
      
      * add conversion script for bros
      
      * Apply suggestions from code review
      
      * fix readme
      
      * apply fix-copies
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      17fdd354