multimolecule/ufold538de5c2f48e56731c092e40d54c641ff84a2154rna-secondary-structurenpu:0{
"torch": "2.9.0+cpu",
"torch_npu_available": true,
"npu_device_count": 2,
"npu_device_name": "Ascend910_9362",
"transformers": "5.9.0",
"multimolecule": "0.2.1",
"input_length": 71,
"dtype": "float32"
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"sequence": "GGGCUAUAGCUCAGUUGGUUAGAGCGCACCCCUGAUAAGGGUGAGGUCGCUGAUUCGAAUCAGCACCCCCC",
"length": 71,
"sha256": "c546ed223325fdd9fdee27aa2fd29e72517243d47861fc71920fc6b4b9358b8a",
"alphabet": "A/C/G/U/N",
"replace_T_with_U": true,
"direction": "5'->3'",
"padding_token": "N",
"tokenizer": "RnaTokenizer",
"vocab": "A,C,G,U,N",
"L": 71
}{
"logits_shape": [
1,
71,
71
],
"contact_map_shape": [
1,
71,
71
],
"logits_dtype": "float32",
"contact_dtype": "float32",
"output_device": "npu:0",
"dot_bracket_npu": "(((...(.((((.........)))).(((((.......))))).....((((((....)))))))...)))",
"dot_bracket_cpu": "(((...(.((((.........)))).(((((.......))))).....((((((....)))))))...)))",
"pairs_count_npu": 19,
"pairs_count_cpu": 19,
"contact_mean_npu": 0.017810717225074768,
"contact_mean_cpu": 0.01780277118086815,
"model": "multimolecule/ufold",
"revision": "538de5c2f48e56731c092e40d54c641ff84a2154",
"route": "rna-secondary-structure"
}{
"output": "contact_map (LxL probability)",
"shape": [
1,
71,
71
],
"dtype": "float32",
"max_abs_diff": 0.0028688907623291016,
"mean_abs_diff": 8.055113298066934e-06,
"atol": 0.01,
"rtol": 0.001,
"passed": true,
"pearson_corr": 0.9999995338266006,
"binary_diff_count_threshold_0.5": 0,
"binary_total": 5041,
"finite_ratio_cpu": 1.0,
"finite_ratio_npu": 1.0,
"logits_max_diff": 0.052310943603515625,
"logits_mean_diff": 0.0057905325666069984
}{
"L": 71,
"batch": 1,
"dtype": "float32",
"device": "npu:0",
"warmup": 3,
"stable_runs": 10,
"avg_latency_ms": 10.688638687133789,
"seq_per_s": 93.55728351111051,
"bases_per_s": 6642.567129288846,
"peak_memory_bytes": 108832768,
"first_inference_ms": 11.997222900390625,
"cpu_baseline_ms": 89.96891975402832
}


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