multimolecule/malinoismainregulatory-sequencenpu:0{
"torch": "2.9.0+cpu",
"torch_npu_available": true,
"device_name": "Ascend910_9362",
"device_count": 2,
"torch_npu": "2.9.0.post1+gitee7ba04",
"multimolecule": "0.2.1",
"transformers": "5.9.0",
"hf_endpoint": "https://hf-mirror.com",
"python": "3.11.14"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"num_sequences": 3,
"sequence_length_fixed": 600,
"alphabet": "A/C/G/T/N (N->4 zero-vector, U->T via replace_U_with_T)",
"strand": "5'->3' retained",
"species": "Homo sapiens (K562/HepG2/SK-N-SH MPRA)",
"genome": "MPRA plasmid flanks, input_length=600 padded by deterministic repeat per model contract",
"padding": "exact 600bp window, each raw fragment centered and repeated to 600; no N padding needed; tokenized without extra special tokens (pad_token_id=4=N)",
"tokenizer": "DnaTokenizer custom ACGT->0-3, N->4 zero-vector via one_hot clamp, replace_U_with_T=true, model_max_length=600",
"sequences": [
{
"name": "p53_600",
"length": 600,
"sha256": "b3c747a8b148e11d5f6cfcb09d91190ef2b86c077697dc01dd31a667c4e6d143",
"preview": "ACTCCCCTGCCCTCAACAAGATGTTTTGCCAA",
"desc": "tumor protein p53 fragment repeated to 600bp (MPRA CRE context)"
},
{
"name": "BRCA1_600",
"length": 600,
"sha256": "b76f9f4e1255e551d92f6881c920477d92ee67051cd6dc1544746b7f222fa063",
"preview": "TCATTGGAACAGAAAGAAATGGATTTATCTGC",
"desc": "BRCA1 DNA repair associated fragment repeated to 600bp"
},
{
"name": "HBB_600",
"length": 600,
"sha256": "ac29a70bd7d37f13c8b629928a7938253beb4357506047e44273e2ffcbbc8950",
"preview": "CATTTGCTTCTGACACAACTGTGTTCACTAGC",
"desc": "hemoglobin subunit beta fragment repeated to 600bp"
}
],
"input_ids_shape": [
3,
600
],
"attention_mask_shape": [
3,
600
],
"add_special_tokens": false
}{
"output_shape": [
3,
3
],
"dtype": "float32",
"task": "regulatory-sequence CRE activity regression K562/HepG2/SK-N-SH",
"output_names": [
"K562",
"HepG2",
"SK-N-SH"
],
"logits_range": [
-0.405,
1.082
],
"samples": [
{
"name": "p53_600",
"logits": [
0.610428,
0.952002,
1.08246
],
"cpu_logits": [
0.611062,
0.951942,
1.082101
]
},
{
"name": "BRCA1_600",
"logits": [
-0.19969,
-0.192729,
-0.010027
],
"cpu_logits": [
-0.199748,
-0.192784,
-0.010187
]
},
{
"name": "HBB_600",
"logits": [
-0.198549,
0.070588,
-0.405136
],
"cpu_logits": [
-0.198426,
0.070793,
-0.405111
]
}
],
"device_proof": "first_param:npu:0, input_ids:npu:0, logits:npu:0",
"finite_ok": true
}{
"atol": 0.01,
"rtol": 0.001,
"max_abs_diff": 0.000634,
"mean_abs_diff": 0.000187,
"pearson": 1.0,
"passed": true,
"shape": [
3,
3
],
"elements": 9,
"note": "3 sequences batch compared; allclose passed with atol=0.01 (FP32 conv+batchnorm tolerance)"
}{
"first_run_ms": 3.09,
"avg_ms": 3.09,
"min_ms": 3.05,
"max_ms": 3.13,
"single_latency_ms": 3.92,
"throughput_seq_per_s": 970.66,
"throughput_bases_per_s": 582395.6,
"throughput_single_seq_per_s": 255.0,
"batch_size": 3,
"sequence_length": 600,
"dtype": "float32",
"warmup": 3,
"iters": 10,
"device": "npu:0"
}


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