Python class
Shardable
Shardableβ
class max.nn.Shardable(*args, **kwargs)
Bases: Protocol
Protocol for objects that support sharding across multiple devices.
This protocol defines the interface that all shardable components (like Linear layers and Weight objects) must implement to participate in distributed computation.
shard()β
shard(devices)
Creates a sharded view of this object for a specific device.
sharding_strategyβ
property sharding_strategy: ShardingStrategy | None
Gets the weight sharding strategy.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!