1. 18 Apr, 2024 2 commits
  2. 17 Apr, 2024 1 commit
  3. 15 Apr, 2024 1 commit
  4. 10 Apr, 2024 1 commit
    • Pavel Iakubovskii's avatar
      Fix and simplify semantic-segmentation example (#30145) · 56d001b2
      Pavel Iakubovskii authored
      * Remove unused augmentation
      
      * Fix pad_if_smaller() and remove unused augmentation
      
      * Add indentation
      
      * Fix requirements
      
      * Update dataset use instructions
      
      * Replace transforms with albumentations
      
      * Replace identity transform with None
      
      * Fixing formatting
      
      * Fixed comment place
      56d001b2
  5. 09 Apr, 2024 1 commit
  6. 08 Apr, 2024 2 commits
  7. 05 Apr, 2024 1 commit
  8. 02 Apr, 2024 1 commit
  9. 30 Mar, 2024 1 commit
  10. 21 Mar, 2024 1 commit
  11. 20 Mar, 2024 1 commit
  12. 15 Mar, 2024 1 commit
  13. 12 Mar, 2024 2 commits
  14. 11 Mar, 2024 2 commits
    • Yitong Huang's avatar
      Make torch xla available on GPU (#29334) · 873d9bb3
      Yitong Huang authored
      
      
      * add USE_TORCH_XLA env
      
      * rename torch_tpu to torch_xla
      
      * better is_torch_xla_available; fix some fsdp and performance issues
      
      * fix format
      
      * fix bug when pjrt_device is cpu
      
      * fix bug
      
      * fix the deprecation handling
      
      ---------
      Co-authored-by: default avataranw90 <ang868@gmail.com>
      Co-authored-by: default avatarwangang.wa <wangang.wa@alibaba-inc.com>
      873d9bb3
    • Tanay Mehta's avatar
      Add Fill-in-the-middle training objective example - PyTorch (#27464) · 6d67837f
      Tanay Mehta authored
      * add: initial script to train clm fim
      
      * fix: if training model from scratch, new tokens will be added and embeddings resized
      
      * fix: fixed attention_mask errors when generating FIM data
      
      * fix: file formatted using black
      
      * add: run_fim_no_trainer.py and fixed some comments in run_fim.py
      
      * add: added fim examples to the README.md and ran code fixup
      
      * fix: little bug in both fim training scripts
      
      * fix: remove comment from notebook and added a note on fim related params
      
      * fix: minor typo in README
      
      * add: suggested minor changes to README and run_fim.py
      
      * add: gradient_accumulation_steps and gradient_checkpointing args
      
      * add: improved model embedding resizing
      
      * add: pad_to_multiple_of and attn_implementation params
      
      * add: requested minor changes
      
      * add: deepspeed zero compatibility
      
      * add: resize embeddings layer with zero3 support for fim model initialization
      6d67837f
  15. 21 Feb, 2024 1 commit
  16. 19 Feb, 2024 2 commits
  17. 16 Feb, 2024 1 commit
  18. 12 Feb, 2024 2 commits
  19. 07 Feb, 2024 1 commit
  20. 02 Feb, 2024 1 commit
    • Klaus Hipp's avatar
      [Docs] Fix spelling and grammar mistakes (#28825) · 721ee783
      Klaus Hipp authored
      * Fix typos and grammar mistakes in docs and examples
      
      * Fix typos in docstrings and comments
      
      * Fix spelling of `tokenizer` in model tests
      
      * Remove erroneous spaces in decorators
      
      * Remove extra spaces in Markdown link texts
      721ee783
  21. 01 Feb, 2024 1 commit
  22. 30 Jan, 2024 1 commit
    • Matt's avatar
      Pin Torch to <2.2.0 (#28785) · 74c9cfea
      Matt authored
      
      
      * Pin torch to <2.2.0
      
      * Pin torchvision and torchaudio as well
      
      * Playing around with versions to see if this helps
      
      * twiddle something to restart the CI
      
      * twiddle it back
      
      * Try changing the natten version
      
      * make fixup
      
      * Revert "Try changing the natten version"
      
      This reverts commit de0d6592c35dc39ae8b5a616c27285db28262d06.
      
      * make fixup
      
      * fix fix fix
      
      * fix fix fix
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      74c9cfea
  23. 29 Jan, 2024 1 commit
  24. 26 Jan, 2024 1 commit
  25. 22 Jan, 2024 2 commits
  26. 19 Jan, 2024 1 commit
  27. 18 Jan, 2024 2 commits
    • Yoach Lacombe's avatar
      Making CTC training example more general (#28582) · 772307be
      Yoach Lacombe authored
      
      
      * add w2v2bert compatibility
      
      * Update examples/pytorch/speech-recognition/run_speech_recognition_ctc.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      772307be
    • Yoach Lacombe's avatar
      Add new meta w2v2-conformer BERT-like model (#28165) · d2cdefb9
      Yoach Lacombe authored
      
      
      * first commit
      
      * correct default value non causal
      
      * update config and modeling code
      
      * update converting checkpoint
      
      * clean modeling and fix tests
      
      * make style
      
      * add new config parameters to docstring
      
      * fix copied from statements
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * make position_embeddings_type docstrings clearer
      
      * clean converting script
      
      * remove function not used
      
      * clean modeling file
      
      * apply suggestion for test file + add convert script to not_doctested
      
      * modify tests according to review - cleaner logic and more tests
      
      * Apply nit suggestions from code review
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * add checker of valid position embeddings type
      
      * instantiate new layer norm layer with the right eps
      
      * fix freeze_feature_encoder since it can be None in some cases
      
      * add test same output in convert script
      
      * restore wav2vec2conformer and add new model
      
      * create processor and FE + clean
      
      * add new model code
      
      * fix convert script and set default config parameters
      
      * correct model id paths
      
      * make style
      
      * make fix-copies and cleaning files
      
      * fix copied from statements
      
      * complete .md and fixe copies
      
      * clean convert script argument defaults
      
      * fix config parameters docstrings
      
      * fix config docstring
      
      * add copied from and enrich FE tests
      
      * fix copied from and repo-consistency
      
      * add autotokenizer
      
      * make test input length shorter and change docstring code
      
      * fix docstrings and copied from
      
      * add add_adapter to ASR training example
      
      * make testing of adapters more robust
      
      * adapt to multi adapter layers
      
      * refactor input_values->input_features and remove w2v2-bert feature extractor
      
      * remove pretraining model
      
      * remove depreciated features and useless lines
      
      * add copied from and ignore statements to modeling tests
      
      * remove pretraining model #2
      
      * change import in convert script
      
      * change default in convert script
      
      * update readme and remove useless line
      
      * Update tests/models/wav2vec2_bert/test_processor_wav2vec2_bert.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * refactor BERT to Bert for consistency
      
      * remove useless ignore copy statement
      
      * add persistent to buffer in rotary
      
      * add eps in LayerNorm init and remove copied from
      
      * add adapter activation parameters and add copied from statements
      
      * Fix copied statements and add unitest.skip reasons
      
      * add copied statement in test_processor
      
      * refactor processor
      
      * make style
      
      * replace numpy random by torch rand
      
      * remove expected output CTC
      
      * improve converting script with processor class
      
      * Apply suggestions from code review
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * remove gumbel class
      
      * remove tests related to previously deleted class
      
      * Update src/transformers/models/wav2vec2_bert/configuration_wav2vec2_bert.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * correct typos
      
      * remove uused parameters
      
      * update processor to takes both text and audio
      
      * update checkpoints
      
      * update expected output and add ctc expected output
      
      * add label_attention_mask
      
      * replace pt with np in processor tests
      
      * fix typo
      
      * revert to behaviour with labels_attention_mask
      
      ---------
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      d2cdefb9
  28. 16 Jan, 2024 1 commit
  29. 15 Jan, 2024 2 commits
  30. 12 Jan, 2024 1 commit
  31. 11 Jan, 2024 1 commit
    • Alex Hedges's avatar
      Set `cache_dir` for `evaluate.load()` in example scripts (#28422) · 95091e15
      Alex Hedges authored
      While using `run_clm.py`,[^1] I noticed that some files were being added
      to my global cache, not the local cache. I set the `cache_dir` parameter
      for the one call to `evaluate.load()`, which partially solved the
      problem. I figured that while I was fixing the one script upstream, I
      might as well fix the problem in all other example scripts that I could.
      
      There are still some files being added to my global cache, but this
      appears to be a bug in `evaluate` itself. This commit at least moves
      some of the files into the local cache, which is better than before.
      
      To create this PR, I made the following regex-based transformation:
      `evaluate\.load\((.*?)\)` -> `evaluate\.load\($1,
      cache_dir=model_args.cache_dir\)`. After using that, I manually fixed
      all modified files with `ruff` serving as useful guidance. During the
      process, I removed one existing usage of the `cache_dir` parameter in a
      script that did not have a corresponding `--cache-dir` argument
      declared.
      
      [^1]: I specifically used `pytorch/language-modeling/run_clm.py` from
      v4.34.1 of the library. For the original code, see the following URL:
      https://github.com/huggingface/transformers/tree/acc394c4f5e1283c19783581790b3dc3105a3697/examples/pytorch/language-modeling/run_clm.py.
      95091e15