Initial K3 snapshot: 0.5B KDA/MLA/MoE train path
Standalone tree split from LLMRL/projects/kda. Includes Triton dt_bias backward fix, train_k3 --preset 0.5b, SFT, Docker runtime, and tests.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
"""Identity dispatch: keep the NVIDIA Triton implementation in this tree."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
from typing import TypeVar
|
||||
|
||||
F = TypeVar("F", bound=Callable)
|
||||
|
||||
|
||||
def dispatch(operation: str):
|
||||
def decorator(func: F) -> F:
|
||||
return func
|
||||
|
||||
return decorator
|
||||
|
||||
|
||||
class BaseBackend:
|
||||
backend_type = "triton"
|
||||
|
||||
def is_available(self) -> bool:
|
||||
return True
|
||||
|
||||
def is_enabled(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
class BackendRegistry:
|
||||
@classmethod
|
||||
def ensure_initialized(cls, operation: str) -> None:
|
||||
return None
|
||||
|
||||
|
||||
__all__ = ["BackendRegistry", "BaseBackend", "dispatch"]
|
||||
Reference in New Issue
Block a user