Update modeling_internlm3.py (#18)
Browse files- Update modeling_internlm3.py (94cd46f35e87e1b3b2b82df73230bdb5275cd652)
- Update tokenization_internlm3.py (0f3d7019880c0b6f7a9d35b392d21cbfca07478b)
Files changed (2)
792 unmodified lines793794795796797798799270 unmodified lines107010711072107310741075792 unmodified linesArgs:config: InternLM3Config"""def __init__(self, config: InternLM3Config):super().__init__(config)self.padding_idx = config.pad_token_id270 unmodified linesclass InternLM3ForCausalLM(InternLM3PreTrainedModel, GenerationMixin):_tied_weights_keys = ["lm_head.weight"]_tp_plan = {"lm_head": "colwise_rep"}792 unmodified lines793794795796797798799270 unmodified lines1070107110721073107410751076792 unmodified linesArgs:config: InternLM3Config"""_auto_class = "AutoModel"def __init__(self, config: InternLM3Config):super().__init__(config)self.padding_idx = config.pad_token_id270 unmodified linesclass InternLM3ForCausalLM(InternLM3PreTrainedModel, GenerationMixin):_auto_class = "AutoModelForCausalLM"_tied_weights_keys = ["lm_head.weight"]_tp_plan = {"lm_head": "colwise_rep"}
66 unmodified lines6768697071727366 unmodified linesWhether or not to add an initial space to the input. This allows to treat the leading word just as anyother word. Again, this should be set with `from_slow=True` to make sure it's taken into account."""vocab_files_names = VOCAB_FILES_NAMESmodel_input_names = ["input_ids", "attention_mask"]66 unmodified lines6768697071727366 unmodified linesWhether or not to add an initial space to the input. This allows to treat the leading word just as anyother 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_NAMESmodel_input_names = ["input_ids", "attention_mask"]
modeling_internlm3.py+2-1
tokenization_internlm3.py+1-1