This commit is contained in:
regisss 2025-06-18 07:52:59 +00:00
parent 9dbaa176fd
commit 1acc96c82a
10 changed files with 16 additions and 10 deletions

View File

@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" PyTorch Llava-NeXT model.""" """PyTorch Llava-NeXT model."""
from typing import List, Optional, Tuple from typing import List, Optional, Tuple

View File

@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" PyTorch Idefics2 model.""" """PyTorch Idefics2 model."""
from typing import List, Optional, Tuple from typing import List, Optional, Tuple

View File

@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" PyTorch Idefics3 model.""" """PyTorch Idefics3 model."""
from typing import List, Optional, Tuple from typing import List, Optional, Tuple

View File

@ -17,7 +17,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" Idefics model configuration""" """Idefics model configuration"""
import copy import copy
from transformers import PretrainedConfig from transformers import PretrainedConfig

View File

@ -17,7 +17,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
""" PyTorch Idefics model.""" """PyTorch Idefics model."""
from typing import List, Optional, Tuple, Union from typing import List, Optional, Tuple, Union
import torch import torch

View File

@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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 from dataclasses import dataclass

View File

@ -1798,7 +1798,9 @@ class FlashCausalLM(Model):
total_batch_seq = 0.001 total_batch_seq = 0.001
total_mem = 0 total_mem = 0
available_mem = free_mem - self.mem_reserved 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): for i, (batch_size, block_num) in enumerate(buckets):
if batch_size > block_num: if batch_size > block_num:
continue continue

View File

@ -822,7 +822,9 @@ class FlashVlmCausalLM(FlashCausalLM):
total_batch_seq = 0.001 total_batch_seq = 0.001
total_mem = 0 total_mem = 0
available_mem = decode_available_memory 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): for i, (batch_size, block_num) in enumerate(buckets):
if batch_size > block_num: if batch_size > block_num:
continue continue

View File

@ -442,7 +442,9 @@ class FlashMllamaCausalLM(FlashVlmCausalLM):
total_batch_seq = 0.001 total_batch_seq = 0.001
total_mem = 0 total_mem = 0
available_mem = free_mem - self.mem_reserved 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): for i, (batch_size, block_num) in enumerate(buckets):
if batch_size > block_num: if batch_size > block_num:
continue continue

View File

@ -8,7 +8,7 @@ import torch
def find_segments( def find_segments(
adapter_indices: Union[torch.Tensor, List[int]] adapter_indices: Union[torch.Tensor, List[int]],
) -> Tuple[List[int], List[int]]: ) -> Tuple[List[int], List[int]]:
segments = [0] segments = [0]
segment_indices = [] segment_indices = []