Repository: lm-sys/FastChat
File: fastchat/model/model_adapter.py (Python)

Code before:
            **from_pretrained_kwargs,
        )
        return model, tokenizer

    def get_default_conv_template(self, model_path: str) -> Conversation:
        return get_conv_template("redpajama-incite")


class H2OGPTAdapter(BaseAdapter):
    """The model adapter for h2oGPT."""

    def match(self, model_path: str):
        return "h2ogpt" in model_path.lower()

    def get_default_conv_template(self, model_path: str) -> Conversation:
        return get_conv_template("h2ogpt")

class RobinAdapter(BaseAdapter):
    """The model adapter for LMFlow/Full-Robin-7b-v2"""

    def match(self,model_path:str):
        return "Robin" in model_path

    def get_default_conv_template(self,model_path:str) -> Conversation:
        return get_conv_template("Robin")

class SnoozyAdapter(BaseAdapter):
    """The model adapter for nomic-ai/gpt4all-13b-snoozy"""

    def match(self, model_path: str):
        return "gpt4all" in model_path and "snoozy" in model_path

    def get_default_conv_template(self, model_path: str) -> Conversation:
        return get_conv_template("snoozy")


class WizardLMAdapter(BaseAdapter):
    """The model adapter for WizardLM/WizardLM-13B-V1.0"""

    def match(self, model_path: str):
        return "wizardlm" in model_path.lower()

    def get_default_conv_template(self, model_path: str) -> Conversation:
        model_path = model_path.lower()
        if "13b" in model_path or "30b" in model_path:
            return get_conv_template("vicuna_v1.1")
        else:
            # TODO: use the recommended template for 7B
            # (https://huggingface.co/WizardLM/WizardLM-13B-V1.0)
            return get_conv_template("one_shot")


Review comment (suggestion):
```suggestion
        return get_conv_template("Robin")

```

Code after:
            **from_pretrained_kwargs,
        )
        return model, tokenizer

    def get_default_conv_template(self, model_path: str) -> Conversation:
        return get_conv_template("redpajama-incite")


class H2OGPTAdapter(BaseAdapter):
    """The model adapter for h2oGPT."""

    def match(self, model_path: str):
        return "h2ogpt" in model_path.lower()

    def get_default_conv_template(self, model_path: str) -> Conversation:
        return get_conv_template("h2ogpt")


class RobinAdapter(BaseAdapter):
    """The model adapter for LMFlow/Full-Robin-7b-v2"""

    def match(self,model_path:str):
        return "Robin" in model_path

    def get_default_conv_template(self,model_path:str) -> Conversation:
        return get_conv_template("Robin")


class SnoozyAdapter(BaseAdapter):
    """The model adapter for nomic-ai/gpt4all-13b-snoozy"""

    def match(self, model_path: str):
        return "gpt4all" in model_path and "snoozy" in model_path

    def get_default_conv_template(self, model_path: str) -> Conversation:
        return get_conv_template("snoozy")


class WizardLMAdapter(BaseAdapter):
    """The model adapter for WizardLM/WizardLM-13B-V1.0"""

    def match(self, model_path: str):
        return "wizardlm" in model_path.lower()

    def get_default_conv_template(self, model_path: str) -> Conversation:
        model_path = model_path.lower()
        if "13b" in model_path or "30b" in model_path:
            return get_conv_template("vicuna_v1.1")
        else:
            # TODO: use the recommended template for 7B
            # (https://huggingface.co/WizardLM/WizardLM-13B-V1.0)