Yih-Dar
eef0507f3d
Fix gemma tests ( #31794 )
...
* skip 3 7b tests
* fix
* fix
* fix
* [run-slow] gemma
---------
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2024-07-05 10:17:59 +02:00
Boris Feld
9e599d1d94
Update CometCallback to allow reusing of the running experiment ( #31366 )
...
* Update CometCallback to allow reusing of the running experiment
* Fixups
* Remove useless TODO
* Add checks for minimum version of the Comet SDK
* Fix documentation and links.
Also simplify how the Comet Experiment name is passed
2024-07-05 08:13:46 +02:00
xiangdong
d19b5a90c2
Exclude torch.compile time from metrics computation ( #31443 )
...
* exclude compile time from metrics computation
* fix the quality issue
2024-07-05 08:11:55 +02:00
Kazuaki Ishizaki
2aa2a14481
Make tensor device correct when ACCELERATE_TORCH_DEVICE is defined ( #31751 )
...
return correct device when ACCELERATE_TORCH_DEVICE is defined
2024-07-05 08:09:04 +02:00
Marc Sun
8c5c180de0
Fix serialization for offloaded model ( #31727 )
...
* Fix serialization
* style
* add test
2024-07-05 08:07:07 +02:00
mxkopy
eaa5f41439
Fix ClapProcessor to merge feature_extractor output into the returned BatchEncoding ( #31767 )
...
* fixed ClapProcessor to merge all values output from the feature extractor into the returned BatchEncoding.
* fixed trailing whitespace
2024-07-05 07:55:47 +02:00
Billy Cao
43ffb785c0
Add torch_empty_cache_steps to TrainingArguments ( #31546 )
...
* Add torch_empty_cache_steps to TrainingArguments
* Fix formatting
* Add torch_empty_cache_steps to docs on single gpu training
* Remove check for torch_empty_cache_steps <= max_steps
* Captalize Tip
* Be device agnostic
* Fix linting
2024-07-04 13:20:49 -04:00
hoshi-hiyouga
cee768d97e
Fix Gemma2 types ( #31779 )
...
Update __init__.py
2024-07-04 15:37:32 +02:00
Yih-Dar
87726a08ed
pytest_num_workers=4
for some CircleCI jobs (#31764 )
...
pytest_num_workers=4
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2024-07-04 14:44:58 +02:00
Pavel Iakubovskii
048f599f35
Fix RT-DETR weights initialization ( #31724 )
...
* Fix init for rt-detr heads
* Fixup
* Add separate prior_prob value to config for initialization
* Add bbox init
* Change to 1 / num_labels init
* Adjust weights init test
* Fix style for test
2024-07-03 14:29:02 +01:00
Pavel Iakubovskii
b97521614a
Fix RT-DETR cache for generate_anchors ( #31671 )
...
* Fix cache and type conversion
* Add test
* Fixup
* nit
* [run slow] rt_detr
* Fix test
* Fixup
* [run slow] rt_detr
* Update src/transformers/models/rt_detr/modeling_rt_detr.py
2024-07-03 14:19:57 +01:00
Willard Sheen
534cbf8a5d
[fix bug] logits's shape different from label's shape in preprocess_logits_for_metrics ( #31447 )
...
* [fix BUG] pad labels before use it in preprocess_logits_for_metrics
* a more readable fix
labels can't use `gather` before pass to `preprocess_logits_for_metrics`, so must split into 2 if-block
* add a comment
* oh code quality check
2024-07-03 06:58:27 -04:00
Nate Brake
65a02cd27d
Add ignore_errors=True to trainer.py rmtree in _inner_training_loop ( #31668 )
...
Update trainer.py
2024-07-03 06:54:49 -04:00
Joao Gante
ddfaf11926
Gemma 2: Update slow tests ( #31759 )
...
gemma 2 slow tests
2024-07-03 11:43:44 +02:00
Pablo Montalvo
c1fe12595e
handle (processor_class, None) returned by ModelPatterns ( #31753 )
2024-07-03 11:42:30 +02:00
Aymeric Roucher
0fd885b91c
Adds final answer tool for all agents ( #31703 )
...
* Adds final answer tool for all agents
* Typo
* Add clarification in doc
* Put final_answer tool adition in agent for clarity
2024-07-03 11:36:09 +02:00
Ella Charlaix
dc72fd7edd
Requires for torch.tensor before casting ( #31755 )
2024-07-03 11:12:51 +02:00
jiqing-feng
7f91f168a1
fix assisted decoding ( #31401 )
...
* fix assisted decoding
* check None
* fix typo
* fix _prepare_special_tokens
* fix style
* fix lint
* add tests for assisted decoding
* fix style
* fix tests check
2024-07-03 09:22:56 +01:00
Jörg Bornschein
f91c16d270
Fix documentation for Gemma2. ( #31682 )
...
* Fix documentation for Gemma2.
Model sizes and Blog post URL are wrong in the documentation.
* Update docs/source/en/model_doc/gemma2.md
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2024-07-02 23:04:53 +01:00
Matt
cd0935dd55
Make tool JSON schemas consistent ( #31756 )
...
Make the order of array items consistent using sorted()
2024-07-02 20:00:42 +01:00
Joao Gante
82486e5995
🚨 🚨 TextGenerationPipeline: rely on the tokenizer default kwargs ( #31747 )
...
* rely on the tokenizer default kwargs
* fix a few tests
2024-07-02 16:17:42 +02:00
Sanchit Gandhi
a9701953ff
[whisper] static kv cache ( #31166 )
...
* make work with cache abstraction
* correct for static cache
* hacks for compile
* make fast
* fix
* fix pos ids
* generate
* fix sdpa
* fix sdpa cache pos
* fix fa2
* clean fa2
* integrate cache into generate
* make style
* copies
* more copies
* update eager
* update sdpa
* update fa2
* simplify
* use cache pos
* always compute cross-cache for debug
* avoid recompiles
Co-authored-by: Arthur Zucker <arthur@huggingface.co>
* fix fix
* fix fix fix
* more fix
* try encoder-decoder cache (too messy)
* revert encoder-decoder cache
* check cross-attn cache
* use enc-dec dataclass
* use richer enc-dec dataclass
* clean-up
* revert static cache changes
* small fixes
* revert to cpu flag
* fix copies
* add static slow test
* past k/v docstring
* more docstrings
* cache_position docstrings
* add to docs
* add enc-dec cache to docs
* make style
* fix after rebase
* fix beam
* style
* fix generation strategies
* fix most decoder-only tests
* style
* skip test
* more clean up
* small docstrings
* Apply suggestions from code review
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
* add todo
* only crop self-attn
* check cache in mixin
* style
* fix re-compile after rebase
* move `is_updated` logic to enc-dec wrapper
* revert back
* revert cache back
* finalise design
* fix
* fix fix
* style
* Update src/transformers/cache_utils.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* deprecate
* updates
* final updates
* style
* style
---------
Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2024-07-02 13:24:15 +01:00
fxmarty
57d7594a79
Fix mistral ONNX export ( #31696 )
...
* use bitwise or
* why is the CI not triggered?
2024-07-02 19:54:10 +08:00
Yih-Dar
93cd94b79d
Move some test files (tets/test_xxx_utils.py
) to tests/utils
( #31730 )
...
* move
* move
* move
* move
* Update tests/utils/test_image_processing_utils.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>
2024-07-02 13:46:03 +02:00
Krisztián Boros
cf85e86e9a
remove incorrect urls pointing to the llava repository ( #31107 )
...
* remove incorrect urls pointing to the llava repository
* remove incorrect urls pointing to the llava repository; removing entire comments
* remove incorrect urls pointing to the llava repository; removing entire comments; ran fix-copies
* ran fixup
2024-07-02 12:24:55 +01:00
Joao Gante
3345ae733b
dependencies: keras-nlp<0.14
pin ( #31684 )
...
* keras nlp pin
* this should use the new docker images:dev
* dev-ci
2024-07-01 17:39:33 +01:00
Jade Choghari
e655029515
Add French version of run scripts tutorial ( #31483 )
...
* Add French translation of run scripts tutorial
* Update docs/source/fr/run_scripts_fr.md
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Update docs/source/fr/run_scripts_fr.md
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Update docs/source/fr/run_scripts_fr.md
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Update docs/source/fr/run_scripts_fr.md
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
* Update docs/source/fr/run_scripts_fr.md
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
---------
Co-authored-by: Jade Choghari <chogharijade@icloud.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2024-06-28 18:02:30 +02:00
Arthur
bbf1e61864
Gemma capping is a must for big models ( #31698 )
...
* softcapping
* soft cap before the mask
* style
* ...
* super nit
2024-06-28 17:16:17 +02:00
Sangbum Daniel Choi
cb298978ad
add gather_use_object arguments ( #31514 )
...
* add gather_use_object arguments
* fix name and pass the CI test for Seq2SeqTrainer
* make style
* make it to functools
* fix typo
* add accelerate version:
* adding warning
* Update src/transformers/trainer.py
Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com>
* make style
* Update src/transformers/training_args.py
* check function move to initial part
* add test for eval_use_gather_object
---------
Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com>
2024-06-28 13:50:27 +01:00
Jacky Lee
82a1fc7256
Fix return_dict in encodec ( #31646 )
...
* fix: use return_dict parameter
* fix: type checks
* fix: unused imports
* update: one-line if else
* remove: recursive check
2024-06-28 12:18:01 +01:00
hoshi-hiyouga
5e89b335ab
Fix Gemma2 4d attention mask ( #31674 )
...
Update modeling_gemma2.py
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2024-06-28 08:20:30 +02:00
Wing Lian
0142aab7f8
don't zero out the attention_mask when using sliding window with flash attention ( #31670 )
...
* don't zero out the attention_mask when using sliding window with flash attention
* chore: lint
2024-06-28 07:59:54 +02:00
Sanchit Gandhi
1c68f2cafb
[HybridCache] Fix get_seq_length
method ( #31661 )
...
* fix gemma2
* handle in generate
2024-06-27 19:40:40 +02:00
Steven Liu
464aa74659
[docs] Llama3 ( #31662 )
...
quick usage to top
2024-06-27 10:32:51 -07:00
Billy Cao
e44b878c02
Fix float out of range in owlvit and owlv2 when using FP16 or lower precision ( #31657 )
2024-06-27 18:07:33 +01:00
Arthur
75a6319864
Fix post gemma merge ( #31660 )
...
* nit
* toctree issue
* protect gemma2 tests as well
* sdpa supported
2024-06-27 17:51:42 +02:00
Lysandre
727eea4ab0
v4.43.0.dev0
2024-06-27 17:40:07 +02:00
Arthur
0cf60f13ab
Add gemma 2 ( #31659 )
...
* inital commit
* Add doc
* protect?
* fixup stuffs
* update tests
* fix build documentation
* mmmmmmm config attributes
* style
* nit
* uodate
* nit
* Fix docs
* protect some stuff
---------
Co-authored-by: Lysandre <lysandre@huggingface.co>
2024-06-27 17:36:19 +02:00
Raushan Turganbay
4aa17d0069
Remove deprecated config attribute in VLMs ( #31655 )
...
remove
2024-06-27 16:54:41 +05:00
Sangbum Daniel Choi
be50a0338b
change anchor_image_size None for compatibility ( #31640 )
...
* change anchor_image_size None for compatibility
* make fix-copies
2024-06-27 12:36:55 +01:00
Billy Cao
3a028101e9
[QoL] Allow dtype str for torch_dtype arg of from_pretrained ( #31590 )
...
* Allow dtype str for torch_dtype in from_pretrained
* Update docstring
* Add tests for str torch_dtype
2024-06-27 12:41:49 +02:00
Arthur
11138ca013
[Llama
] Conversion: fix and simplify the script! ( #31591 )
...
* fix and simplify the script!
* add co-author
---------
Co-authored-by: crackalamoo <crackalamoo@users.noreply.github.com>
2024-06-27 12:35:19 +02:00
Merve Noyan
c9f191a0b7
Fix ONNX exports for Optimum compatible models ( #31311 )
...
* fixed models
* format with bumped ruff version on my local
* fix copies
* add tracing checks
* format
* Update src/transformers/utils/generic.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* format
* style fix
* Update modeling_mobilevit.py
* add docstring and change name
* Update __init__.py
* Update __init__.py
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2024-06-27 10:46:36 +01:00
Raushan Turganbay
dc76e9fa7f
Generation: past kv can be None ( #31051 )
...
* fix
* better
2024-06-27 09:55:33 +05:00
amyeroberts
1de7dc7403
Skip tests properly ( #31308 )
...
* Skip tests properly
* [test_all]
* Add 'reason' as kwarg for skipTest
* [test_all] Fix up
* [test_all]
2024-06-26 21:59:08 +01:00
Billy Cao
1f9f57ab4c
Fix dtype casting in swinv2 and swinv2sr to allow non-FP32 inference ( #31589 )
...
* Fix dtype casting in modeling_swin2sr to allow non-FP32 inference
* Fix formattting
* Fix for swinv2 too
* Update src/transformers/models/swin2sr/modeling_swin2sr.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update src/transformers/models/swinv2/modeling_swinv2.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Add FP16 tests for swin2sr and swinv2
* [run_slow] swin2sr, swinv2
* [run_slow] swin2sr, swinv2
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2024-06-26 18:46:48 +01:00
Joao Gante
a3fb96a42a
Generate: fix assisted generation with past_key_values
passed as kwargs ( #31644 )
2024-06-26 18:24:04 +01:00
Pablo Montalvo
492ee17ec3
Fix paligemma detection inference ( #31587 )
...
* fix extended attention mask
* add slow test for detection instance
* [run-slow]paligemma
2024-06-26 19:17:09 +02:00
Raushan Turganbay
e71f2863d7
Add LLaVa NeXT Video ( #31252 )
...
* squash into single commit
* run diff once more
* docstring
* tests
* minor chnages and ready to go
* Update src/transformers/models/llava_next_video/processing_llava_next_video.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Update tests/models/vipllava/test_modeling_vipllava.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* [run-slow] llava-next-video
* [run-slow] llava-next-video
* [run-slow] llava_next_video
* fix two tests
* fix slow tests
* remove logit checks due to numeric errors
* run test once more
* [run-slow] llava_next_video
* final try to pass the test
* [run-slow] llava_next_video
* [run-slow] llava_next_video
* [run-slow] llava_next_video
* style
* fix
* style
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
2024-06-26 21:52:28 +05:00
Pavel Iakubovskii
b1ec745475
Fix RT-DETR inference with float16 and bfloat16 ( #31639 )
...
* [run_slow] rt_detr
* Fix positional embeddings and anchors dtypes
* [run slow] rt_detr
* Apply suggestions from code review
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Fixup
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
2024-06-26 17:50:10 +01:00