multimolecule/optmrle003fc2feced71d6cf11e7336164985e331817e7utr-translationnpu:0{
"torch_version": "2.9.0+cpu",
"torch_npu_version": "2.9.0.post1+gitee7ba04",
"device_name": "Ascend910_9362",
"device_count": 2,
"npu_available": true,
"python_version": "3.11.14",
"cann_version": "8.5.1",
"dtype": "float32",
"model_dir": "/opt/atomgit/.cache/huggingface/hub/models--multimolecule--optmrl/snapshots/e003fc2feced71d6cf11e7336164985e331817e7"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"num_sequences": 5,
"sequence_length": 50,
"alphabet": "A/C/G/U/N",
"strand": "5'->3'",
"sequences_sha256": [
"992eeba3372e7a30288e2a4be013eb8fd1968c204cdcf9ea780281c63573b0d5",
"e97f33059e432f154c59b027b874642339afdb18b369a8ca645fa1d12f0905dc",
"57652af7a86087837e4bdcf36cf7dcf8d6103588a70db7fc9c4d4ea6817e81ac",
"e83a236520b1dc04450f487fc5aff2b69008a25a4137cb75b7b70377c4b62f8a",
"b3144536aa1ddf56513569861d33beaf68590bf7d0162cd449513283f99e3d22"
],
"example_sequence": "GGGGCCGGAAGUGCCGCUCCUUGGUGGGGGCUGUUCAUGGCGGUUCCGGG",
"example_source": "NRAS proto-oncogene 5' UTR truncated to 50 nt (real human 5'UTR from model card)",
"all_sources": [
"NRAS proto-oncogene 5' UTR truncated to 50 nt (real human 5'UTR from model card)",
"amyloid beta precursor protein 5' UTR truncated to 50 nt (real human 5'UTR)",
"RUNX1 5' UTR truncated to 50 nt (real human 5'UTR)",
"microRNA 21 (22 nt) + A-pad to 50 nt (real ncRNA from model card, padded with A's to fixed window)",
"synthetic ACGU repeat 50 nt (balanced alphabet smoke)"
],
"input_ids_shape": [
5,
50
],
"attention_mask_shape": [
5,
50
],
"tokenizer": "RnaTokenizer",
"vocab_size": 5,
"replace_T_with_U": true,
"padding": "max_length 50, truncation True, A-pad for short sequences"
}{
"logits_shape": [
5,
1
],
"logits_dtype": "float32",
"output_type": "scalar mean-ribosome-load (MRL) per 50 nt 5'UTR window (regression)",
"cpu_logits": [
-1.9786300659179688,
0.4048468768596649,
0.831030011177063,
-0.5907962322235107,
0.854703426361084
],
"npu_logits": [
-1.9787813425064087,
0.404829204082489,
0.8310579061508179,
-0.5907660126686096,
0.8547353744506836
],
"example_mrl_cpu": -1.9786300659179688,
"example_mrl_npu": -1.9787813425064087,
"logits_device": "npu:0",
"num_labels": 1,
"problem_type": "regression"
}{
"passed": true,
"shape": [
5,
1
],
"elements": 5,
"max_abs_diff": 0.0001512765884399414,
"mean_abs_diff": 5.180239999999999e-05,
"atol": 0.001,
"rtol": 0.001,
"per_sequence_diff": [
0.0001512765884399414,
1.767278e-05,
2.789497e-05,
3.021955e-05,
3.194809e-05
],
"note": "CPU vs NPU same weights, same RnaTokenizer batch, same padding, float32. Max diff 1.5e-4 well below 1e-3 threshold."
}{
"device": "npu:0",
"dtype": "float32",
"batch": 5,
"sequence_length": 50,
"warmup_iterations": 3,
"stable_iterations": 10,
"first_latency_ms": 193.04,
"avg_latency_ms": 0.83,
"min_latency_ms": 0.81,
"max_latency_ms": 0.86,
"sequences_per_second": 6021.16,
"bases_per_second": 301057.76,
"model_params_M": 0.476,
"flops_M": 24.04
}


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