multimolecule/optmrle003fc2feced71d6cf11e7336164985e331817e7utr-translationnpu:0{
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1",
"transformers": "4.57.1",
"multimolecule": "0.2.4",
"npu_name": "Ascend910_9362",
"npu_count": 2,
"cann": "8.5.1",
"python": "3.11"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"primary_sequence": "GGGGCCGGAAGUGCCGCUCCUUGGUGGGGGCUGUUCAUGGCGGUUCCGGGGUCUCCAACAUUUUUCCCGGCUGUGGUCCUAAAUCUGUCCAAAGCAGAGGCAGUGGAGCUUGAGGUUCUUGCUGGUGUGAA",
"sequence_length": 131,
"sequence_sha256": "085ce6d59b446cef3eca50f927aa7e992a2c8cbf7b5b9b0818eaa1fa00021fd9",
"alphabet": "A/C/G/U/N",
"tokenization": "RnaTokenizer truncation=True max_length=50 padding=max_length replace_T_with_U=true",
"input_ids_shape": [
1,
50
],
"additional_fixtures": [
"APP_5UTR len=150",
"insulin_5UTR_like len=141",
"MYC_5UTR len>200"
]
}{
"output_type": "MRL scalar regression (mean ribosome load)",
"logits_shape": [
1,
1
],
"dtype": "float32",
"device": "npu:0",
"npu_mrl": -1.9787813425064087,
"cpu_mrl": -1.9786299467086792,
"additional_mrl": {
"APP_5UTR": 0.404829204082489,
"insulin_5UTR_like": -1.8964329957962036
}
}{
"method": "CPU vs NPU same weights & inputs",
"sequences_tested": 4,
"metric": "abs diff MRL",
"max_abs_diff": 0.0001513957977294922,
"mean_abs_diff": 8.518248796463013e-05,
"atol": 0.0001,
"rtol": 0.0001,
"passed": true
}{
"device": "npu:0",
"first_compile_ms": 1.99,
"stable_avg_ms": 1.24,
"seq_per_s": 805.8,
"warmup": 3,
"stable_runs": 10,
"dtype": "float32",
"batch": 1,
"sequence_length": 50,
"note": "timing with torch.npu.synchronize() before/after; CPU preprocessing excluded"
}


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