Unverified Commit 6d08ce2a authored by HAI's avatar HAI Committed by GitHub
Browse files

Use Optional with None default (#2770)

parent 380930a9
...@@ -376,7 +376,7 @@ class Grok1ForCausalLM(nn.Module): ...@@ -376,7 +376,7 @@ class Grok1ForCausalLM(nn.Module):
def load_weights( def load_weights(
self, self,
weights: Iterable[Tuple[str, torch.Tensor]], weights: Iterable[Tuple[str, torch.Tensor]],
use_presharded_weights: bool | None = None, use_presharded_weights: Optional[bool] = None,
): ):
if use_presharded_weights is None: if use_presharded_weights is None:
use_presharded_weights = self.use_presharded_weights use_presharded_weights = self.use_presharded_weights
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment