mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-05 20:19:51 +00:00
modeling_deepseek_v3: fix GenerationMixin warning
Fix GenerationMixin warning introduced by upgrading transformers to 4.51.3.
This commit is contained in:
parent
7530491f5b
commit
def1ec7683
1 changed files with 2 additions and 1 deletions
|
@ -30,6 +30,7 @@ from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
|
|||
|
||||
from transformers.activations import ACT2FN
|
||||
from transformers.cache_utils import Cache, DynamicCache, StaticCache
|
||||
from transformers.generation import GenerationMixin
|
||||
from transformers.modeling_attn_mask_utils import (
|
||||
AttentionMaskConverter,
|
||||
_prepare_4d_attention_mask,
|
||||
|
@ -1598,7 +1599,7 @@ class DeepseekV3Model(DeepseekV3PreTrainedModel):
|
|||
|
||||
return causal_mask
|
||||
|
||||
class DeepseekV3ForCausalLM(DeepseekV3PreTrainedModel):
|
||||
class DeepseekV3ForCausalLM(DeepseekV3PreTrainedModel, GenerationMixin):
|
||||
_tied_weights_keys = ["lm_head.weight"]
|
||||
|
||||
def __init__(self, config):
|
||||
|
|
Loading…
Add table
Reference in a new issue