feat(unified-memory): byte-budget sizing, feasibility floor, and a conservation verifier (#35158)
Co-authored-by: Caihua Li <caihua.li@bytedance.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Cheng Wan <cheng.wan@radixark.ai>
This commit is contained in:
co-authored by
Caihua Li
Claude Fable 5
Cheng Wan
parent
961beee9e5
commit
98cb3535b7
@@ -71,6 +71,13 @@ class MemoryPoolConfig:
|
||||
|
||||
mem_fraction_static: Optional[float] = None
|
||||
|
||||
# Unified pool only: the PROFILED byte budget for the token-granular
|
||||
# sub-pools. Set, the factories size the buffer from it directly instead of
|
||||
# re-summing ratio-derived token counts, which keeps the re-sum's floor
|
||||
# losses out of the buffer; the token counts stay boot labels / conserve
|
||||
# caps. None on the token-capped path -- a user token cap IS the budget.
|
||||
unified_total_bytes: Optional[int] = None
|
||||
|
||||
def __post_init__(self):
|
||||
if self.max_total_num_tokens <= 0:
|
||||
msg = "Not enough memory. Please try to increase --mem-fraction-static."
|
||||
|
||||
Reference in New Issue
Block a user