dkarthikeyan1/tcrt5_pre_tcrdbd315a64b63482852d25c296c6ea07701d9ab844btcr-sequence-generationnpu:0{
"python": "3.11.14",
"torch": "2.9.0+cpu",
"torch_npu": "2.9.0.post1+gitee7ba04",
"transformers": "4.57.6",
"sentencepiece": "0.2.1",
"safetensors": "0.7.0",
"device_name": "Ascend910_9362",
"npu_devices": 2
}安装:pip install -r requirements.txt
默认执行:python inference.py
{
"tokenizer_class": "T5Tokenizer",
"vocab_size": 128,
"pmhc_input": "[PMHC]KLGGALQAK[SEP]YFAMYQENVAQTDVDTLYIIYRDYTWAELAYTWY[EOS]",
"pmhc_sha256": "3db03a10cbc44b62a6de25ff09434326eed118e6fec2e3da5dac6943741dc715",
"cdr3_source": "CASSLGQGYEQYF",
"cdr3_sha256": "8d5c8634ed30aed893a497f1ede941468002607649787218f340e6808859e458",
"masked_input": "CASSLG<extra_id_0>YEQYF",
"span_target": "<extra_id_0>QG<extra_id_1>YEQYF<extra_id_2>",
"batch_size": 2,
"seq_len": 46
}{
"encoder_last_hidden_state_shape": [
2,
46,
256
],
"decoder_logits_shape": [
2,
11,
128
],
"decoder_loss": 7.7656,
"generated_pmhc_to_tcr": "[SOS] <extra_id_0> LLL <extra_id_1>",
"generated_mask_recon": "[SOS] <extra_id_0> GS <extra_id_1>",
"output_dtype": "float32"
}{
"encoder_hidden_state": {
"passed": true,
"max_abs_diff": 6.854534149169922e-07,
"mean_abs_diff": 8.84807556691113e-08,
"atol": 1e-05,
"rtol": 0.001,
"elements": 23552
},
"decoder_logits": {
"passed": true,
"max_abs_diff": 2.193450927734375e-05,
"mean_abs_diff": 2.6529974919950208e-06,
"atol": 0.0001,
"rtol": 0.001,
"elements": 2816
},
"generated_ids_identical": true,
"note": "CPU baseline and npu:0 use identical revision, input, tokenizer seed and float32; biological span-reconstruction outputs and decoder sequence match exactly."
}{
"dtype": "float32",
"warmup_iters": 3,
"stable_iters": 10,
"latency_ms_per_iter": 636.6,
"sequences_per_s": 1.57,
"amino_acid_tokens_per_s": 154,
"generated_len": 49,
"device": "npu:0"
}


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