1. 04 Jul, 2024 1 commit
    • Billy Cao's avatar
      Add torch_empty_cache_steps to TrainingArguments (#31546) · 43ffb785
      Billy Cao authored
      * Add torch_empty_cache_steps to TrainingArguments
      
      * Fix formatting
      
      * Add torch_empty_cache_steps to docs on single gpu training
      
      * Remove check for torch_empty_cache_steps <= max_steps
      
      * Captalize Tip
      
      * Be device agnostic
      
      * Fix linting
      43ffb785
  2. 03 Jul, 2024 1 commit
  3. 02 Jul, 2024 2 commits
  4. 27 Jun, 2024 3 commits
  5. 26 Jun, 2024 4 commits
    • amyeroberts's avatar
      Skip tests properly (#31308) · 1de7dc74
      amyeroberts authored
      * Skip tests properly
      
      * [test_all]
      
      * Add 'reason' as kwarg for skipTest
      
      * [test_all] Fix up
      
      * [test_all]
      1de7dc74
    • Raushan Turganbay's avatar
      Add LLaVa NeXT Video (#31252) · e71f2863
      Raushan Turganbay authored
      
      
      * squash into single commit
      
      * run diff once more
      
      * docstring
      
      * tests
      
      * minor chnages and ready to go
      
      * Update src/transformers/models/llava_next_video/processing_llava_next_video.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update tests/models/vipllava/test_modeling_vipllava.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * [run-slow] llava-next-video
      
      * [run-slow] llava-next-video
      
      * [run-slow] llava_next_video
      
      * fix two tests
      
      * fix slow tests
      
      * remove logit checks due to numeric errors
      
      * run test once more
      
      * [run-slow] llava_next_video
      
      * final try to pass the test
      
      * [run-slow] llava_next_video
      
      * [run-slow] llava_next_video
      
      * [run-slow] llava_next_video
      
      * style
      
      * fix
      
      * style
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      e71f2863
    • Pavel Iakubovskii's avatar
      Update RT-DETR code snippet (#31631) · ac52084b
      Pavel Iakubovskii authored
      Update code snippet
      ac52084b
    • Anton Vlasjuk's avatar
      [`GPT-NeoX`] Add SDPA support (#31031) · b07770c5
      Anton Vlasjuk authored
      * starting support for sdpa in `gptneox` models
      
      * small comment on tests
      
      * fix dropout
      
      * documentation and style
      
      * clarify concrete paths for reference
      
      * generalise attn projections and rope application
      
      added head mask check to sdpa mask creation
      
      handle sdpa memory backend bug via own version flag
      
      * update docs and style
      
      * move dtype casting outside of general attn_projection_and_rope function
      
      fix flash_attn_2 stuff
      
      * more generic attn warning if output_attns or head_mask
      
      * simplify head mask check by moving head mask creation to a later point
      
      * remove copied llama artifact
      
      * remove padding_mask from attention function signature
      
      * removing unnecessary comments, only "save" attn implementation once
      
      * [run_slow] gpt_neox
      b07770c5
  6. 25 Jun, 2024 1 commit
    • Raushan Turganbay's avatar
      Add video modality for InstrucBLIP (#30182) · fc689d75
      Raushan Turganbay authored
      * squash in single commit
      
      * add docs
      
      * dummy obj
      
      * more changes in diff converter
      
      * tiny fix
      
      * make docs happy
      
      * skip test
      
      * repo consistency tests
      
      * update docstring
      
      * style
      
      * fix tests
      
      * change diff imports
      
      * [run-slow] instructblipvideo
      
      * [run-slow] instructblipvideo
      
      * fix tests and remove logit check
      
      * [run-slow] instructblipvideo
      fc689d75
  7. 23 Jun, 2024 1 commit
  8. 21 Jun, 2024 1 commit
  9. 19 Jun, 2024 4 commits
  10. 18 Jun, 2024 3 commits
  11. 12 Jun, 2024 1 commit
  12. 11 Jun, 2024 2 commits
    • amyeroberts's avatar
      Fast image processor (#28847) · f53fe35b
      amyeroberts authored
      
      
      * Draft fast image processors
      
      * Draft working fast version
      
      * py3.8 compatible cache
      
      * Enable loading fast image processors through auto
      
      * Tidy up; rescale behaviour based on input type
      
      * Enable tests for fast image processors
      
      * Smarter rescaling
      
      * Don't default to Fast
      
      * Safer imports
      
      * Add necessary Pillow requirement
      
      * Woops
      
      * Add AutoImageProcessor test
      
      * Fix up
      
      * Fix test for imagegpt
      
      * Fix test
      
      * Review comments
      
      * Add warning for TF and JAX input types
      
      * Rearrange
      
      * Return transforms
      
      * NumpyToTensor transformation
      
      * Rebase - include changes from upstream in ImageProcessingMixin
      
      * Safe typing
      
      * Fix up
      
      * convert mean/std to tesnor to rescale
      
      * Don't store transforms in state
      
      * Fix up
      
      * Update src/transformers/image_processing_utils_fast.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/auto/image_processing_auto.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/auto/image_processing_auto.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/auto/image_processing_auto.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Warn if fast image processor available
      
      * Update src/transformers/models/vit/image_processing_vit_fast.py
      
      * Transpose incoming numpy images to be in CHW format
      
      * Update mapping names based on packages, auto set fast to None
      
      * Fix up
      
      * Fix
      
      * Add AutoImageProcessor.from_pretrained(checkpoint, use_fast=True) test
      
      * Update src/transformers/models/vit/image_processing_vit_fast.py
      Co-authored-by: default avatarPavel Iakubovskii <qubvel@gmail.com>
      
      * Add equivalence and speed tests
      
      * Fix up
      
      ---------
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      Co-authored-by: default avatarPavel Iakubovskii <qubvel@gmail.com>
      f53fe35b
    • Matt's avatar
      Chat Template support for function calling and RAG (#30621) · edc1dffd
      Matt authored
      
      
      * First draft, still missing automatic function conversion
      
      * First draft of the automatic schema generator
      
      * Lots of small fixes
      
      * the walrus has betrayed me
      
      * please stop committing your debug breakpoints
      
      * Lots of cleanup and edge cases, looking better now
      
      * Comments and bugfixes for the type hint parser
      
      * More cleanup
      
      * Add tests, update schema generator
      
      * Update tests, proper handling of return values
      
      * Small docstring change
      
      * More doc updates
      
      * More doc updates
      
      * Add json_schema decorator
      
      * Clean up the TODOs and finish the docs
      
      * self.maxDiff = None to see the whole diff for the nested list test
      
      * add import for add_json_schema
      
      * Quick test fix
      
      * Fix something that was bugging me in the chat template docstring
      
      * Less "anyOf" when unnecessary
      
      * Support return types for the templates that need them
      
      * Proper return type tests
      
      * Switch to Google format docstrings
      
      * Update chat templating docs to match new format
      
      * Stop putting the return type in with the other parameters
      
      * Add Tuple support
      
      * No more decorator - we just do it implicitly!
      
      * Add enum support to get_json_schema
      
      * Update docstring
      
      * Add copyright header
      
      * Update src/transformers/tokenization_utils_base.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update docs/source/en/chat_templating.md
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/utils/chat_template_utils.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/utils/chat_template_utils.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Add copyright header
      
      * make fixup
      
      * Fix indentation
      
      * Reformat chat_template_utils
      
      * Correct return value
      
      * Make regexes module-level
      
      * Support more complex, multi-line arg docstrings
      
      * Update error message for ...
      
      * Update ruff
      
      * Add document type validation
      
      * Refactor docs
      
      * Refactor docs
      
      * Refactor docs
      
      * Clean up Tuple error
      
      * Add an extra test for very complex defs and docstrings and clean everything up for it
      
      * Document enum block
      
      * Quick test fixes
      
      * Stop supporting type hints in docstring to fix bugs and simplify the regex
      
      * Update docs for the regex change
      
      * Clean up enum regex
      
      * Wrap functions in {"type": "function", "function": ...}
      
      * Update src/transformers/utils/chat_template_utils.py
      Co-authored-by: default avatarPablo Montalvo <39954772+molbap@users.noreply.github.com>
      
      * Temporary tool calling commit
      
      * Add type hints to chat template utils, partially update docs (incomplete!)
      
      * Code cleanup based on @molbap's suggestion
      
      * Add comments to explain regexes
      
      * Fix up type parsing for unions and lists
      
      * Add custom exception types and adjust tests to look for them
      
      * Update docs with a demo!
      
      * Docs cleanup
      
      * Pass content as string
      
      * Update tool call formatting
      
      * Update docs with new function format
      
      * Update docs
      
      * Update docs with a second tool to show the model choosing correctly
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarPablo Montalvo <39954772+molbap@users.noreply.github.com>
      edc1dffd
  13. 10 Jun, 2024 2 commits
    • Pavel Iakubovskii's avatar
      Decorators for deprecation and named arguments validation (#30799) · 517df566
      Pavel Iakubovskii authored
      
      
      * Fix do_reduce_labels for maskformer image processor
      
      * Deprecate reduce_labels in favor to do_reduce_labels
      
      * Deprecate reduce_labels in favor to do_reduce_labels (segformer)
      
      * Deprecate reduce_labels in favor to do_reduce_labels (oneformer)
      
      * Deprecate reduce_labels in favor to do_reduce_labels (maskformer)
      
      * Deprecate reduce_labels in favor to do_reduce_labels (mask2former)
      
      * Fix typo
      
      * Update mask2former test
      
      * fixup
      
      * Update segmentation examples
      
      * Update docs
      
      * Fixup
      
      * Imports fixup
      
      * Add deprecation decorator draft
      
      * Add deprecation decorator
      
      * Fixup
      
      * Add deprecate_kwarg decorator
      
      * Validate kwargs decorator
      
      * Kwargs validation (beit)
      
      * fixup
      
      * Kwargs validation (mask2former)
      
      * Kwargs validation (maskformer)
      
      * Kwargs validation (oneformer)
      
      * Kwargs validation (segformer)
      
      * Better message
      
      * Fix oneformer processor save-load test
      
      * Update src/transformers/utils/deprecation.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/utils/deprecation.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/utils/deprecation.py
      Co-authored-by: default avatarPablo Montalvo <39954772+molbap@users.noreply.github.com>
      
      * Update src/transformers/utils/deprecation.py
      Co-authored-by: default avatarPablo Montalvo <39954772+molbap@users.noreply.github.com>
      
      * Better handle classmethod warning
      
      * Fix typo, remove warn
      
      * Add header
      
      * Docs and `additional_message`
      
      * Move to filter decorator ot generic
      
      * Proper deprecation for semantic segm scripts
      
      * Add to __init__ and update import
      
      * Basic tests for filter decorator
      
      * Fix doc
      
      * Override `to_dict()` to pop depracated `_max_size`
      
      * Pop unused parameters
      
      * Fix trailing whitespace
      
      * Add test for deprecation
      
      * Add deprecation warning control parameter
      
      * Update generic test
      
      * Fixup deprecation tests
      
      * Introduce init service kwargs
      
      * Revert popping unused params
      
      * Revert oneformer test
      
      * Allow "metadata" to pass
      
      * Better docs
      
      * Fix test
      
      * Add notion in docstring
      
      * Fix notification for both names
      
      * Add func name to warning message
      
      * Fixup
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarPablo Montalvo <39954772+molbap@users.noreply.github.com>
      517df566
    • 谭九鼎's avatar
      docs: fix style (#31340) · 807483ed
      谭九鼎 authored
      807483ed
  14. 07 Jun, 2024 1 commit
    • Matt's avatar
      Remove ConversationalPipeline and Conversation object (#31165) · 065729a6
      Matt authored
      * Remove ConversationalPipeline and Conversation object, as they have been deprecated for some time and are due for removal
      
      * Update not-doctested.txt
      
      * Fix JA and ZH docs
      
      * Fix JA and ZH docs some more
      
      * Fix JA and ZH docs some more
      065729a6
  15. 06 Jun, 2024 3 commits
  16. 05 Jun, 2024 1 commit
  17. 04 Jun, 2024 1 commit
  18. 03 Jun, 2024 2 commits
    • Aaron Jimenez's avatar
      [docs] Spanish translation of tokenizer_summary.md (#31154) · c73ee133
      Aaron Jimenez authored
      * add tokenizer_summary to es/_toctree.yml
      
      * add tokenizer_summary to es/
      
      * fix link to Transformes XL in en/
      
      * translate until Subword tokenization section
      
      * fix GPT link in en/
      
      * fix other GPT link in en/
      
      * fix typo in en/
      
      * translate the doc
      
      * run make fixup
      
      * Remove .md in Transformer XL link
      
      * fix some link issues in es/
      
      * fix typo
      c73ee133
    • Isotr0py's avatar
      Add Qwen2 GGUF loading support (#31175) · e4628434
      Isotr0py authored
      * add qwen2 gguf support
      
      * Update docs
      
      * fix qwen2 tokenizer
      
      * add qwen2 gguf test
      
      * fix typo in qwen2 gguf test
      
      * format code
      
      * Remove mistral, clarify the error message
      
      * format code
      
      * add typing and update docstring
      e4628434
  19. 31 May, 2024 3 commits
  20. 30 May, 2024 1 commit
  21. 29 May, 2024 2 commits