Josh
754f61ca05
Update RayTune doc link for Hyperparameter tuning ( #24422 )
...
Update outdated hyperlink hpo_train.md
Link to RayTune search space API docs was outdated - have provided correct new link for docs.
Co-authored-by: Joshua Samuel <66880119+Joshsamuel101@users.noreply.github.com>
2023-06-22 10:38:01 -04:00
Yih-Dar
8f2ef52fb6
Fix save_cache
version in config.yml
( #24419 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-22 16:18:16 +02:00
Younes Belkada
3ce3385c47
Revert "Fix gradient checkpointing + fp16 autocast for most models" ( #24420 )
...
Revert "Fix gradient checkpointing + fp16 autocast for most models (#24247 )"
This reverts commit 285a48011d
.
2023-06-22 16:11:27 +02:00
Younes Belkada
ebb62e8880
[bnb
] Fix bnb serialization issue with new release ( #24416 )
...
* fix bnb issue
* fixup
* revert and do simple patching instead
* add more details
2023-06-22 15:40:38 +02:00
Yih-Dar
652ece0710
Skip test_conditional_generation_pt_pix2struct
in Past CI (torch < 1.11) ( #24417 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-22 15:34:13 +02:00
Matt
22fe73c378
TF safetensors reduced mem usage ( #24404 )
...
* Slight comment cleanup
* Reduce peak mem usage when loading TF-format safetensor weights
* Tweak the PyTorch loading code to support lazy loading from safetensors
* Pass safe_open objects to the PyTorch loading function
* Do GPU transposes for speed
* One more tweak to reduce peak usage further
* One-line hasattr
* Fix bug when there's a shape mismatch
* Rename state_dict in the loading code to be clearer
* Use TF format everywhere for consistency
2023-06-22 14:06:16 +01:00
Sanchit Gandhi
7e03e46934
[ASR pipeline] Check for torchaudio ( #23953 )
...
* [ASR pipeline] Check for torchaudio
* add pip instructions
Co-authored-by: Sylvain Gugger <sylvain.gugger@gmail.com>
---------
Co-authored-by: Sylvain Gugger <sylvain.gugger@gmail.com>
2023-06-22 13:48:49 +01:00
Yih-Dar
6ce6d62b6f
Explicit arguments in from_pretrained
( #24306 )
...
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-21 19:24:11 +02:00
Zach Mueller
127e81c272
Remove redundant code from TrainingArgs ( #24401 )
...
Remove redundant code
2023-06-21 11:51:27 -04:00
Matthijs Hollemans
cd927a4736
add word-level timestamps to Whisper ( #23205 )
...
* let's go!
* initial implementation of token-level timestamps
* only return a single timestamp per token
* remove token probabilities
* fix return type
* fix doc comment
* strip special tokens
* rename
* revert to not stripping special tokens
* only support models that have alignment_heads
* add integration test
* consistently name it token-level timestamps
* small DTW tweak
* initial support for ASR pipeline
* fix pipeline doc comments
* resolve token timestamps in pipeline with chunking
* change warning when no final timestamp is found
* return word-level timestamps
* fixup
* fix bug that skipped final word in each chunk
* fix failing unit tests
* merge punctuations into the words
* also return word tokens
* also return token indices
* add (failing) unit test for combine_tokens_into_words
* make combine_tokens_into_words private
* restore OpenAI's punctuation rules
* add pipeline tests
* make requested changes
* PR review changes
* fix failing pipeline test
* small stuff from PR
* only return words and their timestamps, not segments
* move alignment_heads into generation config
* forgot to set alignment_heads in pipeline tests
* tiny comment fix
* grr
2023-06-21 17:48:21 +02:00
Yih-Dar
0f968ddaa3
Check auto mappings could be imported via from transformers
( #24400 )
...
* fix
* fix
* fix
* fix
* fix
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-21 17:31:57 +02:00
Zach Mueller
1a6fb930fb
Clean up dist import ( #24402 )
2023-06-21 11:19:42 -04:00
Younes Belkada
285a48011d
Fix gradient checkpointing + fp16 autocast for most models ( #24247 )
...
* fix gc bug
* continue PoC on OPT
* fixes
* 🤯
* fix tests
* remove pytest.mark
* fixup
* forward contrib credits from discussions
* forward contrib credits from discussions
* reverting changes on untouched files.
---------
Co-authored-by: zhaoqf123 <zhaoqf123@users.noreply.github.com>
Co-authored-by: 7eu7d7 <7eu7d7@users.noreply.github.com>
2023-06-21 17:04:59 +02:00
Meghan Cowan
1815d1865e
[Trainer] Fix optimizer step on PyTorch TPU ( #24389 )
...
* update optimizer step for tpu
* add comment
2023-06-21 07:24:41 -04:00
Bearnardd
4c6e429589
fix type annotation for debug arg ( #24033 )
...
* fix type annotation for debug arg
* fix TypeErorr
2023-06-21 11:42:21 +01:00
Yih-Dar
16c7b16a0a
byebye Hub connection timeout - Recast ( #24399 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-21 12:36:34 +02:00
Joao Gante
5f0801d174
Generate: add SequenceBiasLogitsProcessor ( #24334 )
2023-06-21 11:14:41 +01:00
Yih-Dar
45f71d793d
Add ffmpeg
for doc_test_job
on CircleCI ( #24397 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-21 11:12:38 +02:00
Steven Liu
ad78d9597b
[docs] Fix NLLB-MoE links ( #24388 )
...
fix broken links
2023-06-20 17:34:20 -07:00
Sergii Dymchenko
cb8f675510
Update deprecated torch.ger ( #24387 )
2023-06-20 20:21:13 -04:00
Sylvain Gugger
eb849f6604
Migrate doc files to Markdown. ( #24376 )
...
* Rename index.mdx to index.md
* With saved modifs
* Address review comment
* Treat all files
* .mdx -> .md
* Remove special char
* Update utils/tests_fetcher.py
Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
---------
Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
2023-06-20 18:07:47 -04:00
Patrick von Platen
b0513b013b
[Wav2Vec2 - MMS] Correct directly loading adapters weights ( #24335 )
...
* Correct direct lang loading
* correct more
* revert black
* Use tie weights instead=
* add tests
* add tests
* make style
2023-06-20 19:39:52 +02:00
Arthur
e5c760d636
[GPTNeoX] Nit in config ( #24349 )
...
* add raise value error for attention size
* nits to fix test_config
* style
2023-06-20 19:19:19 +02:00
Arthur
c2882403c4
[Whisper Docs] Nits ( #24367 )
...
* nits
* config doc did not match
* Apply suggestions from code review
Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
---------
Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
2023-06-20 19:18:52 +02:00
Yih-Dar
83dc5762e7
Skip a tapas (tokenization) test in past CI ( #24378 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-20 18:35:45 +02:00
Yih-Dar
297d769d0e
Better test name and enable pipeline test for pix2struct
( #24377 )
...
* best test name forever
* fix
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-20 18:29:30 +02:00
Aaron Pham
6950f70b38
style: add BitsAndBytesConfig __repr__ function ( #24331 )
...
* style: add repr to BitsAndBytesConfig
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
* chore: update pattern for __repr__
implement diff dict for __repr__ of BitsAndBytesConfig
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
---------
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
2023-06-20 12:26:08 -04:00
Arthur
7feba74400
[Tokenizer doc] Clarification about add_prefix_space
( #24368 )
...
* nits
* more details
* fixup
* Apply suggestions from code review
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2023-06-20 18:22:00 +02:00
Yih-Dar
0527c1c0ea
Add a check in ImageToTextPipeline._forward
( #24373 )
...
* fix
* fix
* fix
* Update src/transformers/pipelines/image_to_text.py
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
2023-06-20 18:07:34 +02:00
Sylvain Gugger
dc4449918d
Rename test to be more accurate ( #24374 )
2023-06-20 11:54:55 -04:00
Sylvain Gugger
a6b4d1ad83
Remove print statement
2023-06-20 11:14:29 -04:00
Sanchit Gandhi
6c1344444a
[Whisper] Make tests faster ( #24105 )
2023-06-20 16:01:56 +01:00
Sanchit Gandhi
f924df3c7e
[modelcard] add audio classification to task list ( #24363 )
2023-06-20 14:01:17 +01:00
Yih-Dar
c23d131eab
Update tiny models for pipeline testing. ( #24364 )
...
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-20 14:43:10 +02:00
Matt
56efbf4301
TensorFlow CI fixes ( #24360 )
...
* Fix saved_model_creation_extended
* Skip the BLIP model creation test for now
* Fix TF SAM test
* Fix longformer tests
* Fix Wav2Vec2
* Add a skip for XLNet
* make fixup
* make fix-copies
* Add comments
2023-06-20 12:59:21 +01:00
Llohann Dallagnol Speranca
183f442ba8
Fix resuming PeftModel checkpoints in Trainer ( #24274 )
...
* Fix resuming checkpoints for PeftModels
Fix an error occurred when resuming a PeftModel from a training checkpoint. That was caused since PeftModel.pre_trained saves only adapter-related data while _load_from_checkpoint was expecting a torch sved model. This PR fix this issue and allows the adapter checkpoint to be loaded.
Resolves : #24252
* fix last comment
* fix nits
---------
Co-authored-by: younesbelkada <younesbelkada@gmail.com>
2023-06-20 13:57:08 +02:00
Matt
0875b2509a
Allow passing kwargs through to TFBertTokenizer ( #24324 )
2023-06-20 12:49:06 +01:00
Denis Ismailaj
cfc838dd4d
Respect explicitly set framework parameter in pipeline ( #24322 )
...
* Respect framework parameter
* Move check to pipeline()
* Add check inside infer_framework_load_model again
2023-06-20 11:43:52 +01:00
Quentin Gallouédec
c5454eba9e
Fix the order in GPTNeo
's docstring ( #24358 )
...
* Fix arg sort in docstring
* further order fix
* make style
2023-06-19 18:59:35 +01:00
Ritesh Ghorse
20273ee214
[Doc Fix] Fix model name path in the transformers doc for AutoClasses ( #24329 )
...
fix model name path
Co-authored-by: Ritesh Ghorse <riteshghorse@Riteshs-Air.attlocal.net>
2023-06-19 17:26:55 +01:00
Aaron Pham
c003c8cb52
docs: add BentoML to awesome-transformers ( #24344 )
...
* docs: add BentoML to awesome-transformers
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
* chore: add the project to the bottom of the line
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
---------
Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
2023-06-19 12:17:30 -04:00
Gema Parreño
52c4276e44
Fix link to documentation in Install from Source ( #24336 )
...
Update __init__.py
Fix link to documentation to install Transformers from source
Probably the title changed at some point from 'Installing' to 'Install'
2023-06-19 17:12:55 +01:00
amyeroberts
7e71eb2ef7
Fix ImageGPT doctest ( #24353 )
...
Fix doctest
2023-06-19 15:23:29 +01:00
Yih-Dar
a4de24f691
Make AutoFormer
work with previous torch version ( #24357 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-19 16:02:06 +02:00
Vineel Pratap
7761b1893a
Update MMS integration docs ( #24311 )
...
* Update mms.mdx
* Update mms.mdx
* Update docs/source/en/model_doc/mms.mdx
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
* Update mms.mdx
* Update docs/source/en/model_doc/mms.mdx
Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
---------
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
2023-06-19 14:49:01 +01:00
Yih-Dar
5fca839fef
Fix device issue in SwitchTransformers
( #24352 )
...
* fix
* Update src/transformers/models/switch_transformers/modeling_switch_transformers.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2023-06-19 15:06:05 +02:00
Matěj Kripner
3b5a56e595
Fix KerasMetricCallback
: pass generate_kwargs
even if use_xla_generation
is False ( #24333 )
...
* Fix `KerasMetricCallback`: always pass `generate_kwargs`.
* Reformat code using Black.
2023-06-19 12:51:25 +01:00
Yih-Dar
0b259a3b7e
Clean up disk sapce during docker image build for transformers-pytorch-gpu
( #24346 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-19 12:54:02 +02:00
Yih-Dar
691b60db90
byebye Hub connection timeout ( #24350 )
...
byebye timeout
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-19 12:50:20 +02:00
Yih-Dar
17e3e7d686
pin apex
to a speicifc commit (for DeepSpeed CI docker image) ( #24351 )
...
* fix
* fix
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-06-19 12:48:53 +02:00