Skip to main content

mb.get_model(name, ...)

Retrieves one model from the registry.

Parameters

  • name: str The name of the model to fetch from the registry.
  • file: Optional[str] The file path to store the model

Returns

Any - The model that was stored in the registry with mb.add_models, or None if file= was specified. If the model doesn't exist an exception is raised.

Examples

Get one model

model = mb.get_model("example_model")

Get one model in the "finance" directory

model = mb.get_model("finance/example_model")

Get a model and store it as a local file

mb.get_model("my_model", file="my_model.gguf")

See also