export HF_ENDPOINT=https://hf-mirror.com
pip install -r requirements.txt
python3 inference.py以下为 Ascend NPU 真实推理输出(Ascend910_9362, CANN 8.5.1, torch_npu 2.9.0):
=== huggy v8 fixed inference ===
device: Ascend910_9362
ckpt downloaded (6s)
ckpt top keys: ['Policy', 'global_step', 'Optimizer:value_optimizer', 'Optimizer:critic']
sd keys: 21
layer 0: (512, 59)
layer 1: (512, 512)
layer 2: (512, 512)
mu head: (21, 512)
output shape: (8, 21)
output sample: [0.9503824710845947, 0.9750116467475891, 1.1814320087432861, -0.8057205080986023, -0.6787391304969788]
=== RESULT ===
model=PaulVialard/ppo-Huggy | params=566805 | out_shape=(8,21) | device=Ascend910_9362 | time=7.1s
ALLDONE结构:Huggy/checkpoint.pt 的 Policy state_dict(21 keys)逐层重建
network_body._body_endoder.seq_layers(59→512→512→512, ReLU)+
action_model._continuous_distribution.mu(512→21 连续动作头),
共 566,805 参数,batch=8 随机观测前向输出 (8,21) 关节力矩,7.1s 端到端完成。