Instructions to use Motif-Technologies/optimizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use Motif-Technologies/optimizer with Kernels:
# !pip install kernels from kernels import get_kernel # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("Motif-Technologies/optimizer", version=1) - Notebooks
- Google Colab
- Kaggle
Commit History
-
feat: CPUOffloadPool.reload_group에 sync_streams 파라미터 추가 (#31)
Unverified signature* feat: tag-based per-group reload for CPU offload + manual offload mode Extend CPUOffloadPool + Muon so callers can drive offload/reload explicitly (layer-lockstep overlap) rather than implicitly inside optimizer.step. CPUOffloadPool (torch-ext/optimizer/cpu_offload.py): * ``track(tensor, tag=None)`` — optional tag per managed tensor. * ``reload_group(tag, sync_streams=())`` — reload just the tensors tagged with ``tag``; the reload stream ``wait_stream`` s on each entry in ``sync_streams`` before issuing H2D. This avoids allocator cross-stream reuse races under ``PYTORCH_ALLOC_CONF=expandable_segments:True``: if the block returned by ``storage.resize_`` was last touched on an FSDP all-gather stream, waiting on that stream enforces FIFO ordering between the prior use and our H2D write. * ``reload_untagged()`` — bulk-reload everything not attached to a tag (for the non-expert portion of the optimizer state in layer- lockstep flows). * ``wait_reload()`` is now self-c…d7e2d58
-
feat: extend QK-Clip to support MLA (MuonClip Algorithm 1) [skip-build] (#28)
Unverified signature* feat: extend QK-Clip to support MLA (MuonClip Algorithm 1) [skip-build] Add MLA support to qk_clip.py following the MuonClip spec (docs/muon-clip.md): - parse_qk_layer: recognize 'wq_b' and 'wkv_b' MLA weight names - QKClipInfo: add is_mla, qk_nope_head_dim, qk_rope_head_dim, v_head_dim fields - get_qk_clip_info: branch on is_mla flag in clip_config - compute_scales: use kv_stride (qk_nope + v_head_dim) as effective head dim for wkv_b - qk_clip: simplify signature to (p, scales, info); vectorize MLA sub-region scaling via tensor reshape instead of Python per-head loops: wq_b: q_nope rows → √γ, q_pe rows → γ wkv_b: k_nope rows → √γ, v rows unchanged Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * style: ruff format (pre-commit fix) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add built binary [skip-build] --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: WyldeCat <skan1543@gmail.com> Co-authored-by: g…e8e2c81
-
Replace cpu_offload constructor param with turn_on/turn_off API (#26)
Unverified signature* Replace cpu_offload constructor param with turn_on/turn_off API [skip-build] Remove the cpu_offload boolean from Muon.__init__ and add explicit turn_on_cpu_offload() / turn_off_cpu_offload() methods instead. state_dict and load_state_dict now require offload to be disabled first (RuntimeError). Preserves AdamW tensor cache invalidation on load_state_dict. Adds test_toggle_correctness test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: skip empty FSDP shards in CPU offload and add storage validation Empty FSDP shards (storage size=0) were being tracked by CPUOffloadPool, causing double-free errors on resize_(0) during offload. This led to hangs on ranks 1-7 while rank 0 succeeded. - Skip tensors with empty storage in track() to avoid double-free - Add storage size validation in offload() and reload() with RuntimeError - Add logging for turn_on/turn_off_cpu_offload Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add built bina…05a75f1
-
draft commit for cpu_offload (#23)
TaehyunKim +3: github-actions[bot], wyldecat, Claude Opus 4.6 (1M context)Unverified signature* draft commit for cpu_offload * draft commit for cpu_offload [skip-build] * claude is british * Add built binary [skip-build] * fix load, save and add test * Add built binary [skip-build] * Fix yapf formatting for pre-commit CI [skip-build] Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: WyldeCat <skan1543@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>10848ab