Skip to content

The labeled_token_indices #5

@weiguo-li

Description

@weiguo-li

The following is from example.py

if args.model_size == '7B':
    adjusted_token_ids = [1] + adjusted_token_ids # Adjusting to recover the first token_ids of the sentences
    adjusted_token_ids=torch.tensor([adjusted_token_ids])
    labeled_token_indices = labeled_token_indices[2:]  # Adjusting to skip the first two separators (beginning and ending of the problems)

My question is : when you add [1] to the "adjusted_token_ids", this will make every token in "the adjusted_token_ids" shift to the right and thus change the corresponding indices of "labeled_token_indices". So "labeled_token_indices" will shift right by one position. The above is my confusion.

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