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

Method load_model

toolbench/model/model_adapter.py:255–262  ·  view source on GitHub ↗
(self, model_path: str, from_pretrained_kwargs: dict)

Source from the content-addressed store, hash-verified

253 return "tool-llama" == model_path
254
255 def load_model(self, model_path: str, from_pretrained_kwargs: dict):
256 tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False)
257 model = AutoModelForCausalLM.from_pretrained(
258 model_path,
259 low_cpu_mem_usage=True,
260 **from_pretrained_kwargs,
261 )
262 return model, tokenizer
263
264 def get_default_conv_template(self, model_path: str) -> Conversation:
265 return get_conv_template("tool-llama")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected