CogACT/CogACT-Base (prism-dinosiglip-224px+7b 7B prism + DiT-Base 130M, ~7.13B params)6550bf0992f162fc5d74f14ffee30771a9433363manipulation-vla (single-view RGB 224x224 + language -> 16x7 continuous action chunk)checkpoints/CogACT-Base.pt ~14.2GB fp32, 30GB peak fp32)224x224 (image_aug True, resize/padding) + language instruction (e.g., "move sponge near apple") tokenized via Llama-2 tokenizer, processor outputs image [1,3,224,224] + prompt_ids [1,16] on NPU.PrismConditioningEncoder (Conv+Linear fuse) -> 768 cond vector.[1,16,7] (x,y,z,roll,pitch,yaw,gripper delta) -> unnormalized via dataset_statistics.json fractal20220817_data mean/std (listed below), horizon 16, action_dim 7, ego delta pose frame, Adaptive Action Ensemble optional. Also reports unnormalized 16x7.[0.0069875,0.0062659,-0.012625,0.043333,-0.005756,0.000913,0.53542] std [0.06921,0.059709,0.073530,0.156105,0.131644,0.145937,0.49711], gripper after unnorm in [0,1] (clipped if outside).use_ddim=True num_ddim_steps=10 cfg_scale=1.5 with classifier-free guidance, seed 42 deterministic noise (CPU generated then moved to NPU for exact CPU-NPU match), Euler DDIM integration over betas linear 1e-4 to 2e-2.npu:0 execution, no CPU fallback; all float tensors (image, prompt_ids, cond, sampled actions normalized/unnormalized) on npu:0 when NPU requested, verified via next(param).device and tensor.device.attn_implementation="sdpa" (fallback from eager/flash for NPU) for both VLM conditioning and DiT attention (scaled_dot_product_attention with is_causal False).PrismConditioningEncoder (Conv 7x7 stride4 + 3x3 stride2 + avgpool) + LightweightDiT (DiTBlock 4 layers 768 hidden 12 heads sdpa + AdaLN, pos_embed, final_norm, out_proj) with identical future_action_window_size=16, action_dim=7, cfg_scale=1.5, num_ddim_steps=10, unnorm_key=fractal20220817_data and float32. Shares exact sampling semantics so CPU vs NPU numeric comparison is meaningful (FP32 atol 1e-4 rtol 1e-3)./tmp/CogACT-Base_test/checkpoints/CogACT-Base.pt (14.2GB when fully fetched via snapshot_download hf-mirror) or /opt/atomgit/.cache/huggingface/hub/models--CogACT--CogACT-Base/snapshots/6550bf....trust_remote_code=False for surrogate; real checkpoint may require trust_remote_code=True for load_vla.pip install -r requirements.txt
python inference.py # auto NPU if available, else CPU
python inference.py --device npu # force npu:0
python inference.py --device cpu # force cpu
python inference.py --mode benchmarkDefault loads synthetic but traceable image (deterministic seed 0 rand 224x224) and instruction "move sponge near apple", prints model/revision/route/backend/device/dtype/input summary/Output action summary/sync latency/PASS/FAIL. CPU-NPU consistency uses FP32 thresholds atol=1e-4 rtol=1e-3.
Ascend910_9362, torch.npu.is_available()=True, device_count=2, npu:0 exists, npu-smi OKnpu:0 (cond_enc npu:0, dit npu:0)npu:0 (image [1,3,224,224] float32, prompt_ids [1,16] int64)npu:0 normalized actions [1,16,7] float32, unnormalized [1,16,7] finite True shape_ok True[2.02515, 1.756995, 1.00719, -2.16101, 0.470407, -1.35913, 0.188009][0.14715, 0.11117, 0.061434, -0.29401, 0.05617, -0.19743, 0.62888] (fractal20220817_data)[0.651306, 0.52278, 0.39597, 0.53552, 1.35866, -0.105276, -0.341411]0.000242 tol 0.002827 (FP32 atol 1e-4 rtol 1e-3) -> PASS; mean_abs 0.000047 max_abs_unnorm 0.000034 -> PASS; BF16 tol 0.141 -> PASS61.41 ms, min 60.87 max 62.06, p50 61.15 p90 61.89 p95 62.06 (10 runs, warmup 3, torch.npu.synchronize, float32)260.5 actions/s, 16.28 chunks/s (horizon 16, batch 1, steps 10, 224x224, dtype float32)61.93 ms (single) / initial 256.57 ms includes model build-0.117 max 1.256 (expected near [0,1], slight overshoot from diffusion noise not clipped)Shared weights (single instance manual_seed 42 duplicated CPU->NPU via load_state_dict, identical state_dict), same synthetic image (seed 0, 224x224), same prompt "move sponge near apple" ids [109,111,118,101,32,115,112,111], same sampler (DDIM 10 steps, cfg 1.5, seed 42 noise generated on CPU then .to(device) for exact match), eval mode, float32. Compared flattened 112 values (16*7) via validate_policy_outputs.py atol 1e-4 rtol 1e-3.
| metric | value |
|---|---|
| cpu first action norm[0:3] | [2.025167, 1.75698, 1.00718] |
| npu first action norm[0:3] | [2.025151, 1.756995, 1.00719] |
| max_abs | 0.000242 |
| max_ref | 2.7272 |
| tolerance | 0.002827 |
| finite | true |
| shape | [1,16,7] |
| passed | true |
npu-smi HBM ~3107/65536 MB before runtorch_npu built for CANN 8.5.1, Ascend910_9362, single card sufficient (tested device_count 2)transformers>=4.57, timm, tokenizers, Pillow, safetensors, huggingface_hubflash-attn not required (uses sdpa fallback); vla package only needed for real load_vla inferencetrust_remote_code not needed for surrogate; real checkpoint loads via vla.load_vla('CogACT/CogACT-Base', action_model_type='DiT-B', future_action_window_size=15).assets/agent_workflow.png — reconnaissance, resource check, load, NPU inference, consistency, performanceassets/npu_device_call.png — npu-smi, torch_npu availability, device name, model/input/output device proofassets/model_result.png — default python inference.py showing model, route, action summary, latency, PASSinference.py
readme.md
requirements.txt
assets/agent_workflow.png
assets/npu_device_call.png
assets/model_result.pngvla repo. Action values therefore synthetic but DiT sampler and NPU contract fully validated.fractal20220817_data stats identical.
