MCPcopy Create free account
hub / github.com/codefuse-ai/codefuse-devops-eval / __init__

Method __init__

src/models/base_model.py:14–19  ·  view source on GitHub ↗
(self, model_path: str, template: str, trust_remote_code=True, tensor_parallel_size=1, gpu_memory_utilization=0.25)

Source from the content-addressed store, hash-verified

12
13class ToolModel:
14 def __init__(self, model_path: str, template: str, trust_remote_code=True, tensor_parallel_size=1, gpu_memory_utilization=0.25):
15 self.model_path = model_path
16 self.trust_remote_code = trust_remote_code
17 self.tensor_parallel_size = tensor_parallel_size
18 self.gpu_memory_utilization = gpu_memory_utilization
19 self.load_model(self.model_path, self.trust_remote_code, self.tensor_parallel_size, self.gpu_memory_utilization)
20
21 def generate(self, prompts: str, template: str = None, generate_configs: GenerateConfigs = None) -> list:
22 '''产出对应结果'''

Callers

nothing calls this directly

Calls 1

load_modelMethod · 0.95

Tested by

no test coverage detected