Duc-Viet Hoang
dc8b6eaeee
Fix contrastive search to correctly handle input with padding ( #33507 )
...
* fix: handle padding in contrastive search for decoder-only models
* fix: handle padding in contrastive search for encoder-decoder models
* tests: move padding contrastive test to test_util, add t5 test
* fix: handle if model_kwargs["decoder_attention_mask"] is None
* refactor: improve padding input contrastive search generation tests
* chore: _ranking_fast to use LongTensor for cosine_matrix_mask
2024-09-20 16:52:08 +01:00
Yoni Gozlan
c0c6815dc9
Add support for args to ProcessorMixin for backward compatibility ( #33479 )
...
* add check and prepare args for BC to ProcessorMixin, improve ProcessorTesterMixin
* change size and crop_size in processor kwargs tests to do_rescale and rescale_factor
* remove unnecessary llava processor kwargs test overwrite
* nit
* change data_arg_name to input_name
* Remove unnecessary test override
* Remove unnecessary tests Paligemma
* Move test_prepare_and_validate_optional_call_args to TesterMixin, add docstring
2024-09-20 11:40:59 -04:00
Yih-Dar
31caf0b95f
Fix missing test in torch_job ( #33593 )
...
fix missing tests
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com >
2024-09-20 17:16:44 +02:00
Joao Gante
2fdb5e74cc
VLM generate: tests can't generate image/video tokens ( #33623 )
2024-09-20 15:43:27 +01:00
Omar Salman
653eb40425
Add sdpa for BioGpt ( #33592 )
...
* Add sdpa for BioGpt
* Updates
* Add the docs
* [run_slow] biogpt
* Use the copy mechanism to ensure consistency
* [run_slow] biogpt
2024-09-20 14:27:32 +01:00
amyeroberts
f9b4409726
Remove unnecessary CPM model tests ( #33621 )
...
Remove model tests
2024-09-20 14:20:57 +01:00
Joao Gante
266d0a6375
Generate: remove flakyness in test_generate_from_inputs_embeds_decoder_only ( #33602 )
...
almost zero is not zero
2024-09-20 14:50:42 +02:00
Lake Lee
ec1424c6a3
Update modeling_mamba2.py, fix pad size ( #32599 )
...
* Update modeling_mamba2.py
Fix pad_size calculation to ensure it's less than self.chunk_size
* [run_slow] mamba2
* [run-slow] mamba2
* [run-slow] Add @require_read_token decorator to failing tests for token propagation
* [run_slow] mamba2
2024-09-20 11:40:57 +01:00
Fanli Lin
8bd1f2f338
[tests] make more tests device-agnostic ( #33580 )
...
* enable
* fix
* add xpu skip
* add marker
* skip for xpu
* add more
* enable on accelerator
* add more cases
* add more tests
* add more
2024-09-20 10:16:43 +01:00
Yih-Dar
31650a53a1
Allow CI could be run on private forked repositories (e.g. new model additions) ( #33594 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com >
2024-09-20 11:00:34 +02:00
Yih-Dar
6dc364616d
Fix CircleCI nightly run ( #33558 )
...
fix
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com >
2024-09-20 10:57:21 +02:00
Joao Gante
bdf4649f67
Docs: add the ability to manually trigger jobs ( #33598 )
2024-09-20 09:37:39 +01:00
Pedro Cuenca
0c718f16d1
Fix Llama 3 TikToken conversion ( #33538 )
...
* Fix Llama 3 TikToken conversion
* No need to add tokens again
2024-09-20 01:28:33 +02:00
Fanli Lin
4d8908df27
[tests] enable GemmaIntegrationTest on XPU ( #33555 )
...
enable GemmaIntegrationTest
2024-09-19 19:39:19 +01:00
Fanli Lin
b87755aa6d
[tests] skip tests for xpu ( #33553 )
...
* enable
* fix
* add xpu skip
* add marker
* skip for xpu
* add more
* add one more
2024-09-19 19:28:04 +01:00
Yoni Gozlan
f111d5b783
Uniformize kwargs for Paligemma processor and update docs ( #33571 )
...
* Uniformize paligemma processor
* nit
2024-09-19 14:14:06 -04:00
Joao Gante
52920b5dd5
Cache: don't throw warnings on gemma2 when instantiating a new cache ( #33595 )
2024-09-19 17:42:47 +01:00
Anton Vlasjuk
b50ff5993a
[Mamba2] Move dt calculations to kernel ( #33520 )
...
* use kernel for dt calculations
* add small test
* [run-slow] mamba2
2024-09-19 17:41:17 +01:00
Vladislav Bronzov
162056a3f4
change sequence_bias type of SequenceBiasLogitsProcessor to list, add… ( #33375 )
...
* change sequence_bias type of SequenceBiasLogitsProcessor tp list, add config tests for all processors
* fix format
* small fix for all_token_bias_pairs_are_valid internal func
* small typo fix in description
* improve test impl, some SequenceBiasLogitsProcessor refactoring
2024-09-19 17:35:44 +01:00
Joao Gante
d9d59e7bac
Generate: check that attention_mask is 2D ( #33575 )
...
check attention mask in generate
2024-09-19 16:23:17 +01:00
Pablo Montalvo
413008c580
add uniform processors for altclip + chinese_clip ( #31198 )
...
* add initial design for uniform processors + align model
* add uniform processors for altclip + chinese_clip
* fix mutable default 👀
* add configuration test
* handle structured kwargs w defaults + add test
* protect torch-specific test
* fix style
* fix
* rebase
* update processor to generic kwargs + test
* fix style
* add sensible kwargs merge
* update test
* fix assertEqual
* move kwargs merging to processing common
* rework kwargs for type hinting
* just get Unpack from extensions
* run-slow[align]
* handle kwargs passed as nested dict
* add from_pretrained test for nested kwargs handling
* [run-slow]align
* update documentation + imports
* update audio inputs
* protect audio types, silly
* try removing imports
* make things simpler
* simplerer
* move out kwargs test to common mixin
* [run-slow]align
* skip tests for old processors
* [run-slow]align, clip
* !$#@!! protect imports, darn it
* [run-slow]align, clip
* [run-slow]align, clip
* update common processor testing
* add altclip
* add chinese_clip
* add pad_size
* [run-slow]align, clip, chinese_clip, altclip
* remove duplicated tests
* fix
* update doc
* improve documentation for default values
* add model_max_length testing
This parameter depends on tokenizers received.
* Raise if kwargs are specified in two places
* fix
* match defaults
* force padding
* fix tokenizer test
* clean defaults
* move tests to common
* remove try/catch block
* deprecate kwarg
* format
* add copyright + remove unused method
* [run-slow]altclip, chinese_clip
* clean imports
* fix version
* clean up deprecation
* fix style
* add corner case test on kwarg overlap
* resume processing - add Unpack as importable
* add tmpdirname
* fix altclip
* fix up
* add back crop_size to specific tests
* generalize tests to possible video_processor
* add back crop_size arg
* fixup overlapping kwargs test for qformer_tokenizer
* remove copied from
* fixup chinese_clip tests values
* fixup tests - qformer tokenizers
* [run-slow] altclip, chinese_clip
* remove prepare_image_inputs
2024-09-19 17:21:54 +02:00
Pablo Montalvo
4f0246e535
fix tests with main revision and read token ( #33560 )
...
* fix tests with main revision and read token
* [run-slow]mamba2
* test previously skipped tests
* [run-slow]mamba2
* skip some tests
* [run-slow]mamba2
* finalize tests
* [run-slow]mamba2
2024-09-19 17:10:22 +02:00
Joao Gante
80b774eb29
Cache: don't show warning in forward passes when past_key_values is None ( #33541 )
2024-09-19 12:02:46 +01:00
Joao Gante
f3b3810fe6
rag: fix CI ( #33578 )
2024-09-19 11:55:26 +01:00
Raushan Turganbay
d7975a5874
VLMs: enable generation tests ( #33533 )
...
* add tests
* fix whisper
* update
* nit
* add qwen2-vl
* more updates!
* better this way
* fix this one
* fix more tests
* fix final tests, hope so
* fix led
* Update tests/generation/test_utils.py
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com >
* pr comments
* not pass pixels and extra for low-mem tests, very flaky because of visio tower
---------
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com >
2024-09-19 12:04:24 +02:00
Raushan Turganbay
e40bb4845e
Load and save video-processor from separate folder ( #33562 )
...
* load and save from video-processor folder
* Update src/transformers/models/llava_onevision/processing_llava_onevision.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com >
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com >
2024-09-19 09:56:52 +02:00
Yoach Lacombe
5af7d41e49
Codec integration ( #33565 )
...
* clean mimi commit
* some nits suggestions from Arthur
* make fixup
* rename repo id + change readme
* Update docs/source/en/model_doc/mimi.md
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com >
* add flaky flag to batching equivalence due to audio_codes failing sometimes
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com >
2024-09-18 19:23:44 +02:00
Marc Sun
6019f3ff78
Fix bnb dequantization ( #33546 )
2024-09-18 19:10:28 +02:00
Yoni Gozlan
7b1ce634cb
Improve compiled RT-DETR inference speed ( #33412 )
...
* modify rt detr to improve inference times when compiled
* Remove redundant "to"
* Fix conditional lru_cache and missing shapes_list
* nit unnecessary list creation
* Fix compile error when ninja not available and custon kernel activated
2024-09-18 12:56:45 -04:00
Dominik Niedziela
9db963aeed
enforce original size to be a list ( #33564 )
...
* enforce original size to be a list
* formatting
* apply datatype change to unpad_image in llava_next
2024-09-18 16:38:31 +01:00
Matt
8efc06ee18
Return attention mask in ASR pipeline to avoid warnings ( #33509 )
...
return attention mask in ASR pipeline
2024-09-18 15:57:39 +01:00
Joao Gante
7542fac2c7
Pipeline: no side-effects on model.config and model.generation_config 🔫 ( #33480 )
2024-09-18 15:43:06 +01:00
Umar Butler
fc83a4d459
Added support for bfloat16 to zero-shot classification pipeline ( #33554 )
...
* Added support for bfloat16 to zero-shot classification pipeline
* Ensure support for TF.
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com >
* Remove dependency on `torch`.
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com >
---------
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com >
2024-09-18 15:41:50 +01:00
Yoach Lacombe
f883827c0a
Fix tests in ASR pipeline ( #33545 )
2024-09-18 16:25:45 +02:00
Ziyú Ye
4f1e9bae4e
fix the wandb logging issue ( #33464 )
...
* fix the wandb logging issue
* handle ConfigError in WandbCallback; move import to local scope
* update integration_utils.py; move import of ConfigError
* Update integration_utils.py: remove trailing whitespace
2024-09-18 07:23:05 -07:00
Ikram Ali
5427eaad43
[i18n-ur] Added README_ur.md file ( #33461 )
...
* Urdu docs added
* fixed the misaligned issue.
2024-09-18 06:49:19 -07:00
Isotr0py
9f2b8cc45a
Fix missing head_dim in llama config from gguf model ( #33526 )
...
fix missing head_dim in llama config from gguf
2024-09-18 06:46:12 -07:00
Raushan Turganbay
db72894b48
Chat template: save and load correctly for processors ( #33462 )
...
* fix
* add tests
* fix tests
* Update tests/models/llava/test_processor_llava.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com >
* fix
* fix tests
* update tests
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com >
2024-09-18 13:00:44 +02:00
Duygu Altinok
52e22cbf67
Fix for slow the bug tokenizer adding spaces to single id decodes ( #32564 )
...
* _decode signature change and quick return
* added bunch of decoding tests
* signature match and return
* added tests for decoding
* merged decoding test
* more tests for special tokens
* cosmetics
* fixed param
* ruffed the file
* refinement for single special tokens
* added test for single special tokens
* slight change to test name
Co-authored-by: Ita Zaporozhets <31893021+itazap@users.noreply.github.com >
* minor change test name for skip tokens
Co-authored-by: Ita Zaporozhets <31893021+itazap@users.noreply.github.com >
* killed already defined var
Co-authored-by: Ita Zaporozhets <31893021+itazap@users.noreply.github.com >
* minor update with vars
Co-authored-by: Ita Zaporozhets <31893021+itazap@users.noreply.github.com >
* killed already defined var once more
Co-authored-by: Ita Zaporozhets <31893021+itazap@users.noreply.github.com >
---------
Co-authored-by: Ita Zaporozhets <31893021+itazap@users.noreply.github.com >
2024-09-18 12:32:02 +02:00
Aymeric Roucher
e6d9f39dd7
Decorator for easier tool building ( #33439 )
...
* Decorator for tool building
2024-09-18 11:07:51 +02:00
Raushan Turganbay
fee86516a4
Support LLaVa-OV-Chat ( #33532 )
...
* add llava-ov-chat
* uncomment
2024-09-18 09:21:55 +02:00
Wang, Yi
454a0f2efd
fix patch_attention_mask incorrect setting which leads to the differe… ( #33499 )
...
* fix patch_attention_mask incorrect setting which leads to the difference in the generated text if batch > 1
Signed-off-by: Wang, Yi <yi.a.wang@intel.com >
* fix format
Signed-off-by: Wang, Yi <yi.a.wang@intel.com >
* [run_slow] idefics2
---------
Signed-off-by: Wang, Yi <yi.a.wang@intel.com >
2024-09-17 22:24:42 +01:00
teamclouday
6c051b4e1e
Add revision to trainer push_to_hub ( #33482 )
...
* add revision to trainer push_to_hub
* apply suggestions
* add test for revision
* apply ruff format
* reorganize imports
* change test trainer path
2024-09-17 23:11:32 +02:00
Yoni Gozlan
d8500cd229
Uniformize kwargs for Pixtral processor ( #33521 )
...
* add uniformized pixtral and kwargs
* update doc
* fix _validate_images_text_input_order
* nit
2024-09-17 14:44:27 -04:00
Nikita Krasnytskyi
c29a8694b0
Fix missing sequences_scores in the Whisper beam search output ( #32970 )
...
* added sequences_scores to the output
* added beam_indices to output
* added test to check for beam_indices, sequences_scores and their shape
* removed redundant whitespaces
* make fixup
2024-09-17 19:36:11 +01:00
ErezSC42
46c27577b3
fix to jamba config, asserting attention and expert offset ( #33316 )
...
* fix to jamba config, asserting attention and expert offset
* fix foramtting
* fix foramtting
* fix foramtting
* changed to error raise instead of assertion, added unittests
* fix
* changed t_ to property_
* changed t_ to property_
* quickfix
* ran code styler
2024-09-17 19:29:27 +01:00
Guillaume LEGENDRE
3476c19e91
CI Build image - move runners ( #33530 )
...
* move runners
* move runners
* move runners
2024-09-17 18:12:12 +02:00
Antoine Dussolle
763548427d
Add explicit example for RAG chat templating ( #33503 )
...
* Add explicit example for RAG chat templating
* Add Tip box and reformulate
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com >
---------
Co-authored-by: Matt <Rocketknight1@users.noreply.github.com >
2024-09-17 16:08:05 +01:00
Max Buckley
ac5a0556f1
Update chameleon.md — fix runtime type error ( #33494 )
...
Update chameleon.md
Fix error
RuntimeError: Input type (float) and bias type (c10::BFloat16) should be the same
2024-09-17 13:32:49 +02:00
Wang, Yi
74026b473e
idefics2 enable_input_require_grads not aligned with disable_input_re… ( #33194 )
...
* idefics2 enable_input_require_grads not aligned with disable_input_require_grads
make peft+idefics2 checkpoints disable fail
Signed-off-by: Wang, Yi <yi.a.wang@intel.com >
* split test case
Signed-off-by: Wang, Yi <yi.a.wang@intel.com >
* fix ci failure
Signed-off-by: Wang, Yi <yi.a.wang@intel.com >
* refine test
Signed-off-by: Wang, Yi <yi.a.wang@intel.com >
---------
Signed-off-by: Wang, Yi <yi.a.wang@intel.com >
2024-09-17 10:39:34 +01:00