ต่อไปคำแนะนำต่อไป
การฝึกอบรมอย่างต่อเนื่องและการฝึกอบรมขึ้นใหม่อัตโนมัติ
เทคนิค
คู่มือทางเทคนิค
Continuous batching updates the active request set between generation iterations instead of holding one fixed batch until every request finishes.
ฟังคำแนะนำนี้บรรยายโดย AI · ~2 min
It can improve serving utilization, while capacity limits and scheduling policy still govern latency.
GPUs are fastest when they process many requests together in a batch. The naive approach, static batching, groups a fixed set of requests, runs them all to completion, then starts the next batch. The problem: language model outputs vary wildly in length, so short requests finish early and their slots sit idle while the batch waits for the longest one, wasting GPU cycles and delaying new arrivals. Continuous batching (also called in-flight or iteration-level batching, popularized by the Orca paper and used in vLLM, TensorRT-LLM, and TGI) operates at the granularity of a single decoding step. After each token is generated, finished sequences exit the batch and queued requests can be admitted when the scheduler has capacity. Iteration-level admission can improve utilization and reduce avoidable waiting compared with fixed batches; the measured effect depends on request lengths, capacity, and scheduling.
API การแชทจะยอมรับข้อความของผู้ใช้ที่เพิ่งมาถึงในแบตช์ที่กำลังทำงานอยู่ทันที แทนที่จะรอคิวสำหรับแบตช์ถัดไป
ยกเลิกคำตอบสั้นๆ ในช่วงกลางชุดและเติมช่องใหม่เพื่อให้ GPU ไม่ต้องรอเป็นเวลานาน
การรวมแบทช์ต่อเนื่องกับ PagedAttention ของ vLLM เพื่อแทรกและลบลำดับอย่างถูกในแต่ละขั้นตอนการถอดรหัส
บริการกรอกโค้ดที่รักษาโทเค็นสูงต่อวินาทีภายใต้การรับส่งข้อมูลที่ต่อเนื่องและมีความยาวผันแปรได้โดยการทำให้แบตช์เต็ม
Serving teams balance throughput with time to first token and time between generated tokens. Long prefill work can delay decoding unless the scheduler splits or otherwise manages it. Capacity budgets, request priorities, and fairness policies determine which work is admitted. Continuous batching can be combined with paged caches, chunked prefill, and speculative decoding, but each combination should be measured on the actual traffic and hardware.
จดหมายข่าวฟรี
เรื่องราว AI ที่ตรวจสอบแล้ว 3 เรื่องทุกวันทำงาน เช้า, เขียนเป็นภาษาอังกฤษธรรมดา ฟรีตลอดไป ไม่มีโฆษณา
อีเมลหนึ่งฉบับทุกวันทำงาน ยกเลิกการสมัครในคลิกเดียว เราไม่เคยขายหรือแชร์ที่อยู่อีเมลของคุณ
ทดสอบตัวเอง
ข้อเสนอแนะทันทีสำหรับทุกคำตอบ และใบรับรองที่สามารถแชร์ได้พร้อม ID ที่ตรวจสอบได้เมื่อคุณผ่านหลักสูตร
สนับสนุนการศึกษา AI ฟรี AI Understanding เป็นองค์กรไม่แสวงหาผลกำไร 501(c)(3) — ไม่มีโฆษณา ไม่มีกำแพงเงิน, ตลอดไป บริจาค
Continuous batching updates the active request set between generation iterations instead of holding one fixed batch until every request finishes. It can improve serving utilization, while capacity limits and scheduling policy still govern latency.
เนื่องจากความยาวของเอาท์พุตแตกต่างกันไป ลำดับที่เสร็จแล้วจะไม่ได้ใช้งานจนกว่าลำดับที่ช้าที่สุดจะเสร็จสิ้น สิ้นเปลืองรอบของ GPU และทำให้คำขอใหม่ล่าช้า
การแบทช์แบบต่อเนื่อง (ระดับการวนซ้ำ) จะอัปเดตชุดที่ใช้งานอยู่หลังจากทุกขั้นตอนการถอดรหัสเดียว ดังนั้นจึงดำเนินการโทเค็นต่อโทเค็นแทนที่จะดำเนินการตามคำขอทั้งหมด
Iteration-level scheduling can refill available capacity subject to memory, token, and other limits.
PagedAttention เก็บแคช KV ของแต่ละซีเควนซ์ไว้ในบล็อกแยกกัน ดังนั้นการเพิ่มหรือลบซีเควนซ์กลางเที่ยวบินจะไม่รบกวนหน่วยความจำของผู้อื่น
รายงานของ Orca ได้แนะนำการตั้งเวลาระดับการวนซ้ำ และแนวคิดนี้ถูกนำมาใช้โดยระบบต่างๆ เช่น vLLM, TGI และ TensorRT-LLM
เรียนรู้ต่อไป
คำแนะนำเพิ่มเติมที่เลือกสำหรับหัวข้อนี้
ต่อไปคำแนะนำต่อไป
การฝึกอบรมอย่างต่อเนื่องและการฝึกอบรมขึ้นใหม่อัตโนมัติ
เทคนิค