当前位置:首页 > 报告详情

释放 Llama 的潜力:基于 CPU 的微调.pdf

上传人: 竿*** 编号:981540 2025-11-29 62页 1.58MB

1、PublicUnleashing LlamasPotential:CPU-Based Fine-TuningQCon SFO 2024 by Rema Hariharan and Anil Rajput*All third-party product,company names and logos are trademarks or registered trademarks and remain the property of their respective holders.Use of them does not imply any affiliation with or endorse

2、ment by them.PublicQCon SFO2018 2019 2024CPUJava PublicQCon SFO2018 2019 2024CPU GPUJava LLMPublicQCon SFO Topic2018 2019 2024CPU GPUJava LLMCPUPublicSurveyBackground in CPU architecture PublicOptimal performance is tango dance between Software and HW platformHW PlatformSoftwareSynchronizationPublic

3、Focus of this talkHardware focused platform features 01Software:Llama,Workloads,Models,Metrics,Characterization,Deployments etc.02Synchronization:Optimization,Tunings Deployment Recommendations for optimal performance 03PublicHardware Platform features NOT the focus of this talk:GPU based platform C

4、PU+GPU based platform Focus:CPU Based Inference PublicHardware Platform features CPUs Cores SMT(Simultaneous MultiThreading)Caches AMD EPYC Chiplet Architecture vs.Unified L3 Memory Capacity and Bandwidth PublicHardware Platform featuresCPUCPUCPUSingle Socket Dual Socket PublicHardware Platform feat

5、uresCPUCPUCPUCoreCoreCoreCoreCoreCoreCoreCoreL3 cache4MB 512 MBCore.Memory,I/O,NIC Controllers etc.DDR MemorySingle Socket Dual Socket CPUPublicHardware Platform featuresCPUCPUCPUCoreCoreCoreCoreCoreCoreCoreCoreL3 cache4MB 512 MBCore.Memory,I/O,NIC Controllers etc.DDR MemoryCoreSingle Socket Dual So

6、cket SMT 0 SMT 1L1 I32KBL1 Data32-64KBL2 I+D512KB-2MBCPUPublicL3 Cache:Unified vs ChipletPublicDual Socket System:12 memory channels Socket 0 (8 CCDs)xGMIExample:Memory bandwidth400 Gbps(Total)40-60 Gbps(each CCD)CCD 1 CCD 2 CCD 3 CCD 4 CCD 5 CCD 6 CCD 7 CCD 8PublicDual Socket System:NPS4 Socket 0 (

word格式文档无特别注明外均可编辑修改,预览文件经过压缩,下载原文更清晰!
三个皮匠报告文库所有资源均是客户上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作商用。
根据《Unleashing Llama’s Potential: CPU-Based Fine-Tuning》的内容,以下是全文关键点的概括: 1. **Llama 模型特点**:Llama 模型相较于其他 GPT 模型,具有更小的模型尺寸,开源且基于公开数据训练,在特定领域定制化时非常准确。 2. **模型内部机制**:Llama 模型包括预填充阶段(核心密集型计算)和解码阶段(内存带宽密集型计算),涉及矩阵乘法、点积、缩放和 softmax 计算。 3. **性能指标**:Llama 的性能通过“时间到第一个令牌”(TTFT)和吞吐量来衡量,TTFT 和吞吐量均受硬件和软件优化影响。 4. **部署模型**:Llama 可在 CPU 或 CPU+GPU 上部署,CPU-Only 适合小型模型,CPU+GPU 适合大型模型。 5. **软件优化**:使用针对特定硬件优化的软件框架(如 Zentorch 或 IPEX)可以提高性能。 6. **硬件优化**:通过增加核心数、使用 SMT、优化内存带宽和缓存使用,可以提高 Llama 的性能。 7. **内存需求**:Llama 的内存需求包括模型参数、激活和 KV 缓存,需要根据模型大小和批处理大小进行计算。 8. **优化建议**:优化内存带宽、使用缓存、并行实例、针对硬件优化软件,以及尽可能将实例固定在核心上。
"Llama性能优化秘诀" "CPU加速Llama推理全解析" "如何让Llama跑得更快?"
客服
商务合作
小程序
服务号
折叠