1. 27 Mar, 2023 7 commits
  2. 24 Mar, 2023 12 commits
  3. 23 Mar, 2023 13 commits
  4. 22 Mar, 2023 8 commits
    • Stas Bekman's avatar
      [deepspeed zero3] need `generate(synced_gpus=True, ...)` (#22242) · 73fdc8c5
      Stas Bekman authored
      
      
      * [deepspeed zero3] need generate(synced_gpus=True, ...)
      
      * fix
      
      * rework per Sylvain's suggestion
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      ---------
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      73fdc8c5
    • Yih-Dar's avatar
      Fix PipelineTests skip conditions (#22320) · 8b05ace0
      Yih-Dar authored
      
      
      * check what tests fail
      
      * Skip failing tests
      
      * Skip failing tests
      
      * Skip failing tests
      
      * Skip failing tests
      
      * clean up
      
      * clean up
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      8b05ace0
    • Luc CAILLIAU's avatar
      Chunkable token classification pipeline (#21771) · d62e7d88
      Luc CAILLIAU authored
      
      
      * Chunkable classification pipeline 
      
      The TokenClassificationPipeline is now able to process sequences longer than 512. No matter the framework, the model, the tokenizer. We just have to pass process_all=True and a stride number (optional). The behavior remains the same if you don't pass these optional parameters. For overlapping parts when using stride above 0, we consider only the max scores for each overlapped token in all chunks where the token is.
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * update with latest black format
      
      * update black format
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * format correction
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update comments
      
      * Update src/transformers/pipelines/token_classification.py
      Co-authored-by: default avatarNicolas Patry <patry.nicolas@protonmail.com>
      
      * Update token_classification.py
      
      Correct spaces, remove process_all and keep only stride. If stride is provided, the pipeline is applied to the whole text.
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update chunk aggregation
      
      Update the chunk aggregation strategy based on entities aggregation.
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      Remove unnecessary pop from outputs dict
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update token_classification.py
      
      * Update src/transformers/pipelines/token_classification.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * add chunking tests
      
      * correct formating
      
      * correct formatting
      
      * correct model id for test chunking
      
      * update scores with nested simplify
      
      * Update test_pipelines_token_classification.py
      
      * Update test_pipelines_token_classification.py
      
      * update model to a tiny one
      
      * Update test_pipelines_token_classification.py
      
      * Adding smaller test for chunking.
      
      * Fixup
      
      * Update token_classification.py
      
      * Update src/transformers/pipelines/token_classification.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/pipelines/token_classification.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      ---------
      Co-authored-by: default avatarNicolas Patry <patry.nicolas@protonmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      d62e7d88
    • Tom Aarsen's avatar
      docs: Resolve incorrect type typo in trainer methods (#22316) · f48d3314
      Tom Aarsen authored
      Resolve incorrect type typo in trainer methods
      f48d3314
    • Younes Belkada's avatar
      Add Pix2Struct (#21400) · 0f68a7f4
      Younes Belkada authored
      
      
      * v1 all keys match
      
      * clean up
      
      * forward pass ok
      
      * add correct image transform
      
      * generate works, logits matching
      
      * clean up
      
      * more refactor
      
      * revert
      
      * revert
      
      * clean up
      
      * clean ups
      
      * clean up
      
      * refactor
      
      * refactor
      
      * fix doc
      
      * fix tokenizer test
      
      * fix toctree
      
      * revert toctree
      
      * oops
      
      * few fixes
      
      * replace to `pixel_embeds`
      
      * make fixup
      
      * test processing & feat extractor
      
      * fix some tests
      
      * more fixes
      
      * make fixup
      
      * clean up
      
      * more clean up
      
      * add a single slow test
      
      * fix test
      
      * make fixup
      
      * fix
      
      * fix authors
      
      * fix toctree
      
      * update docs
      
      * add docstring
      
      * revert change
      
      * Update src/transformers/models/pix2struct/__init__.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * fix tokenizer
      
      * fix processor test
      
      * fix test
      
      * make fixup
      
      * refactor
      
      * fix config
      
      * Update src/transformers/models/pix2struct/image_processing_pix2struct.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * format
      
      * fix
      
      * Update src/transformers/models/pix2struct/image_processing_pix2struct.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * make fixup
      
      * add docstring
      
      * fix issues
      
      * fix
      
      * fix
      
      * fix
      
      * add slow test
      
      * fix
      
      * fix
      
      * fix batched issue
      
      * fix training issues
      
      * fix ci test
      
      * fix slow test
      
      * fix conversion script
      
      * remove unneeded classes
      
      * fix slow test
      
      * fix require backends
      
      * fix masked fill
      
      * revert
      
      * fix softmax
      
      * add large models support
      
      * fix conditional generation
      
      * few fixes
      
      * add instructions
      
      * rm unneeded file
      
      * Update src/transformers/models/pix2struct/convert_pix2struct_original_pytorch_to_hf.py
      
      * fix ci test
      
      * fix ci test really
      
      * Apply suggestions from code review
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * fix nit
      
      * fix nits
      
      * fix image processors nits
      
      * docstring
      
      * clean up
      
      * fix nit
      
      * fix tests
      
      * docstring nit
      
      * fix reshape
      
      * Update src/transformers/models/pix2struct/image_processing_pix2struct.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * fix nit
      
      * fix repetition
      
      * refactor processor
      
      * make patch size consistent
      
      * refactor forward
      
      * fix docstring
      
      * fix max_patches issue
      
      * update docstirng
      
      * update docstring
      
      * fix coped from
      
      * add skip reasons
      
      * few fixes
      
      * Update src/transformers/models/pix2struct/image_processing_pix2struct.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * format
      
      * fix doctests
      
      * refactor and fix
      
      * fix doc build issue
      
      * fix processor test
      
      * small fix conversion script
      
      * replace correct weights
      
      * make fixup
      
      * fix some issues
      
      * Apply suggestions from code review
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * revert config and fixes
      
      * Update src/transformers/models/pix2struct/image_processing_pix2struct.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * more details
      
      * fixes
      
      * fix processor
      
      * fix processor test
      
      * fix
      
      * Apply suggestions from code review
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * make fixup
      
      * fix processor
      
      * Update src/transformers/models/pix2struct/modeling_pix2struct.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * add copied
      
      * make fixup
      
      * fix copies
      
      * update docstring
      
      * refactor
      
      * fix docstring
      
      * fix conversion script
      
      * fix vqa issue
      
      * replace to `flattened_patches`
      
      * nit
      
      * fix numpy issue
      
      * fix image processors
      
      * add batched vqa support
      
      * fix vqa conversion
      
      * make fixup
      
      * fix conversion script
      
      * Apply suggestions from code review
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * make fixup
      
      * add correct docstring
      
      * update docstring
      
      * fix module level + channel dim
      
      * use `make_list_of_images`
      
      * refactor
      
      * correct docstring
      
      * fix authors
      
      * remove `data_format`
      
      * add header text test
      
      * Apply suggestions from code review
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * make fixup
      
      * add checkpoints
      
      ---------
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      0f68a7f4
    • Joao Gante's avatar
      Beef up Llama tests (#22314) · fd3eb3e3
      Joao Gante authored
      * tmp commit
      
      * beef up llama tests
      fd3eb3e3
    • Joao Gante's avatar
      Generate: Export TF generate with a TF tokenizer (#22310) · 12febc20
      Joao Gante authored
      * Export TF generate with a TF tokenizer
      
      * remove unused lines
      12febc20
    • Sylvain Gugger's avatar
      Enforce `max_memory` for device_map strategies (#22311) · 5fd4e3c8
      Sylvain Gugger authored
      Enforce  for device_map strategies
      5fd4e3c8