Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
d359cda5
Commit
d359cda5
authored
Mar 26, 2023
by
Woosuk Kwon
Browse files
Minor
parent
2f49f155
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
cacheflow/master/block_manager.py
cacheflow/master/block_manager.py
+3
-3
cacheflow/models/sample.py
cacheflow/models/sample.py
+1
-0
cacheflow/sequence.py
cacheflow/sequence.py
+1
-1
No files found.
cacheflow/master/block_manager.py
View file @
d359cda5
...
...
@@ -7,7 +7,7 @@ from cacheflow.sequence import SequenceStatus
from
cacheflow.utils
import
Device
class
Block
Manage
r
:
class
Block
Allocato
r
:
def
__init__
(
self
,
...
...
@@ -65,8 +65,8 @@ class BlockSpaceManager:
self
.
num_total_gpu_blocks
=
num_gpu_blocks
self
.
num_total_cpu_blocks
=
num_cpu_blocks
self
.
gpu_allocator
=
Block
Manage
r
(
Device
.
GPU
,
block_size
,
num_gpu_blocks
)
self
.
cpu_allocator
=
Block
Manage
r
(
Device
.
CPU
,
block_size
,
num_cpu_blocks
)
self
.
gpu_allocator
=
Block
Allocato
r
(
Device
.
GPU
,
block_size
,
num_gpu_blocks
)
self
.
cpu_allocator
=
Block
Allocato
r
(
Device
.
CPU
,
block_size
,
num_cpu_blocks
)
# Mapping: seq_id -> BlockTable.
self
.
block_tables
:
Dict
[
int
,
BlockTable
]
=
{}
...
...
cacheflow/models/sample.py
View file @
d359cda5
...
...
@@ -8,6 +8,7 @@ from cacheflow.sampling_params import SamplingParams
from
cacheflow.sequence
import
SequenceOutputs
from
cacheflow.parallel_utils.tensor_parallel
import
gather_from_tensor_model_parallel_region
class
Sampler
(
nn
.
Module
):
def
__init__
(
self
)
->
None
:
...
...
cacheflow/sequence.py
View file @
d359cda5
...
...
@@ -30,7 +30,7 @@ class Sequence:
self
.
status
=
SequenceStatus
.
PENDING
self
.
output_logprobs
:
List
[
Dict
[
int
,
float
]]
=
[]
self
.
cumulative_logprobs
=
1
.0
self
.
cumulative_logprobs
=
0
.0
def
add_block
(
self
)
->
None
:
block
=
LogicalTokenBlock
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment