Model: HumanCompatibleAI/ppo-seals-CartPole-v0
Revision: a86541dd3744275227cb16d07192967fc6b7775e (fixed snapshot tree hash)
Original Source: https://huggingface.co/HumanCompatibleAI/ppo-seals-CartPole-v0
Task: Reinforcement Learning - Discrete control on CartPole (seals/CartPole-v0)
Route: rl-policy (Discrete 2-action MlpPolicy, extended from offline-rl / demonstration-policy)
Backend: stable-baselines3 2.9.0 + torch_npu 2.9.0
Device: npu:0 (Ascend910_9362)
PPO agent trained with Stable-Baselines3 on seals/CartPole-v0 (Gymnasium + SEALS 0.2.1 suite). Policy is MlpPolicy with MlpExtractor:
pi: [64, 64] ReLU, vf: [64, 64] ReLUaction_net: Linear 64 -> 2 (Discrete logits), value_net: Linear 64 -> 1[cart_pos, cart_vel, pole_angle, pole_vel] , action Discrete(2) (push left/right)np.ndarray float32 shape (4,) raw CartPole state. Batch inference supports (B,4). No image preprocessor.argmax deterministic action {0,1}. Horizon=1 (single step), coordinate_frame=cartpole-discrete../model_download/ppo-seals-CartPole-v0.zip (139KB) or HF snapshot_download fallback; no model substitution.torch_npu used: model.policy.to("npu:0"), all float tensors (obs, feats, latent_pi, logits) kept on npu:0. Verified:
npu:0npu:0npu:0npu:0torch.npu.synchronize() wrapped timing.Categorical(logits) on NPU normalizes logits internally (logits - logsumexp), so raw action_net logits used for consistency (probs diff <1e-9).stable_baselines3 source; trust_remote_code not needed (no custom code).gymnasium.make("seals/CartPole-v0") reset seed 0 and manual samples).action_net logits (shape 5x2, 10 values) + deterministic actions.max_abs=4.77e-07, tol=5.69e-03 (atol=1e-4, rtol=1e-3), finite=True, shape_ok=True, actions_match=True => PASS
python scripts/validate_policy_outputs.py --cpu cpu_values.json --npu npu_values.json[0,0,1,1,0].torch.npu.synchronize() before/after, warmup 3, measured 10 iterations batch=5pip install -r requirements.txt
python inference.pyPrints model/revision/route/backend/device/dtype, input summary, CPU vs NPU logits/probs/actions, synchronized latency, consistency and RESULT PASS/FAIL.
No weights are bundled; they are downloaded once from HuggingFace HumanCompatibleAI/ppo-seals-CartPole-v0 or reused from ./model_download.
torch_npu and npu:0. CPU fallback is treated as failure.seals/CartPole-v0 discrete action verified; other envs not tested.
