---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/generation/transformers_js/types/interfaces/TransformersJsGenerationModel.md
description: >-
  Structural duck-type of `MultiModalityCausalLM` — exactly the one method this
  battery drives. Verified against the installed `@huggingface/transformers`
  source (`src/models/multi_modality/modeling_multi_modality.js`):
  `generate_images(options)` runs a normal causal-LM `generate()` internally,
  then decodes the newly generated image tokens into `RawImage[]` via the
  model's `image_decode` session.
---

# Interface: TransformersJsGenerationModel

Defined in: [src/batteries/generation/transformers\_js/types.ts:93](https://github.com/NHTIO/ADK/blob/v1.20261003.0/src/src/batteries/generation/transformers_js/types.ts#L93)

Structural duck-type of `MultiModalityCausalLM` — exactly the one method this battery drives.
Verified against the installed `@huggingface/transformers` source
(`src/models/multi_modality/modeling_multi_modality.js`): `generate_images(options)` runs a normal
causal-LM `generate()` internally, then decodes the newly generated image tokens into
`RawImage[]` via the model's `image_decode` session.

## Properties

| Property                                                | Type                                                                                                                                                                                                            | Description                                                                                                                                                                                                                                                                         | Defined in                                                                                                                                                        |
| ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|  `generate_images` | (`options`: [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, `unknown`>) => `Promise`<[`TransformersJsRawImageLike`](TransformersJsRawImageLike.md)\[]> | Runs a normal causal-LM `generate()` internally, then decodes the newly generated image tokens into `RawImage[]` via the model's `image_decode` session. `options` is the merged processor-inputs + sampling-knobs bag this battery builds per call (see the adapter's `generate`). | [src/batteries/generation/transformers\_js/types.ts:99](https://github.com/NHTIO/ADK/blob/v1.20261003.0/src/src/batteries/generation/transformers_js/types.ts#L99) |
