"vscode:/vscode.git/clone" did not exist on "46ed56cfd1544296feb73b707022149cf03f8c5e"
  1. 27 May, 2021 1 commit
    • Nicolas Patry's avatar
      Adding new argument `max_new_tokens` for generate. (#11476) · 80d712fa
      Nicolas Patry authored
      * Adding new argument `max_new_tokens` for generate.
      
      This is a proposal to add a new argument `max_new_tokens` to `generate`.
      This include a `MaxNewTokensCriteria` that enables callers that don't
      know about the token length ahead (like pipelines callers) to manage
      more easily the length of their generated output.
      
      * Adding a test for the user warning when both`max_length` and
      `max_new_tokens` are used together.
      
      * Removed redundant `no_grad`.
      80d712fa
  2. 26 May, 2021 3 commits
    • Patrick von Platen's avatar
      Flax Generate (#11777) · 996a315e
      Patrick von Platen authored
      
      
      * fix_torch_device_generate_test
      
      * remove @
      
      * add
      
      * indexing
      
      * correct a couple of tests
      
      * fix tests
      
      * add logits processor
      
      * finish top_k, top_p, temp
      
      * add docs
      
      * correct flax prng key default
      
      * improve generate
      
      * add generation docs
      
      * add docs
      
      * make style
      
      * revert model outputs change
      
      * make style
      
      * correct typo
      
      * fix tests
      
      * fix slow test
      
      * add raise
      
      * finish generation
      Co-authored-by: default avatarPatrick von Platen <patrick@huggingface.co>
      996a315e
    • Patrick von Platen's avatar
      [Flax] Allow dataclasses to be jitted (#11886) · d5a72b6e
      Patrick von Platen authored
      * fix_torch_device_generate_test
      
      * remove @
      
      * change dataclasses to flax ones
      
      * fix typo
      
      * fix jitted tests
      
      * fix bert & electra
      d5a72b6e
    • Daniel Stancl's avatar
      Fix usage of head masks by TF encoder-decoder models' `generate()` function (#11775) · 0b933584
      Daniel Stancl authored
      * Fix Bart
      
      * Fix Blenderbot{,_small}
      
      * Fix LED
      
      * Fix Marian
      
      * Fix MBart
      
      * Fix Pegasus
      
      * Fix T5
      
      * Add test for generation with head_mask
      
      * Add a common TF test
      
      * Override a test for the LED model as head masking is not yet properly implemented
      
      * Remove all head_masks from input preparation for LED
      
      * Drop masking for T5 as it needs a bit of refactor
      0b933584
  3. 25 May, 2021 5 commits
  4. 24 May, 2021 1 commit
  5. 21 May, 2021 2 commits
  6. 20 May, 2021 4 commits
  7. 19 May, 2021 1 commit
  8. 18 May, 2021 5 commits
    • Daniel Stancl's avatar
      Fix usage of head masks by PT encoder-decoder models' `generate()` function (#11621) · 680d181c
      Daniel Stancl authored
      * Add missing head masking for generate() function
      
      * Add head_mask, decoder_head_mask and cross_attn_head_mask
      into prepare_inputs_for_generation for generate() function
      for multiple encoder-decoder models.
      
      * Add test_genereate_with_head_masking
      
      * [WIP] Update the new test and handle special cases
      
      * make style
      
      * Omit ProphetNet test so far
      
      * make fix-copies
      680d181c
    • Suraj Patil's avatar
      FlaxGPT2 (#11556) · ca33278f
      Suraj Patil authored
      
      
      * flax gpt2
      
      * combine masks
      
      * handle shared embeds
      
      * add causal LM sample
      
      * style
      
      * add tests
      
      * style
      
      * fix imports, docs, quality
      
      * don't use cache
      
      * add cache
      
      * add cache 1st version
      
      * make use cache work
      
      * start adding test for generation
      
      * finish generation loop compilation
      
      * rewrite test
      
      * finish
      
      * update
      
      * update
      
      * apply sylvains suggestions
      
      * update
      
      * refactor
      
      * fix typo
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      ca33278f
    • Vyom Pathak's avatar
      Fixed: Better names for nlp variables in pipelines' tests and docs. (#11752) · fd3b12e8
      Vyom Pathak authored
      * Fixed: Better names for nlp variables in pipelines' tests and docs.
      
      * Fixed: Better variable names
      fd3b12e8
    • Sylvain Gugger's avatar
      Fix checkpoint deletion (#11748) · a515caa3
      Sylvain Gugger authored
      a515caa3
    • Nicolas Patry's avatar
      [TokenClassification] Label realignment for subword aggregation (#11680) · b88e0e01
      Nicolas Patry authored
      * [TokenClassification] Label realignment for subword aggregation
      
      Tentative to replace https://github.com/huggingface/transformers/pull/11622/files
      
      
      
      - Added `AggregationStrategy`
      - `ignore_subwords` and `grouped_entities` arguments are now fused
        into `aggregation_strategy`. It makes more sense anyway because
        `ignore_subwords=True` with `grouped_entities=False` did not have a
        meaning anyway.
      - Added 2 new ways to aggregate which are MAX, and AVERAGE
      - AVERAGE requires a bit more information than the others, for now this
      case is slightly specific, we should keep that in mind for future
      changes.
      - Testing has been modified to reflect new argument, and to check the
      correct deprecation and the new aggregation_strategy.
      - Put the testing argument and testing results for aggregation_strategy,
      close together, so that readers can understand what is supposed to
      happen.
      - `aggregate` is now only tested on a small model as it does not mean
      anything to test it globally for all models.
      - Previous tests are unchanged in desired output.
      - Added a new test case that showcases better the difference between the
        FIRST, MAX and AVERAGE strategies.
      
      * Wrong framework.
      
      * Addressing three issues.
      
      1- Tags might not follow B-, I- convention, so any tag should work now
      (assumed as B-TAG)
      2- Fixed an issue with average that leads to a substantial code change.
      3- The testing suite was not checking for the "index" key for "none"
      strategy. This is now fixed.
      
      The issue is that "O" could not be chosen by AVERAGE strategy because
      those tokens were filtered out beforehand, so their relative scores were
      not counted in the average. Now filtering on
      ignore_labels will happen at the very end of the pipeline fixing
      that issue.
      It's a bit hard to make sure this stays like that because we do
      not have a end-to-end test for that behavior
      
      * Formatting.
      
      * Adding formatting to code + cleaner handling of B-, I- tags.
      Co-authored-by: default avatarFrancesco Rubbo <rubbo.francesco@gmail.com>
      Co-authored-by: default avatarelk-cloner <rezakakhki.rk@gmail.com>
      
      * Typo.
      Co-authored-by: default avatarFrancesco Rubbo <rubbo.francesco@gmail.com>
      Co-authored-by: default avatarelk-cloner <rezakakhki.rk@gmail.com>
      b88e0e01
  9. 17 May, 2021 1 commit
  10. 14 May, 2021 1 commit
  11. 13 May, 2021 3 commits
    • Volodymyr Byno's avatar
    • lexhuismans's avatar
      [T5] Add 3D attention mask to T5 model (2) (#9643) (#11197) · 91cf2915
      lexhuismans authored
      * Add 3D attention mask to T5 model (#9643)
      
      Added code for 3D attention mask in T5 model. Similar to BERT model.
      
      * Add test for 3D attention mask
      
      Added test for 3D attention mask: test_decoder_model_past_with_3d_attn_mask()
      3D attention mask of the shape [Batch_size, Seq_length, Seq_length] both for
      attention mask and decoder attention mask. Test is passing.
      91cf2915
    • Philip May's avatar
      Enable option for subword regularization in more tokenizers. (#11417) · 37ed3ab7
      Philip May authored
      * improve slow class tok usage at xlm rob
      
      * add subword regularization for barthez
      
      * improve barthez tok. test
      
      * fix tokenizer tests
      
      * add subword regularization for camembert
      
      * add subword regularization for deberta v2 tokenizer
      
      * add more doc to deberta v2 tokenizer
      
      * add subword regularization for speech to text tok.
      
      * fix sp_model_kwargs type in speech 2 text tok.
      
      * add subword regularization for M2M100 tok.
      
      * add more concrete type hints
      
      * fix tests for m2m100 and s2t tok.
      
      * add missing Any import
      
      * fix syntax error in m2m100 tok.
      
      * fix unpickle of m2m100 and s2t tok.
      
      * fix test of m2m100 and s2t tok.
      
      * improve unpickle of deberta v2 tok.
      
      * add test for pickle of barthez & camembert
      
      * fix pickle of barthez & camembert
      
      * add test for deberta v2 tok. pickle
      
      * fix m2m100 tok. pickle
      
      * fix s2t tok. pickle
      
      * add subword regularization to albert tok.
      
      * refactor subword reg. test into TokenizerTesterMixin
      
      improve albert tok. test
      
      remove sample argument form albert tok.
      
      check subword reg. using TokenizerTesterMixin
      
      improve tok. tests
      
      improve xlm roberta tok. tests
      
      improve xlm roberta tok. tests
      
      * add subword regularization for big bird t.
      
      * improve xlm roberta tok. test
      
      * add subword regularization for mbart50 tok.
      
      * add subword regularization for pegasus tok.
      
      * add subword regularization for reformer tok.
      
      * add subword regularization for T5 tok.
      
      * fix t5 tok. test formatting
      
      * add subword regularization for xlm_proph. tok.
      
      * add subword regularization for xlnet tok.
      
      * add subword regularization for gert_gen tok.
      
      * add typing to tokenizers
      
      * add typing to xlm rob. tok
      
      * add subword regularization for marian tok.
      
      * add reverse tok. test
      
      * fix marian tok test
      
      * fix marian tok test
      
      * fix casing in tok. tests
      
      * fix style of tok. common test
      
      * fix deberta v2 tok test
      
      * add type annotations to tok. tests
      
      * add type annotations to tok. __init__
      
      * add typing to kokenizer
      
      * add type annotations to tok. __init__
      
      * don't specify the default when it's None
      
      * fix barthez tok. doc
      
      * move sentencepiece tok. tests to TokenizerTesterMixin
      
      * fix unused imports
      
      * fix albert tok. test
      
      * add comment to sentencepiece test options
      
      * fix Any import at big bird tok.
      
      * fix Any import at xlm prophetnet tok.
      
      * empty commit to trigger CI
      37ed3ab7
  12. 12 May, 2021 2 commits
    • NielsRogge's avatar
      Vit deit fixes (#11309) · fa84540e
      NielsRogge authored
      
      
      * Improve docs of DeiT and ViT, add community notebook
      
      * Add gitignore for test_samples
      
      * Add notebook with Trainer
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      fa84540e
    • Suraj Patil's avatar
      CLIP (#11445) · 8719afa1
      Suraj Patil authored
      
      
      * begin second draft
      
      * fix import, style
      
      * add loss
      
      * fix embeds, logits_scale, and projection
      
      * fix imports
      
      * add conversion script
      
      * add feature_extractor and processor
      
      * style
      
      * add tests for tokenizer, extractor and processor
      
      * add vision model tests
      
      * add weight init
      
      * add more tests
      
      * fix save_load  test
      
      * model output, dosstrings, causal mask
      
      * config doc
      
      * add clip model tests
      
      * return dict
      
      * bigin integration test
      
      * add integration tests
      
      * fix-copies
      
      * fix init
      
      * Clip => CLIP
      
      * fix module name
      
      * docs
      
      * fix doc
      
      * output_dim => projection_dim
      
      * fix checkpoint names
      
      * remoe fast tokenizer file
      
      * fix conversion script
      
      * fix tests, quality
      
      * put causal mask on device
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * fix attribute test
      
      * style
      
      * address sylvains comments
      
      * style
      
      * fix docstrings
      
      * add qucik_gelu in activations, docstrings
      
      * clean-up attention test
      
      * fix act fun
      
      * fix config
      
      * fix torchscript tests
      
      * even batch_size
      
      * remove comment
      
      * fix ouput tu_tuple
      
      * fix save load tests
      
      * fix add tokens test
      
      * add fast tokenizer
      
      * update copyright
      
      * new processor API
      
      * fix docs
      
      * docstrings
      
      * docs
      
      * fix doc
      
      * fix doc
      
      * fix tokenizer
      
      * fix import in doc example
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * check types of config
      
      * valhalla => openai
      
      * load image using url
      
      * fix test
      
      * typo
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      8719afa1
  13. 11 May, 2021 2 commits
  14. 10 May, 2021 2 commits
    • Pavel Soriano's avatar
      Fixes NoneType exception when topk is larger than one coupled with a small... · 9120ae7d
      Pavel Soriano authored
      Fixes NoneType exception when topk is larger than one coupled with a small context in the Question-Answering pipeline (#11628)
      
      * added fix to decode function. added test to qa pipeline tests
      
      * completed topk docstring
      
      * fixed formatting with black
      
      * applied style_doc to fix line length
      9120ae7d
    • Tanmay Laud's avatar
      Big Bird Fast Tokenizer implementation (#11075) · f7f87295
      Tanmay Laud authored
      
      
      * Added Big Bird Fast Tokenizer initial file
      
      * style fixes
      
      * flake fixes
      
      * Added big bird fast tokenizer to init files
      
      * Added big bird fast to Auto tokenization
      
      * fix styles
      
      * minor quality fixes
      
      * Added initial test code
      
      * Fix SpmConverter when precompiled_charsmap doesn't exist
      
      * fixed post processor
      
      * minor style fix
      
      * minor fix input names
      
      * Actually fix identity normalization
      
      * style
      
      * Added token type ids to fast tokenizer
      
      * style
      
      * flake fix
      
      * fix copies
      Co-authored-by: default avatarAnthony MOI <m.anthony.moi@gmail.com>
      f7f87295
  15. 07 May, 2021 2 commits
  16. 06 May, 2021 1 commit
  17. 05 May, 2021 2 commits
  18. 04 May, 2021 2 commits
    • Sylvain Gugger's avatar
      Reproducible checkpoint (#11582) · 6b241e0e
      Sylvain Gugger authored
      * Set generator in dataloader
      
      * Use generator in all random samplers
      
      * Checkpoint all RNG states
      
      * Final version
      
      * Quality
      
      * Test
      
      * Address review comments
      
      * Quality
      
      * Remove debug util
      
      * Add python and numpy RNGs
      
      * Split states in different files in distributed
      
      * Quality
      
      * local_rank for TPUs
      
      * Only use generator when accepted
      
      * Add test
      
      * Set seed to avoid flakiness
      
      * Make test less flaky
      
      * Quality
      6b241e0e
    • Patrick Fernandes's avatar
      [Flax] Add Electra models (#11426) · 0afe4a90
      Patrick Fernandes authored
      
      
      * add electra model to flax
      
      * Remove Electra Next Sentence Prediction model added by mistake
      
      * fix parameter sharing and loosen equality threshold
      
      * fix styling issues
      
      * add mistaken removen imports
      
      * fix electra table
      
      * Add FlaxElectra to automodels and fixe docs
      
      * fix issues pointed out the PR
      
      * fix flax electra to comply with latest changes
      
      * remove stale class
      
      * add copied from
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      0afe4a90