huggingface / huggingface/lighteval

Handling last token in tokenized_continuation

Open
#203 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
2.5k
Forks
555
Avg merge
1d 6h
Merged PRs (30d)
1

Description

Hi,

In:

https://github.com/huggingface/lighteval/blob/a98210fd3a2d1e8bface1c32b72ebd5017173a4c/src/lighteval/models/base_model.py#L842

if single_token:
inputs = [request.tokenized_context for request in batch]
else:
inputs = [
request.tokenized_context + request.tokenized_continuation[:-1] for request in batch
] # The last token (an eos) doesn't need to be given to the model

However, I cannot find where we strictly set "tokenized_continuation" to be ended with .

If this is true, then the eval results are not correct, especially for short tokenized_continuation

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.