File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 77from cacheflow .utils import Device
88
99
10- class BlockManager :
10+ class BlockAllocator :
1111
1212 def __init__ (
1313 self ,
@@ -65,8 +65,8 @@ def __init__(
6565 self .num_total_gpu_blocks = num_gpu_blocks
6666 self .num_total_cpu_blocks = num_cpu_blocks
6767
68- self .gpu_allocator = BlockManager (Device .GPU , block_size , num_gpu_blocks )
69- self .cpu_allocator = BlockManager (Device .CPU , block_size , num_cpu_blocks )
68+ self .gpu_allocator = BlockAllocator (Device .GPU , block_size , num_gpu_blocks )
69+ self .cpu_allocator = BlockAllocator (Device .CPU , block_size , num_cpu_blocks )
7070
7171 # Mapping: seq_id -> BlockTable.
7272 self .block_tables : Dict [int , BlockTable ] = {}
Original file line number Diff line number Diff line change 88from cacheflow .sequence import SequenceOutputs
99from cacheflow .parallel_utils .tensor_parallel import gather_from_tensor_model_parallel_region
1010
11+
1112class Sampler (nn .Module ):
1213
1314 def __init__ (self ) -> None :
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def __init__(
3030
3131 self .status = SequenceStatus .PENDING
3232 self .output_logprobs : List [Dict [int , float ]] = []
33- self .cumulative_logprobs = 1 .0
33+ self .cumulative_logprobs = 0 .0
3434
3535 def add_block (self ) -> None :
3636 block = LogicalTokenBlock (
You can’t perform that action at this time.
0 commit comments