multimolecule/deepcpgdna-hou2016-mesca21c2965ee47880c49d923766bbfdc657a707c64regulatory-sequencenpu:0{
"CANN": "8.5.1",
"torch": "2.5.0",
"torch_npu": "available",
"transformers": "4.40+",
"multimolecule": "0.4.3",
"npu_name": "Ascend910_9362",
"npu_count": 2,
"platform": "Atlas 800 A2 (Ascend910)"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"alphabet": "A/C/G/T/N (N=all-zero, pad)",
"sequence_length": 1001,
"strand": "5'->3'",
"padding": "right-pad N to 1001, no truncation beyond 1001",
"tokenizer": "DnaTokenizer 1-mer, vocab_size=5, pad_token=N",
"sequences": [
{
"name": "p53_fragment",
"length": 1001,
"sha256_prefix": "72558a15e155d8dd",
"source": "model card tumor protein p53 extended to 1001"
},
{
"name": "BRCA1_fragment",
"length": 1001,
"sha256_prefix": "83c71b4c3f0ad74a",
"source": "model card BRCA1"
},
{
"name": "HBB_fragment",
"length": 1001,
"sha256_prefix": "3b3517a325b4a251",
"source": "model card hemoglobin subunit beta"
},
{
"name": "synthetic_ACGT",
"length": 1001,
"sha256_prefix": "f8f15f3762978b8a",
"source": "ACGT*250+A"
},
{
"name": "synthetic_polyC",
"length": 1001,
"sha256_prefix": "cf8aabbc1bd3a50f",
"source": "C*1001"
}
],
"batch": 1,
"dtype": "float32",
"revision_source": "local snapshot a21c2965ee47880c49d923766bbfdc657a707c64"
}{
"task": "per-cell single-cell methylation logits (binary) 6 cells: mESC1..mESC6",
"output_shape": "[1,6]",
"output_dtype": "float32",
"example_logits_cpu": {
"p53_fragment": [
-0.1924,
0.0799,
-0.1036,
-0.1836,
0.0024,
-0.142
],
"BRCA1_fragment": [
2.0551,
2.0831,
2.2459,
2.0745,
2.432,
2.0259
],
"HBB_fragment": [
2.7851,
2.7452,
2.9012,
2.7535,
3.4083,
2.792
],
"synthetic_ACGT": [
-2.8783,
-3.3375,
-3.1813,
-2.6691,
-3.2541,
-3.0509
],
"synthetic_polyC": [
0.1845,
0.1248,
0.4128,
-0.3846,
-0.0184,
-1.0491
]
},
"example_probs_sigmoid": {
"p53_fragment": [
0.452,
0.52,
0.4741,
0.4542,
0.5006,
0.4646
],
"synthetic_ACGT": [
0.0532,
0.0343,
0.0399,
0.0648,
0.0372,
0.0452
]
},
"postprocess": "sigmoid -> per-cell methylation probability, >0.5 methylated",
"device_proof": "logits device npu:0 verified, first param on npu:0"
}{
"comparison": "CPU vs NPU per-cell logits, same weights, same sequences, float32",
"metric": "max_abs_diff and mean_abs_diff",
"atol": 0.005,
"rtol": 0.0,
"per_sequence": {
"p53_fragment": {
"max_abs_diff": 0.000137,
"mean_abs_diff": 0.0001,
"pass": true
},
"BRCA1_fragment": {
"max_abs_diff": 7.9e-05,
"mean_abs_diff": 7.2e-05,
"pass": true
},
"HBB_fragment": {
"max_abs_diff": 3.3e-05,
"mean_abs_diff": 2e-05,
"pass": true
},
"synthetic_ACGT": {
"max_abs_diff": 0.002193,
"mean_abs_diff": 0.001699,
"pass": true
},
"synthetic_polyC": {
"max_abs_diff": 0.000283,
"mean_abs_diff": 0.000245,
"pass": true
}
},
"worst_max_abs_diff": 0.002193,
"overall_pass": true,
"sign_agreement": true
}{
"warmup_iters": 3,
"measured_iters": 10,
"batch": 1,
"sequence_length": 1001,
"avg_latency_ms": 1.02,
"throughput_seq_per_s": 980.0,
"bases_per_s": 981072,
"dtype": "float32",
"device": "npu:0",
"synchronize": "torch.npu.synchronize before and after timing",
"peak_memory_note": "model params 4.1M (~16MB), activation small, HBM < 3110 MB baseline"
}


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