TinkerInference
Attributes
attributenamestr= 'tinker'attributeConfigtype= TinkerInferenceConfigattributemodel_name= model_nameattributecheckpoint_path= checkpoint_pathFunctions
func__init__(self, *, model_name, checkpoint_path=None, api_key_env='TINKER_API_KEY') -> Noneparamselfparammodel_namestrparamcheckpoint_pathstr | None= Noneparamapi_key_envstr= 'TINKER_API_KEY'Returns
Nonefunc_submit(self, prompt, max_tokens, temperature, stop)paramselfparampromptstrparammax_tokensintparamtemperaturefloatparamstoplist[str] | NoneReturns
Nonefunc_decode(self, future) -> strparamselfparamfutureReturns
strfuncgenerate(self, *, prompt, max_tokens=256, temperature=0.0, stop=None) -> strparamselfparampromptstrparammax_tokensint= 256paramtemperaturefloat= 0.0paramstoplist[str] | None= NoneReturns
strfuncgenerate_batch(self, *, prompts, max_tokens=256, temperature=0.0, stop=None) -> list[str]Submit all prompts concurrently, then collect results in order.
paramselfparampromptslist[str]parammax_tokensint= 256paramtemperaturefloat= 0.0paramstoplist[str] | None= NoneReturns
list[str]funcfrom_run_result(cls, run_result, run_cfg, *, label='final') -> 'TinkerInference'Build a TinkerInference pointing at the run's final sampler checkpoint.
Reads run_result.artifacts["run_dir"], locates checkpoints.jsonl
via :func:find_manifest, picks the checkpoint matching label
(default "final"), and instantiates with run_cfg.model.name +
that sampler URI. Raises a clear RuntimeError for each missing
piece so callers can diagnose without spelunking.
paramclsparamrun_resultAnyparamrun_cfgAnyparamlabelstr= 'final'Returns
'TinkerInference'