Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
tgaddair committed Nov 4, 2024
1 parent a4a2d5f commit 4a264bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions server/lorax_server/models/causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,11 +596,11 @@ def generate_token(self, batch: CausalLMBatch) -> Tuple[List[Generation], Option
# TODO(travis): don't update this if indices haven't changed
# Use prefill=True in all cases to force use of SGMV, as the batch is heterogenous
adapter_data = AdapterBatchData.from_meta(
meta=batch.adapter_meta,
weights=self.layer_to_adapter_weights,
meta=batch.adapter_meta,
weights=self.layer_to_adapter_weights,
layer_to_lora_weights={},
punica_wrapper=None,
prefill=True,
prefill=True,
prefill_head_indices=None,
)

Expand Down
6 changes: 3 additions & 3 deletions server/lorax_server/models/flash_qwen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ def embed(self, batch) -> torch.Tensor:
adapter_meta = batch.adapter_meta
prefill = False
adapter_data = AdapterBatchData.from_meta(
meta=adapter_meta,
weights=self.layer_to_adapter_weights,
meta=adapter_meta,
weights=self.layer_to_adapter_weights,
layer_to_lora_weights={},
punica_wrapper=None,
prefill=prefill,
prefill=prefill,
prefill_head_indices=batch.prefill_head_indices,
)
embedding, _ = self.forward(batch, adapter_data=adapter_data)
Expand Down
6 changes: 3 additions & 3 deletions server/lorax_server/models/flash_roberta.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ def forward(self, batch: FlashEmbeddingClassificationBatch):
@tracer.start_as_current_span("embed")
def embed(self, batch: FlashEmbeddingClassificationBatch) -> Embedding:
adapter_data = AdapterBatchData.from_meta(
meta=batch.adapter_meta,
weights=self.layer_to_adapter_weights,
meta=batch.adapter_meta,
weights=self.layer_to_adapter_weights,
layer_to_lora_weights={},
punica_wrapper=None,
prefill=False,
prefill=False,
prefill_head_indices=None,
)

Expand Down

0 comments on commit 4a264bc

Please sign in to comment.