Skip to content

[Bug for InternVL 4B] ValueError: If eos_token_id is defined, make sure that pad_token_id is defined. (InternVL-4B) #1072

Open
@yinglang

Description

@yinglang
model = AutoModel.from_pretrained(
   "OpenGVLab/InternVL2_5-4B",
    torch_dtype=torch.bfloat16,
    low_cpu_mem_usage=True,
    trust_remote_code=True,
    ).eval().to(device)

tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

model.chat(
            tokenizer, pixel_values, question, gen_config,
            num_patches_list=num_patches_list, history=None, return_history=False, verbose=self.verbose)

got Error ValueError: If eos_token_id is defined, make sure that pad_token_id is defined. (InternVL-4B)

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