Function: createLLMRunner()
createLLMRunner(
modelPath,tokenizerPath,modalities?,runtime?):Promise<LLMRunner>
Defined in: extensions/llm/llmRunner.ts:177
Creates an ExecuTorch LLM runner instance.
Loads the model and its tokenizer, validates the model's exported methods against the supported runner specs, and returns the matching runner.
Parameters
modelPath
string
Path to the local .pte model file.
tokenizerPath
string
Path to the local tokenizer file (e.g. tokenizer.json).
modalities?
readonly ("image" | "audio")[]
List of supported input non-text modalities (e.g.
['image']). When omitted, defaults to text-only.
runtime?
WorkletRuntime
Optional worklet runtime thread on which to load the model and tokenizer.
Returns
Promise<LLMRunner>
A promise resolving to the LLMRunner instance.