Sayak Paul
263fd3c4c7
add: task guide on video classification model fine-tuning. ( #20827 )
...
* add: task guide on video classification model fine-tuning.
* apply make style from hf-formatting.
* add: toc entry.
* chore: address PR comments.
Co-authored-by Maria Khalusova
* Reflect Maria's contributions.
Co-authored-by: Maria Khalusova <1065417+MKhalusova@users.noreply.github.com>
* chore: minor correction.
* Apply suggestions from code review
Co-authored-by: Nathan Raw <nxr9266@g.rit.edu>
* PyTorch Video -> PyTorchVideo.
* Apply suggestions from code review
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* change licensing year.
* minor rewording.
* apply make style.
* address Sylvain's comments.
* replace links.
Co-authored-by: Maria Khalusova <1065417+MKhalusova@users.noreply.github.com>
Co-authored-by: Nathan Raw <nxr9266@g.rit.edu>
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2023-01-05 00:43:40 +05:30
Steven Liu
d53f329d88
Update PR template ( #21006 )
...
add maria to pr template
2023-01-04 11:01:52 -08:00
Sylvain Gugger
7804177af9
Fix repo consistency
2023-01-04 14:00:45 -05:00
Sujay
15e17c99f9
Remove T5 dependency from mT5 model ( #20949 )
...
make mt5 independent from t5
2023-01-04 13:51:54 -05:00
Steven Liu
9dcc881fa6
Update bug report template ( #21004 )
...
add maria to bug report
2023-01-04 10:33:15 -08:00
Joao Gante
a6c850e4f4
Generate: TF uses GenerationConfig
as the basis for .generate()
parametrization ( #20994 )
2023-01-04 18:23:20 +00:00
milyiyo
3b309818e7
Refactor the function get_results ( #20999 )
2023-01-04 12:05:36 -05:00
İdil Sülo
926452298d
Fix model hub link ( #20998 )
2023-01-04 12:04:33 -05:00
amyeroberts
56397471b4
Don't call deprecated method ( #20904 )
2023-01-04 16:59:11 +00:00
Alara Dirik
52c9e6af29
Fix bug in segmentation postprocessing ( #20198 )
...
* Fix post_process_instance_segmentation
* Add test for label fusing
2023-01-04 18:34:58 +03:00
amyeroberts
292acd71d6
Update image processor parameters if creating with kwargs ( #20866 )
...
* Update parameters if creating with kwargs
* Shallow copy to prevent mutating input
* Pass all args in constructor dict - warnings in init
* Fix typo
2023-01-04 14:29:48 +00:00
JeongYeon Nam
f9e977be70
auxiliary_loss works for Deformable Detr ( #20959 )
...
fix: auxiliary_loss works
Co-authored-by: Jeongyeon Nam <jy.nam@navercorp.com>
2023-01-04 09:01:08 -05:00
Maria Khalusova
b493fee958
Add: doc page for the object detection task ( #20925 )
...
* Added Object Detection task guide (new branch)
* Polished code examples after running make style
* Update docs/source/en/tasks/object_detection.mdx
Rephrasing suggestion from Sayak
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* Update docs/source/en/tasks/object_detection.mdx
A rephrasing suggestion from Sayak
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* Update docs/source/en/tasks/object_detection.mdx
typo
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Applied reviewers suggestions
>
>
Co-authored-by: sayakpaul <spsayakpaul@gmail.com>
Co-authored-by: sgugger <sylvain.gugger@gmail.com>
* polished code examples
* Added a visualization of the inference result. Slightly changed hyperparameters, and updated the results.
* polished code examples
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Update docs/source/en/tasks/object_detection.mdx
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* Applying Steven's review suggestions
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
* minor punctuation fix
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2023-01-04 08:36:37 -05:00
Arthur
d7b66d9b44
update template ( #20885 )
...
* update template
* replace redme entries
* make style
2023-01-04 10:15:45 +01:00
Jongjyh
ce85686a1f
Add AltCLIP ( #20446 )
...
* add altclip
* update
* fix wrong title
* fix the copyright in readme
* add altclip model
* add altclip
* fix test_gradient_checkpointing_enable_disable
* code
* add return class
* add projection_state
* "fix pretrained model bug"
* delete print and fix 2 test instances.
* delete token
* rm xlmr
* one model one file.
* empty commit to trigger CI
* Fix modeling_outputs.py
* Fix __init__
* Fix quality
* Fix modeling file docstring
* Fix README.md
* Fix test file
* add vision model
* empty commit to trigger CI
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* del token in mdx file
* fix
* fix
* fix
* remove altrob from test list
* add vision test
* fix fx
* fix
* fix
* fix
* trigger CI
* fix copies
* fix tests
* fix style
* fix quality
* update
* recover import
* recover
* add ,
* recover
* fix copies
* trigger CI
* fix
* some of review
* update
* remove import
* last 2
* fix
* fix style
* fix style
* fix bug
* fix uncomment
* fix
* update
* fix
* second review
* empty commit to trigger CI
* empty commit to trigger CI
* fix position
* fix
* empty commit to trigger CI
* empty commit to trigger CI
* third comment
* Update docs/source/en/model_doc/altclip.mdx
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* Update docs/source/en/model_doc/altclip.mdx
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* Update src/transformers/__init__.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* Update src/transformers/models/altclip/configuration_altclip.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* Update src/transformers/models/altclip/modeling_altclip.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* Update src/transformers/models/altclip/processing_altclip.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* Update src/transformers/models/altclip/modeling_altclip.py
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
* fix merge
* fix copies
* update
* update
* empty commit to trigger CI
* fix code example
* empty commit to trigger CI
* fix
* empty commit to trigger CI
* empty commit to trigger CI
Co-authored-by: shunxing1234 <xw747777271@gmail.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: shunxing1234 <33774367+shunxing1234@users.noreply.github.com>
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
2023-01-04 09:18:57 +01:00
Motoki Wu
45da7cec5a
Add custom stop token ids for generation ( #20727 )
...
* Add StopIdStoppingCriteria
* add a working test for stop id criteria
* add to global scope
* add stop_ids to generate
* add pipeline test
* use tokenizer encode in test
* add test to generation utils
* reformat
* fixup
* make-fix-copies
* rename to stop_token_id
* use stop_tokens instead
* add to text to text generation
* make fixup
* make repo-consistency
* Add support for list of ints for eos_token_id inside generation/utils.py
* Instead of having if elses, cast the eos_token_id into a List[int]
* Add List[int] support for logits_process.py
* add List[int] for beam_search.py
* add List[int] for forced_eos_token_id
* revert stop token id stopping criteria changes
* make fixup
* fix tests
* add eos_token_id to generation/utils.py and added tests test_utils.py
* add eos_token_id type hints and fix for pad tokens
* add comments
* remove some prints and remove forced false test
* fix
* put back test_stop_sequence_stopping_criteria
* remove unused import and make fixup
* add a none check
* update docstring
* add more docstring for list ints
* make fixup
2023-01-03 15:18:24 -05:00
radcheb
cd918492c6
Fix race condition on cleaning checkpoints when save_total_limit set to 1 ( #20989 )
...
* Update trainer.py
* fix style
Co-authored-by: Radhwane Chebaane <rchebaane.external@epo.org>
2023-01-03 15:16:12 -05:00
Alara Dirik
cd2457809f
Improve OWL-ViT postprocessing ( #20980 )
...
* add post_process_object_detection method
* style changes
2023-01-03 19:25:09 +03:00
Yih-Dar
e901914da7
Fix for LXMERT ( #20986 )
...
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-03 17:16:52 +01:00
Yih-Dar
8f09dd89f6
Avoid CI runs under users' own CircleCI personal account ( #20981 )
...
* Avoid null CI
* Avoid null CI
* rename
* more clear error message
* Update .circleci/config.yml
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* clean up
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2023-01-03 16:19:38 +01:00
Anna Krogager
7b0727a401
Ignore errors when deleting old checkpoints in trainer ( #20984 )
2023-01-03 10:10:59 -05:00
samuelpullely
15c68c67f4
Enable decoder_attention_mask
in generate
function ( #20726 )
...
* Enable `decoder_attention_mask` in `generate` function
* Make style corrections
* Run `make repo-consistency`
* Add integration test
2023-01-03 09:59:08 -05:00
JeongYeon Nam
a9653400d3
Fix valid ratio for Deformable Detr ( #20958 )
...
* fix: valid ratio has right value
* chore: remove unnecessary line
Co-authored-by: Jeongyeon Nam <jy.nam@navercorp.com>
2023-01-03 09:43:26 -05:00
Wang, Yi
9c9fe89f84
[run_clm example] add torch_dtype option for model load. ( #20971 )
...
* [run_clm example] add torch_dtype option for model load.
for BLOOM 175B model. peak memory will reduce about 350G for inference. the weight of BLOOM in model hub is bfloat16
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
* add other type in option
* fix style
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
2023-01-03 09:33:11 -05:00
Yih-Dar
e697c912c2
Remove more unused attributes in config classes ( #20858 )
...
Remove more unused attributes in config classes
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-03 14:37:40 +01:00
NielsRogge
9c6f7485a6
Add GIT (GenerativeImage2Text) ( #20295 )
...
* First draft
* Make model instantiation work
* Fix copied from statement
* More fixes
* Add correct output head
* Improve configuration
* Add conversion script
* Improve conversion script
* Remove token_type_ids
* Fix conversion of projection layers
* Convert all weights
* Use cats image
* Make logits match
* Generate caption on cats image
* Add GITProcessor
* Update conversion script
* Add support for more checkpoints
* Fix conversion script
* Add initial tests
* Remove cross-attention
* More improvements
* Remove is_decoder
* Improve model tests
* Improve tests
* Improve model outputs
* Fix model outputs equivalence
* Fix more tests
* Remove unused code
* Use generate to generate text, no use of cache for now
* Use generate more appropriately
* Fix config tests
* Fix style
* Add support for use_cache
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* Fix style
* Fix GIT vision encoder
* Update README
* Fix integration test
* Set bos and eos token ids
* Improve docs
* Improve code
* Add support for provided attention_mask
* Add copied from statement
* Fix gradient checkpointing test
* Set model_input_names
* Investigate model_input_names
* Remove script
* Fix model inputs
* Fix docstring
* Rename GIT to Git
* Support more models
* Add support for textvqa model
* Add video support
* Extend conversion script for video
* Add support for large variant
* Add support for more models
* Fix config archive map
* Update integration test
* Fix README
* Fix CLIP mean and std
* Update processor
* Fix use_cache for video, thanks @gante
* Remove print statements
* Remove assertion
* Add processor tests
* Fix model_input_names
* Use Auto API for processor
* Fix processor tests
* Fix integration test
* Fix pipeline test
* Make tests faster
* Update conversion script
* Update conversion script
* Convert more checkpoints
* Update conversion script
* Fix typo
* Update docstrings
* Improve code snippets
* Fix doc tests
* Add more code examplesé
* Fix doc tests
* Add integration tests
* Fix unused variable
* revert
* Add GIT to Japanese README
Co-authored-by: Niels Rogge <nielsrogge@Nielss-MacBook-Pro.local>
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2023-01-03 14:17:18 +01:00
Alara Dirik
305f41e4de
Fix post_process_object_detection method descriptions ( #20977 )
...
fix post_process_object_detection descriptions
2023-01-03 15:56:02 +03:00
Konstantin Kotik
367fdf3330
MinNewTokensLengthLogitsProcessor
for .generate
method #20814 ( #20892 )
...
* feat: add min new length logit processor
* test: add min new length logit processor
* docs: add MinNewTokensLengthLogitsProcessor
* feat: import MinNewTokensLengthLogitsProcessor
* fix: update pytorch dummy objects
* refactor & fix: rename attributes and var and get rid of dynamic attribute
* tests: align test with new interface
* docs: fix typo
* docs: minor clarification
* Empty-Commit
* empty commit
* run automated quality edits
Co-authored-by: Joao Gante <joao@huggingface.co>
2023-01-03 06:29:02 -05:00
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