torch.manual_seed(123) model = GPTModel(GPT_CONFIG_124M) #setting output layer to use same weights as embedding layer. # as it is same dictionary. model.out_head.weight = model.tok_emb.weight tied_param_count = sum(p.numel() for p in model.parameters()) print(f"Total number of unique parameters: {tied_param_count}") __ __