1. 11 Jul, 2023 6 commits
    • Joao Gante's avatar
      2642d8d0
    • Connor Henderson's avatar
      fix: Text splitting in the BasicTokenizer (#22280) · 5739726f
      Connor Henderson authored
      * fix: Apostraphe splitting in the BasicTokenizer for CLIPTokenizer
      
      * account for apostrophe at start of new word
      
      * remove _run_split_on_punc, use re.findall instead
      
      * remove debugging, make style and quality
      
      * use pattern and punc splitting, repo-consistency will fail
      
      * remove commented out debugging
      
      * adds bool args to BasicTokenizer, remove pattern
      
      * do_split_on_punc default True
      
      * clean stray comments and line breaks
      
      * rebase, repo-consistency
      
      * update to just do punctuation split
      
      * add unicode normalizing back
      
      * remove redundant line
      5739726f
    • Justin Martin's avatar
      Fix typo in LocalAgent (#24736) · 2489e380
      Justin Martin authored
      2489e380
    • Jegor Kit拧kerkin's avatar
      Add ViViT (#22518) · 8a5e8a9c
      Jegor Kit拧kerkin authored
      
      
      * Add model
      
      * Add ability to get classification head weights
      
      * Add docs
      
      * Add imports to __init__.py
      
      * Run style
      
      * Fix imports and add mdx doc
      
      * Run style
      
      * Fix copyright
      
      * Fix config docstring
      
      * Remove imports of ViViTLayer and load_tf_weights_in_vivit
      
      * Remove FeatureExtractor and replace with ImageProcessor everywhere
      
      * Remove ViViTForPreTraining from vivit.mdx
      
      * Change ViViT -> Vivit everywhere
      
      * Add model_doc to _toctree.yml
      
      * Replace tuples with lists in arguments of VivitConfig
      
      * Rename patch_size to tubelet_size in TubeletEmbeddings
      
      * Fix checkpoint names
      
      * Add tests
      
      * Remove unused num_frames
      
      * Fix imports for VivitImageProcessor
      
      * Minor fixes
      
      * Decrease number of frames in VivitModelTester from 32 to 16
      
      * Decrease number of frames in VivitModelTester from 16 to 8
      
      * Add initialization for pos embeddings
      
      * Rename Vivit -> ViViT in some places
      
      * Fix docstring and formatting
      
      * Rename TubeletEmbeddings -> VivitTubeletEmbeddings
      
      * Remove load_tf_weights_in_vivit
      
      * Change checkpoint name
      
      * Remove Vivit _TOKENIZER_FOR_DOC
      
      * Fix
      
      * Fix VivitTubeletEmbeddings and pass config object as parameter
      
      * Use image_size and num_frames instead of video_size
      
      * Change conversion script and fix differences with the orig implementation
      
      * Fix docstrings
      
      * Add attention head pruning
      
      * Run style and fixup
      
      * Fix tests
      
      * Add ViViT to video_classification.mdx
      
      * Save processor in conversion script
      
      * Fix
      
      * Add image processor test
      
      * Run fixup and style
      
      * Run fix-copies
      
      * Update tests/models/vivit/test_modeling_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update tests/models/vivit/test_modeling_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/modeling_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Use PyAV instead of decord
      
      * Add unittest.skip
      
      * Run style
      
      * Remove unneeded test
      
      * Update docs/source/en/model_doc/vivit.mdx
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/configuration_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/modeling_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/image_processing_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/modeling_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/modeling_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/image_processing_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/modeling_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Add model
      
      * Add docs
      
      * Run style
      
      * Fix imports and add mdx doc
      
      * Remove FeatureExtractor and replace with ImageProcessor everywhere
      
      * Change ViViT -> Vivit everywhere
      
      * Rename Vivit -> ViViT in some places
      
      * Update src/transformers/models/vivit/image_processing_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Run make style
      
      * Remove inputs save
      
      * Fix image processor
      
      * Fix
      
      * Run `make style`
      
      * Decrease parameters of VivitModelTester
      
      * Decrease tubelet size
      
      * Rename vivit.mdx
      
      * Update src/transformers/models/vivit/image_processing_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/image_processing_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/vivit/image_processing_vivit.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Fix default values in image_processing_vivit.py
      
      ---------
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      8a5e8a9c
    • Arthur's avatar
      [Patch-t5-tokenizer] Patches the changes on T5 to make sure previous behaviour... · b15343de
      Arthur authored
      
      [Patch-t5-tokenizer] Patches the changes on T5 to make sure previous behaviour is still valide for beginning of words (#24622)
      
      * patch `_tokenize` function
      
      * more tests
      
      * properly fix
      
      * fixup
      
      * Update src/transformers/models/t5/tokenization_t5.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * fix without ifs
      
      * update
      
      * protect import
      
      * add python processing
      
      * is first needed
      
      * add doc and update with lefacy
      
      * updaate
      
      * fix T5 SPM converter
      
      * styling
      
      * fix T5 warning
      
      * add is_seqio_available
      
      * remove is_first
      
      * revert some changes
      
      * more tests and update
      
      * update llama test batterie
      
      * fixup
      
      * refactor T5 spm common tests
      
      * draft the llama tests
      
      * update
      
      * uopdate test
      
      * nits
      
      * refine
      
      * name nit
      
      * fix t5 tests
      
      * fix T5
      
      * update
      
      * revert convert slow to fast changes that fail lots of tests
      
      * legacy support
      
      * fixup
      
      * nits is first not defined
      
      * don't use legacy behaviour f...
      b15343de
    • Matt's avatar
      Falcon port (#24523) · b3ab3fac
      Matt authored
      
      
      * Initial commit
      
      * Update src/transformers/models/falcon/configuration_falcon.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/falcon/configuration_falcon.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Cleanup config docstring
      
      * Update src/transformers/models/falcon/configuration_falcon.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Convert to relative imports
      
      * Remove torch < 1.8 warning
      
      * Restructure cos_sin header
      
      * qkv -> query, key, value
      
      * Refactor attention calculation
      
      * Add a couple of config variables to account for the different checkpoints
      
      * Successful merging of the code paths!
      
      * Fix misplaced line in the non-parallel attention path
      
      * Update config and tests
      
      * Add a pad_token_id when testing
      
      * Support output_attentions when alibi is None
      
      * make fixup
      
      * Skip KV cache shape test
      
      * No more _keys_to_ignore_on_load_missing
      
      * Simplify self attention a bit
      
      * Simplify self attention a bit
      
      * make fixup
      
      * stash commit
      
      * Some more attention mask updates
      
      * Should pass all tests except assisted generation!
      
      * Add big model generation test
      
      * make fixup
      
      * Add temporary workaround for test
      
      * Test overrides for assisted generation
      
      * Update src/transformers/models/falcon/modeling_falcon.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/falcon/modeling_falcon.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update src/transformers/models/falcon/modeling_falcon.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Update tests/models/falcon/test_modeling_falcon.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Test overrides for assisted generation
      
      * Add generation demo
      
      * Update copyright
      
      * Make the docstring model actually small
      
      * Add module-level docstring
      
      * Remove all assertions
      
      * Add copied from bloom
      
      * Reformat the QKV layer
      
      * Add copied from bloom
      
      * Update src/transformers/models/falcon/modeling_falcon.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * Remove unused line and reformat
      
      * No single letter variables
      
      * Cleanup return names
      
      * Add copied from line
      
      * Remove the deprecated arguments blocks
      
      * Change the embeddings test to an alibi on/off test
      
      * Remove position_ids from FalconForQA
      
      * Remove old check for token type IDs
      
      * Fix the alibi path when multi_query is False
      
      * Update src/transformers/models/falcon/modeling_falcon.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update src/transformers/models/falcon/modeling_falcon.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update tests/models/falcon/test_modeling_falcon.py
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * Update config naming
      
      * Fix typo for new_decoder_architecture
      
      * Add some comments
      
      * Fix docstring
      
      * Fix docstring
      
      * Create range in the right dtype from the start
      
      * Review comment cleanup
      
      * n_head_kv -> num_kv_heads
      
      * self.alibi -> self.use_alibi
      
      * self.num_kv -> self.num_kv_heads
      
      * Reorder config args
      
      * Made alibi arguments Optional
      
      * Add all model docstrings
      
      * Add extra checkpoints
      
      * Add author info for Falcon
      
      * Stop removing token_type_ids because our checkpoints shouldn't return it anymore
      
      * Add one hopeful comment for the future
      
      * Fix typo
      
      * Update tests, fix cache issue for generation
      
      * Use -1e9 instead of -inf to avoid float overflow
      
      * Recompute the rotary embeddings much less often
      
      * Re-enable disabled tests
      
      * One final fix to attention mask calculation, and update tests
      
      * Cleanup targeting falcon-40b equivalency
      
      * Post-rebase docs update
      
      * Update docstrings, especially in the config
      
      * More descriptive variable names, and comments where we can't rename them
      
      ---------
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      b3ab3fac
  2. 10 Jul, 2023 4 commits
  3. 07 Jul, 2023 4 commits
  4. 06 Jul, 2023 5 commits
    • Zach Mueller's avatar
      Fix integration with Accelerate and failing test (#24691) · fded6f41
      Zach Mueller authored
      Fix integration
      fded6f41
    • Yih-Dar's avatar
    • Sourab Mangrulkar's avatar
      DeepSpeed/FSDP ckpt saving utils fixes and FSDP training args fixes (#24591) · 66a37842
      Sourab Mangrulkar authored
      * update ds and fsdp ckpt logic
      
      * refactoring
      
      * fix 馃悰
      
      * resolve comment
      
      * fix issue with overriding of the fsdp config set by accelerate
      66a37842
    • Zhao Tianyu's avatar
      Add dropouts to GPT-NeoX (#24680) · 39274045
      Zhao Tianyu authored
      * add attention dropout, post attention dropout, post mlp dropout to gpt-neox
      
      * fix typo
      
      * add documentation
      
      * fix too long line
      
      * ran Checking/fixing src/transformers/models/gpt_neox/configuration_gpt_neox.py src/transformers/models/gpt_neox/modeling_gpt_neox.py
      python utils/custom_init_isort.py
      python utils/sort_auto_mappings.py
      doc-builder style src/transformers docs/source --max_len 119 --path_to_docs docs/source
      python utils/check_doc_toc.py --fix_and_overwrite
      running deps_table_update
      updating src/transformers/dependency_versions_table.py
      python utils/check_copies.py
      python utils/check_table.py
      python utils/check_dummies.py
      python utils/check_repo.py
      Checking all models are included.
      Checking all models are public.
      Checking all models are properly tested.
      Checking all objects are properly documented.
      Checking all models are in at least one auto class.
      Checking all names in auto name mappings are defined.
      Checking all keys in auto name mappings are defined in `CONFIG_MAPPING_NAMES`.
      Checking all auto mappings could be imported.
      Checking all objects are equally (across frameworks) in the main __init__.
      python utils/check_inits.py
      python utils/check_config_docstrings.py
      python utils/check_config_attributes.py
      python utils/check_doctest_list.py
      python utils/update_metadata.py --check-only
      python utils/check_task_guides.py
      39274045
    • Yuchao Dai's avatar
      LlamaTokenizer should be picklable (#24681) · fb3b22c3
      Yuchao Dai authored
      * LlamaTokenizer should be picklable
      
      * make fixup
      fb3b22c3
  5. 05 Jul, 2023 6 commits
  6. 04 Jul, 2023 7 commits
  7. 03 Jul, 2023 7 commits
  8. 01 Jul, 2023 1 commit