1. 15 Nov, 2023 1 commit
  2. 14 Nov, 2023 1 commit
  3. 13 Nov, 2023 2 commits
    • Gift Sinthong's avatar
      [time series] Add PatchTST (#25927) · 2ac5b932
      Gift Sinthong authored
      
      
      * Initial commit of PatchTST model classes
      Co-authored-by: default avatarPhanwadee Sinthong <phsinthong@gmail.com>
      Co-authored-by: default avatarNam Nguyen <namctin@gmail.com>
      Co-authored-by: default avatarVijay Ekambaram <vijaykr.e@gmail.com>
      Co-authored-by: default avatarNgoc Diep Do <55230119+diepi@users.noreply.github.com>
      Co-authored-by: default avatarWesley Gifford <79663411+wgifford@users.noreply.github.com>
      
      * Add PatchTSTForPretraining
      
      * update to include classification
      Co-authored-by: default avatarPhanwadee Sinthong <phsinthong@gmail.com>
      Co-authored-by: default avatarNam Nguyen <namctin@gmail.com>
      Co-authored-by: default avatarVijay Ekambaram <vijaykr.e@gmail.com>
      Co-authored-by: default avatarNgoc Diep Do <55230119+diepi@users.noreply.github.com>
      Co-authored-by: default avatarWesley Gifford <79663411+wgifford@users.noreply.github.com>
      
      * clean up auto files
      
      * Add PatchTSTForPrediction
      
      * Fix relative import
      
      * Replace original PatchTSTEncoder with ChannelAttentionPatchTSTEncoder
      
      * temporary adding absolute path + add PatchTSTForForecasting class
      
      * Update base PatchTSTModel + Unittest
      
      * Update ForecastHead to use the config class
      
      * edit cv_random_masking, add mask to model output
      
      * Update configuration_patchtst.py
      
      * add masked_loss to the pretraining
      
      * add PatchEmbeddings
      
      * Update configuration_patchtst.py
      
      * edit loss which considers mask in the pretraining
      
      * remove patch_last option
      
      * Add commits from internal repo
      
      * Update ForecastHead
      
      * Add model weight initilization + unittest
      
      * Update PatchTST unittest to use local import
      
      * PatchTST integration tests for pretraining and prediction
      
      * Added PatchTSTForRegression + update unittest to include label generation
      
      * Revert unrelated model test file
      
      * Combine similar output classes
      
      * update PredictionHead
      
      * Update configuration_patchtst.py
      
      * Add Revin
      
      * small edit to PatchTSTModelOutputWithNoAttention
      
      * Update modeling_patchtst.py
      
      * Updating integration test for forecasting
      
      * Fix unittest after class structure changed
      
      * docstring updates
      
      * change input_size to num_input_channels
      
      * more formatting
      
      * Remove some unused params
      
      * Add a comment for pretrained models
      
      * add channel_attention option
      
      add channel_attention option and remove unused positional encoders.
      
      * Update PatchTST models to use HF's MultiHeadAttention module
      
      * Update paper + github urls
      
      * Fix hidden_state return value
      
      * Update integration test to use PatchTSTForForecasting
      
      * Adding dataclass decorator for model output classes
      
      * Run fixup script
      
      * Rename model repos for integration test
      
      * edit argument explanation
      
      * change individual option to shared_projection
      
      * style
      
      * Rename integration test + import cleanup
      
      * Fix outpu_hidden_states return value
      
      * removed unused mode
      
      * added std, mean and nops scaler
      
      * add initial distributional loss for predition
      
      * fix typo in docs
      
      * add generate function
      
      * formatting
      
      * add num_parallel_samples
      
      * Fix a typo
      
      * copy weighted_average function, edit PredictionHead
      
      * edit PredictionHead
      
      * add distribution head to forecasting
      
      * formatting
      
      * Add generate function for forecasting
      
      * Add generate function to prediction task
      
      * formatting
      
      * use argsort
      
      * add past_observed_mask ordering
      
      * fix arguments
      
      * docs
      
      * add back test_model_outputs_equivalence test
      
      * formatting
      
      * cleanup
      
      * formatting
      
      * use ACT2CLS
      
      * formatting
      
      * fix add_start_docstrings decorator
      
      * add distribution head and generate function to regression task
      
      add distribution head and generate function to regression task. Also made add PatchTSTForForecastingOutput,  PatchTSTForRegressionOutput.
      
      * add distribution head and generate function to regression task
      
      add distribution head and generate function to regression task. Also made add PatchTSTForForecastingOutput,  PatchTSTForRegressionOutput.
      
      * fix typos
      
      * add forecast_masking
      
      * fixed tests
      
      * use set_seed
      
      * fix doc test
      
      * formatting
      
      * Update docs/source/en/model_doc/patchtst.md
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * better var names
      
      * rename PatchTSTTranspose
      
      * fix argument names and docs string
      
      * remove compute_num_patches and unused class
      
      * remove assert
      
      * renamed to PatchTSTMasking
      
      * use num_labels for classification
      
      * use num_labels
      
      * use default num_labels from super class
      
      * move model_type after docstring
      
      * renamed PatchTSTForMaskPretraining
      
      * bs -> batch_size
      
      * more review fixes
      
      * use hidden_state
      
      * rename encoder layer and block class
      
      * remove commented seed_number
      
      * edit docstring
      
      * Add docstring
      
      * formatting
      
      * use past_observed_mask
      
      * doc suggestion
      
      * make fix-copies
      
      * use Args:
      
      * add docstring
      
      * add docstring
      
      * change some variable names and add PatchTST before some class names
      
      * formatting
      
      * fix argument types
      
      * fix tests
      
      * change x variable to patch_input
      
      * format
      
      * formatting
      
      * fix-copies
      
      * Update tests/models/patchtst/test_modeling_patchtst.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * move loss to forward
      
      * Update src/transformers/models/patchtst/modeling_patchtst.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/models/patchtst/modeling_patchtst.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/models/patchtst/modeling_patchtst.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/models/patchtst/modeling_patchtst.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * Update src/transformers/models/patchtst/modeling_patchtst.py
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      
      * formatting
      
      * fix a bug when pre_norm is set to True
      
      * output_hidden_states is set to False as default
      
      * set pre_norm=True as default
      
      * format docstring
      
      * format
      
      * output_hidden_states is None by default
      
      * add missing docs
      
      * better var names
      
      * docstring: remove default to False in output_hidden_states
      
      * change labels name to target_values in regression task
      
      * format
      
      * fix tests
      
      * change to forecast_mask_ratios and random_mask_ratio
      
      * change mask names
      
      * change future_values to target_values param in the prediction class
      
      * remove nn.Sequential and make PatchTSTBatchNorm class
      
      * black
      
      * fix argument name for prediction
      
      * add output_attentions option
      
      * add output_attentions to PatchTSTEncoder
      
      * formatting
      
      * Add attention output option to all classes
      
      * Remove PatchTSTEncoderBlock
      
      * create PatchTSTEmbedding class
      
      * use config in PatchTSTPatchify
      
      * Use config in PatchTSTMasking class
      
      * add channel_attn_weights
      
      * Add PatchTSTScaler class
      
      * add output_attentions arg to test function
      
      * format
      
      * Update doc with image patchtst.md
      
      * fix-copies
      
      * rename Forecast <-> Prediction
      
      * change name of a few parameters to match with PatchTSMixer.
      
      * Remove *ForForecasting class to match with other time series models.
      
      * make style
      
      * Remove PatchTSTForForecasting in the test
      
      * remove PatchTSTForForecastingOutput class
      
      * change test_forecast_head to test_prediction_head
      
      * style
      
      * fix docs
      
      * fix tests
      
      * change num_labels to num_targets
      
      * Remove PatchTSTTranspose
      
      * remove arguments in PatchTSTMeanScaler
      
      * remove arguments in PatchTSTStdScaler
      
      * add config as an argument to all the scaler classes
      
      * reformat
      
      * Add norm_eps for batchnorm and layernorm
      
      * reformat.
      
      * reformat
      
      * edit docstring
      
      * update docstring
      
      * change variable name pooling to pooling_type
      
      * fix output_hidden_states as tuple
      
      * fix bug when calling PatchTSTBatchNorm
      
      * change stride to patch_stride
      
      * create PatchTSTPositionalEncoding class and restructure the PatchTSTEncoder
      
      * formatting
      
      * initialize scalers with configs
      
      * edit output_hidden_states
      
      * style
      
      * fix forecast_mask_patches doc string
      
      ---------
      Co-authored-by: default avatarGift Sinthong <gift.sinthong@ibm.com>
      Co-authored-by: default avatarNam Nguyen <namctin@gmail.com>
      Co-authored-by: default avatarVijay Ekambaram <vijaykr.e@gmail.com>
      Co-authored-by: default avatarNgoc Diep Do <55230119+diepi@users.noreply.github.com>
      Co-authored-by: default avatarWesley Gifford <79663411+wgifford@users.noreply.github.com>
      Co-authored-by: default avatarWesley M. Gifford <wmgifford@us.ibm.com>
      Co-authored-by: default avatarnnguyen <nnguyen@us.ibm.com>
      Co-authored-by: default avatarNgoc Diep Do <diiepy@gmail.com>
      Co-authored-by: default avatarKashif Rasul <kashif.rasul@gmail.com>
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      Co-authored-by: default avatarPatrick von Platen <patrick.v.platen@gmail.com>
      2ac5b932
    • Arthur's avatar
      Remove-auth-token (#27060) · b97cab7e
      Arthur authored
      * don't use `use_auth_token`internally
      
      * let's use token everywhere
      
      * fixup
      b97cab7e
  4. 10 Nov, 2023 3 commits
    • Susnato Dhar's avatar
      Add Phi-1 and Phi-1_5 (#26170) · e1c3ac25
      Susnato Dhar authored
      * only dir not even init
      
      * init
      
      * tokenizer removed and reference of codegen added
      
      * modeling file updated a lot remaining app_rotary_emb
      
      * conversion script done
      
      * conversion script fixed, a lot of factoring done and most tests pass
      
      * added token_clf and extractive_QA_head
      
      * integration tests pass
      
      * flash attn tests pass!
      
      * config done
      
      * more docs in modeling file
      
      * some style fix
      
      * style and others
      
      * doc test error fix
      
      * more doc fix
      
      * some attention fixes
      
      * most fixes
      
      * style and other fixes
      
      * docs fix and config
      
      * doc fix
      
      * some comments
      
      * conversion script updated
      
      * conversion script updated
      
      * Revert "conversion script updated"
      
      This reverts commit e92378c54084ec0747041b113083d1746ecb6c7f.
      
      * final comments
      
      * add Phi to language_modeling.md
      
      * edit phi.md file
      
      * rebase and fix
      
      * removed phi-1.5 example
      
      * changed model_type from 'phi'->'mixformer-sequential'
      
      * small change
      
      * small change
      
      * revert \small change
      
      * changed mixformer-sequential->phi
      
      * small change
      
      * added phi-1.5 example instead of phi-1
      
      * doc test might pass now
      
      * rebase and small change
      
      * added the dropout layer
      
      * more fixes
      
      * modified .md file
      
      * very very small doc change
      e1c3ac25
    • Susnato Dhar's avatar
      Add CLVP (#24745) · 7e9f10ac
      Susnato Dhar authored
      * init commit
      
      * attention arch done except rotary emb
      
      * rotary emb done
      
      * text encoder working
      
      * outputs matching
      
      * arch first pass done
      
      * make commands done, tests and docs remaining
      
      * all tests passed, only docs remaining
      
      * docs done
      
      * doc-builder fix
      
      * convert script removed(not relevant)
      
      * minor comments done
      
      * added ckpt conversion script
      
      * tokenizer done
      
      * very minor fix of index.md 2
      
      * mostly make fixup related
      
      * all done except fe and rotary emb
      
      * very small change
      
      * removed unidecode dependency
      
      * style changes
      
      * tokenizer removed require_backends
      
      * added require_inflect to tokenizer tests
      
      * removed VOCAB_FILES in tokenizer test
      
      * inflect dependency removed
      
      * added rotary pos emb cache and simplified the apply method
      
      * style
      
      * little doc change
      
      * more comments
      
      * feature extractor added
      
      * added processor
      
      * auto-regressive config added
      
      * added CLVPConditioningEncoder
      
      * comments done except the test one
      
      * weights added successfull(NOT tested)
      
      * tokenizer fix with numbers
      
      * generate outputs matching
      
      * almost tests passing Integ tests not written
      
      * Integ tests added
      
      * major CUDA error fixed
      
      * docs done
      
      * rebase and multiple fixes
      
      * fixed rebase overwrites
      
      * generate code simplified and tests for AutoRegressive model added
      
      * minor changes
      
      * refectored gpt2 code in clvp file
      
      * weights done and all code refactored
      
      * mostly done except the fast_tokenizer
      
      * doc test fix
      
      * config file's doc fixes
      
      * more config fix
      
      * more comments
      
      * tokenizer comments mostly done
      
      * modeling file mostly refactored and can load modules
      
      * ClvpEncoder tested
      
      * ClvpDecoder, ClvpModel and ClvpForCausalLM tested
      
      * integration and all tests passed
      
      * more fixes
      
      * docs almost done
      
      * ckpt conversion refectored
      
      * style and some failing tests fix
      
      * comments
      
      * temporary output fix but test_assisted_decoding_matches_greedy_search test fails
      
      * majority changes done
      
      * use_cache outputs same now! Along with the asisted_greedy_decoding test fix
      
      * more comments
      
      * more comments
      
      * prepare_inputs_for_generation fixed and _prepare_model_inputs added
      
      * style fix
      
      * clvp.md change
      
      * moved clvpconditionalencoder norms
      
      * add model to new index
      
      * added tokenizer input_ids_with_special_tokens
      
      * small fix
      
      * config mostly done
      
      * added config-tester and changed conversion script
      
      * more comments
      
      * comments
      
      * style fix
      
      * some comments
      
      * tokenizer changed back to prev state
      
      * small commnets
      
      * added output hidden states for the main model
      
      * style fix
      
      * comments
      
      * small change
      
      * revert small change
      
      * .
      
      * Update clvp.md
      
      * Update test_modeling_clvp.py
      
      * :)
      
      * some minor change
      
      * new fixes
      
      * remove to_dict from FE
      7e9f10ac
    • Yoach Lacombe's avatar
      update Bark FA2 docs (#27400) · 9dd58c53
      Yoach Lacombe authored
      
      
      * update Bark FA2 docs
      
      * update benchmark section
      
      * Update bark.md
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * rephrase
      
      ---------
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      9dd58c53
  5. 08 Nov, 2023 1 commit
    • Sanchit Gandhi's avatar
      MusicGen Update (#27084) · f16ff0f0
      Sanchit Gandhi authored
      * [MusicGen] Add stereo model
      
      * safe serialization
      
      * Update src/transformers/models/musicgen/modeling_musicgen.py
      
      * split over 2 lines
      
      * fix slow tests on cuda
      f16ff0f0
  6. 07 Nov, 2023 3 commits
  7. 06 Nov, 2023 1 commit
  8. 03 Nov, 2023 3 commits
  9. 01 Nov, 2023 2 commits
  10. 31 Oct, 2023 2 commits
  11. 30 Oct, 2023 2 commits
    • NielsRogge's avatar
      [KOSMOS-2] Update docs (#27157) · 8211c59b
      NielsRogge authored
      Update docs
      8211c59b
    • Yih-Dar's avatar
      Add `Kosmos-2` model (#24709) · 691fd8fd
      Yih-Dar authored
      
      
      * Add KOSMOS-2 model
      
      * update
      
      * update
      
      * update
      
      * address review comment - 001
      
      * address review comment - 002
      
      * address review comment - 003
      
      * style
      
      * Apply suggestions from code review
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      
      * fix
      
      * address review comment - 004
      
      * address review comment - 005
      
      * address review comment - 006
      
      * address review comment - 007
      
      * address review comment - 008
      
      * address review comment - 009
      
      * address review comment - 010
      
      * address review comment - 011
      
      * update readme
      
      * fix
      
      * fix
      
      * fix
      
      * [skip ci] fix
      
      * revert the change in _decode
      
      * fix docstring
      
      * fix docstring
      
      * Update docs/source/en/model_doc/kosmos-2.md
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      
      * no more Kosmos2Tokenizer
      
      * style
      
      * remove "returned when being computed by the model"
      
      * Apply suggestions from code review
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * UTM5 Atten
      
      * fix attn mask
      
      * use present_key_value_states instead of next_decoder_cache
      
      * style
      
      * conversion scripts
      
      * conversion scripts
      
      * conversion scripts
      
      * Add _reorder_cache
      
      * fix doctest and copies
      
      * rename 1
      
      * rename 2
      
      * rename 3
      
      * make fixup
      
      * fix table
      
      * fix docstring
      
      * rename 4
      
      * change repo_id
      
      * remove tip
      
      * update md file
      
      * make style
      
      * update md file
      
      * put docs/source/en/model_doc/kosmos-2.md to slow
      
      * update conversion script
      
      * Use CLIPImageProcessor in Kosmos2Processor
      
      * Remove Kosmos2ImageProcessor
      
      * Remove to_dict in Kosmos2Config
      
      * Remove files
      
      * fix import
      
      * Update conversion
      
      * normalized=False
      
      * Not using hardcoded values like <image>
      
      * elt --> element
      
      * Apply suggestion
      
      * Not using hardcoded values like </image>
      
      * No assert
      
      * No nested functions
      
      * Fix md file
      
      * copy
      
      * update doc
      
      * fix docstring
      
      * fix name
      
      * Remove _add_remove_spaces_around_tag_tokens
      
      * Remove dummy docstring of _preprocess_single_example
      
      * Use `BatchEncoding`
      
      * temp
      
      * temp
      
      * temp
      
      * Update
      
      * Update
      
      * Make Kosmos2ProcessorTest a bit pretty
      
      * Update gradient checkpointing
      
      * Fix gradient checkpointing test
      
      * Remove one liner remove_special_fields
      
      * Simplify conversion script
      
      * fix add_eos_token
      
      * update readme
      
      * update tests
      
      * Change to microsoft/kosmos-2-patch14-224
      
      * style
      
      * Fix doc
      
      ---------
      Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
      Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
      Co-authored-by: default avatarNielsRogge <48327001+NielsRogge@users.noreply.github.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      691fd8fd
  12. 23 Oct, 2023 2 commits
    • Yoach Lacombe's avatar
      Add Seamless M4T model (#25693) · cb45f71c
      Yoach Lacombe authored
      
      
      * first raw commit
      
      * still POC
      
      * tentative convert script
      
      * almost working speech encoder conversion scripts
      
      * intermediate code for encoder/decoders
      
      * add modeling code
      
      * first version of speech encoder
      
      * make style
      
      * add new adapter layer architecture
      
      * add adapter block
      
      * add first tentative config
      
      * add working speech encoder conversion
      
      * base model convert works now
      
      * make style
      
      * remove unnecessary classes
      
      * remove unecessary functions
      
      * add modeling code speech encoder
      
      * rework logics
      
      * forward pass of sub components work
      
      * add modeling codes
      
      * some config modifs and modeling code modifs
      
      * save WIP
      
      * new edits
      
      * same output speech encoder
      
      * correct attention mask
      
      * correct attention mask
      
      * fix generation
      
      * new generation logics
      
      * erase comments
      
      * make style
      
      * fix typo
      
      * add some descriptions
      
      * new state
      
      * clean imports
      
      * add tests
      
      * make style
      
      * make beam search and num_return_sequences>1 works
      
      * correct edge case issue
      
      * correct SeamlessM4TConformerSamePadLayer copied from
      
      * replace ACT2FN relu by nn.relu
      
      * remove unecessary return variable
      
      * move back a class
      
      * change name conformer_attention_mask ->conv_attention_mask
      
      * better nit code
      
      * add some Copied from statements
      
      * small nits
      
      * small nit in dict.get
      
      * rename t2u model -> conditionalgeneration
      
      * ongoing refactoring of structure
      
      * update models architecture
      
      * remove SeamlessM4TMultiModal classes
      
      * add tests
      
      * adapt tests
      
      * some non-working code for vocoder
      
      * add seamlessM4T vocoder
      
      * remove buggy line
      
      * fix some hifigan related bugs
      
      * remove hifigan specifc config
      
      * change
      
      * add WIP tokenization
      
      * add seamlessM4T working tokenzier
      
      * update tokenization
      
      * add tentative feature extractor
      
      * Update converting script
      
      * update working FE
      
      * refactor input_values -> input_features
      
      * update FE
      
      * changes in generation, tokenizer and modeling
      
      * make style and add t2u_decoder_input_ids
      
      * add intermediate outputs for ToSpeech models
      
      * add vocoder to speech models
      
      * update valueerror
      
      * update FE with languages
      
      * add vocoder convert
      
      * update config docstrings and names
      
      * update generation code and configuration
      
      * remove todos and update config.pad_token_id to generation_config.pad_token_id
      
      * move block vocoder
      
      * remove unecessary code and uniformize tospeech code
      
      * add feature extractor import
      
      * make style and fix some copies from
      
      * correct consistency + make fix-copies
      
      * add processor code
      
      * remove comments
      
      * add fast tokenizer support
      
      * correct pad_token_id in M4TModel
      
      * correct config
      
      * update tests and codes  + make style
      
      * make some suggested correstion - correct comments and change naming
      
      * rename some attributes
      
      * rename some attributes
      
      * remove unecessary sequential
      
      * remove option to use dur predictor
      
      * nit
      
      * refactor hifigan
      
      * replace normalize_mean and normalize_var with do_normalize + save lang ids to generation config
      
      * add tests
      
      * change tgt_lang logic
      
      * update generation ToSpeech
      
      * add support import SeamlessM4TProcessor
      
      * fix generate
      
      * make tests
      
      * update integration tests, add option to only return text and update tokenizer fast
      
      * fix wrong function call
      
      * update import and convert script
      
      * update integration tests + update repo id
      
      * correct paths and add first test
      
      * update how new attention masks are computed
      
      * update tests
      
      * take first care of batching in vocoder code
      
      * add batching with the vocoder
      
      * add waveform lengths to model outputs
      
      * make style
      
      * add generate kwargs + forward kwargs of M4TModel
      
      * add docstrings forward methods
      
      * reformate docstrings
      
      * add docstrings t2u model
      
      * add another round of modeling docstrings + reformate speaker_id -> spkr_id
      
      * make style
      
      * fix check_repo
      
      * make style
      
      * add seamlessm4t to toctree
      
      * correct check_config_attributes
      
      * write config docstrings + some modifs
      
      * make style
      
      * add docstrings tokenizer
      
      * add docstrings to processor, fe and tokenizers
      
      * make style
      
      * write first version of model docs
      
      * fix FE + correct FE test
      
      * fix tokenizer + add correct integration tests
      
      * fix most tokenization tests
      
      * make style
      
      * correct most processor test
      
      * add generation tests and fix num_return_sequences > 1
      
      * correct integration tests -still one left
      
      * make style
      
      * correct position embedding
      
      * change numbeams to 1
      
      * refactor some modeling code and correct one test
      
      * make style
      
      * correct typo
      
      * refactor intermediate fnn
      
      * refactor feedforward conformer
      
      * make style
      
      * remove comments
      
      * make style
      
      * fix tokenizer tests
      
      * make style
      
      * correct processor tests
      
      * make style
      
      * correct S2TT integration
      
      * Apply suggestions from Sanchit code review
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      
      * correct typo
      
      * replace torch.nn->nn + make style
      
      * change Output naming (waveforms -> waveform) and ordering
      
      * nit renaming and formating
      
      * remove return None when not necessary
      
      * refactor SeamlessM4TConformerFeedForward
      
      * nit typo
      
      * remove almost copied from comments
      
      * add a copied from comment and remove an unecessary dropout
      
      * remove inputs_embeds from speechencoder
      
      * remove backward compatibiliy function
      
      * reformate class docstrings for a few components
      
      * remove unecessary methods
      
      * split over 2 lines smthg hard to read
      
      * make style
      
      * replace two steps offset by one step as suggested
      
      * nice typo
      
      * move warnings
      
      * remove useless lines from processor
      
      * make generation non-standard test more robusts
      
      * remove torch.inference_mode from tests
      
      * split integration tests
      
      * enrich md
      
      * rename control_symbol_vocoder_offset->vocoder_offset
      
      * clean convert file
      
      * remove tgt_lang and src_lang from FE
      
      * change generate docstring of ToText models
      
      * update generate docstring of tospeech models
      
      * unify how to deal withtext_decoder_input_ids
      
      * add default spkr_id
      
      * unify tgt_lang for t2u_model
      
      * simplify tgt_lang verification
      
      * remove a todo
      
      * change config docstring
      
      * make style
      
      * simplify t2u_tgt_lang_id
      
      * make style
      
      * enrich/correct comments
      
      * enrich .md
      
      * correct typo in docstrings
      
      * add torchaudio dependency
      
      * update tokenizer
      
      * make style and fix copies
      
      * modify SeamlessM4TConverter with new tokenizer behaviour
      
      * make style
      
      * correct small typo docs
      
      * fix import
      
      * update docs and add requirement to tests
      
      * add convert_fairseq2_to_hf in utils/not_doctested.txt
      
      * update FE
      
      * fix imports and make style
      
      * remove torchaudio in FE test
      
      * add seamless_m4t.md to utils/not_doctested.txt
      
      * nits and change the way docstring dataset is loaded
      
      * move checkpoints from ylacombe/ to facebook/ orga
      
      * refactor warning/error to be in the 119 line width limit
      
      * round overly precised floats
      
      * add stereo audio behaviour
      
      * refactor .md and make style
      
      * enrich docs with more precised architecture description
      
      * readd undocumented models
      
      * make fix-copies
      
      * apply some suggestions
      
      * Apply suggestions from code review
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      
      * correct bug from previous commit
      
      * refactor a parameter allowing to clean the code + some small nits
      
      * clean tokenizer
      
      * make style and fix
      
      * make style
      
      * clean tokenizers arguments
      
      * add precisions for some tests
      
      * move docs from not_tested to slow
      
      * modify tokenizer according to last comments
      
      * add copied from statements in tests
      
      * correct convert script
      
      * correct parameter docstring style
      
      * correct tokenization
      
      * correct multi gpus
      
      * make style
      
      * clean modeling code
      
      * make style
      
      * add copied from statements
      
      * add copied statements
      
      * add support with ASR pipeline
      
      * remove file added inadvertently
      
      * fix docstrings seamlessM4TModel
      
      * add seamlessM4TConfig to OBJECTS_TO_IGNORE due of unconventional markdown
      
      * add seamlessm4t to assisted generation ignored models
      
      ---------
      Co-authored-by: default avatarSanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      cb45f71c
    • Omar Sanseviero's avatar
      Nits in Llama2 docstring (#26996) · d33d3131
      Omar Sanseviero authored
      Update llama2.md
      d33d3131
  13. 19 Oct, 2023 2 commits
  14. 18 Oct, 2023 1 commit
    • Pablo Montalvo's avatar
      Add fuyu model (#26911) · caa0ff0b
      Pablo Montalvo authored
      
      
      * initial commit
      
      * add processor, add fuyu naming
      
      * add draft processor
      
      * fix processor
      
      * remove dropout to fix loading of weights
      
      * add image processing fixes from Pedro
      
      * fix
      
      * fix processor
      
      * add basic processing fuyu test
      
      * add documentation and TODO
      
      * address comments, add tests, add doc
      
      * replace assert with torch asserts
      
      * add Mixins and fix tests
      
      * clean imports
      
      * add model tester, clean imports
      
      * fix embedding test
      
      * add updated tests from pre-release model
      
      * Processor: return input_ids used for inference
      
      * separate processing and model tests
      
      * relax test tolerance for embeddings
      
      * add test for logit comparison
      
      * make sure fuyu image processor is imported in the init
      
      * fix formattingh
      
      * more formatting issues
      
      * and more
      
      * fixups
      
      * remove some stuff
      
      * nits
      
      * update init
      
      * remove the fuyu file
      
      * Update integration test with release model
      
      * Update conversion script.
      
      The projection is not used, as confirmed by the authors.
      
      * improve geenration
      
      * Remove duplicate function
      
      * Trickle down patches to model call
      
      * processing fuyu updates
      
      * remove things
      
      * fix prepare_inputs_for_generation to fix generate()
      
      * remove model_input
      
      * update
      
      * add generation tests
      
      * nits
      
      * draft leverage automodel and autoconfig
      
      * nits
      
      * fix dtype patch
      
      * address comments, update READMEs and doc, include tests
      
      * add working processing test, remove refs to subsequences
      
      * add tests, remove Sequence classification
      
      * processing
      
      * update
      
      * update the conversion script
      
      * more processing cleanup
      
      * safe import
      
      * take out ModelTesterMixin for early release
      
      * more cl;eanup
      
      * more cleanup
      
      * more cleanup
      
      * and more
      
      * register a buffer
      
      * nits
      
      * add postprocessing of generate output
      
      * nits
      
      * updates
      
      * add one working test
      
      * fix test
      
      * make fixup works
      
      * fixup
      
      * Arthur's updates
      
      * nits
      
      * update
      
      * update
      
      * fix processor
      
      * update tests
      
      * passe more fixups
      
      * fix
      
      * nits
      
      * don't import torch
      
      * skip fuyu config for now
      
      * fixup done
      
      * fixup
      
      * update
      
      * oups
      
      * nits
      
      * Use input embeddings
      
      * no buffer
      
      * update
      
      * styling processing fuyu
      
      * fix test
      
      * update licence
      
      * protect torch import
      
      * fixup and update not doctested
      
      * kwargs should be passed
      
      * udpates
      
      * update the impofixuprts in the test
      
      * protect import
      
      * protecting imports
      
      * protect imports in type checking
      
      * add testing decorators
      
      * protect top level import structure
      
      * fix typo
      
      * fix check init
      
      * move requires_backend to functions
      
      * Imports
      
      * Protect types
      
      ---------
      Co-authored-by: default avatarPedro Cuenca <pedro@huggingface.co>
      Co-authored-by: default avatarArthurZucker <arthur.zucker@gmail.com>
      Co-authored-by: default avatarArthur <48595927+ArthurZucker@users.noreply.github.com>
      Co-authored-by: default avatarLysandre <lysandre@huggingface.co>
      caa0ff0b
  15. 17 Oct, 2023 2 commits
  16. 16 Oct, 2023 1 commit
  17. 13 Oct, 2023 2 commits
  18. 04 Oct, 2023 1 commit
  19. 03 Oct, 2023 2 commits
  20. 02 Oct, 2023 1 commit
  21. 27 Sep, 2023 1 commit
  22. 26 Sep, 2023 2 commits
    • NielsRogge's avatar
      [ViTMatte] Add resources (#26317) · a09130fe
      NielsRogge authored
      Add resource
      a09130fe
    • NielsRogge's avatar
      Add Nougat (#25942) · ace74d16
      NielsRogge authored
      
      
      * Add conversion script
      
      * Add NougatImageProcessor
      
      * Add crop margin
      
      * More improvements
      
      * Add docs, READMEs
      
      * Remove print statements
      
      * Include model_max_length
      
      * Add NougatTokenizerFast
      
      * Fix imports
      
      * Improve postprocessing
      
      * Improve image processor
      
      * Fix image processor
      
      * Improve normalize method
      
      * More improvements
      
      * More improvements
      
      * Add processor, improve docs
      
      * Simplify fast tokenizer
      
      * Remove test file
      
      * Fix docstrings
      
      * Use NougatProcessor in conversion script
      
      * Add is_levensthein_available
      
      * Add tokenizer tests
      
      * More improvements
      
      * Use numpy instead of opencv
      
      * Add is_cv2_available
      
      * Fix cv2_available
      
      * Add is_nltk_available
      
      * Add image processor tests, improve crop_margin
      
      * Add integration tests
      
      * Improve integration test
      
      * Use do_rescale instead of hacks, thanks Amy
      
      * Remove random_padding
      
      * Address comments
      
      * Address more comments
      
      * Add import
      
      * Address more comments
      
      * Address more comments
      
      * Address comment
      
      * Address comment
      
      * Set max_model_input_sizes
      
      * Add tests
      
      * Add requires_backends
      
      * Add Nougat to exotic tests
      
      * Use to_pil_image
      
      * Address comment regarding nltk
      
      * Add NLTK
      
      * Improve variable names, integration test
      
      * Add test
      
      * refactor, document, and test regexes
      
      * remove named capture groups, add comments
      
      * format
      
      * add non-markdown fixed tokenization
      
      * format
      
      * correct flakyness of args parse
      
      * add regex comments
      
      * test functionalities for crop_image, align long axis and expected output
      
      * add regex tests
      
      * remove cv2 dependency
      
      * test crop_margin equality between cv2 and python
      
      * refactor table regexes to markdown
      
      add newline
      
      * change print to log, improve doc
      
      * fix high count tables correction
      
      * address PR comments: naming, linting, asserts
      
      * Address comments
      
      * Add copied from
      
      * Update conversion script
      
      * Update conversion script to convert both small and base versions
      
      * Add inference example
      
      * Add more info
      
      * Fix style
      
      * Add require annotators to test
      
      * Define all keyword arguments explicitly
      
      * Move cv2 annotator
      
      * Add tokenizer init method
      
      * Transfer checkpoints
      
      * Add reference to Donut
      
      * Address comments
      
      * Skip test
      
      * Remove cv2 method
      
      * Add copied from statements
      
      * Use cached_property
      
      * Fix docstring
      
      * Add file to not doctested
      
      ---------
      Co-authored-by: default avatarPablo Montalvo <pablo.montalvo.leroux@gmail.com>
      ace74d16
  23. 22 Sep, 2023 1 commit
  24. 19 Sep, 2023 1 commit
    • NielsRogge's avatar
      Add ViTMatte (#25843) · 7d6354e0
      NielsRogge authored
      * First draft
      
      * Simplify image processor
      
      * Fix rebase
      
      * Address comments
      
      * Address more comments
      
      * Address more comments
      
      * Address more comments
      
      * Address more comments
      
      * Improve pad_image
      
      * Add tests
      
      * Update integration test
      
      * Fix image processor tests
      
      * Fix model tests
      
      * Convert checkpoints
      
      * Fix doc tests
      
      * Remove file
      
      * Apply suggestions
      
      * Address comments
      
      * Fix typing hint
      
      * Add batch_norm_eps
      
      * Address comments
      
      * Fix style
      7d6354e0