Error when loading weights

When loading model weights from hf, it is reading the last layer in the weights as the first layer and showing size mismatch, but the weights are fine I tried loading weights locally and it works fine. Also I have saved weights using the push to hub method only .

Both dense layers are named differently