diff --git a/xinference/model/llm/llm_family.json b/xinference/model/llm/llm_family.json index b1fe58b1d8..c86cfa67f8 100644 --- a/xinference/model/llm/llm_family.json +++ b/xinference/model/llm/llm_family.json @@ -6784,6 +6784,7 @@ "chat", "vision" ], + "model_repository": "https://github.com/OpenGVLab/InternVL", "model_description": "InternVL 2.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": [ { @@ -7282,6 +7283,7 @@ "chat", "vision" ], + "model_repository": "https://github.com/QwenLM/Qwen2.5-VL", "model_description":"Qwen2.5-VL: Qwen2.5-VL is the latest version of the vision language models in the Qwen model familities.", "model_specs":[ { @@ -7775,6 +7777,7 @@ "chat", "reasoning" ], + "model_repository": "https://github.com/deepseek-ai/DeepSeek-R1", "model_description": "DeepSeek-R1, which incorporates cold-start data before RL. DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks.", "model_specs": [ { diff --git a/xinference/model/llm/llm_family.py b/xinference/model/llm/llm_family.py index cd95440e55..6267f507c2 100644 --- a/xinference/model/llm/llm_family.py +++ b/xinference/model/llm/llm_family.py @@ -136,6 +136,7 @@ class LLMFamilyV1(BaseModel): model_ability: List[ Literal["embed", "generate", "chat", "tools", "vision", "audio", "reasoning"] ] + model_repository: Optional[str] model_description: Optional[str] # reason for not required str here: legacy registration model_family: Optional[str] diff --git a/xinference/model/llm/tests/test_llm_family.py b/xinference/model/llm/tests/test_llm_family.py index 86677917d4..c0b86b6b9c 100644 --- a/xinference/model/llm/tests/test_llm_family.py +++ b/xinference/model/llm/tests/test_llm_family.py @@ -136,7 +136,7 @@ def test_serialize_llm_family_v1(): stop=["hello", "world"], ) - expected = """{"version": 1, "context_length": 2048, "model_name": "TestModel", "model_lang": ["en"], "model_ability": ["embed", "generate"], "model_description": null, "model_family": null, "model_specs": [{"model_format": "ggufv2", "model_hub": "huggingface", "model_size_in_billions": 2, "quantizations": ["q4_0", "q4_1"], "quantization_parts": {"q4_2": ["a", "b"]}, "model_id": "example/TestModel", "model_revision": "123", "model_file_name_template": "TestModel.{quantization}.bin", "model_file_name_split_template": "TestModel.{quantization}.bin.{part}", "model_uri": null}, {"model_format": "pytorch", "model_hub": "huggingface", "model_size_in_billions": 3, "quantizations": ["int8", "int4", "none"], "model_id": "example/TestModel", "model_revision": "456", "model_uri": null}], "chat_template": "xyz", "stop_token_ids": [1, 2, 3], "stop": ["hello", "world"], "reasoning_start_tag":null, "reasoning_end_tag":null}""" + expected = """{"version": 1, "context_length": 2048, "model_name": "TestModel", "model_lang": ["en"], "model_ability": ["embed", "generate"], "model_repository": null, "model_description": null, "model_family": null, "model_specs": [{"model_format": "ggufv2", "model_hub": "huggingface", "model_size_in_billions": 2, "quantizations": ["q4_0", "q4_1"], "quantization_parts": {"q4_2": ["a", "b"]}, "model_id": "example/TestModel", "model_revision": "123", "model_file_name_template": "TestModel.{quantization}.bin", "model_file_name_split_template": "TestModel.{quantization}.bin.{part}", "model_uri": null}, {"model_format": "pytorch", "model_hub": "huggingface", "model_size_in_billions": 3, "quantizations": ["int8", "int4", "none"], "model_id": "example/TestModel", "model_revision": "456", "model_uri": null}], "chat_template": "xyz", "stop_token_ids": [1, 2, 3], "stop": ["hello", "world"], "reasoning_start_tag":null, "reasoning_end_tag":null}""" assert json.loads(llm_family.json()) == json.loads(expected) llm_family_context_length = LLMFamilyV1( diff --git a/xinference/web/ui/src/scenes/launch_model/modelCard.js b/xinference/web/ui/src/scenes/launch_model/modelCard.js index bb3a547ce5..fc1aef2f58 100644 --- a/xinference/web/ui/src/scenes/launch_model/modelCard.js +++ b/xinference/web/ui/src/scenes/launch_model/modelCard.js @@ -9,9 +9,11 @@ import { EditNoteOutlined, ExpandLess, ExpandMore, + GitHub, Grade, HelpCenterOutlined, HelpOutline, + OpenInNew, RocketLaunchOutlined, StarBorder, UndoOutlined, @@ -968,6 +970,31 @@ const ModelCard = ({ {t('launchModel.contextLength')} + {(() => { + if (modelData.model_repository) { + return ( +