multimolecule/openspliceai-mane.400eb24f956d1e6182eaa6e1110820cb30542f1ad66splicingnpu:0{
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1+gitee7ba04",
"transformers": "5.9.0",
"huggingface_hub": "1.28.0",
"tokenizers": "0.22.0",
"multimolecule": "0.2.1",
"npu_device": "Ascend910_9362",
"npu_count": 2,
"cann": "8.5.1",
"python": "3.11.14"
}安装:pip install -r requirements.txt
默认运行:python inference.py
{
"sequence_type": "DNA",
"alphabet": "A/C/G/T/N",
"length": 400,
"context": 400,
"species": "Homo sapiens",
"genome": "GRCh38",
"source": "INS gene synthetic 400bp window (insulin coding + GTAAGTAA intronic repeat)",
"seq_head_50": "ATGGCCCTGTGGATGCGCCTCCTGCCCCTGCTGGCGCTGCTGGCCCTCTG",
"gc_content": 0.58,
"sha256": "412397e37d466286d83d58fcaf1dc1b6",
"sha256_full": "412397e37d466286d83d58fcaf1dc1b67f19960fed4d38dfde5c7a83b62ce0e4",
"tokenizer": "RnaTokenizer",
"replace_T_with_U": true,
"attention_mask": "all 1 (no padding)"
}{
"logits_shape": [
1,
400,
3
],
"num_labels": 3,
"label_semantics": "0=neither, 1=acceptor (AG), 2=donor (GT)",
"dtype": "float32",
"prob_sum_check": "1.0000 per position after softmax",
"donor_max_prob": 0.9778282642364502,
"donor_max_pos": 332,
"donor_mean_prob": 0.002446,
"acceptor_max_prob": 0.0001275749527849257,
"acceptor_max_pos": 312,
"top5_donor": [
[
332,
0.9778282642364502
],
[
185,
0.00045532616786658764
],
[
336,
0.00010623771959217265
],
[
331,
3.2049425499280915e-05
],
[
324,
2.5813626052695327e-05
]
],
"top5_acceptor": [
[
312,
0.0001275749527849257
],
[
223,
1.1482019544928335e-05
],
[
332,
3.6670985537057277e-06
],
[
261,
3.6458222893998027e-06
],
[
185,
3.643988520707353e-06
]
],
"sample_logits_pos0": [
0.7617248296737671,
-16.916522979736328,
-17.922508239746094
],
"sample_logits_pos200": [
3.357851505279541,
-18.738487243652344,
-20.563556671142578
]
}{
"method": "compare_outputs.py cpu vs npu identical sequence and weights",
"shape": [
1,
400,
3
],
"elements": 1200,
"max_abs_diff": 0.005191802978515625,
"mean_abs_diff": 0.0007416549445285151,
"atol": 0.01,
"rtol": 0.001,
"passed": true,
"note": "float32 donor/acceptor logits; NPU one_hot internal format warning but numerical diff within 0.01"
}{
"warmup": 3,
"stable_iters": 10,
"npu_avg_ms": 2.07,
"npu_min_ms": 2.05,
"npu_max_ms": 2.11,
"npu_throughput_seq_per_s": 482.54,
"npu_throughput_bases_per_s": 193016.8,
"cpu_avg_ms": 11.37,
"cpu_throughput_seq_per_s": 87.97,
"speedup_npu_vs_cpu": 5.49,
"input_len": 400,
"output_shape": [
1,
400,
3
],
"dtype": "float32",
"synchronize": "torch.npu.synchronize() before and after timing",
"peak_memory_hbm_mb": 3111
}


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