Skip to content

Commit d359cda

Browse files
committed
Minor
1 parent 2f49f15 commit d359cda

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cacheflow/master/block_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from 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] = {}

cacheflow/models/sample.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from cacheflow.sequence import SequenceOutputs
99
from cacheflow.parallel_utils.tensor_parallel import gather_from_tensor_model_parallel_region
1010

11+
1112
class Sampler(nn.Module):
1213

1314
def __init__(self) -> None:

cacheflow/sequence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)