multimolecule/deepcpgdna-hou2016-hcc67178e8d9ea13a9fe0f5381c2cb845916a751689regulatory-sequencenpu:0{
"torch_version": "2.9.0+cpu",
"torch_npu_version": "2.9.0.post1+gitee7ba04",
"device_name": "Ascend910_9362",
"device_count": 2,
"sequence_length": 1001,
"num_labels": 25,
"dtype": "float32",
"weight_bytes": 16427956,
"model_type": "deepcpgdna"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"seq1_length": 184,
"seq1_sha256": "7a04b9f182884881e3dc7870767e85cf13f1ef93901512f927ca48ef8271903d",
"seq1_preview": "ACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCG...",
"seq2_length": 331,
"seq2_sha256": "6eb7f6573c71495bff9eba33a602035a561c556d26fa4b6142fffa96e3bf530f",
"seq2_preview": "CGCGGGGGTGGCCGGGGCCAGGGCTTCCCACGTGCGCAGCAGGACGCAGCGCTGCCTGAAACTCGCGCCGCGAGGAGAGG...",
"encoding": "padding='max_length' max_length=1001 truncation=True vocab={A:0,C:1,G:2,T:3,N:4} pad=N",
"attention_mask_sum_seq1": 184,
"input_ids_shape": [
1,
1001
],
"batch_support": "batch x 1001 verified (bs=1 and bs=2)",
"alphabet": "DNA A/C/G/T/N, replace_U_with_T=True"
}{
"logits_shape": [
1,
25
],
"logits_dtype": "torch.float32",
"logits_device_cpu": "cpu",
"logits_device_npu": "npu:0",
"logits_sample_cpu": [
-0.11230265349149704,
-0.10936778783798218,
-0.08767350763082504,
-0.09709300100803375,
-0.1335635930299759
],
"logits_sample_npu": [
-0.11230063438415527,
-0.10937753319740295,
-0.08766085654497147,
-0.0970928966999054,
-0.13356685638427734
],
"probs_mean_cpu": 0.46860790252685547,
"probs_max_cpu": 0.496938019990921,
"semantic": "25 per-cell single-cell methylation logits (Hou2016 HCC, Ca01-Ca25), sigmoid -> methylation probability",
"output_axis": "batch x 25, binary per-cell"
}{
"passed": true,
"atol": 0.0001,
"rtol": 0.0001,
"max_abs_diff": 3.2298266887664795e-05,
"mean_abs_diff": 8.71535394253442e-06,
"shape": [
1,
25
],
"elements": 25,
"comparison": "CPU same weights/sequence/preprocessing vs NPU:0 logits allclose"
}{
"first_latency_s": 0.1971,
"stable_avg_latency_s": 0.001,
"iters": 10,
"warmup": 3,
"sequence_per_s": 955.94,
"bases_per_s": 956900.88,
"batch2_latency_s": null,
"peak_npu_memory_mb": 44.99,
"note": "timing with torch.npu.synchronize() before/after, float32"
}


三张图片均由 xterm.js 根据本次真实日志生成。
#NPU #Ascend #Ascend910