multimolecule/procapnet8703b8aa772c754dbd87f90e074c55f25d723442regulatory-sequencenpu:0{
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1+gitee7ba04",
"transformers": "5.9.0",
"multimolecule": "0.2.1",
"npu_name": "Ascend910_9362",
"device_count": 2,
"python": "3.11.14",
"cann": "8.5.1"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"sequence": "ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT...GTACGTACGTACGTACGTACGTACGTACGTAC",
"full_length": 2114,
"sequence_sha256": "c40b532a83994ba982de92e95a2c97f6b1832dd29ade7a63ed911f7941b55f4c",
"alphabet": "A/C/G/T/N",
"direction": "5'->3'",
"species": "human K562",
"window_bp": 2114,
"profile_bp": 1000,
"strands": 2,
"tokenizer": "DnaTokenizer",
"input_ids_shape": [
1,
2114
],
"attention_mask_shape": [
1,
2114
],
"source": "synthetic ACGT repeat truncated to 2114 (SHA c40b532a) - traceable, mirrors model card example (ACGT*529)[:2114]"
}{
"profile_logits_shape": [
1,
1000,
2
],
"count_logits_shape": [
1,
1
],
"track_shape": [
1,
1000,
2
],
"profile_logits_sample": [
-11.293557167053223,
-9.28838062286377,
-12.38500690460205,
-8.576783180236816,
-11.293557167053223
],
"count_logits_value": 10.210614,
"track_sum_cpu": 27189.269531,
"track_sum_npu": 27190.328125,
"dtype": "float32",
"postprocess": "ProCapNetForProfilePrediction.postprocess => base-resolution two-stranded PRO-cap track"
}{
"profile_logits_max_abs_diff": 0.0015378,
"profile_logits_mean_abs_diff": 0.0007579327,
"count_logits_max_abs_diff": 3.910065e-05,
"track_max_abs_diff": 0.01734543,
"track_mean_abs_diff": 0.004785132,
"atol": 0.01,
"rtol": 0.001,
"passed": true,
"comparison": "CPU vs NPU same weights, same sequence, float32, profile+count heads compared"
}{
"device": "npu:0",
"first_compile_time_s": 0.2008,
"avg_stable_time_s": 0.0124,
"warmup": 3,
"stable_iterations": 10,
"sequence_per_s": 80.79,
"bases_per_s": 170781.6,
"dtype": "float32",
"batch": 1,
"input_length": 2114,
"peak_memory_MiB": 44.9,
"synchronize": "torch.npu.synchronize() before/after timing"
}


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