* Implement head_mask for Flax BERT and other models copied from BERT
* Remove `from jax._src.nn.functions import sigmoid`
Remove `from jax._src.nn.functions import sigmoid` unintentionally added by IDE
* Remove no more valid copy statement
* Apply patil-suraj's suggestions from code review
* Apply suggestions from the code review
* Update Flax template
* Fix a typo
* Also update template for CausalLM modules
* PoC for conserving old links
* Do the same for other links
* remap the redirects section
* add instructions on how to move sections
* improve
Co-authored-by: Stas Bekman <stas@stason.org>
* Initial commit for Keras model cards
* Revert accidental change
* make style
* make style
* make style
* Fix PR comments
* Move repo creation to __init__
* Fixes to README.md creation
* Partial progress for proper card creation on `push_to_hub`
* Proper card creation from `push_to_hub` plus fixes for malformed model cards
* Fixes for model card creation outside the callback
* Adding a model card creation test
* Putting the model card creation test in the right file.
Good job, Matt.
* make style
* Fix model card test temp dir usage
* Fix model card creation when no optimizer present
* Fixes for when training history not present
* Fix accidental edit to test_modeling_common
* Adding support for multiple mask tokens.
- Original implem: https://github.com/huggingface/transformers/pull/10222
Co-authored-by: njafer <naveen.jafer@oracle.com>
* In order to accomodate optionally multimodal models like Perceiver
we add information to the tasks to specify tasks where we know for sure
if we need the tokenizer/feature_extractor or not.
* Adding info in the documentation about multi masks.
+ marked as experimental.
* Add a copy() to prevent overriding the same tensor over and over.
* Fixup.
* Adding small test for multi mask with real values..
Co-authored-by: njafer <naveen.jafer@oracle.com>
* Adding some slow test to check for perceiver at least from a high level.
* Re-enabling fast tests for Perceiver ImageClassification.
* Perceiver might try to run without Tokenizer (Fast doesn't exist) and
with FeatureExtractor some text only pipelines.
* Oops.
* Adding a comment for `update_config_with_model_class`.
* Remove `model_architecture` to get `tiny_config`.
* Finalize rebase.
* Smarter way to handle undefined FastTokenizer.
* Remove old code.
* Addressing some nits.
* Don't instantiate `None`.
* Fix doc examples: cannot import name
* remove copy because of some necessary minor changes (maybe add copy to the individual methods instead)
* Keep copy with some modifications
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
- Do not run image-classification pipeline (_CHECKPOINT_FOR_DOC uses the checkpoint for
langage, which cannot load a FeatureExtractor so current logic fails).
- Add a safeguard to not run tests when `tokenizer_class` or
`feature_extractor_class` **are** defined, but cannot be loaded
This happens for Perceiver for the "FastTokenizer" (which doesn't exist
so None) and FeatureExtractor (which does exist but cannot be loaded
because the checkpoint doesn't define one which is reasonable for the
said checkpoint)
- Added `get_vocab` function to `PerceiverTokenizer` since it is used by
`fill-mask` pipeline when the argument `targets` is used to narrow a
subset of possible values.
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>