
从底层理解分离式推理:交互演示解析预填充与解码调度
来源标题:Disaggregated Inference from the Ground Up
这篇交互式讲解用可视化演示了分离式推理中预填充(prefill)和解码(decode)阶段的调度过程。演示包含三个不同长度提示词的请求,按混合、预填充、解码三种策略展示时间分配,可调节速率与步长。
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
"}; var config = {"kind":"chat","initial":"mixed-t-0","duration":50,"durationByPolicy":{"mixed":40,"prefill":40,"decode":50},"step":0.05,"rate":9.23,"policy":"mixed","policyControls":true,"playbackLabel":"scheduled response","chat":{"horizon":51,"requests":[{"arrival":0,"work":4,"size":"Short prompt","prompt":"What's the classic Star Wars wish for good luck? Explain what it means.","response":["May","the","Force","be","with","you.","It","is","a","way","to","wish","someone","luck,","courage,","and","guidance","on","the","journey","ahead."]},{"arrival":4,"work":10,"size":"Long prompt","prompt":"Summarize these story notes in six words: a crew loses its map during a storm, follows the stars through the night, and finally reaches home just before the sun comes up.","response":["The","crew","returns","home","before","sunrise."]},{"arrival":7,"work":6,"size":"Medium prompt","prompt":"Create a six-word slogan for a small neighborhood bakery that bakes fresh bread every morning.","response":["Fresh","bread,","warm","smiles,","every","morning."]}],"schedules":{"mixed":[{"id":"p-1","request":0,"start":0,"end":1,"kind":"prefill","token":null},{"id":"p-2","request":0,"start":1,"end":2,"kind":"prefill","token":null},{"id":"p-3","request":0,"start":2,"end":3,"kind":"prefill","token":null},{"id":"p-4","request":0,"start":3,"end":4,"kind":"prefill","token":0},{"id":"d-1","request":0,"start":4,"end":5,"kind":"decode","token":1},{"id":"d-2","request":0,"start":5,"end":6,"kind":"decode","token":2},{"id":"d-3","request":0,"start":6,"end":7,"kind":"decode","token":3},{"id":"d-4","request":0,"start":7,"end":8,"kind":"decode","token":4},{"id":"p-1","request":1,"start":8,"end":9,"kind":"prefill","token":null},{"id":"p-2","request":1,"start":9,"end":10,"kind":"prefill","token":null},{"id":"p-3","request":1,"start":10,"end":11,"kind":"prefill","token":null},{"id":"p-4","request":1,"start":11,"end":12,"kind":"prefill","token":null},{"id":"p-5","request":1,"start":12,"end":13,"kind":"prefill","token":null},{"id":"p-6","request":1,"start":13,"end":14,"kind":"prefill","token":null},{"id":"p-7","request":1,"start":14,"end":15,"kind":"prefill","token":null},{"id":"p-8","request":1,"start":15,"end":16,"kind":"prefill","token":null},{"id":"p-9","request":1,"start":16,"end":17,"kind":"prefill","token":null},{"id":"p-10","request":1,"start":17,"end":18,"kind":"prefill","token":0},{"id":"d-5","request":0,"start":18,"end":19,"kind":"decode","token":5},{"id":"d-1","request":1,"start":18,"end":19,"kind":"decode","token":1},{"id":"d-6","request":0,"start":19,"end":20,"kind":"decode","token":6},{"id":"d-2","request":1,"start":19,"end":20,"kind":"decode","token":2},{"id":"d-7","request":0,"start":20,"end":21,"kind":"decode","token":7},{"id":"d-3","request":1,"start":20,"end":21,"kind":"decode","token":3},{"id":"d-8","request":0,"start":21,"end":22,"kind":"decode","token":8},{"id":"d-4","request":1,"start":21,"end":22,"kind":"decode","token":4},{"id":"p-1","request":2,"start":22,"end":23,"kind":"prefill","token":null},{"id":"p-2","request":2,"start":23,"end":24,"kind":"prefill","token":null},{"id":"p-3","request":2,"start":24,"end":25,"kind":"prefill","token":null},{"id":"p-4","request":2,"start":25,"end":26,"kind":"prefill","token":null},{"id":"p-5","request":2,"start":26,"end":27,"kind":"prefill","token":null},{"id":"p-6","request":2,"start":27,"end":28,"kind":"prefill","token":0},{"id":"d-9","request":0,"start":28,"end":29,"kind":"decode","token":9},{"id":"d-5","request":1,"start":28,"end":29,"kind":"decode","token":5},{"id":"d-1","request":2,"start":28,"end":29,"kind":"decode","token":1},{"id":"d-10","request":0,"start":29,"end":30,"kind":"decode","token":10},{"id":"d-2","request":2,"start":29,"end":30,"kind":"decode","token":2},{"id":"d-11","request":0,"start":30,"end":31,"kind":"decode","token":11},{"id":"d-3","request":2,"start":30,"end":31,"kind":"decode","token":3},{"id":"d-12","request":0,"start":31,"end":32,"kind":"decode","token":12},{"id":"d-4","request":2,"start":31,"end":32,"kind":"decode","token":4},{"id":"d-13","request":0,"start":32,"end":33,"kind":"decode","token":13},{"id":"d-5","request":2,"start":32,"end":33,"kind":"decode","token":5},{"id":"d-14","request":0,"start":33,"end":34,"kind":"decode","token":14},{"id":"d-15","request":0,"start":34,"end":35,"kind":"decode","token":15},{"id":"d-16","request":0,"start":35,"end":36,"kind":"decode","token":16},{"id":"d-17","request":0,"start":36,"end":37,"kind":"decode","token":17},{"id":"d-18","request":0,"start":37,"end":38,"kind":"decode","token":18},{"id":"d-19","request":0,"start":38,"end":39,"kind":"decode","token":19},{"id":"d-20","request":0,"start":39,"end":40,"kind":"decode","token":20}],"prefill":[{"id":"p-1","request":0,"start":0,"end":1,"kind":"prefill","token":null},{"id":"p-2","request":0,"start":1,"end":2,"kind":"prefill","token":null},{"id":"p-3","request":0,"start":2,"end":3,"kind":"prefill","token":null},{"id":"p-4","request":0,"start":3,"end":4,"kind":"prefill","token":0},{"id":"p-1","request":1,"start":4,"end":5,"kind":"prefill","token":null},{"id":"p-2","request":1,"start":5,"end":6,"kind":"prefill","token":null},{"id":"p-3","request":1,"start":6,"end":7,"kind":"prefill","token":null},{"id":"p-4","request":1,"start":7,"end":8,"kind":"prefill","token":null},{"id":"p-5","request":1,"start":8,"end":9,"kind":"prefill","token":null},{"id":"p-6","request":1,"start":9,"end":10,"kind":"prefill","token":null},{"id":"p-7","request":1,"start":10,"end":11,"kind":"prefill","token":null},{"id":"p-8","request":1,"start":11,"end":12,"kind":"prefill","token":null},{"id":"p-9","request":1,"start":12,"end":13,"kind":"prefill","token":null},{"id":"p-10","request":1,"start":13,"end":14,"kind":"prefill","token":0},{"id":"p-1","request":2,"start":14,"end":15,"kind":"prefill","token":null},{"id":"p-2","request":2,"start":15,"end":16,"kind":"prefill","token":null},{"id":"p-3","request":2,"start":16,"end":17,"kind":"prefill","token":null},{"id":"p-4","request":2,"start":17,"end":18,"kind":"prefill","token":null},{"id":"p-5","request":2,"start":18,"end":19,"kind":"prefill","token":null},{"id":"p-6","request":2,"start":19,"end":20,"kind":"prefill","token":0},{"id":"d-1","request":0,"start":20,"end":21,"kind":"decode","token":1},{"id":"d-1","request":1,"start":20,"end":21,"kind":"decode","token":1},{"id":"d-1","request":2,"start":20,"end":21,"kind":"decode","token":1},{"id":"d-2","request":0,"start":21,"end":22,"kind":"decode","token":2},{"id":"d-2","request":1,"start":21,"end":22,"kind":"decode","token":2},{"id":"d-2","request":2,"start":21,"end":22,"kind":"decode","token":2},{"id":"d-3","request":0,"start":22,"end":23,"kind":"decode","token":3},{"id":"d-3","request":1,"start":22,"end":23,"kind":"decode","token":3},{"id":"d-3","request":2,"start":22,"end":23,"kind":"decode","token":3},{"id":"d-4","request":0,"start":23,"end":24,"kind":"decode","token":4},{"id":"d-4","request":1,"start":23,"end":24,"kind":"decode","token":4},{"id":"d-4","request":2,"start":23,"end":24,"kind":"decode","token":4},{"id":"d-5","request":0,"start":24,"end":25,"kind":"decode","token":5},{"id":"d-5","request":1,"start":24,"end":25,"kind":"decode","token":5},{"id":"d-5","request":2,"start":24,"end":25,"kind":"decode","token":5},{"id":"d-6","request":0,"start":25,"end":26,"kind":"decode","token":6},{"id":"d-7","request":0,"start":26,"end":27,"kind":"decode","token":7},{"id":"d-8","request":0,"start":27,"end":28,"kind":"decode","token":8},{"id":"d-9","request":0,"start":28,"end":29,"kind":"decode","token":9},{"id":"d-10","request":0,"start":29,"end":30,"kind":"decode","token":10},{"id":"d-11","request":0,"start":30,"end":31,"kind":"decode","token":11},{"id":"d-12","request":0,"start":31,"end":32,"kind":"decode","token":12},{"id":"d-13","request":0,"start":32,"end":33,"kind":"decode","token":13},{"id":"d-14","request":0,"start":33,"end":34,"kind":"decode","token":14},{"id":"d-15","request":0,"start":34,"end":35,"kind":"decode","token":15},{"id":"d-16","request":0,"start":35,"end":36,"kind":"decode","token":16},{"id":"d-17","request":0,"start":36,"end":37,"kind":"decode","token":17},{"id":"d-18","request":0,"start":37,"end":38,"kind":"decode","token":18},{"id":"d-19","request":0,"start":38,"end":39,"kind":"decode","token":19},{"id":"d-20","request":0,"start":39,"end":40,"kind":"decode","token":20}],"decode":[{"id":"p-1","request":0,"start":0,"end":1,"kind":"prefill","token":null},{"id":"p-2","request":0,"start":1,"end":2,"kind":"prefill","token":null},{"id":"p-3","request":0,"start":2,"end":3,"kind":"prefill","token":null},{"id":"p-4","request":0,"start":3,"end":4,"kind":"prefill","token":0},{"id":"d-1","request":0,"start":4,"end":5,"kind":"decode","token":1},{"id":"d-2","request":0,"start":5,"end":6,"kind":"decode","token":2},{"id":"d-3","request":0,"start":6,"end":7,"kind":"decode","token":3},{"id":"d-4","request":0,"start":7,"end":8,"kind":"decode","token":4},{"id":"d-5","request":0,"start":8,"end":9,"kind":"decode","token":5},{"id":"d-6","request":0,"start":9,"end":10,"kind":"decode","token":6},{"id":"d-7","request":0,"start":10,"end":11,"kind":"decode","token":7},{"id":"d-8","request":0,"start":11,"end":12,"kind":"decode","token":8},{"id":"d-9","request":0,"start":12,"end":13,"kind":"decode","token":9},{"id":"d-10","request":0,"start":13,"end":14,"kind":"decode","token":10},{"id":"d-11","request":0,"start":14,"end":15,"kind":"decode","token":11},{"id":"d-12","request":0,"start":15,"end":16,"kind":"decode","token":12},{"id":"d-13","request":0,"start":16,"end":17,"kind":"decode","token":13},{"id":"d-14","request":0,"start":17,"end":18,"kind":"decode","token":14},{"id":"d-15","request":0,"start":18,"end":19,"kind":"decode","token":15},{"id":"d-16","request":0,"start":19,"end":20,"kind":"decode","token":16},{"id":"d-17","request":0,"start":20,"end":21,"kind":"decode","token":17},{"id":"d-18","request":0,"start":21,"end":22,"kind":"decode","token":18},{"id":"d-19","request":0,"start":22,"end":23,"kind":"decode","token":19},{"id":"d-20","request":0,"start":23,"end":24,"kind":"decode","token":20},{"id":"p-1","request":1,"start":24,"end":25,"kind":"prefill","token":null},{"id":"p-2","request":1,"start":25,"end":26,"kind":"prefill","token":null},{"id":"p-3","request":1,"start":26,"end":27,"kind":"prefill","token":null},{"id":"p-4","request":1,"start":27,"end":28,"kind":"prefill","token":null},{"id":"p-5","request":1,"start":28,"end":29,"kind":"prefill","token":null},{"id":"p-6","request":1,"start":29,"end":30,"kind":"prefill","token":null},{"id":"p-7","request":1,"start":30,"end":31,"kind":"prefill","token":null},{"id":"p-8","request":1,"start":31,"end":32,"kind":"prefill","token":null},{"id":"p-9","request":1,"start":32,"end":33,"kind":"prefill","token":null},{"id":"p-10","request":1,"start":33,"end":34,"kind":"prefill","token":0},{"id":"d-1","request":1,"start":34,"end":35,"kind":"decode","token":1},{"id":"d-2","request":1,"start":35,"end":36,"kind":"decode","token":2},{"id":"d-3","request":1,"start":36,"end":37,"kind":"decode","token":3},{"id":"d-4","request":1,"start":37,"end":38,"kind":"decode","token":4},{"id":"d-5","request":1,"start":38,"end":39,"kind":"decode","token":5},{"id":"p-1","request":2,"start":39,"end":40,"kind":"prefill","token":null},{"id":"p-2","request":2,"start":40,"end":41,"kind":"prefill","token":null},{"id":"p-3","request":2,"start":41,"end":42,"kind":"prefill","token":null},{"id":"p-4","request":2,"start":42,"end":43,"kind":"prefill","token":null},{"id":"p-5","request":2,"start":43,"end":44,"kind":"prefill","token":null},{"id":"p-6","request":2,"start":44,"end":45,"kind":"prefill","token":0},{"id":"d-1","request":2,"start":45,"end":46,"kind":"decode","token":1},{"id":"d-2","request":2,"start":46,"end":47,"kind":"decode","token":2},{"id":"d-3","request":2,"start":47,"end":48,"kind":"decode","token":3},{"id":"d-4","request":2,"start":48,"end":49,"kind":"decode","token":4},{"id":"d-5","request":2,"start":49,"end":50,"kind":"decode","token":5}]}}}; document.querySele
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。