Model: sb3/dqn-LunarLander-v2 (https://huggingface.co/sb3/dqn-LunarLander-v2)
Revision: 3f631509a3a70816ba982661e79a1f25f2e617bb
Route: discrete-rl (DQN extends offline-rl) — state (8-dim) → Q-values (4) → discrete action
Task: LunarLander-v2 discrete control (4 actions: noop, left engine, main engine, right engine)
Backend: stable_baselines3 2.9.0 + torch 2.9.0+cpu + torch_npu on Ascend910_9362 (npu:0)
DType: float32 (FP32)
DQN agent trained with stable-baselines3 RL Zoo on LunarLander-v2. Architecture: MlpPolicy with net_arch=[256,256] → Linear(8→256) → ReLU → Linear(256→256) → ReLU → Linear(256→4). Input is LunarLander observation Box(8,) : [x, y, vx, vy, angle, ang_vel, leg_contact1, leg_contact2]. Output is Q-values for 4 discrete actions; greedy action = argmax(Q). This adaptation maps to offline-rl family (Decision Transformer contractor: state/action/RTG) but with discrete Q-learning; validated as continuous Q-value tensor rather than environment reward.
Box(-inf, inf, (8,), float32) lunar lander state, normalized none, dtype float32.Discrete(4) predicted via Q-network; validated object is Q-value tensor [1,4] and derived greedy action. horizon=1, action_dim=4, coordinate_frame=discrete.inference.py loads from https://huggingface.co/sb3/dqn-LunarLander-v2 via huggingface_hub snapshot_download + DQN.load(..., map_location='cpu') then policy.to(npu:0).pip install -r requirements.txt
python inference.pyDefault run prints model/revision/route/backend/device/dtype, input summary, Q-values, action, synchronized latency, CPU-NPU consistency and PASS/FAIL. All floating tensors and outputs are explicitly on npu:0.
Fixed observation obs=[0.0, 1.0, 0.0, -0.5, 0.1, 0.2, 0.0, 0.0] (float32, shape [1,8], device npu:0):
[85.373619, 84.597313, 86.116455, 86.668724] device cpu[85.373611, 84.597328, 86.116440, 86.668724] device npu:03 (fire right engine) both CPU and NPU — horizon 1, action_dim 4max_abs=1.526e-05 MAE=9.537e-06 tolerance=8.677e-02 (atol=1e-4 rtol=1e-3) PASS, shape [1,4], finite Truevalidate_policy_outputs.pyPerformance (synchronized torch.npu.synchronize() before/after, warmup 3 + 10 measured):
benchmark_policy.py --items-per-call 1 --unit decisions confirms decisions_per_s above.Device proof (see assets/npu_device_call.png):
torch.npu.is_available()=True, device_count=2, device_name=Ascend910_9362policy first param device npu:0, q_net target param npu:0, input tensor npu:0, output tensor npu:0, sampler none.torch_npu, stable_baselines3>=2.9.0, gym==0.26.2, shimmy>=0.2.1 (for Gym→Gymnasium shim).npu:0 only; multi-card not evaluated. Memory <100 MB peak.


All PNGs are rendered from real terminal logs via render_xterm_evidence.mjs --style raw with SHA256 verification.
inference.py — default python inference.py loads from HF cache, runs NPU inference, validates CPU/NPU, benchmarks.requirements.txt — pinned dependencies.assets/ — three xterm evidence images.Model weights URL: https://huggingface.co/sb3/dqn-LunarLander-v2