1. 20 Jul, 2023 1 commit
    • Tom Aarsen's avatar
      Deprecate unused OpenLlama architecture (#24922) · 79444f37
      Tom Aarsen authored
      * Resolve typo in check_repo.py
      
      * Specify encoding when opening modeling files
      
      * Deprecate the OpenLlama architecture
      
      * Add disclaimer pointing to Llama
      
      I'm open to different wordings here
      
      * Match the capitalisation of LLaMA
      79444f37
  2. 17 Jul, 2023 2 commits
    • Yoach Lacombe's avatar
      Add bark (#24086) · f42a35e6
      Yoach Lacombe authored
      
      
      * first raw version of the bark integration
      
      * working code on small models with single run
      
      * add converting script from suno weights 2 hf
      
      * many changes
      
      * correct past_kv output
      
      * working implementation for inference
      
      * update the converting script according to the architecture changes
      
      * add a working end-to-end inference code
      
      * remove some comments and make small changes
      
      * remove unecessary comment
      
      * add docstrings and ensure no unecessary intermediary output during audio generation
      
      * remove done TODOs
      
      * make style + add config docstrings
      
      * modification for batch inference support on the whole model
      
      * add details to .generation_audio method
      
      * add copyright
      
      * convert EncodecModel from original library to transformers implementation
      
      * add two class in order to facilitate model and sub-models loading from the hub
      
      * add support of loading the whole model
      
      * add BarkProcessor
      
      * correct modeling according to processor output
      
      * Add proper __init__ and auto support
      
      * Add up-to-date copyright/license message
      
      * add relative import instead of absolute
      
      * cleaner head_dim computation
      
      * small comment removal or changes
      
      * more verbose LayerNorm init method
      
      * specify eps for clearer comprehension
      
      * more verbose variable naming in the MLP module
      
      * remove unecessary BarkBlock parameter
      
      * clearer code in the forward pass of the BarkBlock
      
      * remove _initialize_modules method for cleaner code
      
      * Remove unnecessary methods from sub-models
      
      * move code to remove unnecessary function
      
      * rename a variable for clarity and change an assert
      
      * move code and change variable name for clarity
      
      * remove unnecessary asserts
      
      * correct small bug
      
      * correct a comment
      
      * change variable names for clarity
      
      * remove asserts
      
      * change import from absolute to relative
      
      * correct small error due to comma missing + correct import
      
      * Add attribute Bark config
      
      * add first version of tests
      
      * update attention_map
      
      * add tie_weights and resize_token_embeddings for fineModel
      
      * correct getting attention_mask in generate_text_semantic
      
      * remove Bark inference trick
      
      * leave more choices in barkProcessor
      
      * remove _no_split_modules
      
      * fixe error in forward of block and introduce clearer notations
      
      * correct converting script with last changes
      
      * make style + add draft bark.mdx
      
      * correct BarkModelTest::test_generate_text_semantic
      
      * add Bark in main README
      
      * add dummy_pt_objects for Bark
      
      * add missing models in the main init
      
      * correct test_decoder_model_past_with_large_inputs
      
      * disable torchscript test
      
      * change docstring of BarkProcessor
      
      * Add test_processor_bark
      
      * make style
      
      * correct copyrights
      
      * add bark.mdx + make style, quality and consistency
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * Remove unnecessary test method
      
      * simply logic of a test
      
      * Only check first ids for slow audio generation
      
      * split full end-to-end generation tests
      
      * remove unneccessary comment
      
      * change submodel names for clearer naming
      
      * remove ModuleDict from modeling_bark
      
      * combine two if statements
      
      * ensure that an edge misued won't happen
      
      * modify variable name
      
      * move code snippet to the right place (coarse instead of semantic)
      
      * change BarkSemanticModule -> BarkSemanticModel
      
      * align BarkProcessor with transformers paradigm
      
      * correct BarkProcessor tests with last commit changes
      
      * change _validate_voice_preset to an instance method instead of a class method
      
      * tie_weights already called with post_init
      
      * add codec_model config to configuration
      
      * update bark modeling tests with recent BarkProcessor changes
      
      * remove SubModelPretrainedModel + change speakers embeddings prompt type in BarkModel
      
      * change absolute imports to relative
      
      * remove TODO
      
      * change docstrings
      
      * add examples to docs and docstrings
      
      * make style
      
      * uses BatchFeature in BarkProcessor insteads of dict
      
      * continue improving docstrings and docs + make style
      
      * correct docstrings examples
      
      * more comprehensible speaker_embeddings load/Save
      
      * rename speaker_embeddings_dict -> speaker_embeddings
      
      * correct bark.mdx + add bark to documentation_tests
      
      * correct docstrings configuration_bark
      
      * integrate last nit suggestions
      
      * integrate BarkGeneration configs
      
      * make style
      
      * remove bark tests from documentation_tests.txt because timeout - tested manually
      
      * add proper generation config initialization
      
      * small bark.mdx documentation changes
      
      * rename bark.mdx -> bark.md
      
      * add torch.no_grad behind BarkModel.generate_audio()
      
      * replace assert by ValueError in convert_suno_to_hf.py
      
      * integrate a series of short comments from reviewer
      
      * move SemanticLogitsProcessors and remove .detach() from Bark docs and docstrings
      
      * actually remove SemanticLogitsProcessor from modeling_bark.oy
      
      * BarkProcessor returns a single output instead of tuple + correct docstrings
      
      * make style + correct bug
      
      * add initializer_range to BarkConfig + correct slow modeling tests
      
      * add .clone() to history_prompt.coarse_prompt to avoid modifying input array
      
      * Making sure no extra "`" are present
      
      * remove extra characters in modeling_bark.py
      
      * Correct output if history_prompt is None
      
      * remove TODOs
      
      * remove ravel comment
      
      * completing generation_configuration_bark.py docstrings
      
      * change docstrings - number of audio codebooks instead of Encodec codebooks
      
      * change 'bias' docstrings in configuration_bark.py
      
      * format code
      
      * rename BarkModel.generate_audio -> BarkModel.generate_speech
      
      * modify AutoConfig instead of EncodecConfig in BarkConfig
      
      * correct AutoConfig wrong init
      
      * refactor BarkModel and sub-models generate_coarse, generate_fine, generate_text_semantic
      
      * remove SemanticLogitsProcessor and replace it with SuppressTokensLogitsProcessor
      
      * move nb_codebook related config arguments to BarkFineConfig
      
      * rename bark.mdx -> bark.md
      
      * correcting BarkModelConfig from_pretrained + remove keys_to_ignore
      
      * correct bark.md with correct hub path
      
      * correct code bug in bark.md
      
      * correct list tokens_to_suppress
      
      * modify Processor to load nested speaker embeddings in a safer way
      
      * correct batch sampling in BarkFineModel.generate_fine
      
      * Apply suggestions from code review
      
      Small docstrings correction and code improvements
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * give more details about num_layers in docstrings
      
      * correct indentation mistake
      
      * correct submodelconfig order of docstring variables
      
      * put audio models in alphabetical order in utils/check_repo.my
      
      * remove useless line from test_modeling_bark.py
      
      * makes BarkCoarseModelTest inherits from (ModelTesterMixin, GenerationTesterMixin, unittest.TestCase) instead of BarkSemanticModelTest
      
      * make a Tester class for each sub-model instead of inheriting
      
      * add test_resize_embeddings=True for Bark sub-models
      
      * add Copied from transformers.models.gpt_neo.modeling_gpt_neo.GPTNeoSelfAttention._split_heads
      
      * remove 'Copied fom Bark' comment
      
      * remove unneccessary comment
      
      * change np.min -> min in modeling_bark.py
      
      * refactored all custom layers to have Bark prefix
      
      * add attention_mask as an argument of generate_text_semantic
      
      * refactor sub-models start docstrings to have more precise config class definition
      
      * move _tied_weights_keys overriding
      
      * add docstrings to generate_xxx in modeling_bark.py
      
      * add loading whole BarkModel to convert_suno_to_hf
      
      * refactor attribute and variable names
      
      * make style convert_suno
      
      * update bark checkpoints
      
      * remove never entered if statement
      
      * move bark_modeling docstrings after BarkPretrainedModel class definition
      
      * refactor modeling_bark.py: kv -> key_values
      
      * small nits - code refactoring and removing unecessary lines from _init_weights
      
      * nits - replace inplace method by variable assigning
      
      * remove *optional* when necessary
      
      * remove some lines in generate_speech
      
      * add default value for optional parameter
      
      * Refactor preprocess_histories_before_coarse -> preprocess_histories
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * correct usage after refactoring
      
      * refactor Bark's generate_xxx -> generate and modify docstrings and tests accordingly
      
      * update docstrings python in configuration_bark.py
      
      * add bark files in utils/documentation_test.txt
      
      * correct docstrings python snippet
      
      * add the ability to use parameters in the form of e.g coarse_temperature
      
      * add semantic_max_new_tokens in python snippet in docstrings for quicker generation
      
      * Reformate sub-models kwargs in BakModel.generate
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * correct kwargs in BarkModel.generate
      
      * correct attention_mask kwarg in BarkModel.generate
      
      * add tests for sub-models args in BarkModel.generate and correct BarkFineModel.test_generate_fp16
      
      * enrich BarkModel.generate docstrings with a description of how to use the kwargs
      
      ---------
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      f42a35e6
    • Sylvain Gugger's avatar
      Add TAPEX to the list of deprecated models (#24859) · c21c3737
      Sylvain Gugger authored
      * Add TAPEX to the list of deprecated models
      
      * Add check
      
      * Fix typo
      
      * Fix import path for Van conversion
      c21c3737
  3. 13 Jul, 2023 2 commits
  4. 03 Jul, 2023 1 commit
    • Arthur's avatar
      [`Umt5`] Add google's umt5 to `transformers` (#24477) · 799df10a
      Arthur authored
      
      
      * add tokenization template
      
      * update conversion script
      
      * update modeling code
      
      * update
      
      * update convert checkpoint
      
      * update modeling
      
      * revert changes on convert script
      
      * new conversion script for new format
      
      * correct position bias
      
      * cleaning a bit
      
      * Credit co authors
      Co-authored-by: default avataragemagician <ahmed.elnaggar@tum.de>
      
      Co-authored-by: stefan-it
      <>
      
      * styling
      
      * Add docq
      
      * fix copies
      
      * add co author
      
      * Other Author
      
      * Merge branch 'main' of https://github.com/huggingface/transformers
      
       into add-umt5
      
      * add testing
      
      * nit
      
      * Update docs/source/en/model_doc/umt5.mdx
      Co-authored-by: default avatarStefan Schweter <stefan@schweter.it>
      
      * fix t5
      
      * actual fix?
      
      * revert wrong changes
      
      * remove
      
      * update test
      
      * more fixes
      
      * revert some changes
      
      * add SPIECE_UNDERLINE
      
      * add a commone xample
      
      * upfate
      
      * fix copies
      
      * revert changes on t5 conversion script
      
      * revert bytefallback changes since there was no addition yet
      
      * fixup
      
      * fixup
      
      * ingore umt5 cutom testing folder
      
      * fix readmes
      
      * revertT5 changes
      
      * same outputs
      
      * fixup
      
      * update example
      
      * Apply suggestions from code review
      
      * style
      
      * draft addition of all new files
      
      * current update
      
      * fix attention and stuff
      
      * finish refactoring
      
      * auto config
      
      * fixup
      
      * more nits
      
      * add umt5 to init
      
      * use md format
      
      * Update README.md
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * revert changes on mt5
      
      * revert mt4 changes
      
      * update test
      
      * more fixes
      
      * add to mapping
      
      * fix-copies
      
      * fix copies
      
      * foix retain grad
      
      * fix some tests
      
      * nits
      
      * done
      
      * Update src/transformers/models/umt5/modeling_umt5.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update docs/source/en/model_doc/umt5.md
      
      * Update src/transformers/models/umt5/__init__.py
      
      * Update docs/source/en/model_doc/umt5.md
      Co-authored-by: default avatarStefan Schweter <stefan@schweter.it>
      
      * Update src/transformers/models/umt5/modeling_umt5.py
      
      * update conversion script + use google checkpoints
      
      * nits
      
      * update test and modelling
      
      * stash slow convert
      
      * update fixupd
      
      * don't change slow
      
      ---------
      
      Co-authored-by: stefan-it <>
      Co-authored-by: default avatarStefan Schweter <stefan@schweter.it>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      799df10a
  5. 29 Jun, 2023 2 commits
    • Yih-Dar's avatar
      c817bc44
    • Sanchit Gandhi's avatar
      Add Musicgen (#24109) · 1c1c9075
      Sanchit Gandhi authored
      
      
      * Add Audiocraft
      
      * add cross attention
      
      * style
      
      * add for lm
      
      * convert and verify
      
      * introduce t5
      
      * split configs
      
      * load t5 + lm
      
      * clean conversion
      
      * copy from t5
      
      * style
      
      * start pattern provider
      
      * make generation work
      
      * style
      
      * fix pos embs
      
      * propagate shape changes
      
      * propagate shape changes
      
      * style
      
      * delay pattern: pad tokens at end
      
      * audiocraft -> musicgen
      
      * fix inits
      
      * add mdx
      
      * style
      
      * fix pad token in processor
      
      * override generate and add todos
      
      * add init to test
      
      * undo pattern delay mask after gen
      
      * remove cfg logits processor
      
      * remove cfg logits processor
      
      * remove logits processor in favour of mask
      
      * clean pos embs
      
      * make fix copies
      
      * update readmes
      
      * clean pos emb
      
      * refactor encoder/decoder
      
      * make fix copies
      
      * update conversion
      
      * fix config imports
      
      * update config docs
      
      * make style
      
      * send pattern mask to device
      
      * pattern mask with delay
      
      * recover prompted audio tokens
      
      * fix docstrings
      
      * laydown test file
      
      * pattern edge case
      
      * remove t5 ref
      
      * add processing class
      
      * config refactor
      
      * better pattern comment
      
      * check if mask is not present
      
      * check if mask is not present
      
      * refactor to auto class
      
      * remove encoder configs
      
      * fix processor
      
      * processor import
      
      * start updating conversion
      
      * start updating tests
      
      * make style
      
      * convert t5, encodec, lm
      
      * convert as composite
      
      * also convert processor
      
      * run generate
      
      * classifier free gen
      
      * comments and clean up
      
      * make style
      
      * docs for logit proc
      
      * docstring for uncond gen
      
      * start lm tests
      
      * work tests
      
      * let the lm generate
      
      * refactor: reshape inside forward
      
      * undo greedy loop changes
      
      * from_enc_dec -> from_sub_model
      
      * fix input id shapes in docstrings
      
      * Apply suggestions from code review
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * undo generate changes
      
      * from sub model config
      
      * Update src/transformers/models/musicgen/modeling_musicgen.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * make generate work again
      
      * generate uncond -> get uncond inputs
      
      * remove prefix allowed tokens fn
      
      * better error message
      
      * logit proc checks
      
      * Apply suggestions from code review
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      
      * make decoder only tests work
      
      * composite fast tests
      
      * make style
      
      * uncond generation
      
      * feat extr padding
      
      * make audio prompt work
      
      * fix inputs docstrings
      
      * unconditional inputs: dict -> model output
      
      * clean up tests
      
      * more clean up tests
      
      * make style
      
      * t5 encoder -> auto text encoder
      
      * remove comments
      
      * deal with frames
      
      * fix auto text
      
      * slow tests
      
      * nice mdx
      
      * remove can generate
      
      * todo - hub id
      
      * convert m/l
      
      * make fix copies
      
      * only import generation with torch
      
      * ignore decoder from tests
      
      * don't wrap uncond inputs
      
      * make style
      
      * cleaner uncond inputs
      
      * add example to musicgen forward
      
      * fix docs
      
      * ignore MusicGen Model/ForConditionalGeneration in auto mapping
      
      * add doc section to toctree
      
      * add to doc tests
      
      * add processor tests
      
      * fix push to hub in conversion
      
      * tips for decoder only loading
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * fix conversion for s / m / l checkpoints
      
      * import stopping criteria from module
      
      * remove from pipeline tests
      
      * fix uncond docstring
      
      * decode audio method
      
      * fix docs
      
      * org: sanchit-gandhi -> facebook
      
      * fix max pos embeddings
      
      * remove auto doc (not compatible with shapes)
      
      * bump max pos emb
      
      * make style
      
      * fix doc
      
      * fix config doc
      
      * fix config doc
      
      * ignore musicgen config from docstring
      
      * make style
      
      * fix config
      
      * fix config for doctest
      
      * consistent from_sub_models
      
      * don't automap decoder
      
      * fix mdx save audio file
      
      * fix mdx save audio file
      
      * processor batch decode for audio
      
      * remove keys to ignore
      
      * update doc md
      
      * update generation config
      
      * allow changes for default generation config
      
      * update tests
      
      * make style
      
      * fix docstring for uncond
      
      * fix processor test
      
      * fix processor test
      
      ---------
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      Co-authored-by: default avatarJoao Gante <joaofranciscocardosogante@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      1c1c9075
  6. 26 Jun, 2023 1 commit
  7. 21 Jun, 2023 1 commit
  8. 20 Jun, 2023 1 commit
  9. 06 Jun, 2023 1 commit
    • amyeroberts's avatar
      Add TimmBackbone model (#22619) · a717e031
      amyeroberts authored
      
      
      * Add test_backbone for convnext
      
      * Add TimmBackbone model
      
      * Add check for backbone type
      
      * Tidying up - config checks
      
      * Update convnextv2
      
      * Tidy up
      
      * Fix indices & clearer comment
      
      * Exceptions for config checks
      
      * Correclty update config for tests
      
      * Safer imports
      
      * Safer safer imports
      
      * Fix where decorators go
      
      * Update import logic and backbone tests
      
      * More import fixes
      
      * Fixup
      
      * Only import all_models if torch available
      
      * Fix kwarg updates in from_pretrained & main rebase
      
      * Tidy up
      
      * Add tests for AutoBackbone
      
      * Tidy up
      
      * Fix import error
      
      * Fix up
      
      * Install nattan in doc_test_job
      
      * Revert back to setting self._out_xxx directly
      
      * Bug fix - out_indices mapping from out_features
      
      * Fix tests
      
      * Dont accept output_loading_info for Timm models
      
      * Set out_xxx and don't remap
      
      * Use smaller checkpoint for test
      
      * Don't remap timm indices - check out_indices based on stage names
      
      * Skip test as it's n/a
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Cleaner imports / spelling is hard
      
      ---------
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      a717e031
  10. 30 May, 2023 1 commit
  11. 03 May, 2023 1 commit
  12. 25 Apr, 2023 1 commit
  13. 19 Apr, 2023 1 commit
    • Arthur's avatar
      Add Segment Anything Model (SAM) (#22654) · 474bf508
      Arthur authored
      
      
      * initial commit
      
      * keys match
      
      * update, fix conversion
      
      * fixes, inference working
      
      * fix
      
      * more fixes
      
      * more fixes
      
      * clean up
      
      * more clean up
      
      * fix copies and add convext copied layer norm
      
      * stash
      
      * pretty big upfate
      
      * cleaning
      
      * more cleaning
      
      * fixup stuffs
      
      * fix copies
      
      * fix iinit
      
      * update test removing tokenizer
      
      * nits
      
      * add pretrained
      
      * more nits
      
      * remove tracking of pipeline
      
      * few fixes
      
      * update san and conversion script
      
      * fix mask decoder and prompt encoder conversion
      
      * fixes
      
      * small update
      
      * fix order
      
      * fix
      
      * fix image embeddings
      
      * nites
      
      * few fixes
      
      * fix logits
      
      * clean up
      
      * fixes boxes inference
      
      * v1 AMG
      
      * clean up
      
      * some clean up
      
      * multi points support
      
      * amg working
      
      * fixup
      
      * clean up
      
      * readme
      
      * update toctree
      
      * fix type hint
      
      * multiple fixes
      
      * fixup
      
      * fixes
      
      * updates
      
      * updates
      
      * more tests
      
      * few fixes
      
      * change to `SamForMaskGeneration`
      
      * doc
      
      * fixup
      
      * fix more tests
      
      * multiple fixes
      
      * fix CI tests
      
      * refactor processor
      
      * renamings
      
      * draft the pipeline
      
      * refactor
      
      * fix tests
      
      * fix test
      
      * few cleanings
      
      * fix test
      
      * edit pipelien support chunking
      
      * udate
      
      * add slow tests
      
      * fix nit
      
      * fixup
      
      * fix nit
      
      * current chunk pipleine
      
      * cast boxes in fp32
      
      * nit
      
      * current updates
      
      * piepleine works
      
      * fixup
      
      * clean up config
      
      * fix slow tests
      
      * fix slow tests
      
      * clean up
      
      * update doc and pipeline
      
      * adds more slow tests
      
      * fix slow tests
      
      * cleaning
      
      * tests pass
      
      * add docstring
      
      * fix copies
      
      * clean up
      
      * support batch of images
      
      * style
      
      * dummy is needed, add tests
      
      * fix slow tests
      
      * fix CI
      
      * update
      
      * adds more tests
      
      * fixes
      
      * fixes
      
      * fixup
      
      * fixes
      
      * few fixes
      
      * filter
      
      * few fixes
      
      * some refactor
      
      * touches finales
      
      * fix
      
      * style
      
      * remove pipeline files
      
      * fixes nits
      
      * revert pipeline changes
      
      * fix test
      
      * fixup
      
      * remove automodel for automatic mask generation
      
      * fix failing torch tests
      
      * update mdx
      
      * revert removal of `MODEL_FOR_AUTOMATIC_MASK_GENERATION_MAPPING`
      
      * update sam config based on review
      Co-authored-by: default avataramyeroberts <aeroberts4444@gmail.com>
      Co-authored-by: default avatarsgugger <sylvain.gugger@gmail.com>
      
      * update low_resolution_masks -> pred_masks
      inti ln with layer_norm_eps
      add_decomposed_rel_pos doc
      forward doc of SamForMaskGeneration
      
      * update processor docstring
      
      * remove image processor import empty
      
      * update for testing
      
      * output vision hidden states + clean recomm
      also test all iou values
      
      * fixup
      
      * fixup
      
      * remove unused
      
      * Update src/transformers/models/sam/modeling_sam.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/sam/image_processing_sam.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * nits
      
      * fix
      
      * fix CI tests and slow tests
      
      * replace with Amy's processor
      
      * clearer docstring
      
      * add `SamVisionNeck`
      
      * refactor - all CI tests should pass
      
      * fix broken import on Gcolab
      
      * few fixes here and there
      
      * fix another bug
      
      * fix more bugs
      
      * update and merge
      
      * correct ckpt
      
      * address comments
      
      * add tips
      
      * revert
      
      * fix docstring
      
      * replace with `SamModel`
      
      * make fixup
      
      * add support for bathed images and batch ed points
      
      * make fixup this time, really
      
      * make fixup again and again
      
      * few fixes here and there, this should be the touche finale
      
      * Update docs/source/en/model_doc/sam.mdx
      
      * fixup
      
      * correct checkpoints
      
      * correct name
      
      * rm unneeded file
      
      * add notebook
      
      ---------
      Co-authored-by: default avataryounesbelkada <younesbelkada@gmail.com>
      Co-authored-by: default avataramyeroberts <aeroberts4444@gmail.com>
      Co-authored-by: default avatarsgugger <sylvain.gugger@gmail.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarYounes Belkada <49240599+younesbelkada@users.noreply.github.com>
      474bf508
  14. 04 Apr, 2023 1 commit
  15. 27 Mar, 2023 1 commit
    • Arthur's avatar
      [WIP]`NLLB-MoE` Adds the moe model (#22024) · 19ade242
      Arthur authored
      * Initial commit
      
      * update modeling code
      
      * update doc
      
      * add functions necessary
      
      * fix impotrs
      
      * revert changes
      
      * fixup
      
      * more styling to get going
      
      * remove standalone encoder
      
      * update code
      
      * styling
      
      * fix config and model
      
      * update code and some refactoring
      
      * make more tests pass
      
      * Adding NLLB-200 - MoE - 54.5B for no language left behind
      Fixes #21300
      
      * fix mor common tests
      
      * styke
      
      * update testing file
      
      * update
      
      * update
      
      * Router2 doc
      
      * update check config with sparse layer
      
      * add dummy router
      
      * update current conversion script
      
      * create on the fly conversion script
      
      * Fixup
      
      * style
      
      * style 2
      
      * fix empty return
      
      * fix return
      
      * Update default config sparse layers
      
      * easier to create sparse layers
      
      * update
      
      * update conversion script
      
      * update modeling
      
      * add to toctree
      
      * styling
      
      * make ruff happy
      
      * update docstring
      
      * update conversion script
      
      * update, will break tests but impelemting top2
      
      * update
      
      * local groups are supported here
      
      * ️ Support for local groups is now removed ️
      
      This is because it has to work with model parallelism that we do not support
      
      * finish simplificaiton
      
      * Fix forward
      
      * style
      
      * fixup
      
      * Update modelling and test, refactoring
      
      * update tests
      
      * remove final layer)norm as it is done in the FF
      
      * routing works! Logits test added
      
      * nit in test
      
      * remove top1router
      
      * style
      
      * make sure sparse are tested. Had to change route_tokens a liottle bit
      
      * add support for unslip models when converting
      
      * fixup
      
      * style
      
      * update test s
      
      * update test
      
      * REFACTOR
      
      * encoder outputs match!
      
      * style
      
      * update testing
      
      * 🎉encoder and decoder logits match 🎉
      
      
      
      * styleing
      
      * update tests
      
      * cleanup tests
      
      * fix router test and CIs
      
      * cleanup
      
      * cleanup test styling
      
      * fix tests
      
      * Finally the generation tests match!
      
      * cleanup
      
      * update test
      
      * style testing file
      
      * remove script
      
      * cleanup
      
      * more cleanup
      
      * nits
      
      * update
      
      * NLLB tokenizer is wrong and will be fixed soon
      
      * use LongTensors
      
      * update tests
      
      * revert some small changes
      
      * fix second expert sampling and batch prioritized routing
      
      * update tests
      
      * finish last tests
      
      * make ruff happy
      
      * update
      
      * ruff again
      
      * style
      
      * Update docs/source/en/model_doc/nllb-moe.mdx
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Updates based on review
      
      * style and fix import issue
      
      * nit
      
      * more nits
      
      * cleanup
      
      * styling
      
      * update test_seconde_expert_policy
      
      * fix name
      
      * last nit on the markdown examples
      
      ---------
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      19ade242
  16. 22 Mar, 2023 1 commit
  17. 16 Mar, 2023 1 commit
    • Jason Phang's avatar
      LLaMA Implementation (#21955) · 0041be5b
      Jason Phang authored
      
      
      * LLaMA
      
      * sharding and docs
      
      * tweak
      
      * black
      
      * inits
      
      * ruff
      
      * LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP
      
      * init
      
      * no checkpoint
      
      * docs
      
      * ruff
      
      * type_vocab_size
      
      * tokenizer fixes
      
      * tokenizer fixes
      
      * Update tokenization_llama.py
      
      * Update tokenization_llama.py
      
      * Update configuration_llama.py
      
      * Update modeling_llama.py
      
      * tokenizer add_bos by default
      
      * licenses
      
      * remove decoder
      
      * norms and mlp
      
      * rope overhaul
      
      * tweaks
      
      * black
      
      * mention OPT implementation
      
      * off-by-one naming
      
      * typo
      
      * fix
      
      * tokenization fix and slicing bug
      
      * padding config
      
      * cleanup
      
      * black
      
      * update tests
      
      * undo typo
      
      * fix vocab caching logic
      
      * ruff
      
      * docbuilder
      
      * attn fix from BlackSamorez
      
      * initial feedback
      
      * typo
      
      * docs
      
      * llama case
      
      * llama case
      
      * load checkpoint docs
      
      * comment about tokenizer
      
      * tokenizer defaults
      
      * clear past_key_values if use_cache=False
      
      * last tweaks
      
      * last tweaks
      
      * last tweaks
      
      * last tweaks
      
      ---------
      Co-authored-by: default avatarStella Biderman <stellabiderman@gmail.com>
      0041be5b
  18. 14 Mar, 2023 1 commit
  19. 13 Mar, 2023 1 commit
    • wangpeng's avatar
      add new model of MGP-STR (#21418) · 102b5ff4
      wangpeng authored
      
      
      * add new model of MGP-STR
      
      * fix the check failings
      
      * remove torch and numpy from mgp_tokenization
      
      * remove unused import from modeling_mgp_str
      
      * add test_processing_mgp_str
      
      * rm test_processing_mgp_str.py
      
      * add test_processing_mgp_str
      
      * add test_processing_mgp_str
      
      * add test_processing_mgp_str
      
      * rm test_processing_mgp_str and add softmax outs to model
      
      * rm test_processing_mgp_str and add softmax outs to model
      
      * rewrite the code of mgp-str according to PR suggestions
      
      * rewrite the code of mgp-str according to PR suggestions
      
      * add new model of MGP-STR
      
      * fix the check failings
      
      * remove torch and numpy from mgp_tokenization
      
      * remove unused import from modeling_mgp_str
      
      * add test_processing_mgp_str
      
      * rm test_processing_mgp_str.py
      
      * add test_processing_mgp_str
      
      * add test_processing_mgp_str
      
      * add test_processing_mgp_str
      
      * rm test_processing_mgp_str and add softmax outs to model
      
      * rewrite the code of mgp-str according to PR suggestions
      
      * rewrite the code of mgp-str according to PR suggestions
      
      * remove representation_size from MGPSTRConfig
      
      * reformat configuration_mgp_str.py
      
      * format test_processor_mgp_str.py
      
      * add test for tokenizer and complete model/processer test and model file
      
      * rm Unnecessary tupple in modeling_mgp_str
      
      * reduce hidden_size/layers/label_size in test_model
      
      * add integration tests and change MGPSTR to Mgpstr
      
      * add test for logit values
      
      * reformat test model file
      
      ---------
      Co-authored-by: default avataryue kun <yuekun.wp@alibaba-inc.com>
      102b5ff4
  20. 08 Mar, 2023 1 commit
  21. 07 Mar, 2023 1 commit
    • Eli Simhayev's avatar
      [Time-Series] informer model (#21099) · 8abe4930
      Eli Simhayev authored
      * added informer to gitignore
      
      * added informer to gitignore
      
      * WIP informer2020
      
      * added checking that instantiate works
      
      * added config using gluonTS by kashif
      
      * WIP config
      
      * adding informeConfig. need to remove FeatureEmbedder
      
      * done InformerConfig, but need to change the names
      
      * Done informer model init. working on enc-dec
      
      * added things to address, after reading again enc-dec in the paper
      
      * done modeling - checking initialization work
      
      * added informer to gitignore
      
      * WIP informer2020
      
      * added checking that instantiate works
      
      * added config using gluonTS by kashif
      
      * WIP config
      
      * adding informeConfig. need to remove FeatureEmbedder
      
      * done InformerConfig, but need to change the names
      
      * Done informer model init. working on enc-dec
      
      * added things to address, after reading again enc-dec in the paper
      
      * done modeling - checking initialization work
      
      * moved enc-dec init to InformerEncoder/Decoder init
      
      * added 'init_std' to config, now model init works!
      
      * WIP conversion script, and added code sources
      
      * WIP conversion script: loading original informer pth works
      
      * WIP conversion script: change defaults in the config
      
      * WIP conversion script: supporting Informer input embedding
      
      * WIP conversion script: added parameters for the informer embed
      
      * WIP conversion script: change dim_feedforward=2048
      
      * WIP conversion script: remove unused args for loading checkpoint
      
      * just cleaning up
      
      * DataEmbedding removed, after thinking with Kashif
      
      * working on forward pass
      
      * WIP forward pass: trying to establish working batch for forward pass
      
      * cleaning and finalizing
      
      * adding HF names and docs
      
      * init after cleaning works
      
      * WIP in tests
      
      * added docs for the informer specific args
      
      * fix style
      
      * undo change
      
      * cleaning informer, now need to work only enc-dec
      
      * initial enc-dec classes
      
      * added encoder and decoder
      
      * added todo
      
      * add todos for conv_layers
      
      * added decoder docs from vanilla
      
      * added encoder docs from vanilla
      
      * remove encoder decoder from the original informer
      
      * removed AttentionLayer from the original paper
      
      * removed TriangularCausalMask, same as decoder_attention_mask
      
      * initial sparse attention
      
      * use conv_layers
      
      * fixed test_config test
      
      * fix parenthesis when itearting zip(layers, conv_layers)
      
      * error found in prob attention, added sizes as comments
      
      * fix sizes
      
      * added proposal for q_reduce indexing, and remove unused
      
      * WIP ProbMask, and changed factor=2 for testing
      
      * remove unused libs for this PR for creating the env
      
      * fix checking the attn_weights.size() after bmm
      
      * Q_reduce: changed from torch.gather to simple slicing
      
      * WIP calculate final attn_output
      
      * finish adding v_aggregated, attn_output ready
      
      * changed tgt_len to u in attention_mask, need to fix the size error
      
      * comment attention_mask for encoder, and fix if cond for v_agg
      
      * added ProbMask support (wip), removed old original code
      
      * finished ProbMask 😃
      
      
      
      * Revert "remove unused libs for this PR for creating the env"
      
      This reverts commit 11a081e09e92771e51a5d2758d53a9afb59547f0.
      
      * fixes
      
      * make style
      
      * fix initial tests
      
      * fix more tests
      
      * dry
      
      * make style
      
      * remove unused files
      
      * style
      
      * added integration tests
      
      * fix num_static_real_features
      
      * fix header
      
      * remove unused function
      
      * fix example
      
      * fix docs
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/modeling_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * Update src/transformers/models/informer/configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * fixes for reviewer
      
      * use prediction_length from model
      
      * fix style
      
      * fixed informer.mdx
      
      * added to index
      
      * updated readme
      
      * undo
      
      * make fix-copies
      
      * typo
      
      * fix copy
      
      * added Informer to toctree
      
      * in order
      
      * fixed comments
      
      * remove unneeded new lines in docs
      
      * make static real and cat optional
      
      * fix use of distil conv layers
      
      * fixed integration test
      
      * added checkpoint for convlayer
      
      * make fix-copies
      
      * updated from time series model
      
      * make fix-copies
      
      * copy decoder
      
      * fix unit tests
      
      * updated scaling config
      
      * fix integration tests
      
      * IGNORE_NON_TESTED
      
      * IGNORE_NON_AUTO_CONFIGURED
      
      * IGNORE_NON_AUTO_CONFIGURED
      
      * updated check configs
      
      * fix formatting
      
      * undo change from time series
      
      * prediction_length should not be None
      
      * aliign with the blog: prettify ProbSparse and change attention_factor  to sampling_factor
      
      * make style
      
      * make fix-copies
      
      * niels CR: update contributed by
      
      * niels CR: update configuration_informer.py
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * niels CR: update kashif -> huggingface
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * niels CR: `sampling_factor` only relevant when `attention_type`=prob
      
      * make style
      
      * fixed U_part: added multiplication by `L_Q`
      
      * fixed bug: remove `is not None` from `if config.distil`
      
      * fixed test: `decoder_seq_length` to `encoder_seq_length` in cross_attentions check
      
      * fix integration tests
      
      * updated model hub
      
      * do not shift as in training
      
      * undo
      
      * fix make-copies
      
      * make fix-copies
      
      * added `if prediction_length is None`
      
      * changed `ProbSparseAttention` to `InformerProbSparseAttention`
      
      * changed `V_sum` -> `v_mean_dim_time`
      
      * changed `ConvLayer` to `InformerConvLayer` and fixed `super()`
      
      * TimeSeriesTansformer->Informer in decoder's Copied from
      
      * more descriptive in ProbSparse
      
      * make style
      
      * fix coped from
      
      * Revert "added `if prediction_length is None`"
      
      This reverts commit b4cbddfa05e3bd739b79569cd3c3b89e316f2451.
      
      * fixed indent
      
      * use InformerSinusoidalPositionalEmbedding
      
      * make fix-style
      
      * fix from #21860
      
      * fix name
      
      * make fix-copies
      
      * use time series utils
      
      * fix dec num_heads
      
      * docstring
      
      * added time series util doc
      
      * _import_structure
      
      * formatting
      
      * changes from review
      
      * make style
      
      * fix docs
      
      * fix doc
      
      * removed NegativeLogLikelihood
      
      ---------
      Co-authored-by: default avatarKashif Rasul <kashif.rasul@gmail.com>
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      8abe4930
  22. 03 Mar, 2023 2 commits
  23. 02 Mar, 2023 1 commit
  24. 01 Mar, 2023 2 commits
  25. 22 Feb, 2023 1 commit
  26. 21 Feb, 2023 1 commit
  27. 20 Feb, 2023 2 commits
    • tanreinama's avatar
      add GPTSAN model (reopen) (#21291) · f56174ac
      tanreinama authored
      * add GPTSAN-Japanese
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN (update for review)
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * fix typo in comment text
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * add GPTSAN
      
      * fix document and comments
      
      * fix class name GPTSAN->GPTSan
      
      * fix import and test for tokenizer
      f56174ac
    • Andy Ehrenberg's avatar
      add flax whisper implementation (#20479) · 2840272c
      Andy Ehrenberg authored
      
      
      * add flax whisper implementation
      
      * rever change to setup
      
      * remove unused imports
      
      * revert generation changes
      
      * flax whisper docs
      
      * docs
      
      * import order
      
      * import sorting
      
      * isort
      
      * add dummy objects
      
      * doc formatting
      
      * formatting
      
      * remove trailing whitespaces
      
      * fix flax whisper docs
      
      * add generation logic to unlock flax whisper
      
      * remove scans
      
      * give credits to Flax Bart implementation
      
      * remove unused imports
      
      * add license
      
      * remove assert
      
      * more credits to Bart
      
      * fix style
      
      * formatting
      
      * support left padding
      
      * add flax whisper generation test
      
      * remove copied from comments whenever not a full copy
      
      * fix docstrings for logits processors
      
      * revert change to FlaxForceTokensLogitsProcessor
      
      * revert doc changes
      
      * improve generation docs
      
      * reorganize
      
      * formatting
      
      * cleanup docs
      
      * add tests
      
      * handle empty list case
      
      * fix forced decoder ids in flax tests
      
      * add flax whisper to inits
      
      * upate dummy objects
      
      * docs for FlaxAutoModelForSpeechSeq2Seq
      
      * fix decoder_position_ids computation in pretrained model decode/__call__ fns
      
      * add Copied from statements as necessary
      
      * compute position_ids only in __call__ and decode methods of pretrained model subclasses
      
      * improve readabilityof compute positional embeddings
      
      * check dimensionality of input_features instead of hidden_states
      
      * copied from statement for init_cache
      
      * formatting
      
      * fix copies
      
      * fix copies
      
      * pass attention mask to encoder layers
      
      * fix decoder module outputs
      
      * set dtype
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * smaller flax model for whisper test
      
      * Update src/transformers/generation/flax_utils.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update tests/models/whisper/test_modeling_flax_whisper.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * cleanup
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * bias cleanup
      
      * doc fix
      
      * align style for force tokens processor
      
      * readability
      
      * fix input shape in tests
      
      * revert FlaxGenerationMixin docstring
      
      * formatting
      
      * fix tests
      
      * fix imports
      
      * consistent encoder hidden states
      
      * consistent hidden states
      
      * input shapes
      
      * typo
      
      * partial class trick
      
      * partial class for input shape
      
      * base_class with correct input shape
      
      * partial base classes
      
      * match by name
      
      * set main_input_name
      
      * compare on names
      
      * formatting
      
      * remove unused import
      
      * safer position ids computation
      
      * safer position id computation
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * Update src/transformers/models/whisper/modeling_flax_whisper.py
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * remove identical inherited tests
      
      * fix prompt ids in tests
      
      * use generation config
      
      * use jnp array
      
      * better var names
      
      * more explicit bias use
      
      * import transformers
      
      * formatting
      
      * test formatting
      
      * remove unused imports
      
      * remove unused imports
      
      * formatting
      
      * isort
      
      * docs
      
      * fix ln orders for encoder hidden states
      
      * whisper unique generation stuff
      
      * flake
      
      * use finfo for attention bias
      
      * docs
      
      * Update src/transformers/generation/flax_utils.py
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * docs
      
      * add timestamp flax test
      
      * jit for timestamps
      
      * formatting
      
      * clean up timestamps processor
      
      * formatting
      
      * remove if_true
      
      * cleanup
      
      ---------
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      2840272c
  28. 16 Feb, 2023 2 commits
    • Arthur's avatar
      [CLAP] Add CLAP to the library (#21370) · c236a621
      Arthur authored
      
      
      * add model like clip
      
      * update
      
      * text model ok
      
      * clap text works
      
      * some refactor
      
      - `CLAPVision` to `CLAPAudio`
      - refactor kwargs of audio modules
      
      * more refactor
      
      * more refactor
      
      * more refactor
      
      * correct fusion
      
      * more refactor
      
      * new modules
      
      * add basic processor
      
      * fixup
      
      * remove whisper copioed from
      
      * audio logits match
      
      * add doc
      
      * correct filters mel and add maxlength
      
      * style
      
      * few fixes
      
      * forward passes
      
      * fixup
      
      * fixup
      
      * some clean up
      
      * remove mels form the dictionnary
      
      * pad after the repeat
      
      * update padding when dsmaller
      
      * fix padding
      
      * style
      
      * use swin patch merging
      
      * use copied from swin
      
      * processor with any tokenizer
      
      * more copied from
      
      * some clean up
      
      * more refactor
      
      * fix mel when rand_trunc
      
      * style
      
      * remove unused imports
      
      * update processing
      
      * remove image processing tests
      
      * add testing fiel
      
      * fixmodeling issues
      
      * replace with `is_longer`
      
      * clap in serialization
      
      * more refactor
      
      * `make fixup`
      
      * make fixup
      
      * fix feature extractor
      
      * update test feature extractor
      
      * `make fixup`
      
      * clean up config
      
      * more clean up
      
      * more cleanup
      
      * update tests
      
      * refactor tests and inits
      
      * removeCLAP vision config
      
      * remove CLAP from image procssing auto and dummy vision objects
      
      * update inits
      
      * style
      
      * re order classes in modeling clap
      
      * Use roberta tokenizer as the other weights are not open sourced
      
      * small cleaup
      
      * remove tokenization CLAP
      
      * processor tokenizr is roberta
      
      * update feature extraction doc
      
      * remove vclap from model zero shot
      
      * update f_min and f_max to frequency_xx
      
      * some changes
      
      - fix modeling keys
      - add `is_longer` in the forward pass
      - make fixup
      
      * make fixup
      
      * consistent behavior ebtween rand_crop and fusion
      
      * add numpy resize and bilinear and documentation
      
      * move resizing to image utils
      
      * clean feature extraction
      
      * import resize from correct file
      
      * resize in image transforms
      
      * update
      
      * style
      
      * style
      
      * nit
      
      * remove unused arguments form the feature extractor
      
      * style
      
      * few fixes + make fixup
      
      * oops
      
      * fix more tests
      
      * add zero shot audio classification pipeline
      
      * update zeroshot classification pipeline
      
      * fixup
      
      * fix copies
      
      * all CI tests pass
      
      * make fixup + fix docs
      
      * fix docs
      
      * fix docs
      
      * update tests pip;eline
      
      * update zero shot pipeline
      
      * update feature extraction clap
      
      * update tokenization auto
      
      * use nested simplify
      
      * update pipeline tests
      
      * Apply suggestions from code review
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * split in two lines
      
      * fixes
      
      * refactor
      
      * clean up
      
      * add integration tests
      
      * update config docstring
      
      * style
      
      * update processor
      
      * fix processor test
      
      * fix feat extractor tests
      
      * update docs
      
      * Apply suggestions from code review
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * fix readmes
      
      * fix tips
      
      * Update src/transformers/models/auto/configuration_auto.py
      
      * update doc and remove todo -> properly explained
      
      * fix idx and typo
      
      * typoe
      
      * cleanup config
      
      * cleanup tests, styles and doc
      
      * ignore docstyle on image transform
      
      * add conversion script
      
      * remove the `clap` indx in favor of `CLAP`
      
      * update __init
      
      * nits
      
      * Update src/transformers/pipelines/__init__.py
      
      * fix bug
      
      * clarifiy config
      
      * fix copy
      
      * fix init
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * fix model output
      
      * fix comment
      
      * make fixup
      
      * make fixup
      
      * rename to `Clap`
      
      * replace to `Clap`
      
      * replace to `Clap`
      
      * repo consistency
      
      * again repo-consistency
      
      * make fixup
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * add config
      
      * changes
      
      * update conversion
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * remove unused function
      
      * update based on code reviews
      
      * style
      
      * more comments
      
      * cleanup
      
      * clean up
      
      * style
      
      * apply suggestions
      
      * Empty commit
      
      * pipeline will be added in a different PR
      
      * update calls to audio utils functions
      
      * update pipeline init
      
      * style
      
      * style
      
      * styling again
      
      * use pad
      
      * fix repo-consistency
      
      * update utils and add doc for audio utils
      
      * clean up resize by using torch. update inits accordingly
      
      * style
      
      * CLap's  tokenizer is RobertA
      
      * add audio utils to internal toctreee
      
      * update totctree
      
      * style
      
      * update documentation and normalize naming accross audio utils and feature extraction clap
      
      * style
      
      * clean up
      
      * update doc and typos
      
      * fix doctest
      
      * update modelin code, got rid of a lot of reshaping
      
      * style on added doc audio utils
      
      * update modeling clap
      
      * style
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      
      * docstringvariables with CLAP
      
      * rename key
      
      * update modeling CLAP
      
      * update audio utils docstring
      
      * update processing clap
      
      * fix readmes
      
      * fix toctree
      
      * udpate configuration clap
      
      * fix init
      
      * make fixup
      
      * fix
      
      * fix
      
      * update naming
      
      * update
      
      * update checkpoint path
      
      * Apply suggestions from code review
      
      * Major refactoring
      
      * Update src/transformers/models/clap/configuration_clap.py
      
      * merge
      
      ---------
      Co-authored-by: default avataryounesbelkada <younesbelkada@gmail.com>
      Co-authored-by: default avatarYounes Belkada <49240599+younesbelkada@users.noreply.github.com>
      Co-authored-by: default avatarSylvain Gugger <35901082+sgugger@users.noreply.github.com>
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      c236a621
    • Connor Henderson's avatar
      refactor: Make direct_transformers_import util (#21652) · 0f96c26d
      Connor Henderson authored
      * refactor: Make direct_import util
      
      * edit direct import fn
      
      * add docstring
      
      * make import function specific to transformers only
      
      * edit doc string
      0f96c26d
  29. 15 Feb, 2023 3 commits
  30. 09 Feb, 2023 1 commit
    • NielsRogge's avatar
      Add BLIP-2 (#21441) · d7f1e7c0
      NielsRogge authored
      
      
      * First draft
      
      * More improvements
      
      * More improvements
      
      * Improve conversion script
      
      * Convert all weights
      
      * Make forward pass work
      
      * Make logits match
      
      * More improvements
      
      * More improvements
      
      * More improvements
      
      * Use get_input_embeddings
      
      * Improve some more
      
      * Improve model tests
      
      * Improve model tests
      
      * More improvements
      
      * Fix processor
      
      * Update files
      
      * Update prepare_inputs_for_generation
      
      * More improvements
      
      * Fix copies
      
      * More fixes
      
      * Make fixup
      
      * More improvements
      
      * Add support for seq2seq language model
      
      * More improvements
      
      * Fix test
      
      * More improvements
      
      * Improve conversion script
      
      * Remove some todo's
      
      * Fix README's
      
      * Improve conversion script
      
      * Fix generation
      
      * Fix style and remove Blip2Model
      
      * Fix model outputs
      
      * More improvements
      
      * Set eos_token_id in config
      
      * Fix quality
      
      * Small improvements
      
      * Add processor tests
      
      * More improvements
      
      * Apply suggestions
      
      * Apply suggestions
      
      * Add integration test
      
      * Update image URL
      
      * Add integration test
      
      * Fix model_type
      
      * Update style
      
      * Improve docs
      
      * Add doc tests
      
      * Fix copies
      
      * Remove tests which are passing
      
      * Improve some more
      
      * Add tests for seq2seq language models
      
      * Minor fix
      
      * Convert more checkpoints
      
      * finalize CI
      
      * Fix blip and blip2 processors
      
      * add `accelerate` support for `blip2`
      
      * clean up
      
      * make style
      
      * Update conversion script
      
      * Update conversion script some more
      
      * Update organization
      
      * revert toc file
      
      * add blip-2 to toc file
      
      * Some more improvements
      
      * Fix docstring
      
      * Improve docs
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      Co-authored-by: default avataryounesbelkada <younesbelkada@gmail.com>
      d7f1e7c0
  31. 06 Feb, 2023 1 commit
    • Sylvain Gugger's avatar
      Update quality tooling for formatting (#21480) · 6f79d264
      Sylvain Gugger authored
      * Result of black 23.1
      
      * Update target to Python 3.7
      
      * Switch flake8 to ruff
      
      * Configure isort
      
      * Configure isort
      
      * Apply isort with line limit
      
      * Put the right black version
      
      * adapt black in check copies
      
      * Fix copies
      6f79d264