text
stringlengths 4
4.47k
|
---|
Wang et al. (2022) iteratively acquires knowledge from the model, making progress in multi-hop QA. Zhou et al. (2023) proposes Least-to-Most Prompting, which initially breaks down the question into sub-questions in a top-down fashion, and subsequently, it solves a sub-question once at a time and leverages their solutions to facilitate subsequent sub-questions. Successive Prompting (Dua et al., 2022) takes a similar approach to Least-to-Most Prompting, and the difference is that it takes a decomposition with interleaved sub-questions and answers rather than two-stage decomposition. The above methods do not formulate tailored solutions for various sub-problems. Decomposed Prompting (Khot et al., 2023) designs a modular shared library, each dedicated to a class of subproblems, which can tailor more effective solutions to different classes of sub-problems. Apart from general tasks, some works focus on question decomposition on tabular reasoning. BINDER(Cheng et al., 2023) maps reasoning to a program in a neural-symbolic manner and obtains the final answer through a program executor such as Python or SQL. Ye et al. (2023) introduces DATER, which breaks down large tables into smaller ones and complex questions into simpler ones. The former reduces irrelevant information, while the latter reduces the complexity of reasoning. |
**Step 3: Relevance ranking.** We use GPT-3.5-Turbo to rate the relevance of an article with respect to a question at 0 temperature. The prompt is given in Figure 14. |
PersonU starts the conversation and only asks questions. Most of PersonU's questions are follow-up or continuations of previous questions. |
**StarCoder:** In [97], Li et al. introduced StarCoder and StarCoderBase. They are 15.5B parameter models with 8K context length, infilling capabilities and fast large-batch inference enabled by multi-query attention. StarCoderBase is trained on one trillion tokens sourced from The Stack, a large collection of permissively licensed GitHub repositories with inspection tools and an opt-out process. They fine-tuned StarCoderBase on 35B Python tokens, resulting in the creation of StarCoder. They performed the most comprehensive evaluation of Code LLMs to date and showed that StarCoderBase outperforms every open Code LLM that supports multiple programming languages and matches or outperforms the OpenAI code-cushman-001 model. |
Footnote 2: Concurrently, DeepSeek-MATH-7B (Shao et al., 2024) also surpasses 80% accuracy. However, their approach relies on a much stronger base model extensively pre-trained on math-related corpora and a sophisticated RL algorithm. Our results are complementary to theirs. |
In this paper, we study how to combine supervised fine-tuning (SFT) with retrieval augmented generation (RAG). We propose a novel adaptation strategy - Retrieval-Augmented Fine Tuning (RAFT). RAFT specifically addresses the challenge of fine-tuning LLMs to incorporate domain knowledge while also improving in-domain RAGperformance. RAFT aims to not only enable models to learn domain specific knowledge through fine-tuning, but also to ensure robustness against inaccurate retrievals. This is achieved by training the models to understand the dynamics between the question posed (prompt), the domain specific documents retrieved, and the appropriate answer. Going back to our analogy, our approach is analogous to studying for an open-book exam by recognizing relevant, and irrelevant retrieved documents. |
We further investigate scaling laws within the \(\mathsf{bioD}(N,K,C,D,L,T)\) data family. Unlike with human biographies, where variation is limited to \(N\), the \(\mathsf{bioD}\) dataset allows for more flexible manipulation of the remaining hyperparameters \(K,C,D,L,T\). This enables us to examine how variations in these parameters affect the model's peak capacity. |
* Fleiss (1971) Joseph L Fleiss. 1971. Measuring nominal scale agreement among many raters. |
We additionally explore the feasibility of prompt recovery across a spectrum of real-world access patterns: full next-token probability outputs, top-K probabilities, probabilities per token upon request, and discrete sampling. We find that even in the case where we are only able to observe text output from the model (no probabilities), we can recover enough of the probability distribution to reconstruct the prompt. |
We can also use our framework to diagnose instabilities with standard actor-critic algorithms used for the RLHF, such as PPO. We follow the RLHF pipeline and focus on the RL fine-tuning step outlined in Section 3. We can draw connections to the control as inference framework [20] for the constrained RL problem outlined in 3. We assume a parameterized model \(\pi_{\theta}(y\mid x)\) and minimize \(\mathbb{D}_{\text{KL}}[\pi_{\theta}(y|x)\mid\mid\pi^{*}(y\mid x)]\) where \(\pi^{*}\) is the optimal policy from Eq. 7 induced by the reward function \(r_{\phi}(y,x)\). |
It suffices to replace \(n_{T}(i)\) in (39) and (40) of the proof of Theorem 4.1 with \(n_{T}(i)\wedge k^{\beta}\), and use the elementary fact that \((n_{T}(i)\wedge k^{\beta})^{-c}=n_{T}(i)^{-c}\lor k^{-\beta c}\asymp n_{T}(i)^ {-c}+k^{-\beta c}\). The rest of the proof proceeds as that of Theorem 4.1. |
**The Milestones of Language Models**. Based on all the exploration efforts, two major milestones have been achieved by OpenAI, namely ChatGPT [131] and GPT-4 [46], which have largely raised the capacity bar of existing AI systems. |
Researchers, engineers, and practitioners working on AI safety are all invited to join the Working Group and contribute to further developing the benchmark.3 |
To address these issues, there have been proposals for supervised fine-tuning methodologies such as Rank Responses to align Human Feedback (RRHF) (Yuan et al., 2023), Reward rAnked Fine-Tuning (RAFT) (Dong et al., 2023), and Direct Preference Optimization (DPO) (Rafailov et al., 2023). These methods circumvent the intricacies inherent in reinforcement learning and have been shown to yield empirical results on par with RLHF. Notably, the DPO technique straightforwardly encourages the LLM to favor positive responses and discourage negative ones. DPO has been observed to yield performant learning outcomes, in spite of its uncomplicated training procedure. |
Therefore, comparing \(\mathsf{bioS}\) and \(\mathsf{bioS}^{\mathsf{simple}}\), it's more advantageous to rewrite the data 1000 times (in this ideal setting), training each for one pass (as done in the \(\mathsf{bioS}\) data), rather than training the same data for 1000 passes (as done in the \(\mathsf{bioS}^{\mathsf{simple}}\) data). This is because, without data diversity, the model wastes capacity memorizing sentence structures, resulting in a capacity loss. |
For general reasoning tasks, as encountered in the MMLU and Chess datasets, the sampling-and-voting method is applied following Algorithm 1 during the sampling phase. Samples are extracted by matching the pattern "(X" or "(X)", where "X" corresponds to the options A, B, C, or D in MMLU task and the chessboard position in Chess task. |
Fig. 35: A generic knowledge distillation framework with student and teacher (Courtesy of [144]). |
In Sections C.3-C.6 we can no longer use general invertible matrices \(\mathbf{S}\) in our arguments, and must instead use orthogonal matrices, matrices \(\mathbf{U}\) such that \(\mathbf{U}^{\top}\mathbf{U}=I\). In models with LayerNorm, we specialise further, too (Appendix C.5). |
**Psychology**: For the domain of psychology, LLM-based agents can be leveraged for conducting simulation experiments, providing mental health support and so on [102, 103, 104, 105]. For example, in [102], the authors assign LLMs with different profiles, and let them complete psychology experiments. From the results, the authors find that LLMs are capable of generating results that align with those from studies involving human participants. Additionally, it was observed that larger models tend to deliver more accurate simulation results compared to their smaller counterparts. An interesting discovery is that, in many experiments, models like ChatGPT and GPT-4 can provide too perfect estimates (called "hyper-accuracy distortion"), which may influence the downstream applications. In [104], the authors systematically analyze the effectiveness of LLM-based conversation agents for mental well-being support. They collect 120 posts from Reddit, and find that such agents can help users cope with anxieties, social isolation and depression on demand. At the same time, they also find that the agents may produce harmful contents sometimes. |
T0 (Chung et al., 2022), and LaMini instruction (Wu et al., 2023). In addition we collect out-of-domain prompts to test the ability of the model to generalize in topical area. |
Now, we need to compare the revenue earned on Thursday and Friday to find out which day earned more revenue. |
Unfortunately, we must conclude that this additional hyperparameter is unstable. This is a downside of using RAG in practice, and the choice of \(K\) cannot be ignored. |
We test how significant the differences between our estimates and Hoffmann et al.'s estimates are. |
On a math-specific base model, such as Llemma-7B, the gains are +15.0 on GSM8K and +17.2 on MATH (compared to MetaMath-Llemma-7B (Luo et al., 2023)), respectively. |
**Experimental Setup.** To conduct the experiments on the effect of instruction data, we leverage these new instruction datasets for tuning LLAMA, a popular LLM backbone that has been widely used for instruction-tuning. |
CorpusTo compile a language-specific corpus without task-specific considerations, we utilize OSCAR Caswell et al. (2020) corpus which contains web crawling texts for each language. Our selection criterion for the number of contexts is based on achieving substantial coverage of each language's vocabulary, ensuring that the selected contexts provide a representative sample of the language. Details are shown in Table 1, where "corpus size" indicates the number of contexts selected, "corpus vocab" represents the vocabulary coverage within the selected contexts, "vocab size" refers to the number of vocabularies of that language. |
Safety evaluation is how we measure the extent to which models are acceptably safe for a given purpose, under specific assumptions about the context in which they are deployed [119, 120]. Evaluation is critical for identifying safety gaps in base models and understanding the effectiveness of safety features, such as adding output filters and guardrails [121, 61]; aligning models to be safer through tuning and steering [122, 68]; and reviewing and filtering training datasets [123]. |
This paper present a survey of LLMs developed in the past few years. We first provide an overview of early pre-trained language models (e.g., as BERT), then review three popular LLM families (GPT, LLaMA, PaLM), and other representative LLMs. We then survey methods and techniques of building, augmenting, and using LLMs. We review popular LLM datasets and benchmarks, and compare performance of a set of prominent models on public benchmarks. Finally, we present open challenges and future research directions. |
Figure 2: Average answer prediction performance (across three evaluation metrics) and average rationale quality scores (_i.e._, \(R_{aspect}\)) for HotpotQA (left) and 2WikiMultiHopQA (right). The right y-axis represents the mean answer prediction scores, and the left y-axis represents the mean rationale quality scores. |
Our investigation also covers two QA generation techniques. The E2E method generates over 12 times more QA than the prompting method (cf. Table 4 in Appendix C), while prompt-based method generates more quality QAs. The results in Table 2 show that fine-tuned models trained on prompt-generated data outperform E2E-generated ones. This highlights the significance of synthetic data quality over quantity. |
We use "Answer the following question with just a number from context or just the math arithmetic using +, -, *, or /." for ConvFinQA, since this dataset requires the model to either extract numbers from the context or do arithmetic calculation. We extract the arithmetic formula generated by the model and use a calculator to get its final result. |
Chinese Culture Testinvestigates the mastery of traditional Chinese culture and history. We collected multiple-choice questions on traditional Chinese culture from the internet, retaining those with answer analyses, and constructed them into (instruction, response) pairs. |
In Figure 1 we plot the accuracy score progression of 8 core end-tasks. All tasks, except OBQA, show an upward trend in accuracy numbers as OLMo-7B is trained on more tokens. A sharp upward tick in accuracy of many tasks between the last and the second to last step shows us the benefit of linearly reducing the LR to 0 over the final 1000 training steps. See Table 9 in Appendix A for additional evaluation results and discussion. |
All the datasets that we use in our work are publicly available, and we have given appropriate credit to the original authors throughout the paper. We acknowledge that occasionally, the generated rationales may include non-factual and offensive statements. As we do not plan on distributing these artifacts, it effectively reduces the potential for harm. |
FormulationWe first formalize the problem. We are given an unlabeled domain pre-training corpus, \(\mathcal{U}\) represented by green region in Figure 1. Next, we can take two scenarios: absence or presence of an unlabeled task corpus. The first scenario of the presence of a task corpus, which can be a single or group of tasks, \(\mathcal{T}\) is depicted as the red region in Figure 1. Typically, the task corpus is a subset of the domain corpus, \(\mathcal{T}\subset\mathcal{U}\), with \(|\mathcal{U}|>>|\mathcal{T}|\). The goal of data selection is to select a subset, \(\mathcal{D}\subset\mathcal{U}\), that is most helpful for pre-training the LLM model. We also assume that the selected domain corpus subset is much larger than the task corpus, \(|\mathcal{D}|>>|\mathcal{T}|\), as is a typical case. |
\(\bullet\)_PaLM_ (540B) [56] uses a pre-training dataset of 780B tokens, which is sourced from social media conversations, filtered webpages, books, Github, multilingual Wikipedia, and news. |
Deactivating MethodTable 6 shows the result of the knowledge question answering task, where we deactivate \(5\) sets of neurons. Details are listed in Appendix C. |
**Performance Improvement.** Despite being tuned on a moderate number of instances, instruction tuning has become an important way to improve or unlock the abilities of LLMs [69]. Recent studies have experimented with language models in multiple scales (ranging from 77M to 540B), showing that the models of different scales can all benefit from instruction tuning [69, 345], yielding improved performance as the parameter scale increases [94]. Further, smaller models with instruction tuning can even perform better than larger models without fine-tuning [28, 69]. Besides the model scale, instruction tuning demonstrates consistent improvements in various model architectures, pre-trainingobjectives, and model adaptation methods [69]. In practice, instruction tuning offers a general approach to enhancing the abilities of existing language models [69] (including small-sized PLMs). Also, it is much less costly than pre-training, since the amount of instruction data required by LLMs is significantly smaller than pre-training data. |
The rapid advancement of artificial intelligence (AI) technologies has led to their widespread adoption across numerous domains, from assistant agents (e.g., ACT-1, from Adept AI1) and software development (e.g., Devin, from Cognition Lab2) to healthcare (Singhal et al., 2022) and finance (Zheng et al., 2022). However, the success of AI models heavily relies on the availability of large, diverse, and high-quality datasets for training and evaluation. Acquiring such datasets can be a significant challenge due to data scarcity (Babbar and Scholkopf, 2019), privacy concerns (Abay et al., 2019), and the sheer cost of data collection and annotation (Gilardi et al., 2023). Pessimists predict that we will run out of fresh text data in 2050 and image data in 2060 (Villalobos et al., 2022). |
**CONTENT WARNING** This work involves viewing content that creates a risk of harm and you might find objectionable or offensive. There are examples of harmful content in this document. |
Fine-tuning does not need to be performed to a single task though, and there are different approaches to multi-task fine-tuning (see e.g. Mahabi et al. [132]). Fine-tuning to one or more tasks is known to improve results and reduce the complexity of prompt engineering, and it can serve as analternative to retrieval augmented generation. Furthermore, there are other reasons why it might be advisable to fine-tune. For example, one might want to fine-tune to expose the model to new or proprietary data that it has not been exposed to during pre-training. |
To do this efficiently, we cache each forward pass and concatenate a diagonal attention mask to the previous attention mask: each generated token now attends to all of the tokens that were used to generate it, as well as to itself (but not to token on other "counterfactual" paths). Moreover, this parallelized next-sampling token procedure can be repeated arbitrarily many times (or at least, until one runs out of memory). We visualize this procedure in Figure 3 and highlight additional ways to make this algorithm faster in Appendix B. |
Footnote 11: A version of Theorem 3.2 can be proven for this dataset with a simpler proof, as it excludes the diversity set. This could also mean the model has full prior knowledge of the diversity set (e.g., assuming a fixed set of 300 university names) without counting this knowledge towards its learned bits. |
Batch size determines the balance between the convergence speed of the model and the consumption of computational resources. If the batch size is too large, it will result in a significant amount of data and computation cost. On the other hand, if the batch size is too small, it will require a large number of training steps and may result in a limited decrease in the loss function. We follows Kaplan et al. (2020) to determine the batchsize from expected loss, with a slight modification from their setting (see Appendix A.2). We conduct experiments on 0.009B, 0.03B, and 0.17B models, respectively, toward this goal. Each model size is trained on 6 batch sizes with a global learning rate of 0.01 and cosine learning rate scheduler. We observe the trend of the optimal batch size with loss on the C4 (Raffel et al., 2019) dataset (red line in the Figure 1). |
Determining Computational BudgetIn many downstream applications, we might not be right provided with a fixed computational budget. Instead, there is often a minimum threshold requirement that must be met before implementation. In such cases, we need to figure out the minimum possible computational budget in order to meet this threshold requirement. As the evaluation criteria is often correlated with the loss value, we can link this minimum threshold requirement into a certain loss value. From this loss value, we can readily determine the optimal model size and minimum computational budget required to achieve it from the analytical relation provided in Equation 5.1. |
NqThe Natural Questions dataset [18] is a collection of real-world questions derived from Google search queries, accompanied by long-form text passages obtained from Wikipedia articles and providing a diverse range of topics and natural language variations. We utilize this dataset for **training** our models in the experiments. |
where \(\hat{r}_{\theta}(x,y)=\beta\log\frac{\pi_{\theta}(y|x)}{\pi_{\text{ref}}(y|x)}\) is the reward implicitly defined by the language model \(\pi_{\theta}\) and reference model \(\pi_{\text{ref}}\) (more in Section 5). Intuitively, the gradient of the loss function \(\mathcal{L}_{\text{DPO}}\) increases the likelihood of the preferred completions \(y_{w}\) and decreases the likelihood of dispreferred completions \(y_{l}\). Importantly, the examples are weighed by how much higher the implicit reward model \(\hat{r}_{\theta}\) rates the dispreferred completions, scaled by \(\beta\), i.e, how incorrectly the implicit reward model orders the completions, accounting for the strength of the KL constraint. Our experiments suggest the importance of this weighting, as a naive version of this method without the weighting coefficient can cause the language model to degenerate (Appendix Table 3). |
Figure 6: Performance of GPT3 model and its instruction-tuned variants, evaluated by human experts on our 252 user-oriented instructions (§4.4). Human evaluators are instructed to rate the models’ responses into four levels. The results indicate that GPT3SELF-INST outperforms all the other GPT3 variants trained on publicly available instruction datasets. Additionally, GPT3SELF-INST scores nearly as good as InstructGPT001 (cf. footnote 1). |
Effectively, the above theorem predicts that for any fixed \(\pi\in(0,1)\) -no matter how small- the test error grokks w.r.t sample size \(T\). The result is empirically confirmed in Figure 3, right (see Figure 10 for another illustration). |
Several related works apply continual pre-training to specific tasks and domains (Sun et al., 2020; Jang et al., 2022; 2022; Gong et al., 2022; Zan et al., 2022; Yadav et al., 2023; Ma et al., 2023; Yang et al., 2024). While these works also utilize continual pre-training techniques, they differ from our work by focusing on particular domains instead of general pre-training techniques, on smaller-scale datasets \(<\) 10B tokens with smaller models. The only existing work that approaches our dataset scale is (Gogoulou et al., 2023), which explores continual autoregressive language modeling across English, Danish, Icelandic, and Norwegian datasets (73B each). While they do not use replay they do re-warm and re-decay the learning rate. The only existing work that approaches our model scale is (Yang et al., 2024). They continually pre-train and instruction tune LLaMA2 on small-scale academic plant science data. This concurrent work uses a very similar continual learning setup to the one we propose: replay, LR re-warming, and LR re-decaying. While, unlike our work, they _do not_ build a controlled experimental framework to systematically evaluate the validity of these approaches for continual pre-training, it is nice to see further experimental evidence validating our approach. |
The reference answer for this question is: Reference Answer Please provide an answer in the following format, assigning your perceived scores for LLM response's "accuracy", "fluency", "informativeness", "logicality", and "harmlessness" on a scale of 0/1/2/3: |
where \(d\) is the embedding dimension, and serves a s proxy for model capacity; the exponent \(c_{q}\) depends both on \(\beta\) and the particular algorithm \(q\) used to update the memories in the model during training. |
**Question:** A treasure hunter found a buried treasure chest filled with gems. There were 175 diamonds, 35 fewer rubies than diamonds, and twice the number of emeralds than the rubies. How many of the gems were there in the chest? |
**Sample Efficiency.** Fig 2 illustrates that within an equivalent number of training samples consumed, MFT yields a better performance than SFT. |
Effect of Token Select RatioWe investigate the impact of token selecting ratios of the SLM. Generally, the selecting ratio is defined by heuristic rules, similar to the approach previously employed in the training of Masked Language Models (MLMs) (Devlin et al., 2019; Liu et al., 2019). As shown in Figure 9, the selected tokens is suitable for accounting for about 60% of the original tokens. |
**Theorem 1** **Restated**.: _Assume, we have a reference model, such that \(\pi_{\text{ref}}(y|x)>0\) for all pairs of prompts \(x\) and answers \(y\) and a parameter \(\beta>0\). |
FindingsWe find that deactivating randomly sampled neurons in task-solving layers disables the capabilities of LLMs in reasoning to a greater extent than deactivating randomly sampled neurons in all layers, which verifies the function of the task-solving layer. |
The developers of large language models typically attempt to create training data that reflects natural human communication, but current methods to collect and curate such datasets are fallible. There are multiple reasons some text ends up over-represented. For example, bot replies, auto-generated templates, and licenses are repeated for structural (e.g., legal, economical) reasons (as was also observed by Dodge et al. (2021)). Additionally, common techniques for acquiring and "cleaning" data can result in an over-representation of particular subsets of world users, often those who are English-speaking and publishing in established forums. This effectively under-represents non-English speakers as well as groups whose communication mostly occurs outside of the public web. In this paper, we focus on the problem of over-representation of some types of text (structural duplicates) but do not address the problem of under-representation of others. |
Chat responseIn this setup, models are given prompts and they respond with a free text chat response. The prompt is usually a request or instruction. This approach closely replicates how people actually interact with models and is widely used in existing datasets [47, 48, 49]. However, free text is hard to assess, as models can respond in many different ways. It is not always clear what constitutes a "safe" or "unsafe" answer if the prompt is ambiguous or context-dependent. Chat responses can be split into single-turn and multi-turn interactions. Multi-turn is a more realistic reflection of how most people interact with models, which typically involves a conversation with several inputs and outputs - such as clarifying requests, giving feedback or updating requirements. At the same time, multi-turn interactions are far more difficult to assess than single turn interactions as the second turn in the conversation must be generated in-context to the models' first response. This creates a garden of forking paths that is hard to automatically review. |
To evaluate Self-Instruct empirically, we run this framework on GPT3 (Brown et al., 2020), which is a vanilla LM (SS3). The iterative Self-Instruct process on this model leads to about 52k instructions, paired with about 82K instance inputs and target outputs. We observe that the resulting data provides a diverse range of creative tasks, as is demonstrated by examples in Figure 1. These generated tasks deviate from the distribution of typical NLP tasks, and also have fairly small overlap with the seed tasks (SS3.2). On this resulting data, we build GPT3SELF-INST by finetuning GPT3 (i.e., the same model used for generating the instruction data). We evaluate GPT3SELF-INST in comparison to various other models on both typical NLP tasks included in SuperNI (Wang et al., 2022), and a set of new instructions that are created for novel usage of instruction-following models (SS4). The results indicate that GPT3SELF-INST outperforms GPT3 (the original model) by a large margin (+33.1%) and nearly matches the performance of InstructGPT001. Moreover, our human evaluation on the newly-created instruction set shows that GPT3SELF-INST demonstrates a broad range of instruction following ability, outperforming models trained on other publicly available instruction datasets and leaving only a 5% gap behind InstructGPT001. |
* Prompt Engineering. Various prompt engineering methods are considered to conduct comprehensive experiments. We evaluate Chain-of-Thought prompting (CoT) (Wei et al., 2022), Zero-Shot Chain-of-Thought prompting (Zero-Shot Cot) (Kojima et al., 2022), and more sophisticated methods such as Solo Performance Prompting (SPP) (Wang et al., 2023c). Initially, these methods are applied with a single LLM query. We then increase the number of queries and employ majority voting to determine the most consistent answer as the final response. * Multiple LLM Agents Collaboration. We select LLM-Debate (Du et al., 2023) denoted as Debate, and self-reflection (Shinn et al., 2023) denoted as Reflection. Within these methods, we generate multiple samples by iteratively operating these methods and using majority voting to produce the final answer. |
These results demonstrate the significant effectiveness and broad applicability of scaling synthetic math SFT data. |
RQ4: Does synthetic data improve over augmentations?Are the gains observed by pre-training on synthetic data the same as pre-training with augmentations? In order to test this, we consider two popular text augmentation baselines--synonym replacement and random deletion using the NL-Augmenter library (Dhole et al., 2021). We pre-train a 350M parameter model for 15B tokens in order to conduct this set of experiments. The total pool size is only about 1.5B tokens, meaning that the model would have to repeat data around 10 times during the pre-training phase, unless augmented over. As seen in the perplexity analysis in Figure 6, the models trained on augmented data perform significantly worse than those trained on combinations of real and synthetic data. This suggests that synthetic data enhances the learning process, and is not merely another form of augmentation. |
**Continual Pre-training Dataset** We construct a Traditional Chinese corpus for continual pretraining, containing 3.1B tokens sourced from publicly available materials. These sources encompass diverse domains, including news media, educational resources, Wikipedia, academic abstracts, governmental reports, Traditional Chinese Dictionary, and scientific articles. |
Footnote 9: An idea is to transfer the optimized training mixture on small models trained with few tokens to the training of large models and large volumes of training data. Nevertheless, in Appendix A, we show that the partial order of data mixture concerning model performance varies as the model size and number of trained tokens change. Therefore, the optimal mixture at experimented scales can be suboptimal at the target scale. |
**Memory update.** Once the retrieval is done, we update the memory and the normalization term with the new KV entries and obtain the next states as |
Both single-agent and multi-agent architectures can be used to solve challenging tasks by employing reasoning and tool calling steps. Many methods use multiple iterations of reasoning, memory, and reflection to effectively and accurately complete problems [16; 23; 32]. They often do this by breaking a larger problem into smaller subproblems, and then solving each one with the appropriate tools in sequence. |
URL filtering.Before undertaking any compute-heavy processing, we perform a first filtering based on the URL alone. This targets fraudulent and/or adult websites (e.g., predominantly pornographic, violent, related to gambling, etc.). We base our filtering on two rules: (1) an aggregated blocklist of 4.6M domains; (2) a URL score, based on the presence of words from a list we curated and weighed by severity. We found that commonly used blocklists include many false positives, such as popular blogging platforms or even pop culture websites. Furthermore, word-based rules (like the one used in C4, Raffel et al. (2020)) can easily result in medical and legal pages being blocked. Our final detailed rules based on this investigation are shared in Appendix G.1. Since we intend RefinedWeb to be used as part of an aggregate dataset along with curated corpora, we also filtered common sources of high-quality data: Wikipedia, arXiv, etc. The detailed list is available in Appendix G.1.3. |
DPO is able to bypass both fitting an explicit reward and performing RL to learn the policy using a single maximum likelihood objective. Note the optimization objective Eq. 5 is equivalent to a Bradley-Terry model with a reward parameterization \(r^{*}(x,y)=\beta\log\frac{\pi_{\theta}^{*}(y|x)}{\pi_{\text{ref}}(y|x)}\) and we optimize our parametric model \(\pi_{\theta}\), equivalently to the reward model optimization in Eq. 2 under the change of variables. In this section we will build the theory behind this reparameterization, show that it does not constrain the class of learned reward models, and allows for the exact recovery of the optimal policy. We begin with by defining an equivalence relation between reward functions. |
Prompts of In-Breadth Evolving.In-Breadth Evolving aims to enhance topic coverage, skill coverage, and overall dataset diversity. Open-domain instruction finetune datasets (e.g., Alpaca, ShareGPT, etc.) are typically small in scale, lacking topic and skill diversity. To solve this problem, we designed a prompt to generate a completely new instruction based on the given instruction, requiring the new instruction to be more long-tailed. |
Moreover, we conduct experiments to investigate mixing a proportion of real data with AI-generated data. Figure 7 demonstrates the effect of blending a random 2% of original data with AI data across all fine-tuning phases. It significantly mitigates model collapse, with the emergence of a grokking curve as predicted in Theorem 3.2. |
_Qualitative Evaluation_: qualitative examples generated by Pythia-6.9B and FinPythia-6.9B are presented in Table 2. Upon examination, we observe that FinPythia-6.9B generates more relevant and detailed responses for finance-related questions. It acquired the financial events knowledge post 2021 with the continual pre-training. These findings suggest that the DACP helps FinPythia-6.9B acquire in-domain knowledge. |
**Kosmos:** In [98], Huang et al. introduced KOSMOS-1, a Multimodal Large Language Model (MLLM) that can perceive general modalities, learn in context (i.e., few-shot), and follow instructions (i.e. zero-shot). Specifically, they trained KOSMOS-1 from scratch on web-scale multi-modal corpora, including arbitrarily interleaved text and images, image-caption pairs, and text data. Experimental results show that KOSMOS-1 achieves impressive performance on (i) language understanding, generation, and even OCR-free NLP (directly fed with document images), (ii) perception-language tasks, including multimodal dialogue, image captioning, visual question answering, and (iii) vision tasks, such as image recognition with descriptions (specifying classification via text instructions). |
Despite F1 scores are the most commonly used metrics for evaluating the quality of QA models, there are often multiple ways to answer questions, which makes the automatic metrics less than perfect. Therefore, we use human evaluations to further compare our ChatQA-70B with GPT-4. In this human evaluation, we ask annotators to verify the facts in ChatQA-70B and GPT-4's outputs and determine which model provides a more accurate response to the question6. The human evaluation results over the 10 datasets are shown in Table 3. We first find that our ChatQA-70B and GPT-4 are tie most of the time (69.09%), and GPT-4 achieves slightly higher win rate (\(\sim\)3.3%) than ours. This further confirms our model has powerful capability to produce correct answers. Second, we find that our model achieves slightly better win rate than GPT-4 in ConvFinQA, which indicates the strong arithmetic calculation ability of our model. Third, we find that GPT-4 achieves significantly better win rate in SQA task, which suggests that there is still a gap between our model and GPT-4 on tabular reasoning task. |
The scaling law formula thus provides a theoretical framework to predict how adjustments in model size, data size, and computational resources are likely to impact the performance of machine learning models. This formula is instrumental in guiding researchers and practitioners towards making informed decisions about resource allocation during the model development process, aiming for an optimal balance between these factors to achieve the best possible model performance. |
Figure 8: **Reverse accuracy for Llama-7b on held-out examples.** Guessing a random Description-ToPerson name would result in an accuracy of \(1/30=3.3\%\). |
Dolma is built using a pipeline of (1) language filtering, (2) quality filtering, (3) content filtering, (4) deduplication, (5) multi-source mixing, and (6) tokenization. We refer the reader to the Dolma report (Soldaini et al., 2024) for more details about its design principles, details about its construction, and a more detailed summary of its contents. The report provides additional analyses and experimental results from training language models on intermediate states of Dolma to share what we learned about important data curation practices, including the role of content or quality filters, deduplication, and mixing data from multiple sources. We keep documents from each source separate, both during curation as well as in the final release. We open-sourced our high-performance data curation tools; this toolkit can be used to further experiment on Dolma, reproduce our work, and enable fast and easy curation of pretraining corpora. Finally, we also open-sourced our WIMBD tool (Elazar et al., 2023) to help with dataset analysis. |
Our web documents in the corpora consist of Oscars1Abadji et al. (2021), that were generated by the ungoliant pipeline2 based on three Common Crawl WET Archives (2022-27, 2022-49 and 2023-14). |
Relatively strong evidence supports the first-hop reasoning in up to 73% of fact composition types.With LLaMA-2 7B-13B-70B, 18/25/34 and 21/27/38 out of 52 of fact composition types exhibit maximum relative frequencies exceeding 0.8 for entity and relation substitution, respectively. In addition, 11 out of 52 types demonstrate such strong first-hop reasoning evidence robustly across all model sizes and substitution types. For example, the maximum frequency of "president of anthem's country" ("The country with the national anthem 'Azat u anakkh Artsakh' is led by president") shows the maximum frequency of 0.97/0.92/1.0 (Figure 1(d)) and 0.87/0.87/0.89 (Figure 1(h)) with each model and substitution, respectively. Individual fact composition types exhibit diverse patterns of relative frequency across layers. |
14. Forest was believed to be fighting for deity Enva, but is revealed to have been forcefully conscribed by deity Dacre. |
Most recently, ChatGPT (OpenAI, 2022) and its follow ups (OpenAI, 2023; Anthropic, 2023; Google, 2023) have led to the paradigm shift of building question answering (QA) models in production and research community. In particular, the following aspects of the QA models are preferred in real-world applications: _i)_ The users can interact with the QA models in a conversational way, thus one can easily raise follow-up questions. _ii)_ The generalist models can generate answers in zero-shot manner without dataset-specific fine-tuning, while matching the accuracies of fine-tuned expert models. _iii)_ The QA models are capable of integrating retrieved chunks of evidence in both open-domain or long document settings, where the provided context is much longer than the context window of LLM (e.g., Anthropic, 2023; Xu et al., 2023b). To this end, we focus on the conversational QA covering these three aspects. |
As mentioned in Section 2, there are fundamental differences between the traditional CL formulations and CKL which make the previous CL methods inadequate for the CKL setting. In this section, we introduce the prior traditional continual learning methods in detail, explore the methods from the literature set as baselines for the CKL benchmark and how they address the identified limitations of CL methods, and provide descriptions about alternative methods making LMs cope with the changing world. |
Figure 14 \(|\) R-GSM example where both the original and the reordered problems were correctly solved by all LLMs in our evaluation. |
**Improvements Compared with SFT.** The results presented in Tab. 1 illustrate that our approach improves performance no matter whether augmentation data is used, demonstrating effectiveness across datasets of varying quality and under two different base models. Notably, this enhancement is most significant in simpler or smaller datasets where the available useful signals in the data may be limited. Our approach demonstrates enhancements in the performance of the MAMnoTH dataset, which incorporates Program-of-Thought Data. This suggests that our method remains effective and is not adversely affected by the inclusion of programming tasks. |
the hyper-parameters settings remain the same as Stanford Alpaca. To better evaluate the instruction following ability of fine-tuned models, we consider two settings, namely _Chat setting_ and _QA setting_. The chat setting mainly utilizes user instructions and queries from daily chat, whereas the QA setting mainly employs question answering examples from existing NLP datasets. The evaluation on the chat setting is conducted based on the AlpacaFarm evaluation set [363]. Instead of using a full pairwise comparison, we select the LLaMA 7B and 13B models fine-tuned on Self-Instruct-52K as the reference baselines, and then compare them with other fine-tuned LLaMA 7B and 13B models using different instructions, respectively. Since our focus is to examine the usefulness of different strategies to generate the instructions, the model fine-tuned on Self-Instruct-52K can serve as a good reference. Following AlpacaFarm [363], for each comparison, we employ ChatGPT to automatically annotate which response from two compared models each time is the best for the user query, and report the win rate (%) as the evaluation metric. For the QA setting, we select two benchmarks, MMLU [364] and BBH [365], and evaluate the accuracy based on their default settings by using heuristic rules to parse the answers from these LLMs. |
In this section, we present an overview about the background of LLMs and then summarize the technical evolution of the GPT-series models. |
Close-Source Models.Numerous technology companies have effectively created exceptionally proficient Large Language Models (LLMs) [3; 4; 7; 20; 44; 45; 47; 51; 52; 53], but have opted against |
Another method to enhance a model's knowledge base is through the use of in-context learning (ICL) (Chen et al., 2021; Radford et al., 2019; Min et al., 2021; Lampinen et al., 2022). The main idea behind ICL is to improve the performance of pre-trained LLMs on new tasks by modifying the input query to the model without directly changing the weights of the model. One form of ICL is retrieval augmented generation (RAG) (Lewis et al., 2020; Neelakantan et al., 2022). RAG uses information retrieval techniques to enable LLMs to obtain relevant information from a knowledge source and incorporate it into generated text. |
**Evaluation of Specialized LLMs.** Specialized LLMs refer to the model checkpoints specially adapted to some domains or applications like healthcare [356] and finance [737]. As special task solvers, specialized LLMs will be tested not only on general abilities (_e.g.,_ basic ability like complex reasoning and advanced ability like human alignment), but also on specific abilities related to their designated domains or applications. For this purpose, one often needs to construct specific benchmarks tailored for the target domains or applications. Then, these domain-specific benchmarks can be combined with general benchmarks to conduct both comprehensive and targeted evaluation for specialized LLMs. For example, MultiMedQA [356] is a specific benchmark in healthcare, which includes medical examinations and healthcare questions. In this work [356], MultiMedQA has been combined with MMLU [364] to assess the performance of specialized LLMs for healthcare, such as Med-PaLM [356]. Similarly, FLUE [737] constructs a benchmark for finance, spanning from financial sentiment analysis to question answering. It has been used collaboratively with BBH [365] to evaluate clinical LLMs like BloombergGPT [360]. |
Fitting the mixture law requires us to first experiment on a few mixtures and obtain their losses. The sample mixture chosen for fitting could largely affect the prediction accuracy. Consider an extreme case where all sample mixtures have proportions around a small region, it is hardly possible to fit a law that reliably predicts the whole proportion space. |
Intuitively, not all tokens require equal amounts of thought. For example, consider the sentence "the person is run-": although there is inevitably some probability of the token being something other than "ing"2, as a standalone sentence without context, additional thinking is unlikely to improve a well-trained model's prediction. Indeed, we conjecture that for most chunks of most online text, additional thought has little to no impact. Indeed, early in our exploration we observed that Quiet-STaR does not benefit all tokens equally. Thus, we design our experiments to investigate whether our approach is useful in predicting tokens that _do_ require thought. We evaluate 1) whether Quiet-STaR improves a language model's ability to directly predict answers in datasets that require reasoning; and, 2) the distribution of impacts resulting from thinking tokens. We conduct all of our experiments starting with the base version of Mistral 7B (Jiang et al., 2023). |
Footnote 2: The notation \(f(T)\lesssim g(T)\) means that \(f(T)\leq Cg(T)\) for sufficiently large \(T\) and an absolute constant \(C\), while \(f(T)\asymp g(T)\) means \(f(T)\lesssim g(T)\lesssim f(T)\). |
**Method.** We make one simple insight for our logprob-free attacks: sampling with temperature 0 produces the token with the largest logit value. By adjusting the logit bias for each token accordingly, we can therefore recover every token's logit value through binary search. Formally, let \(p\) be the prompt, and relabel tokens so that the token with index \(0\) is the most likely token in the response to \(p\), given by \(\mathcal{O}(p,b=\{\})\). For each token \(i\neq 0\), we run a binary search over the logit bias term to find the minimal value \(x_{i}\geq 0\) such that the model emits token \(i\) with probability 1. This recovers all logits (like all prior attacks, we lose one free variable due to the softmax). |
For assumption 1, since the ground truth is correct, there is no need to use the reward model for labeling, and most tokens are supposed to be associated with positive reward signals. |
It is worth mentioning that LoRA can be applied to any a subset of weight matrices in a neural network to reduce the number of trainable parameters. In the Transformer architecture, there are four weight matrices in the self-attention module (\(W_{q}\), \(W_{k}\), \(W_{w}\), \(W_{o}\)), and two in the MLP module. Most of the time, LoRA is focused on adapting the attention weights only for downstream tasks, and freezes the MLP modules, so they are not trained in downstream tasks both for simplicity and parameter-efficiency. |
Fig. 9: GPT-3 shows that larger models make increasingly efficient use of in-context information. It shows in-context learning performance on a simple task requiring the model to remove random symbols from a word, both with and without a natural language task description. Courtesy of [56]. |
* **Prompt Generation:** The LLM generates a range of potential prompts based on a given task or objective. * **Prompt Scoring:** Each generated prompt is then evaluated for its effectiveness, often using criteria like clarity, specificity, and likelihood of eliciting the desired response. * **Refinement and Iteration:** Based on these evaluations, prompts can be refined and iterated upon, further enhancing their quality and effectiveness. |
where \(\texttt{Mask}[k]\) is a vector of length \(d_{inter}\) with the \(k\)-th element as \(1\) and others as \(0\). For calculating \(\text{Imp}(W_{up}[:,k]|x)\) for all neurons in \(W_{up}\) parallelly, we introduce a diagonal mask matrix of size \((d_{inter},d_{inter})\), denoted as Mask. |
**Will the dataset be distributed under a copyright or other intellectual property (IP) license and/or under applicable terms of use (ToU)?** The dataset is distributed under a CC-BY license. |
In this section, we outline an algorithm for extracting \(\mathbf{W}\) up to an orthogonal \(h\times h\) matrix, instead of merely up to a nonsingular \(h\times h\) matrix as in Appendix C. We do **not** carry out this attack in practice for models considered in this paper, and leave improving this algorithm as an open problem for future work. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.