This repository documents the deployment and validation of the 2toINF/X-VLA-Pt model on Huawei Ascend 910 NPU hardware. X-VLA-Pt is a 0.9B parameter Vision-Language-Action (VLA) model that combines a Florence-2 vision-language backbone with a soft-prompted transformer for generating robot action sequences via flow matching. The model accepts multi-view image inputs and natural language instructions, producing end-effector 6-DoF (ee6d) action trajectories.
The deployment workflow covers model weight acquisition, environment configuration, service initialization, smoke testing, and performance benchmarking — all verified on the Ascend platform.
| Package | Version | Purpose |
|---|---|---|
| Python | 3.11.14 | Runtime |
| torch | 2.9.0 | Core tensor computation |
| torch_npu | 2.9.0.post1 | NPU bridge |
| transformers | 4.57.6 | Model loading & inference |
| fastapi | 0.123.10 | HTTP serving |
| uvicorn | 0.46.0 | ASGI server |
| opencv-python | 4.11.0 | Image decoding |
| timm | 1.0.28 | Vision transformer helpers |
| einops | 0.8.2 | Tensor operations |
| json-numpy | — | Numpy serialization |
Run the following to confirm the NPU is accessible:
npu-smi info
# Expected: NPU 7, chip 0/1, Health: OK, Memory: 65536 MBThe X-VLA-Pt checkpoint is approximately 3.5 GB (safetensors format, FP32). Use the HuggingFace mirror for faster downloads within China:
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download 2toINF/X-VLA-Pt --local-dir /path/to/modelpython3 inference.pyThe service starts on port 8000. The FastAPI framework exposes the /act endpoint for action prediction. The service remains running until interrupted.
curl http://localhost:8000/act -X POST -H "Content-Type: application/json" -d '{}'
# Expect: 400 response with "No valid images found" — confirms the endpoint is aliveThe model expects multi-view images, a language instruction, robot proprioception, and a domain identifier. Below is a minimal test workflow:
python3 -c "
import requests, numpy as np
from PIL import Image
# Create a test image (224x224 gray)
img = Image.new('RGB', (224,224), color='gray')
payload = {
'image0': np.array(img).tolist(),
'language_instruction': 'move left',
'proprio': [0.0]*6,
'domain_id': '0',
'steps': 10
}
r = requests.post('http://localhost:8000/act', json=payload)
print('Status:', r.status_code)
print('Actions:', len(r.json().get('action', [])))
"Upon successful inference, the service returns a JSON object containing the predicted action sequence:
{
"action": [
[0.152, 0.431, -0.089, 0.032, -0.055, 0.621],
[0.178, 0.458, -0.112, 0.048, -0.072, 0.648],
...
]
}The output is a 30-step action trajectory in the ee6d action space (6-dim end-effector pose).
| Metric | Observed Value |
|---|---|
| Model Load Time | ~15 seconds |
| Inference Latency | ~200 ms for 10 diffusion steps |
| Peak NPU Memory | ~3.3 GB |
| Response Size | ~1.5 KB (30 × 6 floats) |
| Model Weight Size | 3.52 GB on disk |
The deployment preserves the original model's inference accuracy because:
XVLA Architecture: This model uses a custom architecture (XVLA) with flow-matching action generation, which is fundamentally different from autoregressive language models. vLLM-Ascend does not natively support this architecture; the deployment uses the transformers library directly.
Token Dependency: The model requires the Florence-2 tokenizer (BART-based, ~1.3 MB) to be present in the model directory. The tokenizer.json file is included in the checkpoint.
Model Initialization: On first load, the trust_remote_code=True flag is required to execute the custom model code. Ensure all .py files from the checkpoint are present in the model directory.
Resource Conflicts: If multiple inference sessions are running on the same NPU, monitor memory usage with npu-smi info to avoid OOM errors.
Network Access: The model checkpoint download may require a proxy or mirror configuration depending on the network environment. The recommended approach is to set HF_ENDPOINT=https://hf-mirror.com for improved download speeds.