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

数据更新:

python脚本(注意分支):

HLO图分析KV-Cache更新:

KV-Cache作为HLO图的输入输出:bf16[1,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

相关推荐
罗罗攀1 小时前
PyTorch学习笔记|神经网络的损失函数
人工智能·pytorch·笔记·神经网络·学习
做个文艺程序员2 小时前
2026 年开源大模型选型指南:Qwen3.5 / DeepSeek V3.2 / Llama 4 横向对比
人工智能·开源·llama
枫叶林FYL4 小时前
第10章 符号推理与神经符号AI
pytorch·python·深度学习
龙文浩_8 小时前
AI深度学习/PyTorch/反向传播与梯度下降
人工智能·pytorch·深度学习
汀江游非侠10 小时前
编译llama.cpp
llama
郝学胜-神的一滴12 小时前
Pytorch自动微分模块:从原理到实战,解锁反向传播核心奥秘
服务器·人工智能·pytorch·python·深度学习·机器学习
龙文浩_13 小时前
AI深度学习/PyTorch/神经网络相关
人工智能·pytorch·深度学习
Flying pigs~~1 天前
Prompt 工程实战总结:文本分类、信息抽取、语义匹配
人工智能·自然语言处理·prompt·文本分类·大模型应用
AI大模型..1 天前
数据洞察加速器:LLM Copilot 如何让 SQL 查询效率提升 50% 以上?
人工智能·langchain·llm·agent·llama
ZhiqianXia1 天前
Pytorch 学习笔记(3) : torch.cuda
pytorch·笔记·学习