mlx-swift-examples icon indicating copy to clipboard operation
mlx-swift-examples copied to clipboard

add input_embeddings to LLM interface

Open davidkoski opened this issue 5 months ago • 0 comments

See https://github.com/ml-explore/mlx-swift-examples/pull/238/files

The gemma3_text model has an input_embeddings parameter:

  • https://github.com/ml-explore/mlx-lm/blob/main/mlx_lm/models/gemma3_text.py#L224

Per the python docs on generate_step:

        input_embeddings (mx.array, optional): Input embeddings to use in place of
           prompt tokens. Default: ``None``.

mlx-swift-examples doesn't support this -- should it?

davidkoski avatar Jun 24 '25 18:06 davidkoski