{"categories":[{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/8"}],"enrichment":{"capability":"Implements a hardware-aware Gram Newton-Schulz algorithm for polar decomposition that serves as a drop-in replacement for standard Newton-Schulz in PyTorch optimizers like Muon, achieving faster convergence through symmetric GEMM kernels on NVIDIA GPUs.","skillfed_tags":["gpu-optimization","matrix-algorithms","pytorch-optimizer"],"use_cases":["Drop-in replacement for Newton-Schulz in Muon optimizer for faster large-model training on H100 or B200/B300 clusters.","Accelerating polar decomposition in custom orthogonalization-based optimizers that need symmetric matrix operations.","Autotuning restart schedules for Newton-Schulz iterations to balance speed and numerical stability in iterative algorithms.","Training transformer models with Muon where 2D weight matrices benefit from symmetric GEMM kernels on Hopper/Blackwell hardware."],"what_it_does":"Gram Newton-Schulz is a specialized optimizer component that accelerates polar decomposition\u2014a key operation in the Muon optimizer\u2014by iterating on a smaller symmetric Gram matrix instead of the full rectangular matrix. This mathematical reformulation reduces floating-point operations and enables more efficient symmetric GEMM kernels on modern NVIDIA GPUs. The package provides both a standalone GramNewtonSchulz callable class and integration into a full Muon optimizer that handles mixed parameter types (2D weights for orthogonalization, scalars via an auxiliary optimizer) with autotuned restart points for numerical stability.\n\nIt depends on torch for tensor operations, quack-kernels for custom GEMM implementations, and nvidia-cutlass-dsl for low-level GPU kernel generation. The algorithm is mathematically equivalent to standard Newton-Schulz with no claimed training accuracy loss, making it a direct swap for existing Muon-based training pipelines. Installation requires explicit GPU hardware (Hopper or Blackwell) and careful dependency management to avoid pip installing a CPU-only PyTorch.","worth_installing":"Yes, if you are training on NVIDIA Hopper or Blackwell GPUs with PyTorch 2.7.1+ and use or plan to use Muon as your optimizer. The package is actively maintained, has no known vulnerabilities, carries permissive MIT licensing, and offers a mathematically equivalent but faster polar decomposition with no training accuracy tradeoff. No, if you lack the required GPU hardware or are locked to older PyTorch versions\u2014the installation is hardware-specific and will fail gracefully without the target GPU."},"id":"gram-newton-schulz","links":{"html":"https://skillfed.io/packages/gram-newton-schulz","md":"https://skillfed.io/packages/gram-newton-schulz.md","pypi":"https://pypi.org/project/gram-newton-schulz/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-02","license_spdx":null,"license_treatment":"permissive","name":"gram-newton-schulz","python_support":"supports_current","summary":"Fast Newton-Schulz Algorithm with Kernels"},"popularity":{"monthly_downloads":176350,"position":10246,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.1.6"}
