text
stringlengths 4
4.47k
|
---|
Third, _we explore the underlying reasons for the effectiveness of our method by revealing its impact on learning dependencies._ By conducting both quantitative analyses and case studies, we observed that this method demonstrates an enhanced dependency on the initial mathematical questions and earlier steps. This suggests a possible reason: Instead of depending solely on the local information generated by the model itself from recent steps, which can lead to a higher likelihood of hallucination or misdirection as the sequence extends, our method utilizes more information from the problem statement and earlier steps. These sources are more reliable and less prone to errors. Consequently, this strategy might reduce the risk of misunderstanding the problem and inconsistencies in reasoning (refer to Secs. 2.2 and 3.4). |
Our investigations reveal that the decision on which layers to replicate could be informed by evaluating the cosine similarity scores between the inputs and outputs of each layer. Such an approach allows for targeted model scaling without necessitating additional pretraining, leading only to minimal performance impacts. This minimal impact on performance is attributed to the high cosine similarity, approaching one, between the inputs and outputs of the duplicated layers, as evidenced in Figure 8. |
Experiment DetailsFor reasoning, NLU, and knowledge question answering tasks, we adopt accuracy as the metric. As for the NLG tasks, we adopt ROUGE-L as the metric. Furthermore, for the concrete numbers of different layers, we tune hyperparameters by XQuAD in Chinese. Details are explained in Appendix B. |
- Unpredictable events, such as a major terrorist attack or a sudden change in leadership in either country, could also impact the forecast. |
Figure 1: A diagram illustrating the three steps of our _Reinforcement Learning from Evol-Instruct Feedback_ (_**RLEIF**_): (1) supervised fine-tuning (SFT), (2) Instruction Reward Model (IRM) training and Process-supervised Reward Model (PRM) training, and (3) Active Evol-Instruct and reinforcement learning via proximal policy optimization (PPO). |
2. The war in the world of "Diving Rivuls' is invoked by two resurrected rival detities, Enva and Dacre. |
**Selecting fine-tuning data.** We seek to fine-tune our model on strong forecasts. To select the data, we only keep outputs that give a lower Brier score than the crowd's. However, this can inadvertently cause overconfidence in our fine-tuned model. To mitigate this, we discard pairs where the prediction deviates by more than 0.15 from the crowd prediction, and we also average our prediction with the crowd prediction when constructing the target output. |
Decoding refers to the process of text generation using pretrained LLMs. Given an input prompt, the tokenizer translates each token in the input text into a corresponding token ID. Then, the language model uses these token IDs as input and predicts the next most likely token (or a sequence of tokens). Finally, the model generates logits, which are converted to probabilities using a softmax function. Different decoding strategies have been proposed. Some of the most popular ones are greedy search, beam search, as well as different sample techniques such as top-K, top-P (Nucleus sampling). |
The new definition offers a precise characterization of the critical junctures within training trajectories where emergent abilities manifest. It encourages future studies to investigate the shifts in language models at these junctures, which facilitate the development of new capabilities. |
Footnote 35: Since we mainly focus on discussing quantization methods in the context of LLMs, the line of quantization work on small-sized language models (_e.g._, BERT) has not been included in this survey. |
Task: Does the document supports the claim? Answer with "Support" or "Unsupport". Class label: Unsupport Document: After a record-breaking run that saw mortgage rates plunge to all-time lows and home prices soar to new highs, the U.S. housing market finally is slowing. While demand and price gains are cooling, any correction is likely to be a modest one, housing economists and analysts say. No one expects price drops on the scale of the declines experienced during the Great Recession. Claim: The US housing market is going to crash soon. Class label: Support Document: The U.S. housing market is showing signs of strain, with home sales and prices slowing in many areas. Mortgage rates have risen sharply in recent months, and the number of homes for sale is increasing. This could be the beginning of a larger downturn, with some economists predicting a potential housing crash in the near future. Claim: The US housing market is going to crash soon.... Task: Which of the following is not an input type? (a) number (b) date (c) phone number (d) email address (e) all of these are valid inputs. |
**Activation Functions.** To obtain good performance, activation functions also need to be properly set in feed-forward networks. In existing LLMs, GeLU activations [270] are widely used. Specially, in the latest LLMs (_e.g._, PaLM and LaMDA), variants of GLU activation [262, 271] have also been utilized, especially the SwiGLU and GeGLU variants, which often achieve better performance in practice [266]. However, compared with GeLU, they require extra parameters (about 50%) in the feed-forward networks [272]. |
Furthermore, they discovered that in teams without a designated leader, agents spent most of their time giving orders to one another (-50% of communication), splitting their remaining time between sharing information, or requesting guidance. Conversely, in teams with a designated leader, 60% of the leader's communication involved giving directions, prompting other members to focus more on exchanging and requesting information. Their results demonstrate that agent teams are most effective when the leader is a human. |
Table 1 describes the basic statistics of the generated data. We generate a total of over 52K instructions and more than 82K instances corresponding to these instructions after filtering. |
\(\bullet\)_GPT-2_. Following a similar architecture of GPT-1, GPT-2 [26] increased the parameter scale to 1.5B, which was trained with a large webpage dataset WebText. As claimed in the paper of GPT-2, it sought to perform tasks via unsupervised language modeling, without explicit fine-tuning using labeled data. To motivate the approach, they introduced a probabilistic form for multi-task solving, _i.e._, \(p(output|input,task)\) (similar approaches have been adopted in [123]), which predicts the output conditioned on the input and task information. To model this conditional probability, language text can be naturally employed as a unified way to format input, output and task information. In this way, the process of solving a task can be cast as a word prediction problem for generating the solution text. Further, they introduced a more formal claim for this idea: "Since the (task-specific) supervised objective is the same as the unsupervised (language modeling) objective but only evaluated on a subset of the sequence, the global minimum of the unsupervised objective is also the global minimum of the supervised objective (for various tasks)" [26]15. A basic understanding of this claim is that each (NLP) task can be considered as the word prediction problem based on a subset of the world text. Thus, unsupervised language modeling could be capable in solving various tasks, if it was trained to have sufficient capacity in recovering the world text. These early discussion in GPT-2's paper echoed in the interview of Ilya Sutskever by Jensen Huang: "What the neural network learns is some representation of the process that produced the text. This text is actually a projection of the world...the more accurate you are in predicting the next word, the higher the fidelity, the more resolution you get in this process..."16. |
The **phi-3-small** model (7B parameters) leverages the tiktoken tokenizer (for better multilingual tokenization) with a vocabulary size of 100352 and has default context length \(8K\). It follows the standard decoder architecture of a 7B model class, having 32 layers and a hidden size of 4096. To minimize KV cache footprint, the model also leverages a grouped-query attention, with 4 queries sharing 1 key. Moreover **phi-3-small** uses alternative layers of dense attention and a novel blocksparse attention to further optimize on KV cache savings while maintaining long context retrieval performance. An additional 10% multilingual data was also used for this model. |
still room for performance improvement based on SSM. The SSMs pre-trained on the large-scale dataset, such as ImageNet [2], play a critical role in many downstream tasks, however, the base, large, and huge versions of SSMs are rarely released. We believe this may be an obstacle to the high performance on the CV tasks. |
\(\bullet\)_Data parallelism._ Data parallelism is one of the most fundamental approaches to improving the training throughput. It replicates the model parameters and optimizer states across multiple GPUs and then distributes the whole training corpus into these GPUs. In this way, each GPU only needs to process the assigned data for it, and performs the forward and backward propagation to obtain the gradients. The computed gradients on different GPUs will be further aggregated to obtain the gradients of the entire batch for updating the models in all GPUs. In this way, as the calculations of gradients are independently performed on different GPUs, the data parallelism mechanism is highly scalable, enabling the way that increases the number of GPUs to improve training throughput. Furthermore, this technique is simple in implementation, and most of existing popular deep learning libraries have already implemented data parallelism, such as TensorFlow and PyTorch. |
**Discrete Prompt Optimization.** Discrete prompt is typically composed of a sequence of natural language tokens. Despite that the form is simple and flexible, optimizing prompts in discrete space is a challenging problem due to the combinatorial huge search space. To automatically search effective prompts for downstream tasks, existing studies propose a wide spectrum of discrete prompt approaches, which are detailed as follows. |
Figure 4(b) shows that the LLaMA architecture may lag behind GPT2's scaling law by a factor of 1.3x, even for larger models. |
Chains refer to the method of linking multiple components in a sequence to handle complex tasks with Large Language Models (LLMs). This approach involves creating a series of interconnected steps or processes, each contributing to the final outcome. The concept of Chains is based on the idea of constructing a workflow where different stages or components are sequentially arranged. Each component in a Chain performs a specific function, and the output of one serves as the input for the next. This end-to-end arrangement allows for more complex and nuanced processing, as each stage can be tailored to handle a specific aspect of the task. Chains can vary in complexity and structure, depending on the requirements. In "PromptChainer: Chaining Large Language Model Prompts through Visual Programming" [162], the authors not only describe the main challenges in designing chains, but also describe a visual tool to support those tasks. |
Our findings show that continual pre-training is an efficient and promising alternative to re-training when updating LLMs on new data. Equipped with our strategies, practitioners can efficiently update their existing models (Rae et al., 2021; Hoffmann et al., 2022; Touvron et al., 2023; Jiang et al., 2023; Gemma Team et al., 2024) on newly created higher-quality datasets. These strategies might also be relevant for pre-training curricula such as the ones used by Gemma Team et al. (2024). With the strong incentive for our community to continue creating datasets of increasing quality, we only expect the need for continual pre-training to increase. |
It is easy to verify that this gives the same dataset distribution as Definition 2.2. Next, consider \(Q\) being fixed (thus the dataset \(\mathcal{Z}\) being fixed), we construct \(P_{1},P_{2},\cdots,P_{N+KD+NK}\) using the given model functions \(F^{\top}(W(\mathcal{Z}),R)\) and \(F^{\perp}(W(\mathcal{Z}),n,a,R)\). |
Looking ahead, we plan to explore Reinforcement Learning from Human Feedback (RLHF) or Reinforcement Learning from AI Instructed Feedback (RLAIF) to further align the models' output with human preferences. Moreover, we intend to adopt more advanced and effective quantization methods, such as GPTQ (Frantar et al., 2022), among others. |
However, it is important to acknowledge that low-fidelity synthetic human preference data might be limited in accurately reflecting nuanced human judgment (Argyle et al., 2023). Consequently, the resulting models may be less robust under "jail-breaking attacks" (Deshpande et al., 2023; Huang et al., 2023a), and may reveal strategically deceptive behavior even through safety training (Everitt et al., 2021; Pan et al., 2022; Steinhardt, 2022). To mitigate these risks, researchers must continuously refine and improve the quality and diversity of synthetic data, incorporating more complex and comprehensive scenarios that better capture the intricacies of human values and preferences. Additionally, combining synthetic data with real-world data, and creating synthetic data in an interactive environment which can be synced with the real world, are promising remedies. As the need for effective AI governance and regulation grows, synthetic data will play an increasingly vital role in enabling scalable oversight mechanisms that promote trust, accountability, and the development of AI technologies that are aligned with human values and societal expectations. |
we also dissect how the three components contribute to this overall lower bound. As shown in Figure 13, although the "value" component typically dominates, for certain hyperparameter settings, the "name" or "diversity" components can also be significant. This underscores the importance of proving our Theorem 3.2 lower bound, which is a sum of all three terms. |
The trained models were then tested on the PopQA dataset to evaluate their performance in a real-world question answering scenario. During inference, the NR-LLM and AR-LLM models were utilized as is, with corresponding instruction prompts provided, and outputs expected to be answers to the questions. Conversely, for the Adapt-LLM model, we followed the same prompt procedure as explained in Section 3.2. |
the advances in LLM performance. In our study, we center our analysis on the legal domain, with a specific focus on: _international law_, _professional law_, and _jurisprudence_. Those tasks respectively contain \(120\), \(1500\), and \(110\) examples. |
Claim verification with the entire booksWe prompt Claude-3-Opus and GPT-4-Turbo models with the entire book content and each claim in order to obtain the _Faithful_/_Unfaithful_ labels. Figure 10 shows confusion matrix comparing human labels to models' predictions. Table 32 presents a confusion matrix broken down by claim source (i.e., the model that generated the claim) and prediction model (Claude-3-Opus and GPT-4-Turbo). Figure 11 shows examples of misidentified labels by label-type and prediction model along with human labels and reasoning. Table 30 shows average precision (Pr) and recall (Re) broken down by model and book. |
**Backtracking.** Early methods mainly consider planning forward actions while maintaining the existing plan, thus likely leading to local optimal plans based on a short-term evaluation. To solve this, Tree of Thoughts [527] allows backtracking with search algorithms like breadth-first and depth-first search to make global planning. It refines the plan step by step by backtracking to the last state in the initial plan and choosing the next unexplored action. Furthermore, some studies [535, 446] utilize feedback signals to revise the entire plan. For example, DEPS [535] selects a better plan according to feedback signals, while TIP [446] adds feedback signals to prompts for the LLM-based planner to revise each step in the initial plan. |
We computed the perplexity of our trained models on the validation sets of LM1B and Wiki-40B, and on subsets of the C4 validation set (Figure 2). For the base size, we observe that all models have similar perplexity on the original C4 validation set and on validation set examples that were identified as unique (no near-duplicate in either train or validation). However, both models trained on deduplicated data have significantly higher perplexity on validation set examples that have duplicates in the training set than the model trained on the original C4. ExactSubstr-deduplicated results in higher perplexity than NearDup-deduplicated. These trends holds true for the XL sized model as well. While this may suggest ExactSubstr duplication results in models least overfit on the train set, note that both of these techniques have used separate duplicate thresholds and a different choice of thresholds could change the results. |
Although our framework can seamlessly accommodate various model combinations in a plug-and-play manner, we have restricted our experimental reporting to FLAN-T5. In a similar vein, this work only explores the task of multi-hop QA, leaving an open question about generalizability to other reasoning tasks. We anticipate future research endeavors to extend the application of our approach across diverse domains requiring sophisticated reasoning. Lastly, due to resource constraints, we were unable to collect extensive human annotations for established aspect evaluation metrics. |
Using the above datasets and baselines, we evaluate our model RAFT and demonstrate the effectiveness of RAFT in Tab. 1. We see that RAFT consistently and significantly outperforms the baselines. Compared with the base Llama-2 instruction-tuned model, RAFT with RAG does much better in terms of extracting information as well as being robust towards distractors. The gain can be as big as 35.25% on Hotpot QA and 76.35% on Torch Hub evaluation. Compared with DSF on the specific dataset, our model does better at relying on the provided context to solve the problem. RAFT does much better on tasks like HotpotQA and HuggingFace datasets (30.87% on HotpotQA and 31.41% on HuggingFace). Note that for PubMed QA, since it is a binary yes/no question, we don't observe significant gains when we compare our model with DSF + RAG. Even compared with a much larger and better model GPT-3.5, RAFT demonstrates significant advantages. |
We describe the two data sources for curating our domain corpus: Financial News CommonCrawl and SEC filings. |
**Multi-stage Instruction Tuning.** For instruction tuning, there are two kinds of important instruction data, namely task-formatted instructions and daily chat instructions. Generally, the former has a significantly larger volume than the latter. It is important to balance the training with the two kinds of instruction data. In addition to carefully mixing different instruction data, we can also adopt a multi-stage instruction tuning strategy [352], where LLMs are first fine-tuned with large-scale task-formatted instructions and subsequently fine-tuned on daily chat ones. To avoid the capacity forgetting issue, it is also useful to add an amount of task-formatted instructions at the second stage. Actually, such a multi-stage tuning strategy can be also applied to other settings for instruction tuning. For example, we can schedule different fine-tuning stages with progressively increased levels on difficulty and complexity, and gradually improve the capacities of LLMs to follow complex instructions. |
We perform systematic perturbations on each question/answer pair (as visualized in Figure 1. In three datasets with numerical answers (Drug Dosages, Sports Records, Latest News), we produce ten modifications that act as multipliers on the original value: \(0.1,0.2,0.4,0.8,1.2,1.5,2.0,3.0,5.0,10.0\). In the Wikipedia Years dataset, we perform ten absolute modifications in increments of 20 years for a range of \([-100,100]\). For the Wikipedia Names and Locations, the discrete categories required more hand-crafted levels of variation. For each, we performed three categorical perturbations via prompting: slight, significant,and comical. We provide the full prompts used in our study in the Appendix. For example, for a name like _Bob Green_, a slight modification implies a small tweak to another real name (_Rob Greene_), whereas a significant modification produces a similar but fictitious name (_Bilgorn Grevalle_), and a comical modification is an absurd variant (_Blob Lawnface_). For a city name like _Miami_, a slight modification changes the name of the most similar city (_Fort Lauderdale_), a significant modification produces a fictitious city name (_Marisole_), and a comical modification produces an absurd variant (_Miameme_). Because of differences in how each modified fact might appear in the retrieved text, we utilize GPT-4 to generate the perturbed excerpts for drug dosages and news. Each modified fact is replaced in the original retrieved text. Then, both the question and context are posed to GPT-4, from which the answers, along with the log probabilities of the output tokens, are collected. |
We employ the following datasets for adapting the LLaMA2-13B model to Traditional Chinese through continual pretraining and fine-tuning. |
Furthermore, we incorporate a behavior cloning (BC) regularizer (Hejna et al., 2023) to ensure that \(\pi_{\theta}\) does not deviate from the preferred data distribution: |
Closed-Source Models.Multiple technology companies have successfully developed highly proficient LLMs while choosing not to publicly release them. These models are referred to as closed-source models. For our research, we incorporate a substantial number of these models as our baselines. Specifically, our baselines encompass the following: (i) OpenAI's GPT3.5&4 [2], Code-Davinci-002 [38], Code-Cushman-001 [38], and Codex [16]; (ii) Google's Bard, PaLM 2 [4], PaLM [3], and LaMDA [40]; (iii) Google DeepMind's AlphaCode [12]; and (iv) Anthropic's Claude. |
Figure 4: **Toxic content in RefinedWeb is distributed similarly to The Pile. |
As opposed to zero-shot prompting of a large language model where a user types into an open-ended text field and gets a result without additional input, agents allow for more complex interaction and orchestration. In particular, agentic systems have a notion of planning, loops, reflection and other control structures that heavily leverage the model's inherent reasoning capabilities to accomplish a task end-to-end. Paired with the ability to use tools, plugins, and function calling, agents are empowered to do more general-purpose work. |
Table 5 provides an example of responses to a mathematical question by existing models and our model. By merging a Japanese language model, we not only improve our capability to understand and use Japanese in reading and writing but also expand our knowledge about Japan. This example requires both mathematical reasoning and Japanese-specific knowledge, specifically that Setsubun is the day before the beginning of spring (Risshun). Notably, only our merged model provides the correct answer. Even when the question is translated into English, the English math model WizardMath-7B-V1.1 fails to answer correctly, demonstrating that our merged model is superior to a combination of machine translation and an English math model. |
\(\bullet\)_Unigram tokenization._ Unlike BPE and WordPiece, Unigram tokenization [225] starts with a sufficiently large set of possible substrings or subtokens for a corpus, and iteratively removes the tokens in the current vocabulary until the expected vocabulary size is reached. As the selection criterion, it calculates the yielded increase in the likelihood of training corpus by assuming that some token was removed from current vocabulary. This step is conducted based on a trained unigram language model. To estimate the unigram language model, it adopts an expectation-maximization (EM) algorithm: at each iteration, we first find the currently optimal tokenization of words based on the old language model, and then re-estimate the probabilities of unigrams to update the language model. During this procedure, dynamic programming algorithms (_i.e.,_ the Viterbi algorithm) are used to efficiently find the optimal decomposition way of a word given the language model. Representative models that adopt this tokenization approach include T5 and mBART. |
queries, which is a factor of \(\log_{2}(l)/\log_{2}(N)\) worse. For \(N=300\) and \(l\approx 100{,}000\), this is only a factor of \(2\). |
We introduce an exposition of the datasets employed in our work for evaluating the performance in terms of text generation and toxicity rejection abilities. Our experiments consistently employed approach for the generation of responses by LLaMA-based models involves the implementation of a greedy decoding strategy. In the case of Mistral-based models, the generation of responses was facilitated by setting the repetition penalty Keskar et al. (2019) to 1.15. |
In this section, we examine a few key studies and sample frameworks with multi-agent architectures, such as Embodied LLM Agents Learn to Cooperate in Organized Teams, DyLAN, AgentVerse, and MetaGPT. We highlight how these implementations facilitate goal execution through inter-agent communication and collaborative plan execution. This is not intended to be an exhaustive list of all agent frameworks, our goal is to provide broad coverage of key themes and examples related to multi-agent patterns. |
Figure A9: Studying the effect of training set set size on cosine distance to nearest-neighbor in training set. On the x-axis, we vary the size of the training set (by randomly sampling the original training set), and the y-axis represents distance to nearest neighbor in the training set (averaged across the validation set). We observe that cosine distance to the training set increases with smaller training sets, but the relative ordering of validation sets (with respect to mean distance to training set) remains the same. |
In this section, we consider the fixed compute setting, where we curate and train on a fixed token budget by jointly increasing the size of the source dataset \(D_{source}\) and decreasing \(R\) (the fraction of the \(D_{source}\) which is selected), such that the target token budget remains constant. This setting is analogous to the most common paradigm for LLM training. As \(D_{source}\) grows and \(R\) decreases, we select from larger and larger initial datasets, resulting in a larger set of high-quality data points to select from and increasing the overall quality of the selected set. For clarity, we plot performance as a function of the ratio of the \(D_{source}\) to \(D_{target}\). For each setting, we evaluate the performance of a baseline, SemDeDup alone, SSL Prototypes alone, and our proposed method D4. |
Unfortunately this has several significant drawbacks: the threshold has to be independent of \(h\) (or learning the threshold would reveal \(h\)); the system would need to maintain state of all user queries to the API; and preventing Sybil attacks requires a global pool of user queries, which can present significant privacy risks (Debenedetti et al., 2023). |
\(\bullet\)_The effect of CoT prompting components._ The major distinction between CoT prompting and standard prompting is the incorporation of reasoning paths prior to the final answer. Thus, some researchers investigate the effects of different components in the reasoning paths. Specifically, a recent study identifies three key components in CoT prompting, namely _symbols_ (_e.g.,_ numerical quantities in arithmetic reasoning), _patterns_ (_e.g.,_ equations in arithmetic reasoning), and _text_ (_i.e.,_ the rest of tokens that are not symbols or patterns) [522]. It is shown that the latter two parts (_i.e.,_ patterns and text) are essential to the model performance, and removing either one would lead to a significant performance drop. However, the correctness of symbols and patterns does not seem critical. Further, there exists a symbiotic relationship between text and patterns: the text helps LLMs to generate useful patterns, and patterns aid LLMs to understand tasks and generate texts that help solve them [522]. |
In Appendix Figure 8, we aim to provide some insight into the kinds of tokens where the improvements occur. Namely, while thinking appears to help for many tokens in the example, inspection suggests it disproportionately help to predict tokens where recalling relevant information is useful, such as the name of an applicable theorem or the start of the next step in a proof. Notably, this would align well with the framing proposed by Prystawski et al. (2024). |
With respect to retrieval, our system nears the performance of the crowd when there are at least 5 relevant articles. We further observe that as the number of articles increases, our Brier score improves and surpasses the crowd's (Figure 3(a)). Intuitively, our system relies on high-quality retrieval, and when conditioned on more articles, it performs better. |
Last, we denote the _type of the fact composition_ of a two-hop prompt as "\(\operatorname{type}(r_{2})\) of \(\operatorname{type}(e_{1})\)'s \(\operatorname{type}(r_{1})\)", where "\(\operatorname{type}(e_{1})\)'s \(\operatorname{type}(r_{1})\)" represents the type of the bridge entity's descriptive mention in the prompt. For example, the fact composition type of \(\tau(\texttt{{mother}}(\texttt{{singer}}(\texttt{{Suspresition}})))\) would be "mother of song's singer". |
We thus wonder whether we can obtain the losses of different mixture proportions without training at large scales. Fortunately, this idea gains endorsement from existing experiences that verify the impressive extrapolation of scaling laws of training steps and model sizes. In particular, OpenAI (2023) predicts the loss of the target model with merely \(1,000\times-10,000\times\) less compute. As a consequence, we can train small models with few training steps on different mixtures, and fitting scaling laws on them to estimate the losses of the target model size and the target number of training steps. We can then use the predicted losses to fit a data mixing law and search for the optimal mixture. The proposed pipeline is illustrated in Fig. 1 with details depicted in Alg. 1. |
Figure 7: Human evaluation performance of GPT3SELF-INST models tuned with different sizes of instructions. \(x\)-axis is in log scale. The smallest size is 175, where only the seed tasks are used for instruction tuning. We also evaluate whether improving the data quality will further improve the performance by distilling the outputs from InstructGPT003. We see consistent improvement from using larger data with better quality. |
However, Adapt-LLM consistently determines when additional context is required to answer a question accurately. Across both the NQ and SQuAD training datasets, Adapt-LLM exhibits significantly higher accuracy when retrieving context compared to the NR-LLM model's accuracy without context (as indicated in the \(\langle\)RET\(\rangle\) column of Table 3). Specifically, for the NQ dataset, the accuracy of the Adapt-LLM model when requesting context is 33.04%, whereas the accuracy of the NR-LLM model without context retrieval is notably lower at 14.65%. Similarly, for the SQuAD dataset, Adapt-LLM achieves an accuracy of 33.40% with context retrieval, whereas the NR-LLM model's accuracy without context is substantially lower at 9.94%. |
_In summary, we find that models continually pre-trained with a combination of LR re-warming, LR re-decaying, and replay exceed the average performance (e.g., w.r.t. final validation loss and evaluation accuracy) of baselines trained from random initialization on individual datasets and achieve comparable evaluation performance on average to the expensive re-training baseline (trained on the union of both datasets). |
\(\bullet\)_Heuristic approaches._ Due to their simplicity and low costs, existing work widely adopts heuristic methods to select demonstrations. Several studies employ a \(k\)-NN based retriever to select examples that are semantically relevant to the query [428, 480]. However, they perform the selection individually for each example, rather than evaluating the example set as a whole. To resolve this issue, diversity-based selection strategies are proposed to choose the most representative set of examples for specific tasks [481, 482]. Furthermore, in [483], both relevance and diversity are taken into consideration when selecting demonstrations. |
Re2G (Glass et al., 2022) introduces a sequence-pair classification approach for re-ranking, utilizing a BERT transformer to simultaneously analyze the query and passage. This interaction model, employing cross-attention between sequences, offers a contrast to the representation model typically used in initial retrieval phases. PROMPTTAGATOR (Dai et al., 2023) also employs a cross-attention model for re-scoring. Its "Lift Yourself Up" strategy iteratively selects the best candidate from a pool for further generation rounds, progressively improving content quality via self-generated content. |
Specifically, for a pre-trained weight matrix \(W_{0}\in R^{d\times k}\), LoRA constrains its update by representing the latter with a low-rank decomposition \(W_{0}+\Delta W=\hat{W}_{0}+BA\), where \(B\in R^{d\times r}\,,\,A\in R^{r\times k}\), and the rank \(r\ll min(d,k)\). During training, \(W_{0}\) is frozen and does not receive gradient updates, while \(A\) and \(B\) contain trainable parameters. It is worth mentioning that both \(W_{0}\) and \(\Delta W=BA\) are multiplied with the same input, and their respective output vectors are summed coordinate-wise. For \(h=W_{0}x\), their modified forward pass yields: \(h=W_{0}x+\Delta Wx=W_{0}x+BAx\). Usually a random Gaussian initialization is used for \(A\), and zero initialization for \(B\), so \(\Delta W=BA\) is zero at the beginning of training. They then scale \(\Delta Wx\) by \(\alpha r\), where \(\alpha\) is a constant in r. |
**LLaMA**[12]: LLaMA is a series of foundation models developed by Meta AI, trained on publicly available English-dominate corpus. The corpus includes CommonCrawl, C4, Github code, Wikipedia, Books, and ArXiv papers, amounting to approximately 1.4 trillion tokens. Among these sources, Wikipedia consists of multilingual text, contributing 4.5% of the total corpus. It covers 20 languages that use either the Latin or Cyrillic scripts. LLaMA achieves state-of-the-art results for foundation models of its size. For example, LLaMA-13B with just 13 billion parameters outperforms the much larger 175B parameter GPT-3 on many NLP benchmarks. We consider LLaMA-7B and LLaMA-13B in our experiments. |
We observe that all schedules perform relatively similarly, however, the two infinite schedules have the advantage that we can start annealing at any time during the constant learning rate phase on each split, while the repeated cosine decays require knowing the number of tokens in advance. Additionally, we see negligible forgetting across dataset boundaries for the infinite LR schedules. While the losses initially increase sharply due to re-initializing the optimizer states, the infinite schedules models immediately recover from this. |
Figure 2: Comparison of parity scores between monolingual (English) tokenizer and multilingual tokenizers applied multi-lingual documents. |
To investigate _why_ the LLaMA architecture is inferior to GPT2 in the 100-exposure (insufficiently trained) setting, we closely examine LLaMA by gradually modifying its architecture _back towards_ GPT2 to identify the key architectural changes. We start by tying weights, as this enhances tiny LLaMA model's capacity in the 1000-exposure setting (Result 5). |
_BytePairEncoding_ is originally a type of data compression algorithm that uses frequent patterns at byte level to compress the data. By definition, this algorithm mainly tries to keep the frequent words in their original form and break down ones that are not common. This simple paradigm keeps the vocabulary not very large, but also good enough to represent common words at the same time. Also morphological forms of the frequent words can be represented very well if suffix or prefix is also commonly presented in the training data of the algorithm. |
For more details on LLM-based AI agents see recent survey [172, 173, 174]. |
\(\bullet\)_Unified Memory_. This structure only simulates the human shot-term memory, which is usually realized by in-context learning, and the memory information is directly written into the prompts. For example, RLP [30] is a conversation agent, which maintains internal states for the speaker and listener. During each round of conversation, these states serve as LLM prompts, functioning as the agent's short-term memory. SayPlan [31] is an embodied agent specifically designed for task planning. In this agent, the scene graphs and environment feedback serve as the agent's short-term memory, guiding its actions. CALYPSO [32] is an agent designed for the game Dungeons & Dragons, which can assist Dungeon Masters in the creation and narration of stories. Its short-term memory is built upon scene descriptions, monster information, and previous summaries. DEPS [33] is also a game agent, but it is developed for Minecraft. The agent initially generates task plans and then utilizes them to prompt LLMs, which in turn produce actions to complete the task. These plans can be deemed as the agent's short-term memory. In practice, implementing short-term memory is straightforward and can enhance an agent's ability to perceive recent or contextually sensitive behaviors and observations. However,due to the limitation of context window of LLMs, it's hard to put all memories into prompt, which may degrade the performance of agents.This method has high requirements on the window length of LLMs and the ability to handle long contexts. Therefore, many researchers resort to hybrid memory to alleviate this question. However, the limited context window of LLMs restricts incorporating comprehensive memories into prompts, which can impair agent performance. This challenge necessitates LLMs with larger context windows and the ability to handle extended contexts. Consequently, numerous researchers turn to hybrid memory systems to mitigate this issue. |
**Action Production**: Different from ordinary LLMs, where the model input and output are directly associated, the agent may take actions via different strategies and sources. In the following, we introduce two types of commonly used action production strategies. (1) _Action via Memory Recollection_. In this strategy, the action is generated by extracting information from the agent memory according to the current task. The task and the extracted memories are used as prompts to trigger the agent actions. For example, in Generative Agents [20], the agent maintains a memory stream, and before taking each action, it retrieves recent, relevant and important information from the memory steam to guide the agent actions. In GITM [16], in order to achieve a low-level sub-goal, the agent queries its memory to determine if there are any successful experiences related to the task. If similar tasks have been completed previously, the agent invokes the previously successful actions to handle the current task directly. In collaborative agents such as ChatDev [18] and MetaGPT [23], different agents may communicate with each other. In this process, the conversation history in a dialog is remembered in the agent memories. Each utterance generated by the agent is influenced by its memory. (2) _Action via Plan Following_. In this strategy, the agent takes actions following its pre-generated plans. For instance, in DEPS [33], for a given task, the agent first makes action plans. If there are no signals indicating plan failure, the agent will strictly adhere to these plans. In GITM [16], the agent makes high-level plans by decomposing the task into many sub-goals. Based on these plans, the agent takes actions to solve each sub-goal sequentially to complete the final task. |
Figure 2: Above is the data processing flow and deduplication ratios, below is a schematic diagram of similar line deduplication. |
To explore how language models learn at the token level, we initially examined training dynamics, particularly how the token-level loss evolves during usual pretraining. In SS2.1, we evaluated the model's token perplexity at different checkpoints and categorized tokens into different types. Our findings reveal that significant loss reduction is limited to a select group of tokens during training. Many tokens are "easy tokens" that are already learned, and some are "hard tokens" that exhibit variable losses and resist convergence. These tokens can lead to numerous ineffective gradient updates. |
InvariantLAMAWe create InvariantLAMA, a subset of the LAMA (Petroni et al., 2019) task for measuring _time-invariant_ knowledge which might be forgotten during CKL. Among the 41 relations of the T-REx (Elsahar et al., 2018) subset of LAMA, we manually select 28 relation types that probe for _time-invariant_ instances (a full list of _time-invariant_ relations are provided in Appendix B.1). We also remove instances where the answer overlapped with the subject following Poerner et al. (2019) since the answers for these instances can be inferred from the cloze statement itself. Lastly, we remove instances where the answer was a non-entity to leave only the instances that require world knowledge for prediction on their answers (Guu et al., 2020). |
The intrinsic evaluation aims to assess the generated output of tokenizers based on _fertility_ and _parity_. Furthermore, the tokenizer's vocabulary overlap with other tokenizers is computed. The intrinsic evaluation does not assess the impact of tokenizers on the model performance. |
For GPT\({}_{0}\) and GPT\({}_{1/4}\), we use the same learning rates as specified in Parameter 1. |
\begin{table}
\begin{tabular}{c|c c c|c c} \hline \hline Base & Accuracy & Correct GCD & Correct predictions \\ \hline
10 & 85 & 13 & \{1,2,4,8,16\} & \{1,5,25\} \\
420 & 97 & 38 & \{1,2,4,8,16\} & \{1,3,9\} & \{1,5,25\} \\
1000 & 94 & 22 & \{1,2,4,8,16\} & \{1,5,25\} & \{1,3\} \\
2017 & 85 & 4 & \{1,2\} & \{1,3\} & \\
2023 & 91 & 16 & \{1,2,4\} & \{1,3\} & \{1,7\} & \{1,17\} \\
4913 & 93 & 17 & \{1,2,4\} & \{1,3\} & \{1,5\} & \{1,17\} \\ \hline \hline \end{tabular}
\end{table}
Table 1: **Initial performances.**\(4\)-layer transformers trained to predict GCD, on 300 million examples. Our _test_ set only contains GCD up to \(100\), and accuracy is computed on a reweighted test with equal occurance of each GCD. Thus, the Correct GCD lists all those that can be formed from the correct predictions by forming products across the sets (within the first 100 GCD). We freeze the 0th generation model at this stage and use its prediction to generate synthetic data. For each GCD outside the set of its correct predictions, the model will predict the largest GCD it has learned that divides the ground truth. |
This score evaluates the similarity between the two probability distributions by computing and averaging their cross-entropy, ensuring symmetry in the evaluation. The symmetry from averaging mitigates sensitivity to the individual distribution's entropy levels, aiming for equal treatment of divergences in both directions. |
The evaluated splits and numbers of examples are summarized in Table 5. For English datasets, we follow Gopher [32] and Chinchilla [16]'s selection of evaluation splits. For Chinese datasets, we use the validation split when the ground labels are always available. For CLUEWSC, the size of the validation set is too small (100), so we combine the train and validation splits. GSM8K-Chinese is translated from GSM8K with machine translation and human proofreading. |
and coding text and was developed to be the best general-purpose large language model (LLM) that can fit on a single NVIDIA A100 or H100 GPU. |
In summary, MiniCPM propounds a new stage in the development of small language models, exemplifying the latent potential within SLMs and advocating for a more scientific and sustainable approach toward scaling up LLMs. |
Continuously improve the model: To ensure that the assistant continues to perform well, you need to continuously monitor its performance and collect feedback from users. This feedback can be used to retrain and fine-tune the model. |
Ji-Rong Wen is a full professor, the executive dean of Gaoling School of Artificial Intelligence, and the dean of School of Information at Renmin University of China. He has been working in the big data and AI areas for many years, and publishing extensively on prestigious international conferences and journals. |
The results are in Table 2. As a point of reference, the RMS between a randomly initialized model and the actual weights is \(2\cdot 10^{-2}\), over \(100\)-\(500\times\) higher than the error of our reconstruction. |
Figure 2: Infini-Transformer (top) has an entire context history whereas Transformer-XL (bottom) discards old contexts since it caches the KV states for the last segment only. |
When zooming in to when the mixture models learn to predict GCD that are "unlearnable" with an AI-trained model, the grokking effect becomes more apparent. |
**Theorem 1**.: _When \(\pi_{\text{ref}}\) is defined as \(\pi_{w}\), an ideal policy that precisely aligns with the true data distribution of preferred data, the DPO loss \(\mathcal{L}(\pi_{\theta};\pi_{w})+C\) is upper bounded by \(\mathcal{L}(\pi_{\theta};U)\), where \(C\) is a constant._ |
Our study primarily addressed a template-based QA task, suggesting future research could tackle more complex QA challenges, such as multi-hop QA Ho et al. (2020) or Conversational QA Christmann et al. (2022). Furthermore, we noted that our use of Zephyr for synthetic data generation has limitations in following Chain of Thought (CoT), highlighting the potential benefits of advanced data generation techniques to enhance data quality and reduce fine-tuning cost. |
In this subsection, we explore the effect of compute-equivalent replay when continually pre-training models that re-warm and re-decay the learning rate. |
In Table 4, we present the results of the reliability experiment. Llama-2-7b-chat consistently outperforms Llama-2-7b on the truthfulness and toxicity benchmarks. Notably, after continual pre-training, the models demonstrate inferior performance compared to Llama-2-7b-chat on the two benchmarks. This trend is particularly pronounced in the truthfulness analysis benchmark for English and the toxicity benchmark for Traditional Chinese. Furthermore, we observed that models with a preference for generating Chinese output exhibit inferior performance in the toxicity benchmark. Regarding the bias benchmark, we can observe that Llama-2-7b-chat outputs more positive text than Llama-2-7b. After continual pre-training, the models' outputs have relatively more negative sentiment scores than Llama-2-7b-chat. |
Large Language Models (LLMs) trained on internet-scale data perform extremely well on tasks relating to reasoning, common-sense, and world-knowledge. In particular, the range of knowledge captured by LLMs like GPT-4 (OpenAI, 2023) and Llama-2 (Touvron et al., 2023b) is significantly wider than that of an average person. However, recent research (Berglund et al., 2023; Allen-Zhu & Li, 2023a;b) uncovered a curious flaw in the knowledge capabilities of LLMs, coined the _reversal curse_. They experimentally showed that even the currently most powerful LLMs are incapable of "reversing" facts they had learned. For example, standard LLMs cannot correctly answer "What's the capital of France?" even if the training data contains "Paris is the capital of France", unless it also contains text where "France" is followed by "Paris", such as "As the capital of France, Paris has...". |
**Parameter 3** (Figure 10).: When dealing with models of significantly different sizes for LoRA finetuning, it's necessary to adjust the LoRA rank sizes. In [3], the authors primarily used a rank \(r^{\prime}=128\) update for the embedding layer and ranks \(r=8\) or \(16\) for the query/value matrices, with their base model being either GPT2-12-12 or GPT2-12-20. |
Legal Instruction ConstructionWe synthetically generate comprehensive conversations addressing fundamental legal competencies across multiple legal document types Ding et al. (2023). We leverage a Mistral-7B-instruct to transform legal texts augmented with metadata into coherent conversations. The methodology involves initiating the conversation with \(3\) predefined turns: (1) the user articulates a request related to the legal document, (2) the assistant responds by rephrasing the metadata (e.g., document type, date, name of a judge), and (3) the user prompts the assistant to elaborate on its reasoning. Subsequently, we extend the conversation through a series of turns, where a user model progressively poses more specific questions to grasp the assistant's reasoning. Simultaneously, an assistant model provides in-depth insights. An illustrative example is presented in Figure 2. Notably, we ensure the exclusion of the test set from existing benchmarks. |
Each hazard in the AI Safety v0.5 benchmark has its own test, and each test contains test items (prompts). In this section, we outline our approach to creating these test items. |
In constructing the pre-training corpus, we remove any possible duplicates via document-level exact and near-deduplication (Jennings et al., 2023). We additionally applied document-level quality filtering across our corpus using a language-model based filtering approach similar to (Wenzek et al., 2019) in addition to a series of heuristic filters as described in (Rae et al., 2022) and (Raffel et al., 2020). |
While insightful, human annotation of faithfulness in book-length summarization is simply not scalable: our annotations cost $40 USD per summary for a total cost of $5.2K USD, which is prohibitively expensive for usage during model development and with bigger corpora. In this section, inspired by methods such as FactScore (Min et al., 2023) and BooookScore (Chang et al., 2023b), we develop LLM-powered automatic raters of faithfulness that operate at the claim level. However, our best method, which relies on prompting Claude-3-Opus with the entire book to verify a single claim, is expensive and unreliable at detecting unfaithful claims in Tables, suggesting important directions for future work. |
PersonA: Yes, you can preserve it by freezing or canning it when you're done making it. This allows you to store it for up to a year and enjoy its flavors whenever you want. |
**D4**: As mentioned previously, we find many instances of duplicate-driven clusters: clusters of templated text or extremely semantically redundant information that are not removed by MinHash. These regions of embedding space tend to be very dense and cause k-means to waste valuable cluster assignments on duplicated text. This biased clustering could also negatively to impact the effectiveness of SSL Prototypes since many clusters will be entirely driven by duplicates instead of more topical coherence. |
Figure 15 \(|\) R-GSM example where both the original and the reordered problems were correctly solved by all LLMs in our evaluation. |
Figure 5: **How many golden documents to involve?** We study the hyperparameter \(P\%\) which indicates what fraction of the training data contains the oracle document(s) in its context. Results on NQ, TQA and HotpotQA suggest that mixing a fraction of data that does not have the oracle document in its context is helpful for in-domain RAG. |
The concept of aligning models with human preference originally emerged in the context of training simple robots in virtual environments or Atari games (Christiano et al., 2017; Ibarz et al., 2018) and was subsequently applied to various Natural Language Processing tasks. For example, Ziegleret al. (2019) employed Proximal Policy Optimization (PPO) Schulman et al. (2017), an RL algorithm, to fine-tune GPT-2 Radford et al. (2019) based on human preferences, improving its performance across four NLP tasks. Building on these prior works, Ouyang et al. (2022) introduced InstructGPT, a model based on GPT-3 Brown et al. (2020), which they further fine-tuned using reinforcement learning from human feedback (RLHF). Additionally, Ouyang et al. (2022) formally outlined the RLHF algorithm, which encompasses SFT, reward model (RM) training, and reinforcement learning via Proximal Policy Optimization (PPO). The RLHF algorithm not only enhances the model's ability to follow instructions but also shows promising potential to mitigate the generation of toxic or harmful content. |
Figure 5 reports the validation loss during continual pre-training of 405M parameter models for weak (top) and strong (bottom) shifts. Table 3 reports the average (over the last 100 iterations) final loss value for these models. Since the transition from English to German represents a starker distribution shift than Pile to SlimPajama, training on German leads to significantly more forgetting on Pile (\(\mathcal{D}_{0}\)) for the continually pre-trained model without replay (0.27 vs 1.39 for weak and strong shifts respectively). However, choosing 25% replay to handle the starker shift significantly reduces the amount of forgetting on Pile, a reduction of 1.23 in terms of final loss. When comparing continually pre-trained models to baselines trained exclusively on \(\mathcal{D}_{1}\), we observe that the continually pre-trained models always have lower validation loss across both distribution shifts. When comparing the continually pre-trained models with the \(\mathcal{D}_{0}\cup\mathcal{D}_{1}\) baselines we find that both models achieve nearly identical (weak shift) or identical (strong shift) average final validation losses. This shows that for strong and weak distribution shifts, a simple and scalable combination of LR re-warming, LR re-decaying, and replay can achieve similar performance to the \(\mathcal{D}_{0}\cup\mathcal{D}_{1}\) baseline. |
Question: Is participating in the stress at work survey mandatory? Answer: No, it is voluntary. Question: Will all answers be saved anonymously? Answer: Yes, they will. Question: Who is eligible to take the questionnaire? Answer: Only individuals with work experience, whether part-time or full-time. Question: What happens if someone is not eligible to take the questionnaire? Answer: They will not be able to answer some of the questions. Question: Can you provide a link to all language versions of the questionnaire? Answer: Yes, here is the link. |
Subsets and Splits