Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RL-Align/RL-Kernel
/ types & classes
Types & classes
193 in github.com/RL-Align/RL-Kernel
⨍
Functions
1,290
◇
Types & classes
193
↳
Endpoints
3
↓ 73 callers
Class
WeightManifestValidationError
Raised when a weight update manifest is incomplete or inconsistent.
rl_engine/executors/bridge.py:1343
↓ 45 callers
Class
WeightBridgeUnavailableError
Raised when a requested transport is not supported by this runtime.
rl_engine/executors/bridge.py:1339
↓ 34 callers
Class
LocalTensorCopyBridge
Safe local transport for the weight synchronization protocol. This transport intentionally copies tensors. It is not the final zero-copy
rl_engine/executors/bridge.py:1508
↓ 27 callers
Class
NativeLogpOp
Pure PyTorch native fallback for Fused LogP.
rl_engine/kernels/ops/pytorch/loss/logp.py:9
↓ 27 callers
Class
SharedMemoryTensorBridge
Same-node shared-memory transport with zero-copy import semantics. Publishing creates a shared-memory snapshot of model state. Importing tha
rl_engine/executors/bridge.py:1696
↓ 26 callers
Class
NativeAttentionOp
Pure PyTorch native standard-softmax attention reference. out = softmax(Q Kᵀ * scale + masks) @ V Hand-written naive softmax -- delibera
rl_engine/kernels/ops/pytorch/attention/standard_attn.py:13
↓ 24 callers
Class
NativeLinearLogpOp
Naive PyTorch reference for fused linear log-prob. Materializes the full ``[N, V]`` logits with a single ``F.linear`` and runs ``log_softmax`
rl_engine/kernels/ops/pytorch/loss/linear_logp.py:442
↓ 17 callers
Class
NativeRoPEOp
Pure PyTorch reference RoPE — GPT-NeoX style (HF rotate-half). Qwen3-8B defaults: theta=1e6, head_dim=128, full-dimension rotation (half=64).
rl_engine/kernels/ops/pytorch/rotary_embedding/rope.py:10
↓ 17 callers
Class
StatelessForwardConfig
Configuration for no-cache reference/reward model scoring.
rl_engine/executors/stateless_executor.py:23
↓ 13 callers
Class
NativeGRPOLossOp
Pure PyTorch native fallback for the fused GRPO loss. Consumes logits directly: the per-token ``policy_ratio`` / ``kl_penalty`` come from the
rl_engine/kernels/ops/pytorch/loss/grpo_loss.py:13
↓ 13 callers
Class
NativeKVCacheAttnOp
Pure PyTorch native KV-cache attention reference (ISSUE #108 WS1). Decode/incremental attention: the past keys/values live in a cache and th
rl_engine/kernels/ops/pytorch/attention/kv_cache.py:13
↓ 13 callers
Class
StatelessForwardExecutor
Lightweight Reference/Reward scoring wrapper. The executor runs one full-sequence forward pass with ``use_cache=False`` whenever the wra
rl_engine/executors/stateless_executor.py:93
↓ 13 callers
Class
WeightUpdateRejectedError
Raised when a weight update cannot be imported or acknowledged.
rl_engine/executors/bridge.py:1347
↓ 12 callers
Class
NativeLMHeadOp
Pure PyTorch native language-model-head reference. out = hidden @ weight.t() (+ bias) Projects hidden states back to vocabulary logits -
rl_engine/kernels/ops/pytorch/linear/lm_head.py:12
↓ 12 callers
Class
NativeMatmulOp
Pure PyTorch reference GEMM. It intentionally uses one `torch.matmul` call in fp32 for the gold path and does not implement split-K or manual
rl_engine/kernels/ops/pytorch/linear/matmul.py:10
↓ 12 callers
Class
NativeRMSNormOp
Pure Pytorch native RMSNorm reference out = x * rsqrt(mean(x^2, dim=-1) + eps) * weight
rl_engine/kernels/ops/pytorch/norm/rms_norm.py:9
↓ 10 callers
Class
FusedLinearLogpSM90Op
SM90 (Hopper) TMA+WGMMA fused linear log-prob. Computes ``log_softmax(hidden @ W^T + b)[target]`` without materializing the ``[N, V]`` logits
rl_engine/kernels/ops/cuda/loss/linear_logp.py:252
↓ 10 callers
Class
RolloutExecutor
Unified execution engine for RL rollout (sampling) phase. Manages shared weights and dispatches hardware-specific kernels for large-scale sam
rl_engine/executors/rollout.py:22
↓ 10 callers
Class
TritonLinearLogpOp
Triton fused linear log-prob op. Computes per-token ``log_softmax(hidden @ W^T + b)[target]`` without materializing the ``[N, V]`` logits: th
rl_engine/kernels/ops/triton/loss/linear_logp.py:157
↓ 10 callers
Class
VLLMWeightInstallAdapter
Guarded adapter for installing imported tensors into a rollout engine. vLLM does not expose one stable public hot-weight update API across v
rl_engine/executors/bridge.py:110
↓ 9 callers
Class
CUDAVMMTensorBridge
Same-node CUDA VMM transport with POSIX-fd zero-copy import semantics. This is the modern CUDA IPC path for WSL2/native Linux runtimes where
rl_engine/executors/bridge.py:1993
↓ 9 callers
Class
CandidateSpec
One implementation to validate against the gold path.
rl_engine/kernels/gtest/op_checks.py:28
↓ 9 callers
Class
FixedLogitsModel
tests/test_alignment_model_wrappers.py:20
↓ 9 callers
Class
KernelRegistry
Central dispatcher for high-performance kernels. Handles dynamic routing between ROCm and CUDA backends at runtime.
rl_engine/kernels/registry.py:80
↓ 9 callers
Class
NativeEmbeddingOp
Pure PyTorch native token-embedding reference. out = weight[token_ids] (a plain row gather, no accumulation) Maps integer token ids to
rl_engine/kernels/ops/pytorch/linear/embedding.py:10
↓ 9 callers
Class
NativeRatioKLOp
PyTorch native fallback for the fused ratio + KL operator.
rl_engine/kernels/ops/pytorch/loss/ratio_kl.py:13
↓ 9 callers
Class
StatelessForwardInputs
Dense full-sequence batch for stateless scoring.
rl_engine/executors/stateless_executor.py:53
↓ 8 callers
Class
DeepSpeedTrainingConfig
Configuration for the optional DeepSpeed training worker.
rl_engine/executors/deepspeed_trainer.py:42
↓ 8 callers
Class
NativeSwiGLUOp
Pure PyTorch native SwiGLU reference. out = silu(gate) * up = (gate * sigmoid(gate)) * up Middle stage of the Qwen3/Llama MLP: ``gate``
rl_engine/kernels/ops/pytorch/activation/swiglu.py:44
↓ 8 callers
Class
TritonGRPOLossOp
Triton fused GRPO loss op. The per-token ``policy_ratio`` / ``kl_penalty`` are produced by the fused ``ratio_kl`` Triton kernel (logits -> ra
rl_engine/kernels/ops/triton/loss/grpo_loss.py:58
↓ 7 callers
Class
DeepSpeedTrainingWorker
Training worker implementation backed by a real DeepSpeed engine contract. DeepSpeed is optional for RL-Kernel, so importing this module nev
rl_engine/executors/deepspeed_trainer.py:73
↓ 7 callers
Class
IPCWeightBridge
Same-node legacy PyTorch CUDA IPC transport. Publishing creates a complete CUDA snapshot and stores PyTorch `reduce_tensor` handles in t
rl_engine/executors/bridge.py:2371
↓ 7 callers
Class
NativeSiLUOp
Pure PyTorch native SiLU reference. out = x * sigmoid(x) (a.k.a. Swish) Element-wise activation used by the Qwen3 SwiGLU MLP (hidd
rl_engine/kernels/ops/pytorch/activation/swiglu.py:10
↓ 7 callers
Class
TritonRatioKLOp
Fused policy-ratio + KL-penalty op (Triton; CUDA & ROCm).
rl_engine/kernels/ops/triton/loss/ratio_kl.py:183
↓ 7 callers
Class
_LocalUpdateRecord
rl_engine/executors/bridge.py:1445
↓ 6 callers
Class
RolloutStageResult
Result consumed by training workers.
rl_engine/executors/training_contract.py:21
↓ 5 callers
Class
BenchmarkMetrics
End-to-end performance metrics for a single benchmark run.
benchmarks/profiler.py:42
↓ 5 callers
Class
PagedKVScoringConfig
Configuration for a generation-style paged-KV scoring baseline.
rl_engine/executors/paged_kv_baseline.py:29
↓ 5 callers
Class
PolicyModelWrapper
Standard adapter for the trainable policy model used by RL losses.
rl_engine/alignment/model_wrappers.py:77
↓ 5 callers
Class
RayWorkerSpec
Factory and constructor arguments for a worker hosted in a Ray actor.
rl_engine/executors/ray_actor_manager.py:66
↓ 5 callers
Class
VLLMIPCWeightUpdateRequestBuilder
Build the public vLLM IPC weight-update request shape. vLLM 0.18+ expects `LLM.update_weights({"update_info": ...})` for IPC backends. T
rl_engine/executors/bridge.py:191
↓ 5 callers
Class
VLLMSharedPrefixSampler
Lazy vLLM wrapper that preserves shared prompt prefixes across candidates.
rl_engine/executors/vllm_sampler.py:77
↓ 4 callers
Class
FakeLLMEngine
tests/test_weight_sync_bridge.py:699
↓ 4 callers
Class
NativeAttentionOp
PyTorch SDPA fallback for FlashAttention-layout tensors.
rl_engine/kernels/ops/pytorch/attention/__init__.py:8
↓ 4 callers
Class
OperatorCase
One deterministic test object for an operator candidate.
rl_engine/kernels/gtest/op_checks.py:16
↓ 4 callers
Class
RayRuntimeConfig
Configuration for lazy Ray runtime initialization.
rl_engine/executors/ray_actor_manager.py:18
↓ 4 callers
Class
StatelessForwardOutputs
Normalized model outputs consumed by scoring adapters.
rl_engine/executors/stateless_executor.py:63
↓ 4 callers
Class
VLLMCUDAVMMExternalStorageAdapter
Bind vLLM worker parameters to tensors imported from a CUDA VMM manifest. The vLLM worker imports the manifest itself through `apply_model`,
rl_engine/executors/bridge.py:617
↓ 4 callers
Class
VLLMInProcessWeightReloadAdapter
Install a manifest through vLLM's in-process `reload_weights` utility path. This adapter is for single-process vLLM deployments, for example
rl_engine/executors/bridge.py:327
↓ 4 callers
Class
VLLMSamplerConfig
Configuration for vLLM-backed GRPO rollout sampling.
rl_engine/executors/vllm_sampler.py:12
↓ 4 callers
Class
WeightUpdateManifest
Immutable public record for a complete published weight update.
rl_engine/executors/bridge.py:1387
↓ 4 callers
Class
_EmbeddingLMHeadModel
rl_engine/executors/deepspeed_trainer.py:54
↓ 3 callers
Class
BatchOnlyWorker
tests/test_stateless_training_contract.py:22
↓ 3 callers
Class
FakeRayModule
tests/test_ray_actor_manager.py:68
↓ 3 callers
Class
FakeVLLMEngine
tests/test_weight_sync_bridge.py:562
↓ 3 callers
Class
PerformanceProfiler
Automated end-to-end performance profiling suite. Measures Tokens/sec, TFLOPS, and peak VRAM across different GPU targets for RL-Kernel
benchmarks/profiler.py:156
↓ 3 callers
Class
RayActorManager
Create, wrap, and clean up Ray actors for RL-Kernel workers.
rl_engine/executors/ray_actor_manager.py:75
↓ 3 callers
Class
RocmFlashAttentionOp
Standard FlashAttention wrapper for ROCm. Demonstrates the reference structure for adding new operator families.
rl_engine/kernels/ops/rocm/attention/flash_attn.py:18
↓ 3 callers
Class
TorchRLTrainingConfig
Config shared by local and DeepSpeed training workers.
rl_engine/executors/training_contract.py:57
↓ 3 callers
Class
VLLMCheckpointWeightReloadAdapter
Install a manifest through vLLM's checkpoint-path reload utility path. This path works with vLLM's default EngineCore multiprocessing becaus
rl_engine/executors/bridge.py:436
↓ 2 callers
Class
CaseCheck
Per-case result for one candidate.
rl_engine/kernels/gtest/op_checks.py:55
↓ 2 callers
Class
DeepSpeedUnavailableError
Raised when the optional DeepSpeed runtime cannot be imported.
rl_engine/executors/deepspeed_trainer.py:37
↓ 2 callers
Class
FakeDeepSpeedModule
tests/test_deepspeed_training_worker.py:48
↓ 2 callers
Class
FakeLLM
tests/test_weight_sync_bridge.py:703
↓ 2 callers
Class
FakeReferenceModel
tests/test_stateless_executor.py:25
↓ 2 callers
Class
FakeReloadEngine
tests/test_weight_sync_bridge.py:735
↓ 2 callers
Class
FakeRemoteActorClass
tests/test_ray_actor_manager.py:50
↓ 2 callers
Class
FlashAttentionOp
Standard FlashAttention wrapper for CUDA. Demonstrates the reference structure for adding new operator families.
rl_engine/kernels/ops/cuda/attention/flash_attn.py:10
↓ 2 callers
Class
GPUTargetInfo
Hardware target identification for cross-GPU benchmarking.
benchmarks/profiler.py:29
↓ 2 callers
Class
IterationSpec
tests/test_ray_actor_manager.py:20
↓ 2 callers
Class
NormalizedRolloutCandidate
Stable RL-Kernel view over a vLLM request output candidate.
rl_engine/executors/vllm_sampler.py:56
↓ 2 callers
Class
ObjectOutput
tests/test_alignment_model_wrappers.py:16
↓ 2 callers
Class
OperatorSpec
rl_engine/kernels/gtest/operator_specs.py:18
↓ 2 callers
Class
OutputCheck
Per-output comparison result.
rl_engine/kernels/gtest/op_checks.py:38
↓ 2 callers
Class
PagedKVScoringBaseline
Correctness-first baseline for generation-engine-style scoring. This wrapper reserves a paged KV-cache and block table before running the
rl_engine/executors/paged_kv_baseline.py:85
↓ 2 callers
Class
ReferenceModelWrapper
Standard adapter for the frozen reference model used by KL penalties.
rl_engine/alignment/model_wrappers.py:113
↓ 2 callers
Class
SamplerBackend
rl_engine/kernels/sampling.py:11
↓ 2 callers
Class
StatelessForwardResult
Scoring tensors and scalar metrics produced by the stateless executor.
rl_engine/executors/stateless_executor.py:72
↓ 2 callers
Class
StatelessScoringWorker
Attach no-cache reference/reward scores to a completed rollout payload.
rl_engine/executors/training_contract.py:316
↓ 2 callers
Class
SyntheticRLKernelBatch
Synthetic RL-shaped tensors shared by kernel tests and benchmarks.
rl_engine/testing/rl_batch.py:13
↓ 2 callers
Class
TrainingStageResult
Result produced by training workers.
rl_engine/executors/training_contract.py:37
↓ 2 callers
Class
_StateDictModule
benchmarks/benchmark_weight_sync_bridge.py:649
↓ 1 callers
Class
BenchmarkConfig
benchmarks/benchmark_rl_kernels.py:56
↓ 1 callers
Class
BenchmarkConfig
benchmarks/benchmark_ratio_kl.py:51
↓ 1 callers
Class
CacheReturningModel
tests/test_stateless_executor.py:70
↓ 1 callers
Class
CandidateReport
Aggregate report for one candidate implementation.
rl_engine/kernels/gtest/op_checks.py:66
↓ 1 callers
Class
Constants
rl_engine/platforms/constants.py:96
↓ 1 callers
Class
DeviceContext
Hardware-aware context manager for high-performance RL tasks. Provides transparent support for both AMD (ROCm/HIP) and NVIDIA (CUDA) arc
rl_engine/platforms/device.py:10
↓ 1 callers
Class
FailingReloadEngine
tests/test_weight_sync_bridge.py:772
↓ 1 callers
Class
FailingVLLMEngine
tests/test_weight_sync_bridge.py:679
↓ 1 callers
Class
FakeActorHandle
tests/test_ray_actor_manager.py:41
↓ 1 callers
Class
FakeBothModel
tests/test_stateless_executor.py:220
↓ 1 callers
Class
FakeDeepSpeedEngine
tests/test_deepspeed_training_worker.py:22
↓ 1 callers
Class
FakeGenerationReferenceModel
tests/test_paged_kv_baseline.py:21
↓ 1 callers
Class
FakeObjectRef
tests/test_ray_actor_manager.py:26
↓ 1 callers
Class
FakeReferenceRewardScorer
tests/test_stateless_training_contract.py:165
↓ 1 callers
Class
FakeRemoteMethod
tests/test_ray_actor_manager.py:31
↓ 1 callers
Class
FakeRewardModel
tests/test_stateless_executor.py:50
↓ 1 callers
Class
FakeRewardScorer
tests/test_stateless_training_contract.py:99
↓ 1 callers
Class
Fallback
tests/test_op_accuracy.py:209
next →
1–100 of 193, ranked by callers