MCPcopy Create free account
hub / github.com/BeastyZ/ConvSearch-R1 / load_model

Function load_model

src/eval/models.py:58–71  ·  view source on GitHub ↗
(model_type, model_path)

Source from the content-addressed store, hash-verified

56
57
58def load_model(model_type, model_path):
59 if model_type == "ANCE_Query" or model_type == "ANCE_Passage":
60 config = RobertaConfig.from_pretrained(
61 model_path,
62 finetuning_task="MSMarco",
63 )
64 tokenizer = RobertaTokenizer.from_pretrained(
65 model_path,
66 do_lower_case=True
67 )
68 model = ANCE.from_pretrained(model_path, config=config)
69 else:
70 raise ValueError
71 return tokenizer, model

Callers

nothing calls this directly

Calls 1

from_pretrainedMethod · 0.80

Tested by

no test coverage detected