Skip to content
This repository was archived by the owner on Sep 20, 2025. It is now read-only.
Merged
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
12 changes: 9 additions & 3 deletions src/emd/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,17 @@

@app.command(help="List supported models")
@catch_aws_credential_errors
def list_supported_models(model_id: Annotated[
def list_supported_models(
model_id: Annotated[
str, typer.Argument(help="Model ID")
] = None):
] = None,
detail: Annotated[
Optional[bool],
typer.Option("-a", "--detail", help="output model information in details.")
] = False
):
# console.print("[bold blue]Retrieving models...[/bold blue]")
support_models = Model.get_supported_models()
support_models = Model.get_supported_models(detail=detail)
if model_id:
support_models = [model for _model_id,model in support_models.items() if _model_id == model_id]
r = json.dumps(support_models,indent=2,ensure_ascii=False)
Expand Down
2 changes: 2 additions & 0 deletions src/emd/models/llms/txgemma.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
supported_frameworks=[
fastapi_framework
],
allow_china_region=True,
huggingface_model_id="google/txgemma-9b-chat",
modelscope_model_id="AI-ModelScope/txgemma-9b-chat",
model_files_download_source=ModelFilesDownloadSource.MODELSCOPE,
Expand Down Expand Up @@ -79,6 +80,7 @@
supported_frameworks=[
fastapi_framework
],
allow_china_region=True,
huggingface_model_id="google/txgemma-27b-chat",
modelscope_model_id="AI-ModelScope/txgemma-27b-chat",
model_files_download_source=ModelFilesDownloadSource.MODELSCOPE,
Expand Down
6 changes: 4 additions & 2 deletions src/emd/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ def get_model(cls ,model_id:str,update:dict = None) -> T:
return model

@classmethod
def get_supported_models(cls) -> dict:
return {model_id: model.model_type for model_id,model in cls.model_map.items()}
def get_supported_models(cls,detail=False) -> dict:
if not detail:
return {model_id: model.model_type for model_id,model in cls.model_map.items()}
return {model_id: model.model_dump() for model_id,model in cls.model_map.items()}

def find_current_engine(self,engine_type:str) -> dict:
supported_engines:List[Engine] = self.supported_engines
Expand Down