1. 23 Jun, 2021 2 commits
    • Nicolas Patry's avatar
      Optimizing away the `fill-mask` pipeline. (#12113) · d4be4984
      Nicolas Patry authored
      
      
      * Optimizing away the `fill-mask` pipeline.
      
      - Don't send anything to the tokenizer unless needed. Vocab check is
      much faster
      - Keep BC by sending data to the tokenizer when needed. User handling warning messages will see performance benefits again
      - Make `targets` and `top_k` work together better `top_k` cannot be
      higher than `len(targets)` but can be smaller still.
      - Actually simplify the `target_ids` in case of duplicate (it can happen
      because we're parsing raw strings)
      - Removed useless code to fail on empty strings. It works only if empty
      string is in first position, moved to ignoring them instead.
      - Changed the related tests as only the tests would fail correctly
      (having incorrect value in first position)
      
      * Make tests compatible for 2 different vocabs... (at the price of a
      warning).
      
      Co-authored-by: @EtaoinWu
      
      * ValueError working globally
      
      * Update src/transformers/pipelines/fill_mask.py
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      
      * `tokenizer.vocab` -> `tokenizer.get_vocab()` for more compatiblity +
      fallback.
      Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
      d4be4984
    • Kevin Canwen Xu's avatar
      Add CodeCarbon Integration (#12304) · 037e466b
      Kevin Canwen Xu authored
      * Add optional dependency
      
      * Add CodeCarbon integration
      
      * Add CodeCarbon integration
      
      * Add CodeCarbon integration
      
      * typo
      037e466b
  2. 22 Jun, 2021 10 commits
  3. 21 Jun, 2021 10 commits
  4. 18 Jun, 2021 4 commits
  5. 17 Jun, 2021 9 commits
  6. 16 Jun, 2021 5 commits