(self, model_path: str, from_pretrained_kwargs: dict)
| 32 | return True |
| 33 | |
| 34 | def load_model(self, model_path: str, from_pretrained_kwargs: dict): |
| 35 | tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False) |
| 36 | model = AutoModelForCausalLM.from_pretrained( |
| 37 | model_path, low_cpu_mem_usage=True, **from_pretrained_kwargs |
| 38 | ) |
| 39 | return model, tokenizer |
| 40 | |
| 41 | def get_default_conv_template(self, model_path: str) -> Conversation: |
| 42 | return get_conv_template("one_shot") |