CUDA kernels for the CPM (Chinese Pre-trained Model) family, providing optimized operations like rotary position embedding, layer normalization, and activation functions. Current version is 1.0.11, with irregular release cadence.
pip install cpm-kernelsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize CPMKernel and apply rotary position embedding on a random tensor.
Ensure torch.cuda.is_available() is True before using.
Use recommended alternatives (e.g., torch's native layernorm) or avoid deprecated calls.