npu:6)中文摘要:本目录交付
MidoriChou/ai_final_12_act_2(LeRobot ACT 模仿学习策略)在昇腾 Ascend 910B NPU(物理npu:6)上的完整真实推理候选。模型权重严格使用固定 revision 的 真实检查点,全部模型参数、输入与输出均位于npu:6,无 CPU 前向/offload。
| Field | Value |
|---|---|
| Model ID | MidoriChou/ai_final_12_act_2 |
| Source | https://huggingface.co/MidoriChou/ai_final_12_act_2 |
| Pinned source revision | 92654eb0e3f9ee4329d54a599165aeb12512e92f |
| Architecture route | LeRobot ACT (Action Chunking with Transformers) |
library_name | lerobot |
pipeline_tag | robotics |
license | apache-2.0 (declared in the upstream model card; not guessed) |
| Task | reinforcement-learning-policy / imitation-learning action chunking |
The selected immutable real inference artifacts and their exact byte size / SHA256
(recorded by inference.py at every run, and verified before load):
| Artifact | Bytes | SHA256 |
|---|---|---|
model.safetensors | 206720224 | 9da5b06966343936951d917de0225b07db1ca40eba100f841918d4ef389a223d |
policy_preprocessor_step_3_normalizer_processor.safetensors | 7756 | 100b051bb60ceae799b22334e2c85a104c2c01c1438ac3b42276cd6b94db5f3f |
policy_postprocessor_step_0_unnormalizer_processor.safetensors | 7756 | 100b051bb60ceae799b22334e2c85a104c2c01c1438ac3b42276cd6b94db5f3f |
The checkpoint (model.safetensors, 234 tensors, 51,602,312 parameters) is loaded
strictly and completely (load_state_dict(..., strict=True), no partial / random /
config-only / dummy substitute). The self-contained inference.py re-implements the exact
LeRobot ACT module graph whose parameter names are frozen in the real checkpoint; the state
dict matches 1:1. No lerobot, torchvision or Gym/Unity/robot hardware is used.
| Component | Version / value (recorded from the real run) |
|---|---|
| NPU hardware | Ascend 910B4 (Ascend910B4-1), physical device npu:6 |
| NPU device count visible | 8 |
| CANN | 8.5.1 |
torch | 2.9.0+cpu (CANN-matched, preinstalled) |
torch_npu | 2.9.0 (CANN-matched, preinstalled) |
| Python | 3.11.14 (aarch64) |
| numpy | 1.26.4 |
| safetensors | 0.8.0 |
npu-smi | 25.5.1 |
| OS / platform | Linux-5.10.0-325.0.0.226.oe2203sp4.aarch64-aarch64-with-glibc2.38 |
Hard execution policy (enforced by the script):
torch==2.9.0+cpu and torch_npu==2.9.0 are the container's CANN-matched pair and are
never replaced with ordinary PyPI wheels.npu:6 — there is no CPU offload/fallback. Every model parameter, buffer, numeric input
and tensor output is asserted to be on npu:6; any placement mismatch fails nonzero.Runtime dependencies are deliberately minimal (the script is self-contained). The
CANN-matched torch / torch_npu pair is preinstalled and must not be reinstalled.
Only the two non-torch runtime packages are installed through the configured Aliyun mirror:
# 1. (Recommended) Confirm the preinstalled CANN-matched pair is intact:
python3 -c "import torch, torch_npu; print(torch.__version__, torch_npu.__version__)"
# 2. Install only the non-torch runtime deps from the Aliyun PyPI mirror:
pip install -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txtrequirements.txt in this directory lists safetensors>=0.8.0 and numpy==1.26.4 as the
installable packages; the torch / torch_npu pair appears only as commented documentation
so a plain pip install -r requirements.txt can never replace them.
npu:6):
npu-smi infopython3 /root/ascend-model-pipeline/upstreams/AscendSkills/ai4s-migration-base/scripts/check_npu_basics.py --device npu:6cd /root/ascend-model-pipeline/jobs/rl26/ai-final-12-act-2/ai-final-12-act-2-npu
NPU_HOLD_SECONDS=5 python3 inference.pyNPU_HOLD_SECONDS (default 5) controls the post-load hold window during which an
external wrapper can run npu-smi info and correlate the exact live Python PID with
physical npu:6 (see [MODELAGENT-READY] in the log and logs/ready.marker).Outputs produced in logs/:
| File | Contents |
|---|---|
logs/npu_inference.log | Sanitized raw run log (header, artifact hashes, placement, hold-window npu-smi, action summary, exit). |
logs/npu_result.json | Structured result (top-level engine, npu_available, npu_device_name, source_revision, input_device, model_device, output_device, exit_code, output summary, timing, PID, package versions). |
logs/ready.marker | Hold-window marker (pid, device, phase, timestamp, hold_seconds). |
logs/fusion_result.json | Raw CANN graph-fusion evidence from the real device run. |
Test input (deterministic, redistributable, no external data download):
observation.state: [1, 9] float32 ramp in [-1, 1]observation.images.wrist: [1, 3, 480, 640] float32 vertical intensity gradient in [0, 1]observation.images.front: [1, 3, 480, 640] float32 horizontal intensity gradient in [0, 1][1, chunk_size=100, action_dim=8]Command (the exact final command used):
cd /root/ascend-model-pipeline/jobs/rl26/ai-final-12-act-2/ai-final-12-act-2-npu
NPU_HOLD_SECONDS=5 /usr/local/python3.11.14/bin/python3 inference.pyActual output (verbatim lines from the real final run; full sanitized raw log in
logs/npu_inference.log):
[2026-08-22 08:32:22] LeRobot ACT NPU inference candidate: MidoriChou/ai_final_12_act_2
[2026-08-22 08:32:22] python : 3.11.14 (aarch64)
[2026-08-22 08:32:22] torch : 2.9.0+cpu
[2026-08-22 08:32:22] torch_npu : 2.9.0
[2026-08-22 08:32:22] CANN : 8.5.1
[2026-08-22 08:32:26] device_count : 8
[2026-08-22 08:32:26] device_name(npu:6) : Ascend910B4-1
[2026-08-22 08:32:26] artifact model.safetensors: size=206720224 (exp 206720224) sha256=9da5b06966343936951d917de0225b07db1ca40eba100f841918d4ef389a223d match=True
[2026-08-22 08:32:27] model state_dict : 234 tensors, 51602312 params (real checkpoint)
[2026-08-22 08:32:27] model placement : all 51602312 params + 81 buffers on npu:6
[2026-08-22 08:32:27] [MODELAGENT-READY] pid=3354394 device=npu:6 phase=model_loaded_ready_for_forward hold=5.0s marker=.../logs/ready.marker
| 6 0 | 3354394 | python3 | 344 |
[2026-08-22 08:32:40] action chunk output shape : [1, 100, 8] device=npu:6
[2026-08-22 08:32:40] action chunk first step : [-0.129638, 0.549583, 0.031242, -2.11774, 0.126015, 2.650355, 0.64655, 0.498001]
[2026-08-22 08:32:40] action chunk mean per dim : [-0.146151, 0.568257, 0.012587, -2.146448, 0.126753, 2.697549, 0.624008, -0.153322]
[2026-08-22 08:32:40] action chunk std per dim : [0.005591, 0.01203, 0.007403, 0.011298, 0.004157, 0.017387, 0.015511, 0.3911]
[2026-08-22 08:32:40] action chunk abs mean : 0.838521
[2026-08-22 08:32:42] elapsed forward: 6.5500s total: 17.6586s
[2026-08-22 08:32:42] SUCCESS: real ACT checkpoint executed on npu:6
[RESULT] exit_code=0 result_json=.../logs/npu_result.jsonKey structured fields from logs/npu_result.json:
{
"engine": "torch_npu",
"exit_code": 0,
"npu_available": true,
"npu_device_name": "Ascend910B4-1",
"source_revision": "92654eb0e3f9ee4329d54a599165aeb12512e92f",
"input_device": "npu:6",
"model_device": "npu:6",
"output_device": "npu:6",
"output": {
"name": "action_chunk",
"summary": {
"shape": [1, 100, 8],
"device": "npu:6",
"dtype": "torch.float32",
"first_step": [-0.129638, 0.549583, 0.031242, -2.11774, 0.126015, 2.650355, 0.64655, 0.498001],
"abs_mean": 0.838521,
"norm_chunk_abs_mean": 1.040815
}
},
"timing": {"forward_s": 6.55, "total_s": 17.6586},
"pid": 3354394
}The live npu-smi line during the hold window (| 6 0 | 3354394 | python3 | 344 |) proves
that the inference PID (3354394) is the exact process resident on physical NPU 6.
eval() mode (dropout disabled) with fixed seeds
(torch.manual_seed(42), np.random.seed(42), random.seed(42)) and constrained CPU-side
OpenMP/MKL thread pools (OMP_NUM_THREADS=1, MKL_NUM_THREADS=1,
torch.set_num_threads(1)), which reduce thread-creation pressure on shared machines while
the forward stays entirely on npu:6.first_step, mean_per_dim, std_per_dim, abs_mean, etc.), confirming
deterministic inference on npu:6.Ascend910 does not support fp64; the model uses fp32 throughout.All screenshots are rendered only from the real final transcript / sanitized log / result JSON. Nothing is fabricated.
| Screenshot | Contents |
|---|---|
assets/agent_workflow.png | Real ModelAgent workflow steps from the actual turn transcript (read → audit → fix → verify → run). |
assets/npu_device_call.png | Real npu-smi device table + live process line showing the inference PID on physical npu:6 during the hold window. |
assets/model_result.png | Real logs/npu_result.json action-chunk result (shape, device, first step, summary stats, timing, PID). |
assets/modelagent_live_session.png | Real ModelAgent live-session transcript excerpt (turn 1 final verification). |
inference.py
README.md (byte-identical to readme.md)
readme.md (byte-identical to README.md)
requirements.txt
SHA256SUMS
logs/npu_inference.log
logs/npu_result.json
logs/ready.marker
logs/fusion_result.json
assets/agent_workflow.png
assets/npu_device_call.png
assets/model_result.png
assets/modelagent_live_session.png