Skip to content

Deprecated kwargs in _get_config method for model generation with caching #198

@sabilmakbar

Description

@sabilmakbar

Cache kwargs max_batch_size alr deprecated since HF ver 4.46.1
https://github.com/huggingface/transformers/blob/v4.46.1/src/transformers/cache_utils.py#L319

This Is related to this part of the faulty code:

cache_kwargs = {
"config": self.config.decoder,
"max_batch_size": max_batch_size,
"max_cache_len": max_cache_len,
"device": self.device,
"dtype": cache_dtype,
}
self._cache = cache_cls(**cache_kwargs)

when testing on this snippet:
https://github.com/huggingface/parler-tts/blob/main/INFERENCE.md#compilation

Only need to fix the name from max_batch_size to batch_size, can open the PR too if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions