Update modeling_internlm_xcomposer2.py
Browse files
modeling_internlm_xcomposer2.py
CHANGED
@@ -57,8 +57,10 @@ class InternLMXComposer2ForCausalLM(InternLM2PreTrainedModel):
|
|
57 |
self.vocab_size = config.vocab_size
|
58 |
self.output = nn.Linear(
|
59 |
config.hidden_size, config.vocab_size, bias=False)
|
60 |
-
|
61 |
|
|
|
|
|
62 |
self.max_length = config.max_length
|
63 |
print(f'Set max length to {self.max_length}')
|
64 |
# Initialize weights and apply final processing
|
|
|
57 |
self.vocab_size = config.vocab_size
|
58 |
self.output = nn.Linear(
|
59 |
config.hidden_size, config.vocab_size, bias=False)
|
60 |
+
self.tokenizer = None
|
61 |
|
62 |
+
self.eoh = '<TOKENS_UNUSED_0>' # end of human
|
63 |
+
|
64 |
self.max_length = config.max_length
|
65 |
print(f'Set max length to {self.max_length}')
|
66 |
# Initialize weights and apply final processing
|