1. 19 Feb, 2024 3 commits
    • Max Baak's avatar
      ENH: added new output_logits option to generate function (#28667) · 08cd694e
      Max Baak authored
      output_logits option behaves like output_scores, but returns the raw, unprocessed prediction logit scores,
      ie. the values before they undergo logit processing and/or warping. The latter happens by default for the
      regular output scores.
      
      It's useful to have the unprocessed logit scores in certain circumstances. For example, unprocessed logit scores
      are very useful with causallm models when one wants to determine the probability of a certain answer, e.g.
      when asking a question with a yes/no answer. In that case getting the next-token probabilities of both "yes" and
      "no" (and/or their relative ratio) is of interest for classification. The reason for getting these _before_ logit
      processing and/or warping is b/c a) that can change the probabilities or b) reject the tokens of interest / reduce
      the number of tokens to just 1.
      
      For an example use-case see paper TabLLM: Few-shot Classification of Tabular Data with Large Language Models
      by Stefan Hegselmann, Alejandro Buendia, Hunter Lang, Monica Agrawal, Xiaoyi Jiang, and David Sontag.
      https://arxiv.org/abs/2210.10723
      
      
      
      In addition:
      - added dedicated unit test: tests/generation/test_utils/test_return_unprocessed_logit_scores
        which tests return of logics with output_logits=True in generation.
      - set output_logits=True in all other generation unit tests, that also have output_scores=True.
      
      Implemented @gante's and @amyeroberts review feedback
      Co-authored-by: default avatarkx79wq <max.baak@ing.com>
      08cd694e
    • Lysandre Debut's avatar
      98308586
    • Younes Belkada's avatar
      FIX [`bnb` / `tests`]: Fix currently failing bnb tests (#29092) · a75a6c93
      Younes Belkada authored
      Update test_mixed_int8.py
      a75a6c93
  2. 16 Feb, 2024 7 commits
  3. 15 Feb, 2024 3 commits
    • amyeroberts's avatar
      Patch to skip failing `test_save_load_low_cpu_mem_usage` tests (#29043) · 4156f517
      amyeroberts authored
      * Patch to skip currently failing tests
      
      * Whoops - wrong place
      4156f517
    • Donggeun Yu's avatar
      DeformableDetrModel support fp16 (#29013) · 5b6fa230
      Donggeun Yu authored
      
      
      * Update ms_deform_attn_cuda.cu
      
      * Update ms_deform_attn_cuda.cuh
      
      * Update modeling_deformable_detr.py
      
      * Update src/transformers/models/deformable_detr/modeling_deformable_detr.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update modeling_deformable_detr.py
      
      * python utils/check_copies.py --fix_and_overwrite
      
      * Fix dtype missmatch error
      
      * Update test_modeling_deformable_detr.py
      
      * Update test_modeling_deformable_detr.py
      
      * Update modeling_deformable_detr.py
      
      * Update modeling_deformable_detr.py
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      5b6fa230
    • Arthur's avatar
      Fix static generation when compiling! (#28937) · f3788b09
      Arthur authored
      
      
      * wow I was scared!
      
      * fix everything
      
      * nits
      
      * make it BC?
      
      * add todo
      
      * nits
      
      * is_tracing should still be used to pass tracing tests
      
      * nits
      
      * some nits to make sure genration works with static cache uncompiled
      
      * fix sdpa
      
      * fix FA2 for both static and dynamic in a better way?
      
      * style
      
      * fix-copies
      
      * fix fix copies
      
      * fix sequential beam searcg
      
      * style
      
      * use `keys_to_ignore`
      
      * nit
      
      * correct dtype inference when init
      
      * :( the fix for FA2 is still not optimal to investigate!
      
      * styling
      
      * nits
      
      * nit
      
      * this might work better
      
      * add comment
      
      * Update src/transformers/models/llama/modeling_llama.py
      
      * "position_ids" -> "cache_position"
      
      * style
      
      * nit
      
      * Remove changes that should no be propagatted just yet
      
      * Apply suggestions from code review
      
      * Styling
      
      * make sure we raise an errir for static cache with FA2 enabled
      
      * move  to the bottom of the signature
      
      * style
      
      * Update src/transformers/models/llama/modeling_llama.py
      Co-authored-by: default avatarYounes Belkada <49240599+younesbelkada@users.noreply.github.com>
      
      * Update src/transformers/models/llama/modeling_llama.py
      
      * nit in the name
      
      ---------
      Co-authored-by: default avatarYounes Belkada <49240599+younesbelkada@users.noreply.github.com>
      f3788b09
  4. 14 Feb, 2024 9 commits
  5. 13 Feb, 2024 4 commits
  6. 12 Feb, 2024 3 commits
  7. 08 Feb, 2024 2 commits
  8. 07 Feb, 2024 1 commit
  9. 06 Feb, 2024 4 commits
  10. 05 Feb, 2024 3 commits
    • amyeroberts's avatar
      Image Feature Extraction pipeline (#28216) · ba3264b4
      amyeroberts authored
      
      
      * Draft pipeline
      
      * Fixup
      
      * Fix docstrings
      
      * Update doctest
      
      * Update pipeline_model_mapping
      
      * Update docstring
      
      * Update tests
      
      * Update src/transformers/pipelines/image_feature_extraction.py
      Co-authored-by: default avatarOmar Sanseviero <osanseviero@gmail.com>
      
      * Fix docstrings - review comments
      
      * Remove pipeline mapping for composite vision models
      
      * Add to pipeline tests
      
      * Remove for flava (multimodal)
      
      * safe pil import
      
      * Add requirements for pipeline run
      
      * Account for super slow efficientnet
      
      * Review comments
      
      * Fix tests
      
      * Swap order of kwargs
      
      * Use build_pipeline_init_args
      
      * Add back FE pipeline for Vilt
      
      * Include image_processor_kwargs in docstring
      
      * Mark test as flaky
      
      * Update TODO
      
      * Update tests/pipelines/test_pipelines_image_feature_extraction.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Add license header
      
      ---------
      Co-authored-by: default avatarOmar Sanseviero <osanseviero@gmail.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      ba3264b4
    • Yoach Lacombe's avatar
      Correct wav2vec2-bert inputs_to_logits_ratio (#28821) · 7addc934
      Yoach Lacombe authored
      * Correct wav2vec2-bert inputs_to_logits_ratio
      
      * correct ratio
      
      * correct ratio, clean asr pipeline
      
      * refactor on one line
      7addc934
    • Nicolas Patry's avatar
      [WIP] Hard error when ignoring tensors. (#27484) · 2da28c4b
      Nicolas Patry authored
      
      
      * [WIP] Hard error when ignoring tensors.
      
      * Better selection/error when saving a checkpoint.
      
      - Find all names we should normally drop (those are in the transformers
        config)
      - Find all disjoint tensors (for those we can safely trigger a copy to
        get rid of the sharing before saving)
      - Clone those disjoint tensors getting rid of the issue
      - Find all identical names (those should be declared in the config
        but we try to find them all anyway.)
      - For all identical names:
        - If they are in the config, just ignore them everything is fine
        - If they are not, warn about them.
      - For all remainder tensors which are shared yet neither identical NOR
        disjoint. raise a hard error.
      
      * Adding a failing test on `main` that passes here.
      
      * We don't need to keep the subfolder logic in this test.
      
      * Apply suggestions from code review
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      ---------
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      2da28c4b
  11. 02 Feb, 2024 1 commit