mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-10 20:04:52 +00:00
Apply suggestions from code review
Co-authored-by: OlivierDehaene <olivier@huggingface.co>
This commit is contained in:
parent
b6519b5279
commit
0006fab5ab
@ -422,8 +422,6 @@ class FlashCausalLMBatch(Batch):
|
||||
block_tables_tensor = self.block_tables_tensor[indices]
|
||||
input_lengths_tensor = self.input_lengths_tensor[indices]
|
||||
slots = self.slots[slot_filtering_indices]
|
||||
if slot_indices.max().item() > slots.shape[0]:
|
||||
import ipdb;ipdb.set_trace()
|
||||
next_token_chooser = self.next_token_chooser.filter(indices)
|
||||
top_n_tokens_tensor = self.top_n_tokens_tensor[indices]
|
||||
speculative_ids = self.speculative_ids[indices] if self.speculative_ids is not None else None
|
||||
|
@ -742,9 +742,6 @@ try:
|
||||
|
||||
self._update_cos_sin_cache(dtype, position_ids.device, max_s)
|
||||
|
||||
if position_ids.max().item() >= max_s:
|
||||
import ipdb;ipdb.set_trace()
|
||||
|
||||
cos = torch.index_select(self._cos_cached, 0, position_ids)
|
||||
sin = torch.index_select(self._sin_cached, 0, position_ids)
|
||||
# Note: this unsqueeze is not necessary on RoCm + VLLM ROPE implementation, but we leave it as is to avoid yet an other controlflow.
|
||||
|
Loading…
Reference in New Issue
Block a user