Motif 2 12.7B technical report
Paper
โข
2511.07464
โข
Published
โข
39
Optimizer is a python package that provides:
import torch
from torch.distributed.fsdp import FullyShardedDataParallel as FSDP
from kernels import get_kernel
optimizer = get_kernel("motif-technologies/optimizer")
get_default_muon_param_groups = optimizer.muon.get_default_muon_param_groups
model = None # your model here
fsdp_model = FSDP(model)
# muon, in nature, cannot use 1-d tensor
# we provide helper function to group such tensors
# you can use your own function, if necessary
params = get_default_muon_param_groups(model) # user can write own is_muon_func, if necessary
optim = optimizer.Muon(
params,
lr=0.01,
momentum=0.9,
weight_decay=1e-4,
)
This project uses pre-commit to automatically check and format code before commits.
Install pre-commit:
pip install pre-commit
Install the git hooks:
pre-commit install
Once installed, the configured hooks will run automatically on each commit.
The following tools are run via pre-commit:
--style=file) Run all checks on the entire codebase:
pre-commit run --all-files
Run a specific hook (example: isort):
pre-commit run isort --all-files