Skip to content

Commit

Permalink
rm mini-internvl
Browse files Browse the repository at this point in the history
  • Loading branch information
wuzhaoxin committed May 27, 2024
1 parent ac8f334 commit c427ccb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.
34 changes: 1 addition & 33 deletions xinference/model/llm/llm_family.json
Original file line number Diff line number Diff line change
Expand Up @@ -6026,39 +6026,7 @@
],
"model_id": "OpenGVLab/InternVL-Chat-V1-5-{quantization}",
"model_revision": "acaaed06937c603ab04f084216ecb0268160f538"
}
],
"prompt_style": {
"style_name": "INTERNLM2",
"system_prompt": "You are InternLM (书生·浦语), a helpful, honest, and harmless AI assistant developed by Shanghai AI Laboratory (上海人工智能实验室).",
"roles": [
"<|im_start|>user",
"<|im_start|>assistant"
],
"intra_message_sep": "<|im_end|>",
"stop_token_ids": [
92542
],
"stop": [
"<|im_end|>"
]
}
},
{
"version": 1,
"context_length": 32768,
"model_name": "mini-internvl-chat",
"model_lang": [
"en",
"zh"
],
"model_ability": [
"chat",
"vision"
],
"model_description": "InternVL 1.5 is an open-source multimodal large language model (MLLM) to bridge the capability gap between open-source and proprietary commercial models in multimodal understanding. ",
"model_specs": [
{
}, {
"model_format": "pytorch",
"model_size_in_billions": 2,
"quantizations": [
Expand Down
4 changes: 2 additions & 2 deletions xinference/model/llm/pytorch/intern_vl.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ def load(self, **kwargs):
"device_map": device,
}

if "Int8" in self.model_spec.quantizations:
if "Int8" in self.model_spec.model_id:
kwargs.update(
{
"load_in_8bit": True,
"device_map": device,
}
)
elif "mini" in self.model_family.model_name:
elif "Mini-InternVL-Chat" in self.model_spec.model_id:
kwargs.pop("device_map")

self._model = AutoModel.from_pretrained(self.model_path, **kwargs).eval()
Expand Down

0 comments on commit c427ccb

Please sign in to comment.