MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / get_model_adapter

Function get_model_adapter

toolbench/model/model_adapter.py:55–60  ·  view source on GitHub ↗

Get a model adapter for a model_path.

(model_path: str)

Source from the content-addressed store, hash-verified

53
54@cache
55def get_model_adapter(model_path: str) -> BaseAdapter:
56 """Get a model adapter for a model_path."""
57 for adapter in model_adapters:
58 if adapter.match(model_path):
59 return adapter
60 raise ValueError(f"No valid model adapter for {model_path}")
61
62
63def raise_warning_for_incompatible_cpu_offloading_configuration(

Callers 2

load_modelFunction · 0.85

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected