# How does "\_tied\_weights\_keys" work?

**URL:** <https://discuss.huggingface.co/t/how-does-tied-weights-keys-work/134067>\
**Category:** Beginners\
**Created:** [January 3, 2025, 6:39am UTC](https://discuss.huggingface.co/t/how-does-tied-weights-keys-work/134067 "2025-01-03T06:39:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnsonWythe](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@JohnsonWythe](https://discuss.huggingface.co/u/JohnsonWythe)\
**Post date:** [January 3, 2025, 6:39am UTC](https://discuss.huggingface.co/t/how-does-tied-weights-keys-work/134067/1 "2025-01-03T06:39:44Z")

</div>

I would like to ask the usage of \_tied\_weights\_keys. I noticed that there is no “cls.predictions.decoder.weight” in BertForMaskedLM and it should be tied with input embeddings.

However, I try to check it with the following codes:

```auto
from transformers import AutoModel
from transformers.modeling_utils import find_tied_parameters

model = AutoModel.from_pretrained("Bert-base-uncased")
find_tied_parameters(models)

```

There are no parameters. So I would like to know how to tie the input embedding with decoder outputs?
