pytorch-tpu/llama推理优化之input prompt bucketing

数据更新:

python脚本(注意分支):

HLO图分析KV-Cache更新:

KV-Cache作为HLO图的输入输出:bf161,2048,32,128{3,2,1,0} 128x, 2x32x2

参考链接

notes for transformer introduction by an Italian teaching in China: Attention is all you need (Transformer) - Model explanation (including math), Inference and Training
notes for and LLaMa: LLaMA explained: KV-Cache, Rotary Positional Embedding, RMS Norm, Grouped Query Attention, SwiGLU
github 使用XLA_GPU,选择分支llama2-google-next-inference
pytorch.org: path-achieve-low-inference-latency

相关推荐
xian_wwq19 小时前
【学习笔记】Prompt Engineering 没死,只是它不再够用了-2/16
笔记·学习·prompt
hhzz1 天前
《深度学习框架PyTorch入门与实践》系列:04-nn模块详解:用积木搭建神经网络
pytorch·深度学习·神经网络
可乐ea1 天前
Tool Calling 工具调用:让 Agent 查询数据库、调用接口和执行任务
数据库·prompt·agent·tool
circuitsosk1 天前
长文本与高并发下的Token“瘦身”策略:Prompt压缩与上下文窗口优化
java·前端·python·prompt·上下文窗口·token优化
阳光开朗男孩1 天前
Pytorch的安装与配置
人工智能·pytorch·python
等一朵映山红1 天前
动态图 vs 静态图:PyTorch 与 TensorFlow 架构底层对比
人工智能·pytorch·python
AI创界者1 天前
【ComfyUI 进阶指南】掌握 Prompt 提示词工程:从语法结构到工作流控制实战
prompt
老马聊技术2 天前
Pytorch深度学习环境配置与测试
人工智能·pytorch·python
维核科技2 天前
Llama 3.3 vs Qwen2.5 vs DeepSeek-R1
ai·私有化部署·llama·大模型部署·私有化大模型部署
hhzz2 天前
《深度学习框架PyTorch入门与实践》系列:03-autograd自动微分:反向传播的引擎
人工智能·pytorch·深度学习