凤
weixin_44093752/ug-cppo-finai-2025-ascend-npu
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

graceesthi/ug-cppo-finai-2025 Ascend NPU adaptation

This repository adapts the official graceesthi/ug-cppo-finai-2025 Stable-Baselines3 UG-CPPO trading policy for a direct PyTorch smoke run on Ascend NPU. The official model card identifies the MIT license and the upstream implementation at graceesthi/ug_cppo.

Source lock

  • Official model: graceesthi/ug-cppo-finai-2025
  • Official revision: 8be042ec04ee8811d3bc4e6a69372e61f34a72d5
  • Selected official artifact: ug_cppo_seed42.zip
  • Artifact size: 269,879 bytes
  • Artifact SHA-256: 5b9283ef8a19343842141191fac90c8ab4422af8a642a78b7f29a188c3d69814

The official policy.pth was loaded from the Stable-Baselines3 ZIP with a strict 13-key and shape check. The reconstructed deterministic actor is 81 -> 64 -> 64 -> 10 with Tanh activations; the value branch is 81 -> 64 -> 64 -> 1. The action output is clipped to the official continuous action range [-1, 1] for the smoke call. model-lock.json records the source hash and architecture.

Real Ascend smoke result

The same deterministic [1,81] float32 input was executed on CPU and a real Ascend910 npu:0. This is an execution and finite-output smoke gate; it does not claim a full financial-environment return or trading-accuracy result.

  • Input/output: [1,81] -> [1,10] action and [1,1] value, float32
  • Parameters: 19,531; strict policy keys: 13
  • CPU forward: 0.003444596193730831 s
  • NPU forward: 0.1290899938903749 s
  • Action CPU/NPU cosine: 0.9999999999999986
  • Action max/mean absolute difference: 8.940696716308594e-08 / 2.458691596984863e-08
  • Value CPU/NPU cosine: 1.0; value max absolute difference: 4.470348358154297e-08
  • torch_npu reported npu_available=true; NPU output was finite on npu:0

The run is intentionally smoke-only: it proves that the official policy checkpoint can execute on the real Ascend NPU and that the deterministic CPU/NPU outputs agree closely. It does not claim full financial-environment return or trading-accuracy parity.

Run

Place the official artifact under model/ug_cppo_seed42.zip, source the CANN environment, and run:

./run.sh

CPU smoke can be selected with DEVICE=cpu ./run.sh. The script writes machine-readable JSON and NumPy artifacts under validation/.

Evidence

Agent workflow

NPU device call

Model result