Skip to content

NotImplementedError: Multi-turn with images on the second turn is not supported yet #329

Open
@radna0

Description

@radna0
# Common imports
import os
import jax.numpy as jnp
import tensorflow_datasets as tfds

# Gemma imports
from gemma import gm


os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "1.00"

ds = tfds.data_source("oxford_flowers102", split="train")
image1 = ds[0]["image"]
image2 = ds[1]["image"]

model = gm.nn.Gemma3_4B()

params = gm.ckpts.load_params(gm.ckpts.CheckpointPath.GEMMA3_4B_IT)

sampler = gm.text.ChatSampler(
    model=model,
    params=params,
    multi_turn=True,
)


out = sampler.chat(
    "What can you say about this image: <start_of_image>",
    images=image1,
)

out1 = sampler.chat(
    "What about this other image?: <start_of_image>",
    images=image2,
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions