MCPcopy
hub / github.com/lm-sys/FastChat / load_model

Method load_model

fastchat/model/model_adapter.py:1956–1960  ·  view source on GitHub ↗
(self, model_path: str, from_pretrained_kwargs: dict)

Source from the content-addressed store, hash-verified

1954 return "stable-vicuna" in model_path.lower()
1955
1956 def load_model(self, model_path: str, from_pretrained_kwargs: dict):
1957 model, tokenizer = super().load_model(model_path, from_pretrained_kwargs)
1958 model.config.eos_token_id = tokenizer.eos_token_id
1959 model.config.pad_token_id = tokenizer.pad_token_id
1960 return model, tokenizer
1961
1962 def get_default_conv_template(self, model_path: str) -> Conversation:
1963 return get_conv_template("stable-vicuna")

Callers

nothing calls this directly

Calls 1

load_modelMethod · 0.45

Tested by

no test coverage detected