src/transformers/models/deberta/modeling_tf_deberta.py/TFDebertaEncoder/get_rel_pos
class TFDebertaEncoder:    def get_rel_pos(self, hidden_states, query_states=None, relative_pos=None):
        if self.relative_attention and relative_pos is None:
            q = shape_list(query_states)[-2] if query_states is not None else shape_list(hidden_states)[-2]
            relative_pos = build_relative_position(q, shape_list(hidden_states)[-2])
        return relative_pos