multimolecule/deepcpgdna-smallwood2014-2i646ae5817a52f8da18622583a02e48d047dda217regulatory-sequencenpu:0{
"torch": "2.9.0+cpu",
"torch_npu": "available",
"device_name": "Ascend910_9362",
"device_count": 2,
"transformers": "5.9.0",
"multimolecule": "0.1",
"model_dir": "/tmp/multimolecule_deepcpgdna-smallwood2014-2i_model",
"weight_bytes": 35472629
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"sequence_length": 1001,
"alphabet": "A/C/G/T/N",
"pad_token": "N",
"pad_id": 4,
"tokenizer": "DnaTokenizer",
"seq1_length": 184,
"seq1_sha256": "7a04b9f182884881e3dc7870767e85cf13f1ef93901512f927ca48ef8271903d",
"seq1_preview": "ACTCCCCTGCCCTCAACAAGATGTTTTGCCAACTGGCCAAGACCTGCCCTGTGCAGCTGTGGGTTGATTCCACACCCCCG...",
"seq2_length": 331,
"seq2_sha256": "6eb7f6573c71495bff9eba33a602035a561c556d26fa4b6142fffa96e3bf530f",
"seq2_preview": "CGCGGGGGTGGCCGGGGCCAGGGCTTCCCACGTGCGCAGCAGGACGCAGCGCTGCCTGAAACTCGCGCCGCGAGGAGAGG...",
"seq_source": "model card example tumor protein p53 & TERT - verified DNA 5'->3'",
"encoding": "padding='max_length' max_length=1001 truncation=True",
"batch": 1,
"example_input_ids_shape": [
1,
1001
],
"example_input_ids_first20": [
0,
1,
3,
1,
1,
1,
1,
3,
2,
1,
1,
1,
3,
1,
0,
0,
1,
0,
0,
2
],
"problem_type": "binary per-cell methylation",
"num_labels": 12,
"id2label": {
"0": "BS24_1_2I",
"1": "BS24_2_2I",
"2": "BS24_4_2I",
"3": "BS24_6_2I",
"4": "BS24_8_2I",
"5": "BS25_10_2I",
"6": "BS25_2_2I",
"7": "BS25_6_2I",
"8": "BS25_7_2I",
"9": "BS25_8_2I",
"10": "BS26_1_2I",
"11": "BS26_2_2I"
}
}{
"logits_shape": [
1,
12
],
"logits_dtype": "float32",
"logits_device_cpu": "cpu",
"logits_device_npu": "npu:0",
"probs_mean": 0.207822,
"probs_max": 0.408914,
"probs_min": 0.147242,
"logits_cpu_first5": [
-1.5577278137207031,
-1.5011719465255737,
-1.5272706747055054,
-1.3917104005813599,
-1.5534311532974243
],
"logits_npu_first5": [
-1.5578216314315796,
-1.501266598701477,
-1.5273687839508057,
-1.3917871713638306,
-1.5535252094268799
],
"top3_idx": [
6,
9,
10
],
"top3_labels": [
"BS25_2_2I",
"BS25_8_2I",
"BS26_1_2I"
],
"top3_probs": [
0.4089144766330719,
0.24759997427463531,
0.2191242128610611
],
"finite_ratio": 1.0
}{
"logits_max_abs_diff": 9.810925e-05,
"logits_mean_abs_diff": 7.920464e-05,
"probs_max_abs_diff": 1.862645e-05,
"atol": 0.0001,
"rtol": 0.0001,
"allclose": true,
"shape": [
1,
12
],
"comparison": "CPU vs NPU same weights, same input, float32"
}{
"first_compile_latency_s": 0.2018,
"stable_avg_latency_s_bs1": 0.0011,
"sequence_per_s_bs1": 899.22,
"bases_per_s_bs1": 900115.41,
"stable_avg_latency_s_bs2": 0.0012,
"sequence_per_s_bs2": 1668.35,
"sequence_length": 1001,
"num_labels": 12,
"dtype": "float32",
"warmup_iters": 3,
"stable_iters": 10,
"peak_npu_memory_MB": 45.48,
"device": "npu:0",
"synchronize": "torch.npu.synchronize() before/after timing"
}


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