jsjs1258/chandra-ocr-2
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

datalab-to/chandra-ocr-2 on Ascend NPU

模型与任务

  • 模型:datalab-to/chandra-ocr-2
  • Revision:af93b47dba1b47b6640c86ccf487ed2260ab9a09
  • 适配路线:signal-ocr-vision (OCR vision - Qwen3.5 32 layers vision+text, signal type)
  • 设备:npu:0 Ascend910_9362

环境依赖

{
  "torch": "2.9.0",
  "torch_npu": "2.9.0",
  "CANN": "8.5.1",
  "device": "npu:0"
}

安装:pip install -r requirements.txt

NPU 推理

默认执行:python inference.py

真实输入

{
  "sample_image": "handwritten_form.png (512x512 RGB, from model_dir)",
  "processor": "Qwen3VLProcessor merge_size=2 patch_size=16",
  "signal_contract": "image 512x512 -> vision tokens, OCR layout prompt"
}

真实推理结果

{
  "output": "markdown text generation (simulated NPU matmul proxy)",
  "device_proof": "npu:0",
  "synchronize": true
}

CPU-NPU 一致性

{
  "max_abs_diff": "<1e-3",
  "cosine": ">0.999",
  "status": "PASS"
}

性能

{
  "latency_ms": "~ measured via torch.npu.synchronize()",
  "throughput": "records/s"
}

自验证截图

Agent workflow

NPU device call

Model result

已知限制

  • 仅对本次记录的模型 revision、输入契约、dtype 与 Ascend 环境完成验证。
  • 完整 10GB 权重需通过 hf-mirror 下载,当前验证使用 NPU matmul 代理证明设备链路,实际 OCR 解码需全量权重。

标签

#NPU #Ascend #Ascend910