(self, model_path: str, from_pretrained_kwargs: dict)
| 727 | return get_conv_template("airoboros_v1") |
| 728 | |
| 729 | def load_model(self, model_path: str, from_pretrained_kwargs: dict): |
| 730 | if "mpt" not in model_path.lower(): |
| 731 | return super().load_model(model_path, from_pretrained_kwargs) |
| 732 | model = AutoModelForCausalLM.from_pretrained( |
| 733 | model_path, |
| 734 | low_cpu_mem_usage=True, |
| 735 | trust_remote_code=True, |
| 736 | max_seq_len=8192, |
| 737 | **from_pretrained_kwargs, |
| 738 | ) |
| 739 | tokenizer = AutoTokenizer.from_pretrained( |
| 740 | model_path, trust_remote_code=True, use_fast=True |
| 741 | ) |
| 742 | return model, tokenizer |
| 743 | |
| 744 | |
| 745 | class LongChatAdapter(BaseModelAdapter): |
nothing calls this directly
no test coverage detected