- 18 Nov, 2021 4 commits
-
-
NielsRogge authored
* First draft * More improvements * Improve conversion script * Fix init weights for layer norm * Fix correct model for conversion script * Don't tie input and output embeddings * Add print statements for debugging * Add print statements for debugging * Fix vocab size of model * Improve documentation, remove fast tokenizer * Add ImageGPTForImageClassification, improve docs * Fix docs issue * Set verbosity level back to info * Improve tests * Fix tests and add figure * Delete tokenizer file * Remove ImageGPTTokenizer from init files * Remove ImageGPTLayer from init files * Remove ImageGPT tokenizer from docs * First draft of ImageGPTFeatureExtractor * Fix typo * Fix bug * More improvements * Apply suggestions from code review, add tests for feature extractor * Fix layernorm * Update save_pretrained method * Fix issue * Make all tests of ImageGPTFeatureExtractor pass * Update code examples * Rename model inputs to pixel_values * Improve code examples * Update init_weights to post_init * Fix post_init
-
Sylvain Gugger authored
* Add a post init method to all models * Fix tests * Fix last tests * Fix templates * Add comment * Forgot to save
-
NielsRogge authored
-
William Held authored
-
- 17 Nov, 2021 6 commits
-
-
N authored
* test: make sure model configs are jsonifiable * fix: return python dict instead of config object * fix: accept pretrained config and use correct class * Re-enabling slow tests and applying them to core models only * Re-enabling slow tests and applying them to core models only * Add new test file to fetcher * Remove tooslow tests from test_modeling_tf_common.py * make style * Style fixes * Style fixes * Style fixes * Style fixes * Adding core tests to GPT2 and BART * Removing unused imports Co-authored-by:
niklas.fruehauf <niklas.fruehauf@sovanta.com> Co-authored-by:
matt <rocketknight1@gmail.com>
-
Patrick von Platen authored
-
Antonio Carlos Falc茫o Petri authored
Co-authored-by:Stas Bekman <stas@stason.org>
-
Lysandre authored
-
NielsRogge authored
* Improve tests * Improve documentation * Add ignore_index attribute * Add semantic_ignore_index to BEiT model * Add segmentation maps argument to BEiTFeatureExtractor * Simplify SegformerFeatureExtractor and corresponding tests * Improve tests * Apply suggestions from code review * Minor docs improvements * Streamline segmentation map tests of SegFormer and BEiT * Improve reduce_labels docs and test * Fix code quality * Fix code quality again
-
Patrick von Platen authored
* add new wav2vec2 translation * correct * up * add tests * correct end copy * correct more * up * correct unispeech sat * finish * finalize * finish * up
-
- 16 Nov, 2021 5 commits
-
-
Sylvain Gugger authored
* Create branch for tests * Pin first upgrade * Really pin * Polish fix
-
Lysandre authored
-
Valentin authored
* stop training when a finite IterableDataset is exhausted when using an iterable dataset num_epochs is set to sys.maxsize to make sure all data is consumed likewise we want to set max_steps high enough but still stop when all data is consumed (cherry picked from commit 6f0e1d6363153da9051e93acffe1cbab3a3f3b12) * fix typo flase -> false * add test for stopping training on exhausted finite iterable dataset * remove redundant gradient_accumulation_steps * run make style reformat training_args docstring
-
Sylvain Gugger authored
* Add forward method to dummy models * Fix quality
-
Sylvain Gugger authored
* Fix gradient_checkpointing backward compatibility * Remove needless line * make sure mask prob is big enough and length small enough * Fix tests Co-authored-by:patrickvonplaten <patrick.v.platen@gmail.com>
-
- 15 Nov, 2021 8 commits
-
-
Lysandre Debut authored
* Allow per-version configurations * Update tests/test_configuration_common.py Co-authored-by:
Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Update tests/test_configuration_common.py Co-authored-by:
Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by:
Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
-
Patrick von Platen authored
* [Wav2Vec2] Make sure that gradient checkpointing is only run if needed * make fix-copies
-
Eldar Kurtic authored
Running Movement pruning experiments with the newest HuggingFace would crash due to non-existing BertLayerNorm.
-
Yih-Dar authored
Co-authored-by:ydshieh <ydshieh@users.noreply.github.com>
-
NielsRogge authored
-
Patrick von Platen authored
* [Speech2Text2] Enable tokenizers * minor fix * Apply suggestions from code review Co-authored-by:
Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by:
Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
-
Matt authored
-
Stas Bekman authored
* [doc] performance and parallelism doc update * improve * improve
-
- 14 Nov, 2021 1 commit
-
-
nbertagnolli authored
* Raise exceptions instead of using asserts for control flow in modeling_openai #12789 * reformatted file
-
- 13 Nov, 2021 2 commits
-
-
Suraj Patil authored
* add return_tensors paramter * fix test * Apply suggestions from code review Co-authored-by:
Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * style Co-authored-by:
Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
-
Suraj Patil authored
-
- 12 Nov, 2021 4 commits
-
-
Li-Huai (Allan) Lin authored
* Add normalizer to FNetConverter * Style * Directly use AlbertConverter
-
Patrick von Platen authored
* improve some stuff * finish * correct last
-
Suraj Patil authored
-
Nicolas Patry authored
* Adding support for raw python `generator` in addition to `Dataset` The main goal is to ease the create of streaming data to the pipe. `Dataset` is more involved and pytorch specific. This PR, provides a way to use a python iterator too. This enabled #14250 but can be proposed as a standalone PR. ```python from transformers import pipeline def read_data(filename): with open(filename, 'r') as f: for line in f: yield f pipe = pipeline("text-classification") for classified in pipe(read_data("large_file.txt")): print("Success ! ", classified) ``` The main caveat of this, is the interaction with `DataLoader` with `num_workers>1`. When you have multiple workers, each receive a copy of the generator (like `IterableDataset`). That means the naive Iterator will fail since all workers iterate on all items of the generator. There are ways to do clever "skipping", but it could be bad still because all workers still do have to pass through all items of the generator (they just ignore items they don't handle), depending on the case it might be bad. Using `num_workers=1` is the simplest fix and if the cost of loading your data is small enough should be good enough. In the above example trying to do smart tricks to skip some lines is unlikely to be a net positive for instance. If there are better ways to do "jumps" on some data, then using `Dataset` is more advised (since then differents workers can just jump themselves). * Adding iterator support for `tf` too.
-
- 11 Nov, 2021 7 commits
-
-
Stas Bekman authored
-
Suraj Patil authored
* fix loading flax bf16 weights in pt * fix clip test * fix t5 test * add logging statement * Update src/transformers/modeling_flax_pytorch_utils.py Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * switch back to native any * fix check for bf16 weights Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com>
-
Matt authored
* Fixing requirements for TF LM models and use correct model mappings * make style
-
Matt authored
* Experimenting with adding proper get_config() and from_config() methods * Adding a test for get/from config * Fix test for get/from config
-
Suraj Patil authored
-
Suraj Patil authored
* fix inits * fix embed dtype * fix embed dtype * add test to check default dtype * quality * add type conversion methods for flax models * more robust casting * cast sinusoidal positions * update pegasus * update albert * update test * make sure dtype is passed to every module * style * fix electra dense * fix t5 * quality * add more tests * better name * use the dtype for lm head computation * fix albert * style * fix albert embed dtype * more tests * fix vision enc-dec * cleanup * fix embed dtype pegasus * fix default param test * doc * update template * fix final_logits_bias dtype * Apply suggestions from code review Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com> * fix doc * fix doc * add detailed docstring for dtype parameter * remove un-necessary import Co-authored-by:
Patrick von Platen <patrick.v.platen@gmail.com>
-
Stas Bekman authored
-
- 10 Nov, 2021 3 commits
-
-
Li-Huai (Allan) Lin authored
* Fix index out of range when padding * Apply suggestions from code review * Style
-
Chang Wang authored
-
Ella Charlaix authored
* Add notebook applying Intel Neural Compressor quantization for text classification tasks * Add Optimum notebooks section
-