"vscode:/vscode.git/clone" did not exist on "83a2347952a789ce97dc3eed1384b195b7ef16fb"
  1. 02 Feb, 2024 1 commit
  2. 30 Jan, 2024 1 commit
    • Matt's avatar
      Add tf_keras imports to prepare for Keras 3 (#28588) · 415e9a09
      Matt authored
      * Port core files + ESM (because ESM code is odd)
      
      * Search-replace in modelling code
      
      * Fix up transfo_xl as well
      
      * Fix other core files + tests (still need to add correct import to tests)
      
      * Fix cookiecutter
      
      * make fixup, fix imports in some more core files
      
      * Auto-add imports to tests
      
      * Cleanup, add imports to sagemaker tests
      
      * Use correct exception for importing tf_keras
      
      * Fixes in modeling_tf_utils
      
      * make fixup
      
      * Correct version parsing code
      
      * Ensure the pipeline tests correctly revert to float32 after each test
      
      * Ensure the pipeline tests correctly revert to float32 after each test
      
      * More tf.keras -> keras
      
      * Add dtype cast
      
      * Better imports of tf_keras
      
      * Add a cast for tf.assign, just in case
      
      * Fix callback imports
      415e9a09
  3. 29 Jan, 2024 1 commit
  4. 23 Jan, 2024 1 commit
  5. 15 Jan, 2024 1 commit
  6. 22 Dec, 2023 1 commit
  7. 20 Dec, 2023 1 commit
    • amyeroberts's avatar
      Align backbone stage selection with out_indices & out_features (#27606) · ee298a16
      amyeroberts authored
      * Iteratre over out_features instead of stage_names
      
      * Update for all backbones
      
      * Add tests
      
      * Fix
      
      * Align timm backbone behaviour with other backbones
      
      * Fix tests
      
      * Stricter checks on set out_features and out_indices
      
      * Revert back stage selection logic
      
      * Remove out-of-order logic
      
      * Document restriction in docstrings
      ee298a16
  8. 19 Dec, 2023 1 commit
  9. 18 Dec, 2023 1 commit
    • Matt's avatar
      More TF fixes (#28081) · 71d47f0a
      Matt authored
      * More build_in_name_scope()
      
      * Make sure we set the save spec now we don't do it with dummies anymore
      
      * make fixup
      71d47f0a
  10. 15 Dec, 2023 1 commit
  11. 08 Dec, 2023 1 commit
    • fxmarty's avatar
      F.scaled_dot_product_attention support (#26572) · 80377eb0
      fxmarty authored
      
      
      * add sdpa
      
      * wip
      
      * cleaning
      
      * add ref
      
      * yet more cleaning
      
      * and more :)
      
      * wip llama
      
      * working llama
      
      * add output_attentions=True support
      
      * bigcode sdpa support
      
      * fixes
      
      * gpt-bigcode support, require torch>=2.1.1
      
      * add falcon support
      
      * fix conflicts falcon
      
      * style
      
      * fix attention_mask definition
      
      * remove output_attentions from attnmaskconverter
      
      * support whisper without removing any Copied from statement
      
      * fix mbart default to eager renaming
      
      * fix typo in falcon
      
      * fix is_causal in SDPA
      
      * check is_flash_attn_2_available in the models init as well in case the model is not initialized through from_pretrained
      
      * add warnings when falling back on the manual implementation
      
      * precise doc
      
      * wip replace _flash_attn_enabled by config.attn_implementation
      
      * fix typo
      
      * add tests
      
      * style
      
      * add a copy.deepcopy on the config in from_pretrained, as we do not want to modify it inplace
      
      * obey to config.attn_implementation if a config is passed in from_pretrained
      
      * fix is_torch_sdpa_available when torch is not installed
      
      * remove dead code
      
      * Update src/transformers/modeling_attn_mask_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/modeling_attn_mask_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/modeling_attn_mask_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/modeling_attn_mask_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/modeling_attn_mask_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/bart/modeling_bart.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * remove duplicate pretraining_tp code
      
      * add dropout in llama
      
      * precise comment on attn_mask
      
      * add fmt: off for _unmask_unattended docstring
      
      * precise num_masks comment
      
      * nuke pretraining_tp in LlamaSDPAAttention following Arthur's suggestion
      
      * cleanup modeling_utils
      
      * backward compatibility
      
      * fix style as requested
      
      * style
      
      * improve documentation
      
      * test pass
      
      * style
      
      * add _unmask_unattended tests
      
      * skip meaningless tests for idefics
      
      * hard_check SDPA requirements when specifically requested
      
      * standardize the use if XXX_ATTENTION_CLASSES
      
      * fix SDPA bug with mem-efficient backend on CUDA when using fp32
      
      * fix test
      
      * rely on SDPA is_causal parameter to handle the causal mask in some cases
      
      * fix FALCON_ATTENTION_CLASSES
      
      * remove _flash_attn_2_enabled occurences
      
      * fix test
      
      * add OPT to the list of supported flash models
      
      * improve test
      
      * properly test on different SDPA backends, on different dtypes & properly handle separately the pad tokens in the test
      
      * remove remaining _flash_attn_2_enabled occurence
      
      * Update src/transformers/modeling_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/modeling_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/modeling_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/modeling_attn_mask_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update docs/source/en/perf_infer_gpu_one.md
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * remove use_attn_implementation
      
      * fix docstring & slight bug
      
      * make attn_implementation internal (_attn_implementation)
      
      * typos
      
      * fix tests
      
      * deprecate use_flash_attention_2=True
      
      * fix test
      
      * add back llama that was removed by mistake
      
      * fix tests
      
      * remove _flash_attn_2_enabled occurences bis
      
      * add check & test that passed attn_implementation is valid
      
      * fix falcon torchscript export
      
      * fix device of mask in tests
      
      * add tip about torch.jit.trace and move bt doc below sdpa
      
      * fix parameterized.expand order
      
      * move tests from test_modeling_attn_mask_utils to test_modeling_utils as a relevant test class is already there
      
      * update sdpaattention class with the new cache
      
      * Update src/transformers/configuration_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/bark/modeling_bark.py
      
      * address review comments
      
      * WIP torch.jit.trace fix. left: test both eager & sdpa
      
      * add test for torch.jit.trace for both eager/sdpa
      
      * fix falcon with torch==2.0 that needs to use sdpa
      
      * fix doc
      
      * hopefully last fix
      
      * fix key_value_length that has no default now in mask converter
      
      * is it flacky?
      
      * fix speculative decoding bug
      
      * tests do pass
      
      * fix following #27907
      
      ---------
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      80377eb0
  12. 23 Nov, 2023 1 commit
  13. 13 Nov, 2023 1 commit
  14. 31 Oct, 2023 1 commit
  15. 24 Oct, 2023 1 commit
  16. 06 Oct, 2023 1 commit
  17. 25 Sep, 2023 1 commit
  18. 21 Sep, 2023 1 commit
  19. 19 Sep, 2023 1 commit
  20. 14 Sep, 2023 1 commit
  21. 05 Sep, 2023 1 commit
  22. 29 Aug, 2023 1 commit
  23. 24 Aug, 2023 1 commit
  24. 11 Aug, 2023 1 commit
  25. 09 Aug, 2023 1 commit
  26. 08 Aug, 2023 1 commit
  27. 03 Aug, 2023 1 commit
  28. 31 Jul, 2023 1 commit
  29. 28 Jul, 2023 1 commit
  30. 30 Jun, 2023 1 commit
  31. 28 Jun, 2023 1 commit
  32. 20 Jun, 2023 3 commits
  33. 16 Jun, 2023 1 commit
    • Matt's avatar
      Add test for proper TF input signatures (#24320) · 91389950
      Matt authored
      * Add test for proper input signatures
      
      * No more signature pruning
      
      * Test the dummy inputs are valid too
      
      * fine-tine -> fine-tune
      
      * Fix indent in test_dataset_conversion
      91389950
  34. 13 Jun, 2023 1 commit
    • Matt's avatar
      Stop storing references to bound methods via tf.function (#24146) · 3bd1fe43
      Matt authored
      * Stop storing references to bound methods in tf.functions
      
      * Remove the gc.collect calls now that we resolved the underlying problem
      
      * Remove the default signature from model.serving entirely, big cleanup
      
      * Remove _prune_signature as self.input_signature can prune itself
      
      * Restore serving docstring
      
      * Update int support test to check the input signature
      
      * Make sure other tests also use model.input_signature and not serving.input_signature
      
      * Restore _prune_signature
      
      * Remove the doctest GC now it's no longer needed
      
      * Correct core tests to use the pruned sig
      
      * order lines correctly in core tests
      
      * Add eager_serving back with a deprecation warning
      3bd1fe43
  35. 08 Jun, 2023 1 commit
  36. 24 May, 2023 2 commits
    • Daniel King's avatar
      Fix the regex in `get_imports` to support multiline try blocks and excepts... · 89159651
      Daniel King authored
      Fix the regex in `get_imports` to support multiline try blocks and excepts with specific exception types (#23725)
      
      * fix and test get_imports for multiline try blocks, and excepts with specific errors
      
      * fixup
      
      * add some more tests
      
      * add license
      89159651
    • Matt's avatar
      Better TF docstring types (#23477) · f8b25744
      Matt authored
      * Rework TF type hints to use | None instead of Optional[] for tf.Tensor
      
      * Rework TF type hints to use | None instead of Optional[] for tf.Tensor
      
      * Don't forget the imports
      
      * Add the imports to tests too
      
      * make fixup
      
      * Refactor tests that depended on get_type_hints
      
      * Better test refactor
      
      * Fix an old hidden bug in the test_keras_fit input creation code
      
      * Fix for the Deit tests
      f8b25744
  37. 18 May, 2023 1 commit