mirror of
https://www.modelscope.cn/Shanghai_AI_Laboratory/internlm3-8b-instruct.git
synced 2025-08-16 13:35:54 +08:00
Update modeling_internlm3.py (#18)
- Update modeling_internlm3.py (94cd46f35e87e1b3b2b82df73230bdb5275cd652) - Update tokenization_internlm3.py (0f3d7019880c0b6f7a9d35b392d21cbfca07478b)
This commit is contained in:
parent
b8f6295918
commit
2ecb8953b0
@ -793,7 +793,7 @@ class InternLM3Model(InternLM3PreTrainedModel):
|
||||
Args:
|
||||
config: InternLM3Config
|
||||
"""
|
||||
|
||||
_auto_class = "AutoModel"
|
||||
def __init__(self, config: InternLM3Config):
|
||||
super().__init__(config)
|
||||
self.padding_idx = config.pad_token_id
|
||||
@ -1070,6 +1070,7 @@ class KwargsForCausalLM(FlashAttentionKwargs, LossKwargs): ...
|
||||
|
||||
|
||||
class InternLM3ForCausalLM(InternLM3PreTrainedModel, GenerationMixin):
|
||||
_auto_class = "AutoModelForCausalLM"
|
||||
_tied_weights_keys = ["lm_head.weight"]
|
||||
_tp_plan = {"lm_head": "colwise_rep"}
|
||||
|
||||
|
@ -67,7 +67,7 @@ class InternLM3Tokenizer(PreTrainedTokenizer):
|
||||
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
|
||||
other word. Again, this should be set with `from_slow=True` to make sure it's taken into account.
|
||||
"""
|
||||
|
||||
_auto_class = "AutoTokenizer"
|
||||
vocab_files_names = VOCAB_FILES_NAMES
|
||||
model_input_names = ["input_ids", "attention_mask"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user