We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3ebf0a commit 3943257Copy full SHA for 3943257
vllm/model_executor/layers/layernorm.py
@@ -170,7 +170,9 @@ def __init__(
170
)
171
weight_dtype = dtype or torch.get_default_dtype()
172
self.has_weight = has_weight
173
- self.weight = nn.Parameter(torch.ones(hidden_size, dtype=weight_dtype))
+ self.weight = torch.ones(hidden_size, dtype=weight_dtype)
174
+ if self.has_weight:
175
+ self.weight = nn.Parameter(self.weight)
176
177
if current_platform.is_rocm():
178
self.rocm_norm_func = dispatch_rocm_rmsnorm_func(
0 commit comments