File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/transformers/generation/continuous_batching Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 27
27
28
28
from ...configuration_utils import PreTrainedConfig
29
29
from ...generation .configuration_utils import GenerationConfig
30
- from ...integrations .hub_kernels import load_and_register_kernel
31
30
from ...utils .logging import logging
32
31
from ...utils .metrics import ContinuousBatchProcessorMetrics , attach_tracer , traced
33
32
from .cache import PagedAttentionCache
@@ -609,6 +608,8 @@ def __init__(
609
608
"""
610
609
self .model = model .eval ()
611
610
if "paged|" not in model .config ._attn_implementation :
611
+ from ...integrations .hub_kernels import load_and_register_kernel
612
+
612
613
attn_implementation = "paged|" + self .model .config ._attn_implementation
613
614
load_and_register_kernel (attn_implementation )
614
615
model .set_attn_implementation (attn_implementation )
You can’t perform that action at this time.
0 commit comments