본문 바로가기
오늘의 자연어 처리

[2023-10-18] 오늘의 자연어처리

by 지환이아빠 2023. 10. 18.
반응형

In-Context Pretraining: Language Modeling Beyond Document Boundaries

 

Abstract:Large language models (LMs) are currently trained to predict tokens given document prefixes, enabling them to directly perform long-form generation and prompting-style tasks which can be reduced to document completion. Existing pretraining pipelines train LMs by concatenating random sets of short documents to create input contexts but the prior documents provide no signal for predicting the next document. We instead present In-Context Pretraining, a new approach where language models are pretrained on a sequence of related documents, thereby explicitly encouraging them to read and reason across document boundaries. We can do In-Context Pretraining by simply changing the document ordering so that each context contains related documents, and directly applying existing pretraining pipelines. However, this document sorting problem is challenging. There are billions of documents and we would like the sort to maximize contextual similarity for every document without repeating any data. To do this, we introduce approximate algorithms for finding related documents with efficient nearest neighbor search and constructing coherent input contexts with a graph traversal algorithm. Our experiments show In-Context Pretraining offers a simple and scalable approach to significantly enhance LMs'performance: we see notable improvements in tasks that require more complex contextual reasoning, including in-context learning (+8%), reading comprehension (+15%), faithfulness to previous contexts (+16%), long-context reasoning (+5%), and retrieval augmentation (+9%).

 

초록:LM(Large Language Model)은 현재 문서 접두사가 주어진 토큰을 예측하도록 훈련되어 있으며, 이를 통해 문서 완성으로 줄일 수 있는 롱 폼 생성 및 프롬프트 스타일 작업을 직접 수행할 수 있다. 기존의 사전 훈련 파이프라인들은 입력 컨텍스트를 생성하기 위해 랜덤한 세트의 짧은 문서들을 연결하여 LM들을 훈련하지만, 이전의 문서들은 다음 문서를 예측하기 위한 신호를 제공하지 않는다. 대신 언어 모델이 일련의 관련 문서에 대해 사전 교육을 받아 문서 경계를 넘어 읽고 추론하도록 명시적으로 권장하는 새로운 접근 방식인 In-Context Pretraining을 제시한다. 문서 순서를 변경하여 각 컨텍스트에 관련 문서가 포함되도록 하고, 기존의 사전 교육 파이프라인을 직접 적용하는 것만으로 In-Context Pretraining을 할 수 있다. 그러나, 이러한 문서 정렬 문제는 어렵다. 수십억 개의 문서가 있으며 데이터를 반복하지 않고 모든 문서의 맥락적 유사성을 극대화할 수 있는 유형을 원합니다. 이를 위해 효율적으로 가장 가까운 이웃 검색으로 관련 문서를 찾고 그래프 순회 알고리즘으로 일관성 있는 입력 컨텍스트를 구성하는 근사 알고리듬을 도입한다. 우리의 실험은 컨텍스트 사전 교육이 LM의 성능을 크게 향상시키기 위해 간단하고 확장 가능한 접근 방식을 제공한다는 것을 보여준다. 우리는 컨텍스트 학습(+8%), 읽기 이해(+15%), 이전 컨텍스트에 대한 충실성(+16%), 긴 컨텍스트 추론(+5%)을 포함하여 보다 복잡한 컨텍스트 추론이 필요한 작업에서 눈에 띄는 개선을 볼 수 있다, 검색 확대(+9%). 

 

 

RegaVAE: A Retrieval-Augmented Gaussian Mixture Variational Auto-Encoder for Language Modeling

 

Abstract:Retrieval-augmented language models show promise in addressing issues like outdated information and hallucinations in language models (LMs). However, current research faces two main problems: 1) determining what information to retrieve, and 2) effectively combining retrieved information during generation. We argue that valuable retrieved information should not only be related to the current source text but also consider the future target text, given the nature of LMs that model future tokens. Moreover, we propose that aggregation using latent variables derived from a compact latent space is more efficient than utilizing explicit raw text, which is limited by context length and susceptible to noise. Therefore, we introduce RegaVAE, a retrieval-augmented language model built upon the variational auto-encoder (VAE). It encodes the text corpus into a latent space, capturing current and future information from both source and target text. Additionally, we leverage the VAE to initialize the latent space and adopt the probabilistic form of the retrieval generation paradigm by expanding the Gaussian prior distribution into a Gaussian mixture distribution. Theoretical analysis provides an optimizable upper bound for RegaVAE. Experimental results on various datasets demonstrate significant improvements in text generation quality and hallucination removal.

 

초록:검색-증강 언어 모델은 언어 모델(LM)에서 구식 정보와 환각과 같은 문제를 해결하는 데 가능성을 보여준다. 그러나, 현재의 연구는 1) 어떤 정보를 검색할지 결정하는 것과 2) 생성 중에 검색된 정보를 효과적으로 결합하는 것의 두 가지 주요 문제에 직면해 있다. 우리는 미래 토큰을 모델링하는 LM의 특성을 고려할 때 검색된 가치 있는 정보는 현재의 소스 텍스트와 관련이 있을 뿐만 아니라 미래의 목표 텍스트도 고려해야 한다고 주장한다. 또한, 우리는 컴팩트한 잠재 공간에서 파생된 잠재 변수를 사용하는 집계가 컨텍스트 길이에 의해 제한되고 노이즈에 취약한 명시적 원시 텍스트를 활용하는 것보다 더 효율적이라고 제안한다. 따라서 가변 자동 인코더(VAE)를 기반으로 구축된 검색 증강 언어 모델인 RegaVAE를 소개한다. 텍스트 코퍼스를 잠재 공간으로 인코딩하여 소스 텍스트와 대상 텍스트 모두에서 현재 및 미래 정보를 캡처한다. 또한 가우시안 사전 분포를 가우시안 혼합 분포로 확장하여 VAE를 활용하여 잠재 공간을 초기화하고 검색 생성 패러다임의 확률적 형태를 채택한다. 이론적 분석은 RegaVAE에 대해 최적화 가능한 상한을 제공한다. 다양한 데이터 세트에 대한 실험 결과는 텍스트 생성 품질 및 환각 제거에서 상당한 개선을 보여준다. 

 

 

Llemma: An Open Language Model For Mathematics

 

Abstract:We present Llemma, a large language model for mathematics. We continue pretraining Code Llama on the Proof-Pile-2, a mixture of scientific papers, web data containing mathematics, and mathematical code, yielding Llemma. On the MATH benchmark Llemma outperforms all known open base models, as well as the unreleased Minerva model suite on an equi-parameter basis. Moreover, Llemma is capable of tool use and formal theorem proving without any further finetuning. We openly release all artifacts, including 7 billion and 34 billion parameter models, the Proof-Pile-2, and code to replicate our experiments.

 

초록:우리는 수학의 큰 언어 모델인 Lemma를 제시한다. 우리는 과학 논문, 수학이 포함된 웹 데이터 및 수학 코드가 혼합된 Proof-Pile-2에 대해 코드 라마를 계속 사전 교육하여 Lemma를 산출한다. MATH 벤치마크에서 Lemma는 등 매개 변수 기반으로 미출시 미네르바 모델 제품군뿐만 아니라 알려진 모든 오픈 베이스 모델을 능가한다. 또한 Lemma는 더 이상의 미세 조정 없이 도구 사용과 공식 정리 증명이 가능하다. 우리는 실험을 복제하기 위해 70억 및 340억 매개 변수 모델, Proof-Pile-2 및 코드를 포함한 모든 아티팩트를 공개적으로 공개한다. 

 

 

반응형

댓글