Hi everyone, I'm SunXT-0719 on GitHub. We've been working on an experimental PTO/PTO-ISA kernel backend for Unsloth on Ascend NPUs and would like guidance on contributing it upstream.
The implementation includes SwiGLU forward/backward, RMSNorm, RoPE and attention paths with PyTorch/autograd integration. We've exercised it in LoRA SFT and GRPO generation/training. It also includes decoder graph replay and host/dispatch optimizations, so the figures below measure the combined backend.
We ran these comparisons in a fixed single-NPU environment.
- Earlier experimental fork, Qwen3-1.7B GRPO with W8A16. Approximately 2.34× steady full-step throughput versus a same-precision native torch_npu/HF fused-SDPA reference. The entire fresh 16-step process, including startup, was approximately 1.31× faster. Sampling trajectories differed, so the comparison did not use identical tokens. A predeclared work-sensitivity calculation gave approximately 2.26×.
- More recent upstream-pinned fork, Qwen2.5-0.5B BF16 SFT. Approximately 1.90× steady full-step throughput. Graph preparation took about 59 seconds, and the short cold 16-step process was slower than native, with a speedup factor of 0.354×.
These results apply to the tested models, forks and environment. The GitHub RFC describes finite-run stability, checkpoint-resume comparisons and held-out quality checks, including their limitations.
Two independent draft PRs are open for Ascend eager bootstrap and NPU LoRA cast removal. The PTO kernel source is still private, and we've held off on submitting kernel PRs while we seek direction.
Thanks to li-lizhe for suggesting single-purpose PRs with before/after tests and clear reporting of real-hardware validation, and for offering Ascend-side review and testing.
Would an optional PTO backend be welcome? Should it live in Core, Zoo, or an external backend package, and who should we coordinate with? We could start with a focused SwiGLU forward/backward contribution that includes source build instructions, supported configurations, native fallback and real-NPU validation.
Feedback from maintainers or others working on Ascend support would be appreciated. We're happy to keep the technical decisions in the GitHub RFC.