Tied params cleanup (#24211)

* First test

* Add info for all models

* style

* Repo consistency

* Fix last model and cleanup prints

* Repo consistency

* Use consistent function for detecting tied weights
This commit is contained in:
Sylvain Gugger
2023-06-13 11:38:39 -04:00
committed by GitHub
parent 3723329d01
commit 695928e1e5
100 changed files with 240 additions and 7 deletions

View File

@@ -1191,6 +1191,7 @@ SAM_INPUTS_DOCSTRING = r"""
)
class SamModel(SamPreTrainedModel):
_keys_to_ignore_on_load_missing = [r"prompt_encoder.shared_embedding.positional_embedding"]
_tied_weights_keys = ["prompt_encoder.shared_embedding.positional_embedding"]
def __init__(self, config):
super().__init__(config)