首页 > 试题广场 >

以下代码片段实现了什么优化技术?```pythonwith

[单选题]
以下代码片段实现了什么优化技术?
```python
with torch.inference_mode():
with torch.autocast(device_type='cuda', dtype=torch.float16):
output = model.generate(input_ids, max_new_tokens=100)
```
  • INT8量化推理
  • 混合精度推理(自动将计算转为FP16)
  • 梯度检查点
  • 投机解码

这道题你会答吗?花几分钟告诉大家答案吧!