Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions xinference/model/llm/llm_family.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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":[
{
Expand Down Expand Up @@ -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": [
{
Expand Down
1 change: 1 addition & 0 deletions xinference/model/llm/llm_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion xinference/model/llm/tests/test_llm_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
27 changes: 27 additions & 0 deletions xinference/web/ui/src/scenes/launch_model/modelCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import {
EditNoteOutlined,
ExpandLess,
ExpandMore,
GitHub,
Grade,
HelpCenterOutlined,
HelpOutline,
OpenInNew,
RocketLaunchOutlined,
StarBorder,
UndoOutlined,
Expand Down Expand Up @@ -968,6 +970,31 @@ const ModelCard = ({
{t('launchModel.contextLength')}
</small>
</div>
{(() => {
if (modelData.model_repository) {
return (
<div
className="iconItem"
onClick={(event) => {
event.stopPropagation()
window.open(modelData.model_repository, '_blank')
}}
>
<GitHub className="muiIcon" />
<small className="smallText">
GitHub
<OpenInNew
style={{
fontSize: 'inherit',
verticalAlign: 'middle',
marginLeft: '2px',
}}
/>
</small>
</div>
)
}
})()}
{(() => {
if (
modelData.model_ability &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
display: flex;
flex-direction: column;
align-items: center;
margin: 20px;
margin: 20px 10px;
}
.boldIconText {
font-weight: bold;
Expand Down
Loading