multimolecule/deltasplice-human7a97fb2153016f4b1778590d48e45fd4317eb969splicingnpu:0{
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1+gitee7ba04",
"torch_npu_available": true,
"npu_device_name": "Ascend910_9362",
"device_count": 2,
"cann": "8.5.1",
"transformers": "5.9.0",
"multimolecule": "0.2.1",
"numpy": "1.26.4",
"python": "3.11.14",
"hf_endpoint": "https://hf-mirror.com",
"model_dir": "/tmp/deltasplice-human",
"dtype": "float32"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"route": "splicing",
"alphabet": "RNA A/C/G/U/N (vocab 5, N pad id 4, replace_T_with_U true)",
"strand": "5'->3' forward",
"sequence_length": 29,
"reference_sequence": "AGCAGUCAUUAUGGCGAAUCUGGCAAGUA",
"alternative_sequence": "AGCAGUCAUUAUGGCUAAUCUGGCAAGUA",
"variant": "position 15 (0-indexed 15) G->U, single SNV",
"reference_sha256": "b7f89be8dec01e5543f9ded687a50d7feaa2b3fde1ec2ec958bd023a7e6b8bf1",
"alternative_sha256": "0df7e5524280f11858d5badd9b936e0f0a646af4ef4f353435c320945cea2228",
"real_reference_sha256": "b7f89be8dec01e5543f9ded687a50d7feaa2b3fde1ec2ec958bd023a7e6b8bf1",
"tokenizer": "RnaTokenizer 1-mer, A0 C1 G2 U3 N4 pad_n, replace_T_with_U true, no bos/eos",
"input_ids_shape": [
1,
29
],
"input_ids_sample": [
0,
2,
1,
0,
2,
3,
1,
0,
3,
3
],
"context": 30000,
"padding": 15000,
"output_channels": [
"no_splice",
"acceptor",
"donor"
],
"species": "human (DeltaSplice-human checkpoint, 5-member ensemble avg)",
"long_example": {
"insulin_fragment_length": 333,
"insulin_input_ids_shape": [
1,
333
],
"insulin_preview": "AUGGCCCUGUGGAUGCGCCUCCUGCCCCUGCUGGCGCUGCUGGCCCUCUGGGGACCUGACCC..."
},
"num_labels": 3,
"problem_type": "regression (softmax probabilities)"
}{
"probabilities_shape": [
1,
29,
3
],
"site_probabilities_shape": [
1,
29,
3
],
"delta_shape": [
1,
29,
3
],
"alternative_probabilities_shape": [
1,
29,
3
],
"output_dtype": "float32",
"output_device": "npu:0",
"probabilities_sample_cpu_pos0": [
1.0,
2.146195665631012e-09,
4.016292187714043e-09
],
"probabilities_sample_npu_pos0": [
1.0,
2.1395689664416295e-09,
4.015722421257806e-09
],
"probabilities_sample_cpu_pos2": [
0.999881386756897,
0.00011855623597512022,
7.415609104555188e-08
],
"probabilities_sample_npu_pos2": [
0.9998812675476074,
0.00011867884313687682,
7.423442127674207e-08
],
"site_probabilities_sample_cpu_pos2": [
0.9969480633735657,
0.0030495445244014263,
2.412447884125868e-06
],
"site_probabilities_sample_npu_pos2": [
0.9969466924667358,
0.0030508534982800484,
2.4084299639071105e-06
],
"delta_sample_npu_pos0": [
5.4836272056491e-07,
-7.523936460529512e-07,
1.8307567017927795e-07
],
"delta_sample_npu_pos2": [
0.0017956852680072188,
-0.0018196264281868935,
2.3943577616591938e-05
],
"delta_sample_npu_pos15_variant_center": [
1.1920928955078125e-07,
-1.3139982968368713e-07,
1.9161353392860292e-08
],
"alternative_probabilities_sample_npu_pos15": [
0.9999991059303284,
2.778126031444117e-07,
5.09906669776683e-07
],
"reference_probabilities_sample_npu_pos15": [
0.9999990463256836,
4.092123901955347e-07,
4.907452648694743e-07
],
"insulin_probabilities_shape": [
1,
333,
3
],
"insulin_device": "npu:0",
"output_contract": "probabilities softmax(no_splice, acceptor, donor) per position, site_probabilities auxiliary, delta = alternative - reference (reference-informed)"
}{
"passed": true,
"atol": 0.001,
"rtol": 0.001,
"probabilities_max_abs_diff": 1.226071617566049e-07,
"probabilities_mean_abs_diff": 4.915420699301039e-09,
"site_probabilities_max_abs_diff": 1.4e-06,
"delta_max_abs_diff": 1.3827811926603317e-06,
"delta_mean_abs_diff": 6.686288919212629e-08,
"shape": [
1,
29,
3
],
"elements": 87,
"dtype": "float32",
"note": "CPU vs NPU same weights, same sequences, same preprocessing, identical tokenizer; probabilities and site_probabilities compared directly; delta consistency separately verified with same atol/rtol (CPU 208.7 sec vs NPU 0.46 sec). Threshold based on float32 dilated CNN ensemble and measured error."
}{
"first_compile_latency_ms": 256.39,
"variant_first_latency_ms": 248.35,
"stable_avg_prob_latency_ms": 46.76,
"stable_avg_variant_latency_ms": 238.28,
"warmup_iters": 3,
"stable_iters": 10,
"sequences_per_s_prob": 21.4,
"bases_per_s_prob": 620.1,
"sequences_per_s_variant": 4.2,
"input_length": 29,
"insulin_length": 333,
"insulin_latency_ms": 64.65,
"batch_size": 1,
"dtype": "float32",
"device": "npu:0",
"peak_memory_mb": 310.5,
"synchronize": "torch.npu.synchronize before/after timing, first compile includes compilation",
"cpu_baseline_latency_ms": 43757.9,
"cpu_variant_latency_ms": 208696.4,
"npu_speedup_prob": 935.0,
"npu_speedup_variant": 875.0
}


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