multimolecule/sptransformercb8ab1f834781820140842900014f89c359cf7a2splicingnpu:0{
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0",
"transformers": "5.9.0",
"multimolecule": "0.2.1",
"npu_name": "Ascend910_9362",
"npu_count": 2,
"python": "3.11"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"sequence": "UAGCUUAUCAGACUGAUGUUGA",
"length": 22,
"sequence_sha256": "9c1b1cd23c45d39dd0b1fb28d72c49c0edcc57a16cb61c96119f84676c4b5b1c",
"tokenizer": "RnaTokenizer",
"vocab_size": 5,
"input_ids_shape": [
1,
22
],
"attention_mask_sum": 22,
"alphabet": "A/C/G/U/N",
"direction": "5'->3'",
"source": "model card widget: microRNA 21",
"replace_T_with_U": true
}{
"logits_shape": [
1,
22,
18
],
"splice_head": "0:3 (non-splice/donor/acceptor)",
"tissue_head": "3:18 (15 tissues)",
"dtype": "float32",
"device": "npu:0",
"logits_mean_npu": -9.11,
"logits_max_npu": 7.447,
"example_splice_logits_first_pos": [
5.899,
-5.971,
-3.729
],
"predicted_labels_first_22": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}{
"atol": 0.005,
"rtol": 0.001,
"max_abs_diff": 0.00596,
"mean_abs_diff": 0.001326,
"splice_max_diff": 0.002769,
"tissue_max_diff": 0.00596,
"allclose": true,
"passed": true,
"comparison": "CPU vs NPU same weights, same input, same tokenizer, float32"
}{
"device": "npu:0",
"first_compile_ms": 272.43,
"stable_avg_ms": 24.78,
"warmup_runs": 3,
"stable_runs": 10,
"seq_per_sec": 40.35,
"bases_per_sec": 887.75,
"input_length": 22,
"batch_size": 1,
"dtype": "float32",
"long_seq_512_latency_ms": 22.77,
"synchronize": "torch.npu.synchronize() before/after timing"
}


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