Update modeling_internlm.py
#11
by
irexyc
- opened
- modeling_internlm.py +4 -1
modeling_internlm.py
CHANGED
@@ -615,6 +615,9 @@ class InternLMForCausalLM(InternLMPreTrainedModel):
|
|
615 |
_auto_class = "AutoModelForCausalLM"
|
616 |
|
617 |
def __init__(self, config):
|
|
|
|
|
|
|
618 |
super().__init__(config)
|
619 |
self.model = InternLMModel(config)
|
620 |
|
@@ -995,4 +998,4 @@ class InternLMForSequenceClassification(InternLMPreTrainedModel):
|
|
995 |
past_key_values=transformer_outputs.past_key_values,
|
996 |
hidden_states=transformer_outputs.hidden_states,
|
997 |
attentions=transformer_outputs.attentions,
|
998 |
-
)
|
|
|
615 |
_auto_class = "AutoModelForCausalLM"
|
616 |
|
617 |
def __init__(self, config):
|
618 |
+
assert (0), 'Inference by transformers is currently not supported, ' \
|
619 |
+
'please follow README to convert the model ' \
|
620 |
+
'and use lmdeploy (https://github.com/InternLM/lmdeploy) for inference.'
|
621 |
super().__init__(config)
|
622 |
self.model = InternLMModel(config)
|
623 |
|
|
|
998 |
past_key_values=transformer_outputs.past_key_values,
|
999 |
hidden_states=transformer_outputs.hidden_states,
|
1000 |
attentions=transformer_outputs.attentions,
|
1001 |
+
)
|