(self, model_path: str, template: str, trust_remote_code=True, tensor_parallel_size=1, gpu_memory_utilization=0.25)
| 12 | |
| 13 | class 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 | '''产出对应结果''' |
nothing calls this directly
no test coverage detected