multimolecule/procapnet8703b8aa772c754dbd87f90e074c55f25d723442regulatory-sequencenpu:0{
"python": "3.11.14",
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1",
"cann": "8.5.1",
"soc": "ascend910_9391",
"device_name": "Ascend910_9362",
"device_count": 2,
"multimolecule": "0.2.1",
"transformers": "4.57.1",
"hf_endpoint": "https://hf-mirror.com"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"sequence": "ACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCGCCCGGCACCCGCGTCCGCGCCATGGCCATCTACAAGCAGTCACAGCACATGACGGAGGTTGTGAGGCGCTGCCCCCACCATGAGCGCTGCTCAGATAGCGATGG*12 -> 2114 bp",
"sequence_length": 2114,
"sequence_sha256": "233616d27f86001aabc4b0f2e537ed3d0e40e96c1e50669e72cd1cb9ebf23d8a",
"alphabet": "A/C/G/T/N",
"tokenizer": "DnaTokenizer 1-mer, vocab_size=5, replace_U_with_T=true",
"batch_size": 1,
"dtype": "float32",
"species": "human K562 (PRO-cap)",
"profile_length": 1000,
"num_strands": 2
}{
"profile_logits": {
"shape": [
1,
1000,
2
],
"dtype": "float32",
"device": "npu:0",
"sample": [
[
-9.006,
-6.288
],
[
-7.544,
-6.335
],
[
-9.25,
-3.67
]
]
},
"count_logits": {
"shape": [
1,
1
],
"dtype": "float32",
"device": "npu:0",
"value": 3.909226
},
"track": {
"shape": [
1,
1000,
2
],
"dtype": "float32",
"device": "npu:0",
"note": "postprocess(profile_logits, count_logits) base-resolution PRO-cap signal, two-stranded plus/minus"
}
}{
"profile_max_abs_diff": 0.001038,
"profile_mean_abs_diff": 0.000245,
"profile_atol": 0.005,
"profile_rtol": 0.005,
"profile_pass": true,
"count_max_abs_diff": 6e-05,
"count_mean_abs_diff": 6e-05,
"count_atol": 0.0001,
"count_rtol": 0.0001,
"count_pass": true,
"track_max_abs_diff": 0.000122,
"track_mean_abs_diff": 4e-06,
"track_atol": 0.001,
"track_rtol": 0.001,
"track_pass": true,
"overall_pass": true,
"note": "CPU vs NPU same weights, same sequence, float32, comparison on full 1000x2 profile and scalar count; track is recombined usable prediction"
}{
"first_inference_ms": 215.43,
"stable_avg_ms": 12.48,
"stable_min_ms": 12.3,
"stable_max_ms": 12.96,
"warmup": 3,
"iterations": 10,
"sequences_per_second": 80.1,
"bases_per_second": 169362.0,
"input_length": 2114,
"batch": 1,
"dtype": "float32",
"peak_memory_MB": 44.9,
"device": "npu:0",
"synchronize": "torch.npu.synchronize() before and after timing"
}


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