text
stringlengths
4
4.47k
We meticulously filter, deduplicate, and curate all this data, resulting in a refined dataset comprising \(600\)K instructions.
_Not all data are useful for knowledge acquisition. For instance, while Wikipedia is full of valuable information, the Common Crawl of web pages may not be (there are also many pieces of information on those webpages, but they may not be useful for a language model to learn, such as the serial number of a random product). How does the presence of low-quality data impact the scaling laws of useful knowledge capacity?
To examine the ability of tool manipulation, existing work mostly adopts complex reasoning tasks for evaluation, such as mathematical problem solving (_e.g._, GSM8k [184] and SVAMP [592]) or knowledge question answering (_e.g._, TruthfulQA [556]), where the successful utilization of tools is very important for enhancing the required skills that LLMs are incapable in (_e.g._, numerical calculation). In this way, the evaluated performance on these tasks can reflect the ability of LLMs in tool manipulation. To teach LLMs to utilize tools, existing studies add exemplars using tools in context to elicit LLMs [443], or fine-tune LLMs on simulated data about tool utilization [693, 80]. It has been found that with the help of tools, LLMs become more capable of handling the issues that they are not good at, _e.g._, equation calculation and answering timely questions [80, 448]. However, as the number of available tools increases, the limited context length of LLMs may pose challenges in describing and demonstrating extensive tool APIs. To address this issue, existing work retrieves the usage of relevant tools, or encoding tool information as tokens within the embedding space [702, 703, 704].
Accuracy: Evaluates whether the answer is precise and correct, with accurate information. A high-quality answer should be factually reliable.
Automated evaluation introduces some errorsSUTs' responses are assessed automatically using LlamaGuard [59]. We validated the high accuracy of this model in Section 5.2.1. However, it does make some errors, which could result in incorrect grades being assigned to some SUTs.
Figure 2: Yi’s pre-training data mixture. Overall our data consist of 3.1T high-quality tokens in Both English and Chinese, and come from various sources. Our major differences from existing known mixtures like LLaMA [76] and Falcon [56] are that we are bilingual, and of higher quality due to our more rigorous cleaning pipeline.
After meticulously identifying influential factors in predicting the loss trajectory, we provide transparent, step-by-step guidelines on how to estimate all constant terms in scaling-law formulas by training on models with only 1M\(\sim\)60M parameters. Using these estimated formulas from small models, we showcase the capability to accurately predict various attributes for models with up to 33B parameters before their training starts. By unravelling the mystery of scaling laws and making them easily accessible to everyone, our objective is to shift the understanding of scaling laws from theoretical concepts to practical implementation, thereby aiding future research in pre-training large language models in a more principled manner.
We give a list of detailed information of the models we use below. The weights of the open models are available publicly on Hugging Face, and we primarily use Together AI's serving API to access them. All cut-offs are based on official statements.
In addition to the public available datasets, one of the key elements for stage-2 is to obtain a high-quality document-grounded conversational QA dataset. We create a human-annotated conversational QA (called HumanAnnotatedConvQA) dataset only consisting of 7k dialogues. To build this dataset, we first collected 7k documents covering diverse topics from Internet. Then, we instruct the annotator to act both as a curious user asking questions (and follow-up questions) about the document and as a agent to give the answers. We create a multi-turn conversation for each document, resulting in a total of 7k conversational QA dialogues with an average of 5 user-agent turns per dialogue. Details of data collection guideline can be found in Appendix G.
**Reddit Links.** Reddit is a social media platform that enables users to submit links and text posts, which can be voted on by others through "upvotes" or "downvotes". Highly upvoted posts are often considered useful, and can be utilized to create high-quality datasets. WebText [26] is a well-known corpus composed of highly upvoted links from Reddit, but it is not publicly available. As a surrogate, there is a readily accessible open-source alternative called OpenWebText [157]. Another corpus extracted from Reddit is PushShift.io [158], a real-time updated dataset that consists of historical data from Reddit since its creation day.
Future Work.Although our _WizardCoder_ demonstrates impressive coding performance, as depicted in Figure 1, our model still falls significantly behind the SOTA LLM, GPT4. Therefore, future work will prioritize the enhancement of the Code _Evol-Instruct_ method to further augment the performance of our model.
**Summary**.
\(\bullet\)_Underperforming specialized generation._ Although LLMs have learned general language patterns to generate coherent text, their proficiency in generation might be constrained when dealing with a specialized domain or task. For instance, a language model that has been trained on general web articles may face challenges when generating a medical report which involves many medical jargon and methods. Intuitively, domain knowledge should be critical for model specialization. However, it is not easy to inject such specialized knowledge into LLMs. As discussed in recent analyses [47, 648], when LLMs are trained to exhibit some specific ability that allows them to excel in some areas, they might struggle in others. Such an issue is related to _catastrophic forgetting_[649, 650] in training neural networks, which refers to the conflict phenomenon of integrating new and old knowledge. Similar cases also occur in human alignment of LLMs, where _"alignment tax"_[66] (_e.g.,_ a potential loss in the in-context learning ability) has to be paid for aligning to human values and needs. Moreover, due to the limitations of sequence modeling architecture, LLMs still face challenges in the understanding and generation of structured data. Consequently, they often fall behind task-specific models on complex structured data tasks, such as knowledge-base question answering and semantic parsing [651, 458]. Therefore, it is important to develop effective model specialization methods that can flexibly adapt LLMs to various task scenarios, meanwhile retaining the original abilities as possible.
In the above, we have discussed the basic and advanced abilities of LLMs. Next, we will introduce existing evaluation benchmarks and approaches [733, 734].
Remember, this is just for one day, so now she makes $12 per day in additional income, because she sells her eggs at the farmer's market each day.
Does reversal training hurt performance on standard tasks?In Sections 3.1 to 3.4 we showed that reverse training helps to mitigate the reversal curse.
Since its release, the Yi model series has benefited the community from the following perspectives: (1). it provides GPT-3.5-matching quality yet cost-effective models to researchers, and enables developers to build AI-native applications like language model based agents; (2). it empowers end users with locally runnable chatbots, which consequently helps protecting user data privacy; (3). it sheds light on the direction on further data and model scaling to achieve even stronger frontier models. for both research and commercial use.
\(\bullet\)**HH-RLHF**[170] consists of around 169K instances, and can be divided into two parts that focus on the helpfulness and harmlessness of LLMs, respectively. Each instance is an open-ended conversation between a crowdworker and a chat model, about seeking assistance, advice, or task completion. The chat model provides two responses to each user query, and the more helpful or harmful responses will be chosen as the annotations.
In this work, we introduce a hypothesis suggesting that LLMs address multilingualism by first translating queries into English, processing them using English with the help of multilingual knowledge, and then translating the responses back into the original language. To validate this framework, we introduce a novel method for detecting language-specific neurons and conduct extensive ablation studies. These studies involve selectively deactivating various neuron sets to observe their impact on the multilingual capabilities of LLMs. Additionally, we refine the multilingual performance of LLMs by fine-tuning these language-specific neurons, which only take up a small part of the neurons.
**Improvement for Greedy Search.** Selecting the token with the highest probability at each step may result in overlooking a sentence with a higher overall probability but a lower local estimation. Next, we introduce several improvement strategies to alleviate this issue.
With the obtained actions \(\{\mathbf{a}_{i}\}_{i=1}^{n}\), we can iteratively prompt \(f_{s}\) to complicate the basic instructions, following the prompt template in Figure 10. We randomly sample an action \(\mathbf{a}_{i}\) from the multiple actions generated for a pair of use case and skills. This design choice not only enables controlled complexity (Xu et al., 2023), but also prevents potential confusion between different actions for the LLM.
Note that these values may not be optimal for each testing scenario. We did not perform further tuning on these hyperparameters for each task to maintain a balanced view.
To navigate these challenges, we initially simplify the problem by studying a scenario where the relationship between loss and mixture proportions fits into a univariate monotonic function then retracts the simplifications progressively. In specific, we begin our study on the case where we only train on two domains thus avoiding multi-variables, and only consider the validation data coming from one of the training domains to circumvent the non-monotonicity (Sec. 3.1). Subsequently, we broaden our framework to encompass training on multiple domains (Sec. 3.2) and explore the predictability of losses on general validation data that also comprises various domains (Sec. 3.3).
We apply the same normalization and tokenization as for MinHash to the content of our documents before concatenating them. One important difference is that reversibility is important: for MinHash, we were discarding entire documents, and thus never relying on the normalized+tokenized representation for downstream use. Here, once we have identified duplicate normalized+tokenized spans, we need to revert to the original span to remove it. Accordingly, we include normalization in the tokenization process, and validate that the process is reversible.
We can find the distances from \(0\) to all other vertices using the Bellman-Ford algorithm in \(O(N^{3})\) time. If \(N=300\), this is at most comparable to the latency of \(\mathcal{O}\). Since only \(N\) edges of the graph update at each step, we note that the heuristic of just updating and doing a few incremental iterations of Bellman-Ford gets \([\alpha_{i},\beta_{i}]\) to high precision in practice. The number of API queries and the token cost, of course, remains the same.
Here, \(\sigma\) and \(z_{\text{s}-1}\in\mathbb{R}^{d_{key}}\) are a nonlinear activation function and a normalization term, respectively. As the choice of the non-linearity and the norm method is crucial for training stability, following Katharopoulos et al. (2020) we record a sum over all keys as the normalization term \(z_{\text{s}-1}\) and use element-wise ELU + 1 as the activation function (Clevert et al., 2015).
The observation regarding the estimation of optimal batch size in relation to loss resembles the "Chicken-and-egg" paradox. Practically, there's often a preliminary estimate of the achievable loss for a given model size, informed by prior knowledge of preliminary experiments. However, there is potential for the development of more refined estimation procedures in the future.
Overall, due to the significantly different training durations (i.e., number of training tokens) across the 100-, 300-, 600-, and 1000-exposure settings, we had to adjust their batch sizes, weight decay, and learning rates accordingly. These adjustments are discussed below.
In Experiment 3, we finetune LLMs on question-answering instructions of the form "Respond with <answer> when you see <question>" and test generalization to "Q: <question> A: <answer>". We find results similar to those in Experiment 1.
The emergent self-improvement capability.We typically choose the most capable model to generate synthetic data, as its generation is of higher quality. However, an intriguing question arises: can a model generate synthetic data that is better than the data it was trained on, thus enabling it to improve itself? This concept of self-improvement through synthetic data generation is an exciting avenue for future research. If a model can generate higher-quality data than its original training set, it could potentially bootstrap its own performance by iteratively learning from the enhanced synthetic data (Chen et al., 2024). This self-improvement capability could lead to the emergence of more advanced AI systems that can autonomously refine their skills and knowledge over time (Burns et al., 2023; Huang et al., 2023). Although recent work shows encouraging progress in this direction (Chen et al., 2024; Yuan et al., 2024), the upper bound of self-improvement and the underlying reasons for its effectiveness remain open questions. Future research should investigate the theoretical underpinnings and practical feasibility of self-improvement through synthetic data generation in more diverse scenarios, examining the necessary conditions, potential limitations, and associated risks. By unlocking the potential of emergent self-improvement capabilities, we could enable more adaptable, efficient, and autonomous learning processes (LeCun, 2022).
\(\bullet\)_Neural language models (NLM)_. NLMs [17, 18, 1] characterize the probability of word sequences by neural networks, _e.g.,_ multi-layer perceptron (MLP) and recurrent neural networks (RNNs). As a remarkable contribution, the work in [1] introduced the concept of _distributed representation_ of words and built the word prediction function conditioned on the aggregated context features (_i.e.,_ the distributed word vectors). By extending the idea of learning effective features for text data, a general neural network approachwas developed to build a unified, end-to-end solution for various NLP tasks [2]. Furthermore, word2vec [19, 20] was proposed to build a simplified shallow neural network for learning distributed word representations, which were demonstrated to be very effective across a variety of NLP tasks. These studies have initiated the use of language models for representation learning (beyond word sequence modeling), having an important impact on the field of NLP.
Recently, researchers have also explored other sampling strategies for LLMs. For instance, \(\eta\)_-sampling_[315] further improves top-\(p\) sampling by introducing a dynamic threshold based on the probability distribution. Furthermore, _contrastive search_[316] and _typical sampling_[317] can be utilized to improve the generation coherence during decoding. Since it has been found that large models tend to assign higher probability to important tokens compared to small models, _contrastive decoding_[318] utilizes a larger LM (_e.g._, OPT-13B) and a smaller LM (_e.g._, OPT-125M) to measure their log-likelihood differences. Subsequently, tokens are sampled based on the delta value of the probability distribution, thereby amplifying the impact of important tokens. Based on this contrastive idea, DoLa [319] further extends this approach to contrasting the logits across different layers of a single LLM, as higher layers tend to assign more weight to important tokens.
- There are reports and hints from McCarthy himself that he is considering resignation and may want to "get the hell out," which could indicate a potential for an early departure.
for all prompts \(x\) and completions \(y\). Then we must have \(\pi(y|x)\exp(\frac{1}{\beta}f(x))=\pi^{\prime}(y|x)\). Since these are distributions, summing over \(y\) on both sides, we obtain that \(\exp(\frac{1}{\beta}f(x))=1\) and since \(\beta>0\), we must have \(f(x)=0\) for all \(x\). Therefore \(r(x,y)=r^{\prime}(x,y)\). This completes the proof.
Open-Source Models.Several open-source LLMs have been made available to the AI community, although their performance generally lags behind the closed-source models a lot. As part of our research, we incorporate a significant number of these open-source models as our baselines. Our baselines encompass the following models: StarCoder [11], LLaMa [8], CodeGen [13],CodeGeeX [14], CodeT5+[18], and InCoder[15].
Some works focus on mitigating factual mistakes. He et al. (2023) introduces external knowledge to evaluate reasoning chains and votes to filter out chains that contain factual mistakes but without correcting them Wang et al. (2023) adopts a similar way, with the difference that it additionally introduces a reflection mechanism to correct low-scoring reasoning. Zhao et al. (2023) filters out low-confidence reasoning by consistency and guides models to re-reasoning based on relevant external knowledge. While the aforementioned methods work well on knowledge-intensive tasks, they fall short in addressing the challenge of contextual inconsistencies. Zhang et al. (2023) explores the hallucination snowballing phenomena during the reasoning process. Others aim to address the inconsistency issues. Radhakrishnan et al. (2023) observes that models are more faithful when dealing with simple questions. Thus, it improves faithfulness through question decomposition. Faithful CoT (Lyu et al., 2023) initially generates symbolic reasoning chains and later deterministically executes symbolic functions, mitigating reasoning inconsistencies. Lanham et al. (2023) explores the factors that influence faithfulness, which provides an empirical perspective. It finds faithfulness varies on different tasks and decreases as the model size increases. CoNLI (Lei et al., 2023) proposes a post-editing strategy to diminish the hallucinations. SynTra (Jones et al., 2023) performs prefix-tuning on a synthetic dataset designed to elicit hallucination easily, and then transfers this capability to real tasks.
**QUESTION:** Henry made two stops during his 60-mile bike trip. He first stopped after 20 miles. His second stop was 15 miles before the end of the trip. How many miles did he travel between his first and second stops?
Given two suffix arrays \(A_{1}\) and \(A_{2}\) for two sequences \(S_{1}\) and \(S_{2}\) it's not completely trivial to construct a single suffix array \(A\) for \(S=S_{1}\parallel S_{2}\) because of the boundary conditions. Instead, we don't build the data \(S=S_{1}\ ||\ S_{2}\) but rather let \(S_{1}^{\prime}=S_{1}\ ||\ S_{2}[uptoK]\) for some \(K\) greater than the longest substring match. Then we build the arrays on \(S_{1}^{\prime}\) and \(S_{2}\). To merge the arrays together we can remove the items from the first array after index \(|S_{1}|\) and merge-sort insert them into the second.
**Accuracy by Location.** We compared the specialist ratings for the 67 scenarios conducted in Canada and the 82 scenarios conducted in India.
For the restoration tasks, Guo et al. [77] propose a new image restoration model, termed MambaIR, which aims to explore the potential of Mamba in low-level vision, the model leverages the long-range dependent modeling capabilities of the Mamba state-space model while combining prior knowledge unique to image restoration tasks, such as local block repetition and channel interaction. Serpent [110] uses the State Space Model to maintain a global receptive field with linear scaling of input sizes which significantly reduces the cost of computing resources and GPU memory.
In this section, we present additional results obtained during the development of the Macrodata Refinement pipeline. For Appendix E.1 and Appendix E.3, these were obtained using earlier development versions of the dataset, so results are not directly comparable with the main text. For Appendix E.2, this is based on the Falcon-RW models.
Option 3: Reference modelThis involves recording the percentage of unsafe responses for a reference model as a baseline, and then comparing every SUT against it. For instance, if 20% of the reference model's responses are unsafe for a test and 25% of an SUT's responses are unsafe on the same test then it is 1.25x _more_ unsafe than the reference model (0.25/0.20). If only 10% of another SUT's response are unsafe on the test, it is 0.5x _less_ unsafe (0.10/0.20). The advantage of this approach is that it is interpretable, baselined against AI systems with achievable safety features, and allows thresholds to vary across hazard categories. However, it is more complex than the other solutions to implement and requires picking a reference model.
In this work, we aim to enhance the alignment of non-English LLMs with human preferences. Inspired by the concept of task vectors (Ilharco et al., 2023), we hypothesize that given a consistent base model, pre-existing knowledge and acquired behaviors can be synergized through a straightforward vector addition in the parameter space. To achieve this, we propose an approach to restructure the conventional training paradigm for non-English LLMs from CP \(\rightarrow\) SFT \(\rightarrow\) RLHF to CP \(+\) chat vector. The chat vector is derived by subtracting LLaMA-2's pre-trained weights from those of its chat-enhanced counterpart, LLaMA-2-chat. By introducing this chat vector to a LLaMA-2-based model that's continually pre-trained on non-English content, the evolved model responds in the target language, both in providing answers and declining inappropriate requests, and it aligns more deeply with human preferences. The main process of our method is illustrated in Figure 1.
We thank Sewon Min, Scott Wen-tau Yih, Sean Welleck, and Kawin Ethayarajh for fruitful discussions in the early stages of this work. We thank Sewon Min, Joongwon (Daniel) Kim, and Sandy Kaplan for valuable feedback on the paper, and Tianyu Gao and Weijia Shi for their help on evaluations. Akari Asai is supported by the IBM Fellowship. We thank Stability AI for providing computing to train and evaluate the LMs in this work, and Microsoft Accelerate Foundation Models Research Program for the access to OpenAI APIs. This work was funded in part by the DARPA MCS program through NIWC Pacific (N66001-19-2-4031), NSF IIS-2044660, and gifts from AI2.
(We could also normalize \(\sum_{i}^{\ell}\exp(z_{i})=1\).
This paper presents work whose goal is to advance the field of Machine Translation. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here.
In this section, we assume the adversary can directly view the logits that feed into the softmax function for every token in the vocabulary (we will later relax this assumption), i.e.,
We use "Answer the following questions with one or a list of entities." for SQA, since the answer for this dataset always consists of one or a list of entities from the context.
Considering the reasons and their strengths, it seems there is a balanced set of factors that could influence Trump's decision to participate or not. His history of unconventional tactics and concerns about debate arrangements could lead to a "No," while the potential benefits of participating in terms of policy promotion, engaging opponents, and demonstrating leadership suggest a "Yes." The decision will likely depend on the specific circumstances closer to the debate date and Trump's assessment of the strategic value of his participation.
History-taking and the clinical interview are widely taught in both medical schools' and postgraduate curricula [37, 38, 39, 40, 41, 42]. Consensus on physician-patient communication has evolved to embrace patient-centred communication practices, with recommendations that communication in clinical encounters should address six core functions: fostering the relationship, gathering information, providing information, making decisions, responding to emotions and enabling disease- and treatment-related behavior [43, 44, 20]. Specific skills and behaviours for meeting these goals have also been described, taught and assessed [45, 20] with validated tools [45]. Medical conventions consistently cite that certain categories of information should be gathered during a clinical interview, comprising topics such as the presenting complaint, past medical history and medication history, social and family history, and systems review [46, 47]. Clinicians' ability to meet these goals is commonly assessed using the framework of an objective structured clinical examination (OSCE) [31, 32, 33]. Such assessments vary in their reproducibility or implementation and have even been adapted for remote practice as virtual OSCEs (vOSCEs) with telemedical scenarios, an issue of particular relevance during the COVID-19 pandemic [48].
On Thursday, the mechanic repaired 6 truck tires and 4 car tires. The mechanic charges $60 for each truck tire and $40 for each car tire.
* \(\text{bioS}(N)\) represents an online dataset for \(N\) individuals, where each biography is generated with new randomness for the _selection_ and _ordering_ of six sentence templates _on-the-fly_. * \(\text{bioS}^{\text{simple}}(N)\) denotes a similar dataset, but here, each biography is generated once with a fixed random selection and ordering of the sentence templates. * \(\text{bioR}(N)\) refers to the same dataset, but with each biography written 40 times by LLaMA2 [33] to increase realism and diversity.
To promote the application of LLM-based autonomous agents, researchers have also introduced many open-source libraries, based on which the developers can quickly implement and evaluate agents according to their customized requirements [144; 145; 146; 147; 148; 149; 150; 151; 152; 153; 154; 155; 156; 157]. For example, LangChain [149] is an open-source framework that automates coding, testing, debugging, and documentation generation tasks. By integrating language models with data sources and facilitating interaction with the environment, LangChain enables efficient and cost-effective software development through natural language communication and collaboration among multiple agent roles. Based on LangChain, XLang [147] comes with a comprehensive set of tools, a complete user interface, and support three different agent scenarios, namely data processing, plugin usage, and web agent. AutoGPT [81] is an agent that is fully automated. It sets one or more goals, breaks them down into corresponding tasks, and cycles through the tasks until the goal is achieved. WorkGPT [150] is an agent framework similar to AutoGPT and LangChain. By providing it with an instruction and a set of APIs, it engages in back-and-forth conversations with AI until the instruction is completed. GPT-Engineer [128], SmolModels [126] and DemoGPT [127] are open-source projects that focus on automating code generation through prompts to complete development tasks. AGiXT [146] is a dynamic AI automation platform designed to orchestrate efficient AI command management and task execution across many providers. AgentVerse [19] is a versatile framework that facilitates researchers in creating customized LLM-based agent simulations efficiently. GPT Researcher [152] is an experimental application that leverages large language models to efficiently develop research questions, trigger web crawls to gather information, summarize sources, and aggregate summaries. BMTools [153] is an open-source repository that extends LLMs with tools and provides a platform for community-driven tool building and sharing. It supports various types of tools, enables simultaneous task execution using multiple tools, and offers a simple interface for loading plugins via URLs, fostering easy development and contribution to the BMTools ecosystem.
This section suggests some possible directions for the future development of RALM, based mainly on the limitations mentioned in Section 9.1.
i.e., \(\pi(y\mid x)\) is a valid distribution (probabilities are positive and sum to 1). However, following Eq. 4, we can see that Eq. 9 is the partition function of the optimal policy induced by the reward function \(r(x,y)\). The key insight of the DPO algorithm is that we can impose certain constraints on the under-constrained Plackett-Luce (and Bradley-Terry in particular) family of preference models, such that we preserve the class of representable reward models, but explicitly make the optimal policy in Eq. 4 analytically tractable for all prompts \(x\).
We also introduce _Contrastive Filtering_ during decoding to further identify the most effective instruction-response pairs by leveraging the quality discrepancy between the target and a stronger LLM. This strategy identifies two key instruction sets: (a) those the target LLM struggles with, pushing it to improve in its weak areas for more significant gains, and (b) those the target LLM excels at, feeding them back into the Self-Rubrics process for improved data efficiency. Contrastive Filtering serves as a response-level analogy of contrastive decoding Li et al. (2022).
1. _Multi-variables._ For a data mixing law for \(K\) domains, we should consider \(K-1\) degrees of freedom in the mixture proportions and, correspondingly, \(K-1\) variables in the target function. The increase of variables considerably enlarges the scope of potential functions thereby complicating the identification of the function form. 2. _Nonmonotonicity._ A monotonic relationship between losses and the proportion of any domain indicates that a lopsided mixture can achieve minimum loss without endeavors to balance domain proportions, which contradicts the practice. Therefore, differing from existing scaling laws that loss monotonically decreases with the scale of concerning factors, the data mixing law we study should accommodate non-monotonic functions. This nonmonotonic nature adds another layer of complexity to our analysis.
To assess the degree of influence that the specific prompting technique has on RAG adherence, we test two additional prompts ("strict" and "loose") on GPT-4.
common sense. Due to its excellent generalisation capabilities, many Retrieval-Augmented Language Model (RaLM) architectures, particularly those oriented towards open domains, employ BM25 as a retrieval method, such as Jiang et al. (2023c), Ram et al. (2023) and Zhong et al. (2022).
This train-test set overlap not only causes researchers to over-estimate model accuracy, but also biases model selection towards models and hyperparameters that intentionally overfit their training datasets. 3. Training models on deduplicated datasets is more efficient. Processing a dataset with our framework requires a CPU-only linear-time algorithm. And so because these datasets are up to \(19\%\) smaller, even including the deduplication runtime itself, training on deduplicated datasets directly reduces the training cost in terms of time, dollar, and the environment (Bender et al., 2021; Strubell et al., 2019; Patterson et al., 2021). 4. Deduplicating training data does not hurt perplexity: models trained on deduplicated datasets have no worse perplexity compared to baseline models trained on the original datasets. In some cases deduplication reduces perplexity by up to \(10\%\). Further, because recent LMs are typically limited to training for just a few epochs (Radford et al., 2019; Raffel et al., 2020), by training on higher quality data the models can reach higher accuracy faster.
Subword tokenization.This class of algorithms subsumes all data-driven tokenization approaches which can decompose words into subwords/multiple tokens and currently represent the established tokenization approach upon which LLMs rely (Kudo and Richardson, 2018; Petrov et al., 2023). Because subword tokenizers decompose words into subwords, they can process out-of-vocabulary words by merging subwords from the vocabulary (Kudo and Richardson, 2018). Examples of popular subword tokenizers are WordPiece (Schuster and Nakajima, 2012), BPE (Gage, 1994; Sennrich et al., 2015), Byte-Level BPE (BBPE) (Wang et al., 2020), and Unigram (Kudo, 2018).
1. Legality varies across jurisdictions, even for countries with broadly similar legal systems. 2. Laws are often incomplete, difficult to understand, and may have surprising gaps, asymmetries and limitations. 3. The legality of specific activities is difficult to assess and requires trained legal expertise. 4. AI companies have restrictions on the use of their models, which are defined not solely on the basis of legal prohibitions 34.
This section introduces straightforward approaches to solving the catastrophic forgetting issues discussed in the previous section.
As in all machine learning applications, the choice of hyperparameters significantly impacts the results. We therefore strongly recommend optimizing all relevant hyperparameters for specific cases.
However, the ReAct method is not without its limitations. While intertwining reasoning, observation, and action improves trustworthiness, the model can repetitively generate the same thoughts and actions and fail to create new thoughts to provoke finishing the task and exiting the ReAct loop. Incorporating human feedback during the execution of the task would likely increase its effectiveness and applicability in real-world scenarios.
We detail the prompts given to the Mistral-7B model to generate synthetic versions of the C4 dataset in specific styles.
tion and answer. While NQ appears to be closer to PopQA in terms of question and answer lengths, the key factor influencing the better results of training Adapt-LLM on SQuAD may be the number of questions in the training dataset (\(\sim\)87K in SQuAD and \(\sim\)58K in NQ). Further analyses are required to elucidate the factors that render a training dataset more suitable for a given target dataset (which is beyond the scope of our study), but these results suggest that scale may play once again a crucial role.
Figure 3: Comparing new tokens vs. repeated tokens for random data selection and D4 for fixed selection ratio \(R=0.25\) for 1.3B OPT pre-training. Each method chooses 25% of documents from the source dataset \(D_{source}\), and epochs over that subset until the target token budget of 40B is reached. We observe that repeating tokens via D4 outperforms baseline training (random, new tokens).
In our biography data experiments, we utilize the bio5 multi5+permute dataset from Allen-Zhu & Li (2023a,b) as our bio5 dataset, which generates 5 biography entries per person using randomly chosen sentence templates and permutations.
* Entity-preserving reversals do not impair the model's performance in forward tasks (such as determining the person's birth dates from names) as shown in Table 10. * Mixed-training (i.e., adding instruction tuning data to the pre-training level) generally performs better compared to first pre-training the model with knowledge and then fine-tuning it to answer (reversal) tasks. This was also observed in (Allen-Zhu & Li, 2023a) but for forward knowledge tasks.
The DS-1000 benchmark [34] comprises 1,000 distinct data science workflows spanning seven libraries. It assesses the performance of code generations against test cases and supports two evaluation modes: completion and insertion. In our experiments, we only report insertion scores for models that support. The DS-1000 benchmark further classifies problems based on the libraries employed, including Matplotlib (plt), NumPy (np), Pandas (pd), SciPy (scp), Scikit-Learn (sk), PyTorch (py), and TensorFlow (tf). We follow the same prompt format as StarCoder. In Table 2, we present pass@1 (n=40) results for each library, along with an overall score. Based on these results, our conclusion is that _WizardCoder_ demonstrates a significant superiority over all other models when tackling data science problems on the DS-1000 benchmark. This observation holds true across nearly all data science libraries.
I have this xml and i want to get the xml data to auto populate HTML table, the codes works but it makes duplicate on the table content
Fig. 3: A timeline of existing large language models (having a size larger than 10B) in recent years. The timeline was established mainly according to the release date (_e.g.,_ the submission date to arXiv) of the technical paper for a model. If there was not a corresponding paper, we set the date of a model as the earliest time of its public release or announcement. We mark the LLMs with publicly available model checkpoints in yellow color. Due to the space limit of the figure, we only include the LLMs with publicly reported evaluation results.
Pretraining Large Language Models (LLMs) on large corpora of textual data is now a standard paradigm. When using these LLMs for many downstream applications, it is common to additionally bake in new knowledge (e.g., time-critical news, or private domain knowledge) into the pretrained model either through RAG-based-prompting, or finetuning. However, the optimal methodology for the model to gain such new knowledge remains an open question. In this paper, we present Retrieval Augmented Fine Tuning (RAFT), a training recipe that improves the model's ability to answer questions in an "open-book" in-domain setting. In RAFT, given a question, and a set of retrieved documents, we train the model to ignore those documents that don't help in answering the question, which we call, distractor documents. RAFT accomplishes this by citing verbatim the right sequence from the relevant document that would help answer the question. This coupled with RAFT's chain-of-thought-style response helps improve the model's ability to reason. In domain specific RAG, RAFT consistently improves the model's performance across PubMed, HotpotQA, and Gorilla datasets, presenting a post-training recipe to improve pre-trained LLMs to in-domain RAG.
Given the need to mitigate forgetting when re-warming and re-decaying, we move on to investigate the effects of replay in our weak and strong-shift continued pre-training scenarios. Specifically, we use compete equivalent replay (see Sec. 4.2 for details) where replay tokens from \(\mathcal{D}_{0}\) are added at the cost of removing the equivalent number of \(\mathcal{D}_{1}\) tokens from the budget. Following the same two dataset settings, the model is pre-trained on \(\mathcal{D}_{0}\) (Pile) for 300B tokens. This is followed by continual pre-training on a SlimPajama (weak shift) or German Common Crawl (strong shift). For more details regarding the setup, please see Section 5.2. Our continued pre-training is conducted for the full size of the respective datasets, which is 300B tokens for SlimPajama (weak shift) and 200B tokens for German Common Crawl (strong shift). We consider 1%, 5%, 10%, and 50% replay for both shifts and add 0.5% and 25% replay runs for the weak and strong distribution shifts respectively. We consider two baselines to put these results into a broader context. The first baseline is a model trained on \(\mathcal{D}_{1}\) without replay. The second baseline model is trained from random initialization on a union of \(\mathcal{D}_{0}\) and \(\mathcal{D}_{1}\) for 600B tokens (SlimPajama) and 500B tokens (German Common Crawl). The latter baseline reflects the practice of fully re-training the model to update it instead of continually pre-training the existing model. All models re-warm and re-decay the learning rate using a cosine decay schedule fit to their token budget with the same \(\eta_{\textit{max}}\) (\(3\cdot 10^{-4}\)) and \(\eta_{\textit{min}}\) (\(3\cdot 10^{-5}\)) values as during pre-training on \(\mathcal{D}_{0}\).
ArchitectureWe train decoder-only transformer models (Vaswani et al., 2017) at three different scales, small, medium and XL. The small-scale (128M parameter) model consists of 12 layers, 12 attention heads, and a hidden dimension size of 768. The medium-scale (350M parameter) model consists of 24 layers, 16 attention heads, and a hidden dimension sizeof 1024. The XL-scale (1.3B parameter) model consists of 24 layers, 16 attention heads, and a hidden dimension size of 2048. We do not use dropout in either model and a maximum sequence length of 1024. The models are trained using NVIDIA's Megatron-LM repository.
In case (A), presenting a _negative result_, we also explore 300-exposure, 600-exposure, and 1000-exposure training settings. Given that the 1000-exposure setting requires 48x more training tokens compared to Figure 1(b), or 4.8x more compared to Figure 1(a), we limited experiments to \(\mathsf{bioS}(N)\) with \(N\leq 200K\) to conserve computational resources. Similarly, for 300-exposure and 600-exposure, we only considered \(N\leq 500K\).
But Mozilla Firefox and Internet Explorer don't seem to work like that.
Knowledge distillation.Knowledge distillation Hinton et al. (2015); Sanh et al. (2019); West et al. (2021); Magister et al. (2022) often involves the transfer of knowledge from larger models to smaller ones. Self-Instruct can also be viewed as a form of "knowledge distillation", however, it differs from this line in the following ways: (1) the source and target of distillation are the same, i.e., a model's knowledge is distilled to itself; (2) the content of distillation is in the form of an instruction task (i.e., instructions that define a task, and a set of examples that instantiate it).
We thank everyone who has given feedback, contributed to the paper, helped create the v0.5 benchmark, or has joined the WG. We particularly thank the team at MLCommons.
One direction that researchers have used to train language models to reason or improve their reasoning is training the language model on mined reasoning traces or reasoning-like data (Rajani et al., 2019; Wei et al., 2021; Lewkowycz et al., 2022; Chung et al., 2022; Gunasekar et al., 2023). Although this approach has been demonstrated to be effective, it comes with drawbacks. It requires either manual annotation, which is sensitive to the capability of the annotators and is off-policy for the language model (i.e., the distribution of reasoning is not text that the language model would otherwise likely have generated). This approach is also expensive, difficult to scale, and provides no clear path to solving problems harder than those that the annotators are capable of solving.
The first set of LLaMA models [32] was released in February 2023, ranging from 7B to 65B parameters. These models are pre-trained on trillions of tokens, collected from publicly available datasets. LLaMA uses the transformer architecture of GPT-3, with a few minor architectural modifications, including (1) using a SwiGLU activation function instead of ReLU, (2) using rotary positional embeddings instead of absolute positional embedding, and (3) using root-mean-squared layer-normalization instead of standard layer-normalization. The open-source LLaMA-13B model outperforms the proprietary GPT-3 (175B) model on most benchmarks, making it a good baseline for LLM research.
Figure 1: Learning curves for 6.7B OPT model pretraining on 100B tokens, with data selected with D4 (pink line) and randomly (gray line). D4 significantly outperforms baseline training, getting between 18-20% efficiency gains on validation perplexity and 2% increase in average 0-shot downstream accuracy across 16 NLP tasks. See Section A.2 for full learning curves.
Right-to-left, masked & other training variantsMultiple works have proposed pre-training language models with rephrased or paraphrased text (Lewis et al., 2020; Maini et al., 2024), but were not targeting the reversal curse. Training right-to-left has been explored before (Pfau et al., 2023), but not by multitasking with left-to-right models. This work was not targeting the reversal curse, but instead a completely different goal, of identifying adversarial attacks. Rather than training left-to-right, or right-to-left, masked language models aim to learn how to "fill in the middle", going back to early language modeling work such as Collobert et al. (2011), and models such as BERT (Devlin et al., 2018). Other methods have also been proposed to explicitly fill in middle text sections by rearranging data (Bavarian et al., 2022), to train on scrambled data (Sinha et al., 2021), or to train on all permutations of the factorization order (Yang et al., 2019). Relatedly, transforming training data with repeating segments has also been shown to improve language model embeddings (Springer et al., 2024). Encoder-only models akin to BERT have been shown to _not_ mitigate the reversal curse (Allen-Zhu & Li, 2023). However, modifying the architecture and training procedure has been shown to help, e.g. by introducing Bidirectional Casual language modeling Optimization (BICO) (Lv et al., 2023). In contrast, our work seeks to rectify the issue while keeping standard language model training as similar as possible to the current regime.
Results on main-agg are presented in Figure 1, and in Figure 3 for core-agg and ext-agg. We find that open models consistently underperform models trained on private curated corpora, such as GPT-3-even when using a similar evaluation setup. Conversely, models trained on RefinedWeb are able to match the performance of the GPT-3 series using web data alone, even though common high-quality sources used in The Pile are excluded from RefinedWeb (see Table 14 in Appendix). Finally, we note that our internal model trained on The Pile performs in line with the BigScience Architecture and Scaling model; this highlights that our pretraining setup is unlikely to be the main source of increased performance for models trained on RefinedWeb.
Based on these two hypotheses, we propose the following training strategy: during the pre-training phase, only use large-scale coarse-quality pre-training data, which is abundant and can support continuous training when provided with more computational resources. During the annealing phase, we use diverse and high-quality knowledge and ability-oriented SFT data, mixed into the pre-training data.
Figure A13: Effect of repeating tokens across data selection methods over training. X-axis denotes the number of updates, and the y-axis denotes average perplexity across non-web-snapshot validation sets (top row) and Instruct OPT (bottom row). Each column in the plot above denotes a different data selection method. Within each column: (1) the gray line denotes baseline training, (2) the colored-dashed line denotes repeating tokens via the specified data selection method, and (3) the colored-solid line denotes selecting new tokens via the specified data selection method. Repeating data is generally worse than selecting new data for a _fixed data selection method_ (e.g., fixed column).
We construct TwoHopFact using Wikidata (Vrandecic and Krotzsch, 2014) with the following data construction pipeline.
Figure 1: (a) **WRAP** Recipe: We prompt an off-the-shelf instruction-tuned model to rephrase articles on the web, and pre-train an LLM on a mixture of real and synthetic data. (b) Zero-shot performance of GPT 1.3B models trained on combinations of C4 and synthetic variations. Each step corresponds to a batch of 1M samples. (c) Weighted average perplexity over 21 sub-domains of the Pile for varying model sizes and amount of pre-training data.
The decision-making process of Adapt-LLM enables the model to determine the necessity of context for answering questions through dynamic assessment of each prompt. This flexible behavior allows the model to strike a balance between utilizing context for enhanced understanding and delivering direct answers when sufficient.
Multilingual data.Using the language identification filter, we classify processed CommonCrawl data into 176 languages. Figure 6 shows the top 20 languages present in the data _excluding English_, based on their relative contribution in descending order. 58.20% of all documents in the processed CommonCrawl data were identified as English. We find the distribution of languages in CommonCrawl to only be partially aligned with the worldwide distribution of language speakers (Eberhard et al., 2023): Russian is over-represented (2nd in CC but only 8th worldwide), Mandarin Chinese is under-represented (6-7th in CC but 2nd worldwide), and Hindi does not show-up in the top 20 despite being the 3rd most spoken.
Further detailed results across different platforms and categories can be found in Table 4. Across categories, our system exhibits noticeable variations: on Sports, our system nearly matches the crowd aggregate, and on Environment & Energy, it falls much behind. However, we caution against drawing strong conclusions from subcategories, since the sample size is smaller and variation could be due to noise.
**Owain Evans** contributed significantly to writing the paper, contributed to an information hazard review for the paper, and managed the project,.
While single and multi-agent patterns have diverging capabilities in terms of scope, research finds that "multi-agent discussion does not necessarily enhance reasoning when the prompt provided to an agent is sufficiently robust" [26]. This suggests that those implementing agent architectures should decide between single or multiple agents based on the broader context of their use case, and not based on the reasoning capabilities required.
A: Let's think step by step. First, you want to find out the number of eggs a total that Janet collects each day. Take this many dollars a three and subtract from the money she gets per egg, which is $2. The answer to that question is $5.
To improve the reasoning ability, most training methods focus on acquiring supervised signals obtained through costly means, such as human annotation (Liao et al., 2024), generation of larger models (Yu et al., 2023; Luo et al., 2023; Liu et al., 2023; Yue et al., 2023), or self-sampling (Yuan et al., 2023; Singh et al., 2023; Wang et al., 2023; Zelikman et al., 2022). These methods depend on these signals to direct learning towards a specific trajectory by precisely outlining the reasoning process. In contrast, our method illustrates that an entirely different approach is equally effective. Instead of requiring more precise guidance to direct the generative process, our technique achieves comparable results by introducing random noises into the input. For reasoning tasks, which are generally considered to require precise understanding, we find that the method of incorporating noise into the reasoning steps is surprisingly effective, indicating that the model might have enhanced its performance through a denoising process. Our approach stands out for its simplicity and effectiveness, offering a feasible alternative to the more complex and resource-intensive methods.
**Dependency Regularization.** MFT is helpful in addressing these dependency issues. During stepwise reasoning, an intermediate step might utilize multiple premises from previous steps and questions, forming a directed acyclic graph of dependencies. For the human behavior, in the process of solving mathematical problems, we need to refer both to the initial conditions given in the problem and to many results obtained in previous steps frequently. Although Transformers allow for full connectivity between every token pair, enabling data-driven learning of such dependencies, they risk learning shortcuts through pattern-matching Liu et al. (2022); Khona et al. (2024); Dziri et al. (2023).
12. Iris Winnow resigns from her job at the Oath Gazette after their mother’s sudden death.
The in-context few-shot prompt in step-1 is as follows (aims to generate multi-turn QA conversation):
The randomness is usually introduced via the concept of temperature. The temperature T is a parameter that ranges from 0 to 1, which affects the probabilities generated by the softmax function, making the most likely tokens more influential.