Skip to content

Issue with second last token sampling #2

@benbenwsh

Description

@benbenwsh

In huggingface_models.py, if return_latent, I believe that the collection of the embeddings for the SLT is incorrect. The current code is collecting the embeddings from [-3], instead of the expected [-2], this is due to this code:
sec_last_input = hidden[n_generated - 2]
Since n_generated has already taken into account of the eos token, it should be n-generated -1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions