Skip to content

Commit

Permalink
merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed Feb 20, 2024
1 parent 2229324 commit aa4d477
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions serve/mlc_serve/model/torch_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def generate(
prompt_lens = []
sampling_params = []
past_decode_tokens = []
prompt_masks = []

for request in requests:
if isinstance(request, PrefillRequest):
Expand All @@ -260,6 +261,7 @@ def generate(

all_token_ids.append(request.token_ids)
sampling_params.append(request.sampling_params)
prompt_masks.append(request.prompt_mask)

selected_token_indices: List[int] = []

Expand Down Expand Up @@ -352,6 +354,7 @@ def generate(
sampling_metadata = SamplingState.from_sampling_params(
sampling_params,
past_decode_tokens,
prompt_masks,
torch.float32,
"cuda",
vocab_size,
Expand All @@ -366,6 +369,7 @@ def generate(
torch.float32,
"cuda",
past_decode_tokens,
prompt_masks,
)


Expand Down

0 comments on commit aa4d477

Please sign in to comment.