multimolecule/a2zchromatin-methylation47ae930b83f8e5264bd4a3cb58c11bc7caa19857regulatory-sequencenpu:0{
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1+gitee7ba04",
"cann": "8.5.1",
"soc": "Ascend910_9362",
"npu_count": 2,
"device_name": "Ascend910_9362",
"hf_endpoint": "https://hf-mirror.com",
"python": "3.11.14"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"alphabet": "A/C/G/T/N + IUPAC R/Y/S/W/K/M/B/D/H/V + pad '.'",
"sequence_length": 600,
"direction": "5'->3'",
"sequences": [
{
"name": "synthetic_ACGTx150",
"length": 600,
"sha256": "e4a387752a4865282071c8f2f26b4d990db42b00a357a5080766f61ba6f02dbd",
"preview": "ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT"
},
{
"name": "p53_tumor_protein",
"length": 184,
"sha256": "7a04b9f182884881e3dc7870767e85cf13f1ef93901512f927ca48ef8271903d",
"preview": "ACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAA"
},
{
"name": "hemoglobin_beta",
"length": 142,
"sha256": "8677bfc09d6f00304fc9d688164f02d66bee2593a2062940777f23cfe9416126",
"preview": "CATTTGCTTCTGACACAACTGTGTTCACTAGCAACCTCAA"
}
],
"tokenizer": "DnaTokenizer vocab=16 pad_token=. pad_id=15",
"primary_used": "synthetic_ACGTx150 batch=1 attention_mask_sum=600"
}{
"logits": [
[
0.009714861400425434
]
],
"prob": [
[
0.5024287104606628
]
],
"shape": [
1,
1
],
"device": "npu:0",
"dtype": "torch.float32",
"description": "binary logit for lack of DNA methylation (unmethylated probability via sigmoid)",
"additional": {
"p53_logits": [
-4.433578014373779
],
"hbb_logits": [
-5.420938968658447
]
}
}{
"cpu_logits": [
[
0.009752139449119568
]
],
"npu_logits": [
[
0.009714861400425434
]
],
"max_abs_diff": 3.727804869413376e-05,
"mean_abs_diff": 3.727804869413376e-05,
"atol": 0.001,
"rtol": 0.001,
"passed": true,
"dtype": "float32",
"note": "NPU manual BiLSTM via F.linear on npu:0 due to ACL LSTM missing tbe; all tensors on npu:0"
}{
"avg_time_ms": 19.503,
"min_ms": 19.326,
"max_ms": 19.672,
"first_compile_ms": 229.383,
"seq_per_s": 51.27,
"bases_per_s": 30764.43,
"batch": 1,
"seq_len": 600,
"dtype": "float32",
"device": "npu:0",
"warmup": 3,
"stable_iters": 10
}


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