mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 02:31:11 +06:00
Add support for device_map="auto"
to OPT (#17382)
This commit is contained in:
parent
71cced8ae3
commit
13541b4aa2
@ -381,6 +381,7 @@ class OPTPreTrainedModel(PreTrainedModel):
|
||||
config_class = OPTConfig
|
||||
base_model_prefix = "model"
|
||||
supports_gradient_checkpointing = True
|
||||
_no_split_modules = ["OPTDecoderLayer"]
|
||||
_keys_to_ignore_on_load_unexpected = [r"decoder\.version"]
|
||||
|
||||
def _init_weights(self, module):
|
||||
|
Loading…
Reference in New Issue
Block a user