multimolecule/deepcpgdna-hou2016-hepg26671f9ba39a3e3e2604986e691aabde45b2953c4regulatory-sequencenpu:0{
"torch": "2.9.0+cpu",
"torch_npu": "available",
"device_name": "Ascend910_9362",
"device_count": 2,
"transformers": "4.57.6",
"multimolecule": "0.2.1",
"model_dir": "/tmp/deepcpgdna-hepg2",
"weight_bytes": 35466461
}安装: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": 6,
"id2label": {
"0": "HepG21",
"1": "HepG22",
"2": "HepG23",
"3": "HepG24",
"4": "HepG25",
"5": "HepG26"
}
}{
"logits_shape": [
1,
6
],
"logits_dtype": "float32",
"logits_device_cpu": "cpu",
"logits_device_npu": "npu:0",
"probs_mean": 0.341821,
"probs_max": 0.368496,
"probs_min": 0.325084,
"logits_cpu_first5": [
-0.6612699627876282,
-0.6931700110435486,
-0.6131107807159424,
-0.5386757254600525,
-0.698195219039917
],
"logits_npu_first5": [
-0.6612597703933716,
-0.6931613087654114,
-0.6131016612052917,
-0.5386651754379272,
-0.6981855630874634
],
"top3_idx": [
3,
2,
0
],
"top3_labels": [
"HepG24",
"HepG23",
"HepG21"
],
"top3_probs": [
0.3684956729412079,
0.3513498902320862,
0.3404543697834015
],
"finite_ratio": 1.0
}{
"logits_max_abs_diff": 1.096725e-05,
"logits_mean_abs_diff": 9.864569e-06,
"probs_max_abs_diff": 2.473593e-06,
"atol": 0.0001,
"rtol": 0.0001,
"allclose": true,
"shape": [
1,
6
],
"comparison": "CPU vs NPU same weights, same input, float32"
}{
"first_compile_latency_s": 0.2171,
"stable_avg_latency_s_bs1": 0.0011,
"sequence_per_s_bs1": 928.91,
"bases_per_s_bs1": 929838.17,
"stable_avg_latency_s_bs2": 0.0012,
"sequence_per_s_bs2": 1715.64,
"sequence_length": 1001,
"num_labels": 6,
"dtype": "float32",
"warmup_iters": 3,
"stable_iters": 10,
"peak_npu_memory_MB": 45.47,
"device": "npu:0",
"synchronize": "torch.npu.synchronize() before/after timing"
}


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