Joao Gante
4fd89e4978
Generate: delete unused TF _reorder_cache
( #20964 )
2023-01-03 10:54:56 +00:00
ivanllt
a3e8d3cb1c
Fix T5 docstring ( #20957 )
...
Fix start_docstring for deparallelize method
2023-01-03 05:53:33 -05:00
Joao Gante
588faad106
Generate: TF XLA beam sample ( #20927 )
...
* beam sample in beam search
* rag now works with the updated beam search
* delete legacy (non-XLA) generation code related to beam sample
2023-01-02 10:25:44 +00:00
Hao Wang
375801d5e6
update pyknp to rhoknp ( #20890 )
...
* update pyknp to rhoknp
* fix linter
* fix linter
* fix linter
* fix linter
* fix linter
* support rhoknp==1.1.0, fix testcase
2022-12-31 01:22:26 -05:00
bofeng huang
092d4d49dd
Add generate kwargs to AutomaticSpeechRecognitionPipeline
( #20952 )
...
* Add generate kwargs to AutomaticSpeechRecognitionPipeline
* Add test for generation kwargs
2022-12-31 01:13:39 -05:00
bofeng huang
47c9b22d08
Add generate kwargs to AutomaticSpeechRecognitionPipeline
( #20952 )
...
* Add generate kwargs to AutomaticSpeechRecognitionPipeline
* Add test for generation kwargs
2022-12-31 01:13:28 -05:00
Stas Bekman
9e6da0a7ed
[trainer: distributed_concat
] ensure all_gather
's inputs are contiguous ( #20951 )
...
[trainer: distributed_concat] ensure all_gather's input are contiguous
2022-12-30 21:55:12 -08:00
Samuel Xu
17292440c0
Fixing DistilBert error message ( #20945 )
...
Fixing error message
2022-12-30 03:44:09 -05:00
bofeng huang
881fa716c8
Fix error message in WhisperFeatureExtractor
( #20936 )
...
* Fix error message
* Fix code quality
2022-12-30 02:37:37 -05:00
Matthew McDermott
491a33d138
Adds type checking to PreTrainedConfig. ( #20926 )
2022-12-30 02:35:01 -05:00
ivanllt
8637316e5e
Remove Bert tokenizer dependency from DistillBert (slow/fast) tokenizers ( #20933 )
2022-12-29 02:36:27 -05:00
bofeng huang
fe65657de1
Fix FP16 inference in TextGenerationPipeline ( #20913 )
...
* add torch_dtype attribute to Pipeline
* Use torch_dtype to cast input tensor type in AutomaticSpeechRecognitionPipeline
* Fix code quality
* Add TextGenerationPipeline fp16 test
* Fix code quality
* Remove useless require in tests
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
2022-12-29 02:19:25 -05:00
Harsh Trivedi
11c49ed23b
Load the state dict on CPU to prevent unnecessary GPU memory surge ( #20920 )
...
load the state dict on cpu.
2022-12-29 02:18:03 -05:00
Alex Hedges
0b686a8a1e
Remove non-breaking spaces ( #20929 )
...
* Remove non-breaking space in comment
It was likely added unintionally.
* Remove remaining non-breaking spaces
2022-12-29 02:12:40 -05:00
Joao Gante
bbcd961897
Generate: correctly detect default max length ( #20911 )
...
correctly detect default max length
2022-12-28 10:05:25 +00:00
Akshaya Annavajhala
5f9b2ce0ea
Avoid collisions in writing metrics via 2 APIs - azureml + mlflow ( #20837 )
...
* Avoid collisions in writing metrics via 2 APIs - azureml + mlflow
MLflow tracking API is enabled by default in AzureML and HF MLflow integration is more fully featured. I'd remove the AzureML integration but leaving the current behavior for backwards compatibility (though it should really be removed)
* Trigger CI
2022-12-28 02:24:54 -05:00
Yih-Dar
5fa0b17c3d
[Past CI] 🔥 Leave Past CI failures in the past 🔥 ( #20861 )
...
* torch.jit._state
* Fix past CI
* Fix for perceiver
* Fix REALM
* Fix for Bloom
* Fix for SwinMode
* Fix for TrajectoryTransformerModel
* Fix for test_wav2vec2_with_lm
* make style
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-27 18:37:25 +01:00
Eli Simhayev
e35bc46af6
fix docs typos in "add_new_model" ( #20900 )
...
fix Jupyter typos
2022-12-27 02:49:15 -05:00
Kamal Raj Kanakarajan
d1b3011292
Update flan-t5 original model link ( #20897 )
...
Update flan-t5.mdx
2022-12-27 02:26:14 -05:00
Younes Belkada
accad48e5b
[ T5
] fix fp16 loading issue ( #20878 )
...
* fix fp16 loading issue
* add backward compatibility
* better refactor
* better readability
- remove `force_upcast_dtype` as it is used once
- use `inspect`
- add `TODO`
2022-12-26 10:01:03 +01:00
Nathan Barry
47146721b8
typo fix ( #20891 )
2022-12-26 02:06:23 -05:00
Márton Makrai
3830b3f74a
Fixes typo in the help text for --max_length ( #20883 )
2022-12-24 02:07:06 -05:00
Arthur
a081f292ca
[RobertaPreLayernom] Fixes the CI daily test ( #20886 )
...
get correct checkpoint
2022-12-23 19:55:17 +01:00
Younes Belkada
cab7799f7b
Add japanese translation of template ( #20870 )
...
* add japanese translation of template
* fix japanese translation
- fix special cases
- fix typos
- manually translate special cases
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2022-12-23 14:39:42 +01:00
Jasmijn Bastings
efed8a2794
Add script to convert T5X T5 (v1.0 and v1.1) checkpoints to PyTorch ( #20801 )
...
* Add script to convert T5X T5 (v1.0 and v1.1) checkpoints to PyTorch
* Remove unnecessary check and update docstring
* Format docstring
* Fix whitespace in docstring
2022-12-23 14:36:46 +01:00
Nicolas Patry
f7f0ec2f54
Adding support for fp16
for asr pipeline. ( #20864 )
...
* Supporting `fp16` for asr pipeline
* Adding test.
* Style.
* Oops.
* Flake8 update ?
* Fixing flake8 ?
* Revert "Flake8 update ?"
This reverts commit 0b917fcb52
.
* Style (acctidentally deleted flake8 F401.)
* Move to a bigger test (no small whisper model, and s2t doesn't seem to
accept torch_dtype=fp16).
Also we need to use a GPU to actually compute on fp16.
* Using BatchFeature capability.
2022-12-23 10:18:45 +01:00
Syed Abdul Gaffar Shakhadri
15bc776fec
Add Onnx Config for PoolFormer ( #20868 )
...
poolformer onnx
Co-authored-by: syed <syed.abdul@sandlogic.com>
2022-12-23 01:30:57 -05:00
Sourab Mangrulkar
4a4cd6cd02
having new model entries in Hindi for Hindi README ( #20869 )
2022-12-23 12:00:48 +05:30
Younes Belkada
52dd2b61bf
[MobileNet-v2
] Fix ONNX typo ( #20860 )
...
* fix typo `onnx`
* fix test
2022-12-22 18:52:54 +01:00
Younes Belkada
4d10ffd506
[FSMT
] Make it compatible with xxxForConditionalGeneration
models ( #20825 )
...
* add `get_encoder` and `get_decoder`
* add additional kwargs support
* fix condition
* add better checks
* better checks
* fix embed positions
* better test to consider padding
* fix debug statement
* Apply suggestions from code review
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* add arguments on docstring
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2022-12-22 11:11:19 +01:00
dhansmair
2222740f50
change strings to f-strings in image_processing_utils.py ( #20865 )
...
change strings to f-strings
2022-12-22 02:06:50 -05:00
Joao Gante
829e889418
Generate: post-generate config doctest fix ( #20804 )
...
* fix doctests
* revert unwanted change
2022-12-21 19:18:45 +00:00
Yih-Dar
39e620c134
Update HubertModelIntegrationTest.test_inference_keyword_spotting
( #20863 )
...
fix ci
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-21 18:40:14 +01:00
Arthur
4a433e321f
Add-warning-tokenizer ( #20826 )
...
* add fast not use warning
* update
2022-12-21 18:18:34 +01:00
Arthur
76d02feadb
Fix doctest ( #20843 )
...
* fix doc for generation, dinat, nat and prelayernorm
* style
* update
* fix cpies
* use auto config and auto tokenizer
Co-authored-by: sgugger <sylvain.gugger@gmail.com>
* als modify roberta and the depending models
Co-authored-by: sgugger <sylvain.gugger@gmail.com>
2022-12-21 16:34:31 +01:00
Mohit Sharma
aaa6296de2
Fix whisper export ( #20800 )
...
* fix_whisper_export
* update input
* update input
2022-12-21 16:28:42 +01:00
Yih-Dar
3090e70857
Fix past CI by skipping LevitModelTest.test_problem_types
( #20859 )
...
* Fix past CI
* Fix past CI
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-21 14:29:13 +01:00
Maria Khalusova
04c560225b
Adding evaluate
to the list of libraries required in generated notebooks ( #20850 )
...
Adding `evaluate` to the list of libraries to be installed for every generated notebook in transformers
2022-12-21 14:04:08 +01:00
İdil Sülo
0ae58204c6
Add visual prompt to processor of CLIPSeg model ( #20816 )
...
Adds visual_prompt argument to CLIPSegProcessor to enable image-guided segmentation
2022-12-21 15:23:45 +03:00
ValeKnappich
2da82bb4a7
fix past_key_values in GPTNeoXForCausalLM.prepare_inputs_for_generation ( #20621 )
...
* fix past_key_values in GPTNeoXForCausalLM.prepare_inputs_for_generation
* fix formatting
2022-12-21 11:46:04 +00:00
Yih-Dar
852e7ebaa2
Use config.num_channels
in CLIP-like modeling files ( #20857 )
...
Use config.num_channels in CLIP-like modeling files
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-21 11:51:23 +01:00
NielsRogge
d87e381f93
[Examples] Update big table ( #20845 )
...
Update big table
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MBP.localdomain>
2022-12-21 11:34:31 +01:00
NielsRogge
9efad4efed
[Swin2SR] Add doc tests ( #20829 )
...
* Fix doc tests
* Use Auto API
* Apply suggestion
* Revert "Apply suggestion"
This reverts commit cd9507a866
.
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MBP.localdomain>
2022-12-21 10:09:50 +01:00
Younes Belkada
0d284bd574
Add BLIP ( #20716 )
...
* add new model like
* add v1
* v1
* v1
* vision encoder logits match
* v2
* fix
* add docstring
* CI tests pass
* fix tests
* make fixup
* add to `toctree`
* fix processors
* fix processors
* fix doc
* fill title
* add content doc
* remove from tokenization auto
* fix config
* change order
* add `# Copied from`
* few fixes
- add correct license on modeling text
- remove dummy argument
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* replace name
* refactor a bit
* more refactor
* remove unused arg
* make fixup + remove some `# Adapted from ...`
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* more `# Copied from`
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* now `generate` supports no prefix
* remove `FeatureExtractor`
* fix path
* correct dependency
* fix tests
* few fixes
* add integration tests
* add correct conversion script
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* add `blip` to tokenization auto
* fix docstrings
* fix test + add image
* remove processor from uncorrect place
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* clean up a bit
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* clean pixel mask
* clean pixel mask
* fix `F`
* Update src/transformers/models/blip/modeling_blip.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fix output
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fix pad token id
* remove `token_type_ids`
* make fixup
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* make fixup
* Apply suggestions from code review
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* add comments
* Update src/transformers/models/blip/modeling_blip.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* remove `token_type_ids`
* make fixup
* better name
* replace with `image_attention_mask`
* refactor
* make fixup
* better docstring
* replace `answer_xx`
* remove ununsed args
* add `labels`
* add `labels`
* fix processing tests
* make fixup
* make fixup
* put correct repo
* remove `pad`
* remove `crop` and `center_crop`
* Update src/transformers/models/blip/image_processing_blip.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fix
* remove `size_divisor`
* fix weights `init`
* remove unneeded functions
* add suggestions
* minor changes
- change slow test output for PT 1.13
- docstring order
* replace `feature_extractor` by `image_processor`
* fix doctests
* fix weight init order + add fp16 slow test
* add `blip` to doctest
* add correct repo name and fix test
* Update src/transformers/models/blip/processing_blip.py
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* fix tests
* use `convert_to_rgb` from `image_transforms`
* make fixup
* fix large loading issue
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-12-21 09:39:10 +01:00
Steven Liu
3be028bc9d
Embed circle packing chart for model summary ( #20791 )
...
* embed circle packing chart
* trim whitespace from bottom
* explain bubble sizes
2022-12-20 10:26:52 -08:00
Sanchit Gandhi
bd1a43b699
[S2T, Whisper] Add copied from statements ( #20787 )
...
* [S2T, Whisper] Add copied from statements
* rebase and fix-copies
2022-12-20 18:13:56 +00:00
Steven Liu
5eecf3ff17
Clarify use_fast
parameter in docstring ( #20840 )
...
* clarify use_fast parameter
* make style
* remove check frameworks, apply review
2022-12-20 08:42:26 -08:00
NielsRogge
2875fa971c
[SegFormer] Add support for segmentation masks with one label ( #20279 )
...
* Add support for binary segmentation
* Fix loss calculation and add test
* Remove space
* use fstring
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MBP.localdomain>
2022-12-20 16:46:50 +01:00
Yih-Dar
2280880cb7
remove unused use_cache
in config classes ( #20844 )
...
remove unused use_cache in config classes
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2022-12-20 16:46:43 +01:00
Matt
d0bfdd20f4
TF AdamWeightDecay fix for 2.11 ( #20848 )
...
* Fix incorrect import for the base optimizer for AdamWeightDecay
* Fix incorrect import for the base optimizer for AdamWeightDecay
2022-12-20 13:40:45 +00:00