Type Alias: CreateTransformersJsGenerationModel
ts
type CreateTransformersJsGenerationModel = (input: {
device?: TransformersJsGenerationDeviceType;
dtype?: TransformersJsGenerationDataType;
model: string;
onInitProgress?: TransformersJsGenerationProgressCallback;
}) => Promise<TransformersJsGenerationModel>;Defined in: src/batteries/generation/transformers_js/types.ts:143
Factory for lazily creating the Janus model. Defaults to a dynamic import of @huggingface/transformers + MultiModalityCausalLM.from_pretrained(model, …); override to inject a pre-built model or a test double.
Parameters
| Parameter | Type |
|---|---|
input | { device?: TransformersJsGenerationDeviceType; dtype?: TransformersJsGenerationDataType; model: string; onInitProgress?: TransformersJsGenerationProgressCallback; } |
input.device? | TransformersJsGenerationDeviceType |
input.dtype? | TransformersJsGenerationDataType |
input.model | string |
input.onInitProgress? | TransformersJsGenerationProgressCallback |
Returns
Promise<TransformersJsGenerationModel>