transformers
Reduce by 2 the memory requirement in `generate()` 🔥🔥🔥
#30536
Merged

Reduce by 2 the memory requirement in `generate()` 🔥🔥🔥 #30536

Cyrilvallez
ArthurZucker
ArthurZucker commented on 2024-04-30
Cyrilvallez
Cyrilvallez
Cyrilvallez
ArthurZucker
ArthurZucker commented on 2024-05-08
ArthurZucker
ArthurZucker commented on 2024-05-08
Cyrilvallez
ArthurZucker
Cyrilvallez
ArthurZucker
Cyrilvallez
gante
gante
Cyrilvallez
Cyrilvallez Cyrilvallez force pushed from b835d4d3 1 year ago
Cyrilvallez
Cyrilvallez
ArthurZucker
ArthurZucker
ArthurZucker commented on 2024-05-20
gante
gante commented on 2024-05-20
Cyrilvallez Cyrilvallez force pushed to 6608872a 1 year ago
Cyrilvallez
gante
gante approved these changes on 2024-05-21
gante
gante
ArthurZucker
ArthurZucker ArthurZucker added run-slow
ArthurZucker
Cyrilvallez
younesbelkada
Cyrilvallez Fix contrastive_search for new cache structure, and improve performan…
750955d6
Cyrilvallez Fix _contrastive_search for non-standard cache using ellipsis slicing
c8a43a8d
Cyrilvallez Fix all outputs.logits memory leaks for all decoding strategies!
9342fff1
Cyrilvallez Fix small error in _contrastive_search()
15e8615e
Cyrilvallez Make all necessary change and revert for the new class
c0e40d4c
Cyrilvallez Apply coding style
1de31480
Cyrilvallez Remove pipes in type hints for compatibility
e170e962
Cyrilvallez correct type hint
d7c43594
Cyrilvallez apply style
3986f1dc
Cyrilvallez Use DynamicCache by default and solve conflicts
b9f7e04e
Cyrilvallez Fix rebase issues
614e0525
Cyrilvallez Add `_supports_dynamic_cache_class` in models for models that support…
241b851b
Cyrilvallez Create generation config to return legacy format by default, or to ch…
d31eea46
Cyrilvallez style
17525ab5
Cyrilvallez Fix case when use_cache is False
c47e6ce5
Cyrilvallez Remove default DynamicCache in assiste_decoding if assistant_model do…
b9bbfd9b
Cyrilvallez Update prepare_inputs_for_generation() for case with empty DynamicCache
3b59cf62
Cyrilvallez Correct return of args in _assisted_decoding
2a809ad1
Cyrilvallez Remove EfficientDynamicCache as it is no longer needed
e96adcbe
Cyrilvallez Correct mistake in generation config
20174eca
Cyrilvallez Move cache logic of assisted decoding to AssistedCandidateGenerator._…
7e39b928
Cyrilvallez change DynamicCache function names from "split" to "batch_split" for …
f3e31611
Cyrilvallez Remove `_supports_dynamic_cache_class` attribute after rebase
8abe0551
Cyrilvallez Correct missing line lost in conflict resolution during rebasing
e9d0b25d
Cyrilvallez Add special case for Jamba
c902dc1d
Cyrilvallez Fix jamba test
2f838676
Cyrilvallez Coding style
2c51e031
Cyrilvallez coding style
3c0999b7
Cyrilvallez Cyrilvallez force pushed from 9e2968e8 to 3c0999b7 1 year ago
Cyrilvallez Correct missing import in rebasing
b494dd57
Cyrilvallez Simplify _validate_model_kwargs based on removal of _supports_dynamic…
70a01852
ArthurZucker
Cyrilvallez Simplify code paths in _contrastive_search
d38a9660
Cyrilvallez coding style
c8edaef3
Cyrilvallez
Cyrilvallez
zucchini-nlp
Cyrilvallez
ArthurZucker
Cyrilvallez
tctrautman
ArthurZucker
ArthurZucker commented on 2024-06-03
Cyrilvallez Update docstrings of cache methods
1e020d68
Cyrilvallez Update prepare_inputs_for_generation() -> past_key_values are always …
7bd2e3ee
Cyrilvallez
ArthurZucker
ArthurZucker approved these changes on 2024-06-05
HuggingFaceDocBuilderDev
Cyrilvallez
ArthurZucker
Cyrilvallez
ArthurZucker
ArthurZucker ArthurZucker merged bd5091df into main 1 year ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone