Skip to content

Mistral model no longer loads following PR#101 #107

@johndun

Description

@johndun

The get_model_cls_by_arch_name introduced in Dynamic model class loading PR removes the hard-coded mapping between MistralForCausalLM and LlamaForCausalLM causing issues trying to local host Mistral-7b model as of sglang version 0.1.9. I have tested that adding the following simple models/mistral.py file allows hosting the mistral-7b model.

from sglang.srt.models.llama2 import LlamaForCausalLM


class MistralForCausalLM(LlamaForCausalLM):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)


EntryClass = MistralForCausalLM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions