Why named_parameters() does not return bias?

I use the following code:

for k,v in model.named_parameters():
    print(k)

Only weight returned:

base_model.model.model.embed_tokens.weight
base_model.model.model.layers.0.self_attn.q_proj.base_layer.weight
base_model.model.model.layers.0.self_attn.q_proj.lora_A.default.weight
base_model.model.model.layers.0.self_attn.q_proj.lora_B.default.weight
base_model.model.model.layers.0.self_attn.k_proj.base_layer.weight

Why doesn’t it return bias? What if I want it to return bias?

Could you post the setup of the layer you are using?

sorry. It’s my fault. The bias of the linear layer in my model structure is false. :sweat_smile: :rofl: :joy:
thanks your reply