irexyc commited on
Commit
cd68ed8
1 Parent(s): 562c732

update assert

Browse files
Files changed (1) hide show
  1. 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, please refer to https://huggingface.co/internlm/internlm-chat-20b-4bit#inference'
 
 
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
+ )