Mitigate unsafe deserialization vulnerability (CWE-502) in the GPU
inference pipeline. torch.load without weights_only=True allows
arbitrary code execution via malicious pickle payloads in checkpoint
files.
Affected locations:
- gpu/convert_checkpoint.py:37 (checkpoint conversion utility)
- gpu/generate.py:67,69 (fp16 and int2 checkpoint loading)
The utils/ scripts already applied this parameter correctly; this
commit brings the GPU pipeline to the same safety standard.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>