mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-19 07:42:06 +00:00
Black
This commit is contained in:
parent
9dbaa176fd
commit
1acc96c82a
@ -12,7 +12,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
""" PyTorch Llava-NeXT model."""
|
||||
"""PyTorch Llava-NeXT model."""
|
||||
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
""" PyTorch Idefics2 model."""
|
||||
"""PyTorch Idefics2 model."""
|
||||
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
""" PyTorch Idefics3 model."""
|
||||
"""PyTorch Idefics3 model."""
|
||||
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
""" Idefics model configuration"""
|
||||
"""Idefics model configuration"""
|
||||
import copy
|
||||
|
||||
from transformers import PretrainedConfig
|
||||
|
@ -17,7 +17,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
""" PyTorch Idefics model."""
|
||||
"""PyTorch Idefics model."""
|
||||
from typing import List, Optional, Tuple, Union
|
||||
|
||||
import torch
|
||||
|
@ -12,7 +12,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
""" PyTorch IdeficsVision model: a copy of CLIPVisionModel using a simpler config object"""
|
||||
"""PyTorch IdeficsVision model: a copy of CLIPVisionModel using a simpler config object"""
|
||||
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
@ -1798,7 +1798,9 @@ class FlashCausalLM(Model):
|
||||
total_batch_seq = 0.001
|
||||
total_mem = 0
|
||||
available_mem = free_mem - self.mem_reserved
|
||||
log_master(logger.info, f"Decode batch size list:{[bsz[0] for bsz in buckets]}\n")
|
||||
log_master(
|
||||
logger.info, f"Decode batch size list:{[bsz[0] for bsz in buckets]}\n"
|
||||
)
|
||||
for i, (batch_size, block_num) in enumerate(buckets):
|
||||
if batch_size > block_num:
|
||||
continue
|
||||
|
@ -822,7 +822,9 @@ class FlashVlmCausalLM(FlashCausalLM):
|
||||
total_batch_seq = 0.001
|
||||
total_mem = 0
|
||||
available_mem = decode_available_memory
|
||||
log_master(logger.info, f"Decode batch size list:{[bsz[0] for bsz in buckets]}\n")
|
||||
log_master(
|
||||
logger.info, f"Decode batch size list:{[bsz[0] for bsz in buckets]}\n"
|
||||
)
|
||||
for i, (batch_size, block_num) in enumerate(buckets):
|
||||
if batch_size > block_num:
|
||||
continue
|
||||
|
@ -442,7 +442,9 @@ class FlashMllamaCausalLM(FlashVlmCausalLM):
|
||||
total_batch_seq = 0.001
|
||||
total_mem = 0
|
||||
available_mem = free_mem - self.mem_reserved
|
||||
log_master(logger.info, f"Decode batch size list:{[bsz[0] for bsz in buckets]}\n")
|
||||
log_master(
|
||||
logger.info, f"Decode batch size list:{[bsz[0] for bsz in buckets]}\n"
|
||||
)
|
||||
for i, (batch_size, block_num) in enumerate(buckets):
|
||||
if batch_size > block_num:
|
||||
continue
|
||||
|
@ -8,7 +8,7 @@ import torch
|
||||
|
||||
|
||||
def find_segments(
|
||||
adapter_indices: Union[torch.Tensor, List[int]]
|
||||
adapter_indices: Union[torch.Tensor, List[int]],
|
||||
) -> Tuple[List[int], List[int]]:
|
||||
segments = [0]
|
||||
segment_indices = []
|
||||
|
Loading…
Reference in New Issue
Block a user