Model Name: PaulVialard/ppo-Huggy
Revision: 1fd517574882e4b765aa24a2b078d91fa1ab9072 (Huggy-1009955.pt 13MB + Huggy.onnx 2.2MB, step 1,009,955)
Model Weight URL: https://huggingface.co/PaulVialard/ppo-Huggy
Model Type: Reinforcement Learning (PPO, ML-Agents Huggy)
Task Type: reinforcement-learning / offline-rl (vector observation → continuous action)
Architecture Family: MLP Policy (512×3 ReLU + continuous Gaussian head)
Pipeline Tag: reinforcement-learning
Weights: Huggy/Huggy-1009955.pt (13 MB, PyTorch) + Huggy.onnx (2.2 MB, ONNX) – upstream repo contains 200+ checkpoints.
License: Unknown (Unity ML-Agents based, check upstream README)
PPO agent trained on Unity ML-Agents Huggy (Huggy the sock-like creature). Input is 59-dim vector observation (raycasts, positions, velocities, etc.), output is 21-dim continuous action (joint torques/forces) sampled from Gaussian N(mu, sigma) where mu is MLP output and log_sigma learned. This adaptation validates deterministic mu (clipped to [-1,1]) on Ascend NPU with exact CPU↔NPU consistency.
| Field | Value |
|---|---|
| Input Format | obs [batch, 59] float32, vector observation |
| Axis Order | [B, OBS_DIM] – MLP input |
| Observation Dim | 59 (ML-Agents vector obs; normalized with running_mean/var) |
| Action Dim | 21 continuous (mlagents continuous_act_size_vector=21, no discrete) |
| Horizon / Chunk | 1 (single-step policy; no action chunk, no diffusion steps) |
| Normalizer | observation_encoder.processors.0.normalizer + processors.0.normalizer duplicate (running_mean[59], running_var[59], steps=1009956) |
| Hidden Layers | 3 × Linear 512 (seq_layers 0,2,4) with ReLU: 59→512→512→512 |
| Action Head | mu: Linear(512→21) + log_sigma [1,21] (deterministic inference outputs mu, clipped to [-1,1]) |
| Dtype | float32 (weights fp32, compute fp32, no fp16/bf16) |
| Batch (demo) | 4 (tested also 1 and 16) |
| Preprocessing | normalized = (obs - mean) / sqrt(var + 1e-8) then MLP; synthetic deterministic N(0.8)+0.1*b seed 42 |
| Data Source | Synthetic deterministic (no Unity env required), reproducible with seed 42 |
| Output | mu [B,21] float32 + clipped [B,21] in [-1,1] – both finite, shape verified |
No Unity environment needed; zero-shot forward only.
torch.npu.is_available()==True, device Ascend910_9362, device_count 2, target npu:0npu-smi info and scripts/check_npu.pypip install -r requirements.txtModel weights: auto-loaded from /opt/atomgit/adapt-npu-agent/working/models/ppo-Huggy if present, else from https://huggingface.co/PaulVialard/ppo-Huggy via hf_hub_download (requires HF_ENDPOINT mirror if needed). No tokenizer, no extra Unity binary.
Default command (runs synthetic demo with NPU):
python inference.pyExpected output includes:
model_name, revision, trainer ppo, route offline-rl, arch obs_dim/act_dimconfig: trainer=ppo hidden=512 layers=3obs shape [4,59], sample values, statsmu shape [4,21], sample, finite, boundsfirst_param device: npu:0, input device: npu:0, NPU mu shape: [4,21] device: npu:0first run (compile) time with torch.npu.synchronize() and second run timemax_abs, allcloseFinal state: SUCCESSSupports different batch sizes (1, 16 validated).
Run: python inference.py (batch=4, obs_dim=59, act_dim=21, float32, npu:0)
Input:
obs [4,59], sample [1.5415,1.1898,0.7205,-1.6844,0.5427], mean 0.1935 std 0.7956Output:
mu [4,21], sample [-0.00986,-0.25189,0.11080,0.11443,-0.12403] min -0.5048 max 0.5754mu [4,21], sample [-0.00986,-0.25189,0.11080,0.11443,-0.12403] (max_abs 2.08e-07)finite True, clipped finite TrueTiming (npu:0, synchronized):
No CPU fallback; all tensors on npu:0, normalizer buffers on npu:0.
Saved CPU/NPU outputs to .npy + .json and compared:
python .opencode/skills/npu_adapt_robotics/scripts/validate_policy_outputs.py --cpu /tmp/cpu_ppo_huggy.json --npu /tmp/npu_ppo_huggy.json --atol 1e-4 --rtol 1e-3Result: count 84 passed True finite True max_abs 2.08e-07 mean_abs 4.7e-08 tolerance 6.7e-04 (fp32 atol=1e-4). Shape [4,21] verified, bounds [-1,1] not exceeded, allclose True. Differences due to NPU fused ops but well within tolerance.
Benchmark also via benchmark_policy.py with latencies list: avg 0.27 ms p50 0.27 p90 0.29.
Warmup 3, test 10, synchronized:
HuggyPolicy.forward onlyAdditional: batch 1 latency 0.68 ms shape [1,21]; batch 16 latency 0.65 ms shape [16,21] correct.
Three PNGs generated by xterm.js from real logs (render_xterm_evidence.mjs --style raw):
assets/agent_workflow.png – workflow (inspect, download, NPU check, inference, compare, benchmark, validation)assets/npu_device_call.png – npu-smi + torch.npu availability + model param device + input/output deviceassets/model_result.png – full python inference.py outputImages are rendered from actual terminal logs, not screenshots, prompt atomgit@pod-a94f8701860f4700b161b00e290de466:~$ is display label only.

Huggy-1009955.pt 13 MB demonstrated, other checkpoints (0–2M steps) share same arch and expected similar NPU behavior.Huggy.onnx 2.2 MB available in upstream but torch path used for NPU (ONNX Runtime not NPU-accelerated); conversion to torch verifies same weights.