__init__.py 1.1 KB
Newer Older
Aryan's avatar
Aryan committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

Aryan's avatar
Aryan committed
15
16
17
18
from ..utils import is_torch_available


if is_torch_available():
Aryan's avatar
Aryan committed
19
    from .faster_cache import FasterCacheConfig, apply_faster_cache
Aryan's avatar
Aryan committed
20
    from .first_block_cache import FirstBlockCacheConfig, apply_first_block_cache
Aryan's avatar
Aryan committed
21
    from .group_offloading import apply_group_offloading
22
    from .hooks import HookRegistry, ModelHook
Aryan's avatar
Aryan committed
23
    from .layerwise_casting import apply_layerwise_casting, apply_layerwise_casting_hook
24
    from .pyramid_attention_broadcast import PyramidAttentionBroadcastConfig, apply_pyramid_attention_broadcast