Repository navigation
fix: 고정 비용을 줄여 큰 표가 행 분할되도록 수정 - #41
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
문제
실제 논문 PDF에서 표 4개 중 3개가
llm_summary로 빠져 분할되지 않았다. 고정 비용 (캡션·표 요약·섹션 헤더·문맥 단락)이 토큰 한도를 거의 다 먹어서, 행 하나를 더해도 512를 넘기 때문이다. 고정 비용은 분할해도 줄지 않고 모든 조각에 복제된다.원인 두 가지:
table_abstract가 캡션으로 조립되는데 캡션 자체도 EU 맨 앞에 들어가 두 번 계산변경
unit.safe_abstract: 캡션 문구를 덜어낸 요약을 반환context.CONTEXT_TOKEN_BUDGET = 192: 표에서 가까운 단락부터 예산까지만 수집. 위/아래를 각각 자르지 않고 거리 하나로 줄 세운다.bbox 수집 범위(300pt)는 그대로다. "300pt 안에서 모은 뒤 가까운 것부터 예산만큼 싣는다"로 바뀐 것이다.
측정 (Attention Is All You Need, 표 4개)
표 #2는 13열이라 행 하나가 셀 문장 13개를 끌고 온다. 행 하나 + 헤더 + 문맥만으로 한도를 넘으므로 "행 하나가 한도를 넘는 표는 분할하지 않고 원본 유지"에 해당하는 정상 동작이다.
후속
192는 실측으로 잡은 1차 값이다. 문맥이 줄면 문맥 기반 질의의 Recall에 영향이 있을 수 있으므로 벤치마크 재측정 때 함께 조정한다.Fixes #40