MCPcopy Create free account
hub / github.com/OpenSparseLLMs/MoM / __init__

Method __init__

lm-eval-harness/lm_eval/models/textsynth.py:51–64  ·  view source on GitHub ↗

:param engine: str TextSynth API engine (e.g. `gptj_6B`) :param truncate: bool Truncate input if too long (if False and input is too long, throw error)

(self, engine, truncate: bool = False, **kwargs)

Source from the content-addressed store, hash-verified

49@register_model("textsynth")
50class TextSynthLM(LM):
51 def __init__(self, engine, truncate: bool = False, **kwargs) -> None:
52 """
53 :param engine: str
54 TextSynth API engine (e.g. `gptj_6B`)
55 :param truncate: bool
56 Truncate input if too long (if False and input is too long, throw error)
57 """
58 super().__init__()
59
60 self.engine = engine
61 self.truncate = truncate
62 self.api_url = "https://api.textsynth.com"
63 # Read from environment variable TEXTSYNTH_API_SECRET_KEY
64 self.api_key = os.environ["TEXTSYNTH_API_SECRET_KEY"]
65
66 @property
67 def eot_token_id(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected