Minor fix in compiler & format (#545)

This commit is contained in:
sglang
2024-06-29 23:42:14 -07:00
committed by GitHub
parent 9ce89bc14b
commit 11616fc6bd
12 changed files with 28 additions and 33 deletions

View File

@@ -283,13 +283,14 @@ class ModelTpServer:
(recv_req.image_hash >> 64) % self.model_config.vocab_size,
]
req.image_size = recv_req.image_size
req.origin_input_ids, req.image_offset = (
self.model_runner.model.pad_input_ids(
req.origin_input_ids_unpadded,
req.pad_value,
req.pixel_values.shape,
req.image_size,
)
(
req.origin_input_ids,
req.image_offset,
) = self.model_runner.model.pad_input_ids(
req.origin_input_ids_unpadded,
req.pad_value,
req.pixel_values.shape,
req.image_size,
)
req.sampling_params = recv_req.sampling_params
req.return_logprob = recv_req.return_logprob