update assert
Browse files- modeling_internlm.py +4 -2
modeling_internlm.py
CHANGED
@@ -615,7 +615,9 @@ class InternLMForCausalLM(InternLMPreTrainedModel):
|
|
615 |
_auto_class = "AutoModelForCausalLM"
|
616 |
|
617 |
def __init__(self, config):
|
618 |
-
assert(0), 'Inference by transformers is currently not supported,
|
|
|
|
|
619 |
super().__init__(config)
|
620 |
self.model = InternLMModel(config)
|
621 |
|
@@ -996,4 +998,4 @@ class InternLMForSequenceClassification(InternLMPreTrainedModel):
|
|
996 |
past_key_values=transformer_outputs.past_key_values,
|
997 |
hidden_states=transformer_outputs.hidden_states,
|
998 |
attentions=transformer_outputs.attentions,
|
999 |
-
)
|
|
|
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 |
+
)
|