Generate: detect special architectures when loaded from PEFT
# What does this PR do?

Fixes #23686 

As identified in [this comment](https://github.com/huggingface/transformers/issues/23686#issuecomment-1587285715), a PEFT-loaded BLOOM can't be used as an assistant with assisted generation.

BLOOM (and GPTBigCode) need special handling due to their different cache API, and the architecture detection code was incompatible with PEFT models. This PR adds the logic to detect these special architectures when loaded with PEFT.
_The documentation is not available anymore as the PR was closed or merged._<|||||>The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_24198). All of your documentation changes will be reflected on that endpoint.