Skip to content

Gemma-3 generates garbage after several hundreds (maybe) of tokens #65

Closed

Description

@foldl
No description provided.

Activity

  1. foldl commented on Jun 11, 2025

    @foldl
    OwnerAuthor
    • CPU: OK
    • Vulkan: an odd max_length? such as --max_length 32767
    • CUDA: ??
  2. arch-btw commented on Jul 7, 2025

    @arch-btw
    Contributor

    Maybe it's the value that seems way too high:

    "model_max_length": 1000000000000000019884624838656

    Found in this file: https://huggingface.co/google/gemma-3-4b-it/blob/main/tokenizer_config.json

    There is a thread on it here:

    https://huggingface.co/google/gemma-3-4b-it/discussions/48

  3. foldl commented on Jul 7, 2025

    @foldl
    OwnerAuthor

    Possibly no. model_max_length in tokenizer_config.json is not used.

    It is likely related to un-aligned memory access.

  4. foldl commented on Mar 23, 2026

    @foldl
    OwnerAuthor

    fixed by 8a5018e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions