mstar.engine.resources.dsa.config
What a model declares for DeepSeek sparse attention (DSA): its config, spec and step.
Kept free of the manager so a submodule can declare a step without importing it.
Classes
-
class mstar.engine.resources.dsa.config.DSAConfig(kv_cache: str, topk: int)[source]
Bases: object
- Parameters:
-
-
kv_cache: str
-
topk: int
-
class mstar.engine.resources.dsa.config.DSASpec(resource_key: str, nodes: set[str], config: mstar.engine.resources.dsa.config.DSAConfig)[source]
Bases: NodeResourceSpec
- Parameters:
-
-
config: DSAConfig
-
depends_on()[source]
Keys whose specs this one builds against; the engine resolves them
into EngineResourceInfo.dependencies.
- Return type:
set[str]
-
property resource_class: type[Resource]
What builds this spec. Imported inside the property, so declaring a
resource stays free of the manager and its kernels.
The builder, not necessarily the class built: an attention spec names
AttentionManager, whose build picks a backend subclass.
-
class mstar.engine.resources.dsa.config.DSAStep(segments: tuple[mstar.engine.resources.step.Segment, ...] | None = None)[source]
Bases: ResourceStep
- Parameters:
segments (tuple[Segment, ...] | None)