multimolecule/aparent27ce086836126386421cb9f277c25461bdc6a1b7apolyadenylationnpu:0{
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1",
"multimolecule": "0.2.1",
"transformers": "5.9.0",
"python": "3.11.14",
"os": "Ubuntu 22.04.5 LTS",
"npu": "Ascend910_9362",
"cann": "8.5.1",
"device_count": 2
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"alphabet": "ACGUN",
"direction": "5'->3'",
"length": 205,
"hexamer_position": 70,
"sequences": [
{
"name": "ref_AAUAAA",
"length": 205,
"sha256": "c04a456284ac1eb2967c195dd2993d489d2a377ab1a83e943fc491814ffd2e1c",
"preview": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...AAAAAAAAAA",
"description": "synthetic reference with canonical AAUAAA at 70"
},
{
"name": "alt_AAUACA",
"length": 205,
"sha256": "3c757a9c44bcad6613545cf3b50b50c1b9c316e01dc12b96f2aa14802761de9b",
"preview": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...AAAAAAAAAA",
"description": "synthetic alternate with AAUACA variant at 70"
},
{
"name": "braf_3utr_205",
"length": 205,
"sha256": "d056be8af42aeba8b03726d88edbf1f71d83a2cb29bc1dca6b2db480de7de2c7",
"preview": "AACAAAUGAGUGAGAGUUCAGGAGAGUAGC...GGUUAAAAUA",
"description": "BRAF 3'UTR fragment first 205 nt, RNA alphabet"
}
],
"tokenizer": "RnaTokenizer (vocab A/C/G/U/N, pad N, replace T->U true)",
"batch": 1,
"dtype": "float32"
}{
"output_type": "cleavage profile + isoform usage",
"logits_shape": [
1,
206
],
"logits_dtype": "float32",
"example_cpu_logits_0_5": [
4.457043170928955,
-5.991365909576416,
-3.0637643337249756,
-3.17375111579895,
-1.8348164558410645
],
"example_npu_logits_0_5": [
4.460202693939209,
-5.9926910400390625,
-3.0633773803710938,
-3.17043399810791,
-1.8316755294799805
],
"example_cpu_isoform_77_127": 0.077712,
"example_npu_isoform_77_127": 0.077776,
"variant_ref_iso_cpu": 0.077712,
"variant_ref_iso_npu": 0.077776,
"variant_alt_iso_cpu": 0.015996,
"variant_alt_iso_npu": 0.015995,
"variant_delta_logodds_cpu": -1.645439,
"variant_delta_logodds_npu": -1.646416
}{
"method": "same weights, same sequences, same tokenizer, CPU vs NPU float32",
"logits_max_abs_diff": 0.007155,
"logits_mean_abs_diff": 0.002614,
"prob_max_abs_diff": 0.000144,
"prob_mean_abs_diff": 2.144462e-06,
"isoform_abs_diff": 6.404e-05,
"delta_logodds_abs_diff": 0.000977,
"thresholds": {
"logits_atol": 0.015,
"prob_atol": 0.001,
"iso_atol": 0.001
},
"passed": true,
"compare_script": "scripts/compare_outputs.py with atol 0.015/0.001"
}{
"device": "npu:0",
"warmup": 3,
"stable_runs": 10,
"avg_ms": 8.18,
"min_ms": 8.149,
"max_ms": 8.206,
"sequence_per_sec": 122.25,
"bases_per_sec": 25061.39,
"input_length": 205,
"output_shape": [
1,
206
],
"dtype": "float32",
"peak_memory_bytes": 1353728,
"peak_memory_mb": 1.29,
"synchronize": "torch.npu.synchronize() before and after timing"
}


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