text
stringlengths 4
4.47k
|
---|
Niclas Doll1, Jasper Schulze Buschhoff1, Charvi Jain1,2, Alexander Arno Weber1,2, |
We thank GENCI for generously granting us access to their cutting-edge computing resources. Our model, SaulLM-7B, has been trained on ADASTRA, with initial experimentation conducted on Jeanzay. The utilization of HPC resources was made possible through the Jeanzay grants 101838, 103256, and 103298, as well as the Adastra grants C1615122, CAD14770, and CAD15031. |
Naively continuing to train the model on new data, however, tends to lead to performance far below re-training on all available data, often due to 1) poor adaptation (failure to optimize the new dataset) or 2) catastrophic forgetting (significant capability loss on the previous dataset). Firstly, the question of adaptation is central to our setting as training on large datasets is costly. One would presumably not choose to spend considerable computational resources training on a new dataset only to minimally adapt to it. However, most performant open-source LLMs (Touvron et al., 2023; Jiang et al., 2023; Gemma Team et al., 2024) decay their learning rate to a small value by the end of training. We hypothesize, therefore, that the learning rate must be re-increased and re-decayed to improve adaptation per compute spent when training on a new dataset. We note that this has not been thoroughly studied in the continual learning literature. Secondly, catastrophic forgetting is a key difficulty to overcome if one is to realize the full potential of continual pre-training. Adapting to hundreds of billions of new tokens is important, but it must not come at the cost of erasing most existing knowledge in the LLM. Recent work (Scialom et al., 2022) shows, in an LLM fine-tuning setting, that replaying previous data (as little as 1%) is sufficient to mitigate forgetting to a large extent. While continually pre-training on large amounts of new data will almost surely lead to more forgetting than fine-tuning, we hypothesize that an appropriate amount of replay could mitigate forgetting--even in our setting. Moreover, recent works show that pre-training (Cossu et al., 2022; Ramasesh et al., 2022; Mehta et al., 2023) and increasing model size (Mirzadeh et al., 2022) both help to reduce the effects of forgetting. We, therefore, expect the trend of increasing language model capacity and pre-training dataset size in tandem (Kaplan et al., 2020; Hoffmann et al., 2022; Touvron et al., 2023) will yield models increasingly capable of continual learning (Scialom et al., 2022), suggesting that our experimental results should only improve with models scale. |
Intuitive explanation.To gain a deeper understanding of sDPO, we rearrange the DPO loss from [13], as follows: |
We begin our exploration with the simplest case where we only learn on mixtures of two domains and evaluate our model on the two domains respectively. |
In this paper, our primary focus is on \(\mathsf{bioS}(N)\) for \(N\) ranging between 10K and 20M. Notably, \(\mathsf{bioS}(20M)\) encompasses approximately 1B bits of knowledge (refer to Theorem 3.2). |
Details of adaptive retrieval.For retrieval based on soft constraints, we trigger retrieval if the following condition is satisfied: |
Instruction SourcesAdditionally, we found it beneficial to include conversational data during pretraining. This is inspired by recent advances in neural machine translation, which highlight that the robust capabilities of LLMs in translation are due to the existence of accidental parallel data in the training corpus Anil et al. (2023); Briakou et al. (2023). Specifically, this means that we include the Super Natural Instruction Wang et al. (2022) and FLAN collection Longpre et al. (2023) during pretraining. |
Supervised Fine-Tuning Supervised fine-tuning (SFT) requires sets of labeled input-output pairs. One of the most common SFT methods is instruction tuning (Wang et al., 2022; Mishra et al., 2021; Ouyang et al., 2022; Taori et al., 2023), which has emerged as one of the most powerful methods to improve model performance. With instruction tuning, the input is a natural language task description, and the output is an example of the desired behavior. Many current state-of-the-art LLMs have gone through instruction tuning after their pre-training phase. |
Q: Janet's ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market? |
**Gaokao-Bench**(Zhang et al.2023b): GAOKAO-Bench uses 2811 exam questions from Chinese college entrance exams (Gaokao) from 2010-2022 covering all subjects. It has 1781 multiple choice, 218 fill-in-blank, and 812 open-ended questions across math, Chinese, English, physics, etc. |
**Result 1** (Figure 1(a)).: When trained for 1000 exposures on \(\mathsf{bioS}(N)\), with \(N\) ranging from 10K to 10M, GPT2 models with sizes from 1M to 0.5B parameters (_irrespective of depth or width_) demonstrate the following: |
**The Improvement in the Accuracy of Numerical Calculations is More Significant than Logical Reasoning** The performance of the model gradually improves as the synthetic data increases. For a deeper understanding, we analyze the error proportion for different types of errors on GSM8K. We categorized errors into two types: reasoning errors and calculation errors. Reasoning errors primarily encompass issues such as loss of conditions and concept confusion, while calculation errors include incorrect analysis of quantitative relationships and numerical computation mistakes. Based on the experimental results illustrated in Figure 5, we observe a gradual decrease in the percentage of calculation errors, suggesting that GSM8K is correcting calculation errors at a faster rate than reasoning errors. |
**Figure A.1 \(|\) Simulated Dialogue and Self-play Critique Example.** An example of AMIE modifying behavior based on in-context feedback provided during the inner-loop self-play, illustrating how this critique can impact the behavior of AMIE in the simulated dialogues. We demonstrate in Figure A.19 that this process on average results in improved simulated dialogue quality on a set of four PACES clinical criteria. Note that this is one preliminary example of a single round of iterative feedback and does not reflect the full simulated dialogue process. For example, in this round of feedback, the AMIE critique did not identify that management recommendations should primarily include an in-person evaluation by a physician to gauge severity and rule out more concerning causes or sequelae. |
The contrastive preference optimization is originally defined as minimizing \(\mathcal{L}(\pi_{\theta};U)\) under the constraint of minimizing the difference between preferred data distribution and outputs of the learnable policy: |
We base our evaluation on the popular Eleuther AI evaluation harness (Gao et al., 2021), allowing us to evaluate across a wide range of tasks in the zero-shot setting. |
In the field of autonomous agents, research endeavors [1; 2; 3] are directed towards systems that can operate independently, make decisions, and perform tasks with no or minimal human intervention. These agents are designed to understand instructions, process information, make decisions and take action to achieve a state of autonomy. The advent of large language models (LLMs) [4; 5; 6] has brought new possibilities to the agent development [7]. Current LLMs have shown great power in understanding instructions [8; 9; 10; 11], reasoning and solving problems [12; 13; 14; 15; 16], and interacting with human users [17] as well as external environments [18; 19]. Built upon these powerful LLMs, emergent LLM-based agents [7; 20; 21; 22] can present strong task fulfillment abilities in diverse environments, ranging from virtual assistants to more sophisticated systems involving complex and creative problem solving, planning and reasoning. |
**Effect of Number of Iterations.** We demonstrate the effect of number of CodecLM iterations in Figure 3. In particular, we count the proportion of data from each iteration in all synthesized data \(\mathcal{D}_{g}\) and show it in the blue bar chart with left y-axis. |
## 3 The proportions of data mixtures influence model losses in a quantitatively predictable way |
Additionally, Llama-2 features an extended context length, effectively doubling its capacity to process and comprehend longer sequences of text. These enhancements significantly improve the model's effectiveness across various natural language understanding tasks. |
**Parameter 5** (Figure 2, 12, 13).: For GPT2 models on the \(\mathsf{bioD}\) dataset, we focus on the 1000-exposure case, with \(wd=0.01\), \(lr=0.0005\), and a batch size of 192. |
Unstructured data, in contrast, does not have a clearly defined data structure and exists in various forms, including text, images, and audio. Due to its large and diverse nature, it is challenging to store and manage in traditional tabular form. Although it contains valuable information, it requires natural language processing, image recognition, and other technologies to parse and comprehend. |
Training scale constitutes another significant factor influencing the transferability of LLM capabilities, composed of both pretraining scale and instruction tuning scale. Experimental results are shown in table 1. Taking the example of LLaMA (with 10K, 100K, and 1M further pretrain) and Open Chinese LLaMA, the scale of further Chinese pretraining gradually increases from 0 to 100 billion tokens. Under the settings of 1K and 5K instruction tuning, we observed that the response quality improves progressively with the increase in the scale of further pretraining. 1 However, when the instruction tuning data scale escalates to 950K, we find no significant differences in response quality among the models. Consequently, we hypothesize that more further pretraining could accelerate the model's alignment with human instructions, but the mere tens of billions in training scale are insufficient to enable the model to grasp a greater amount of world knowledge. This leads to their convergence at similar response levels. In other words, the enhancement in response quality primarily stems from an improvement in language generation prowess rather than an elevation in knowledge level. |
Table 3 presents the results of this experiment. The first thing to note is that the Adapt-LLM model generates the \(\langle\)RET\(\rangle\) token for approximately 82-83% of the questions in the PopQA dataset, with similar ratios observed across both training datasets. This observation aligns with the low performance of the NR-LLM configuration demonstrated in Table 1. |
**Shared Scenarios.** We repeated 40 of the scenarios at the other location, meaning if it was originally run in Canada, we then ran it in India and vice-versa. This included all of the UK scenarios and 26 of the India scenarios. Because these conversations did not have specialist ratings, we instead leveraged auto-evaluation to compare the produced differential diagnoses and ablate the effect of the OSCE location. |
Next, our system outperforms the crowd on earlier retrieval dates (1, 2, and 3) but not the later ones (4 and 5). |
* To compare the performance of the DDx accuracy derived from AMIE or PCP consultations;
* To compare the DDx accuracy between simulated patients performed in Canada and India and determine if there is systematic differences between the two locations;
* To isolate the effects of information acquisition and information interpretation by analyzing the DDx accuracy of AMIE when provided the PCP consultation instead of its own;
* To evaluate the efficiency of information acquisition between AMIE and PCPs by analyzing the DDx accuracy as the number of conversation turns increases;
* To evaluate the benefit of inner-loop self-play on dialogue quality before and after critic feedback. |
1. Improved cardiovascular health: HIIT has been shown to increase cardiovascular fitness and reduce the risk of heart disease. |
Over the past few years, large pre-trained models have enabled massive performance improvements in language modeling (Brown et al., 2020; Zhao et al., 2023), visual understanding (Radford et al., 2021; Alayrac et al., 2022; Kirillov et al., 2023), text-to-image generation (Rombach et al., 2022; Pernias et al., 2024), and text-to-video generation (Brooks et al., 2024)--to name a few. Large language models (LLMs) are at the center of all these improvements, providing an intuitive means for humans to interface with machine learning algorithms through language. |
Apart from instruction tuning, it is important to construct high-quality datasets for aligning LLMs with human values and preferences (_e.g.,_ helpfulness, honesty, and harmlessness). In this section, we introduce several widely used datasets for alignment tuning, including HH-RLHF [170], SHP [177], PKU-SafeRLHF [181], Stack Exchange Preferences [178] and Sandbox Alignment Data [179]. We show their details in Table IV. |
We now investigate the benefits of re-warming and re-decaying the learning rate (e.g., following a cosine schedule) for different values of \(\eta_{\text{max}}\). Specifically, we compare these models to two natural baselines: a model that does not re-warm, staying constant at \(\eta_{\text{min}}\) (\(3\cdot 10^{-5}\)), and a model that re-warms to the pre-training \(\eta_{\text{max}}\) (\(3\cdot 10^{-4}\)) but does not re-decay. We use the same two-dataset settings: we first pre-train on the Pile (\(\mathcal{D}_{0}\)) for 300B tokens and continually pre-train our model on SlimPjama (weak shift) or German Common Crawl (strong shift) as our \(\mathcal{D}_{1}\) datasets. The continual pre-training is conducted for the full size (300B and 200B tokens, respectively) of the datasets. The models that re-warm and re-decay the LR consider three strategies: re-warming to half the pre-training's \(\eta_{\text{max}}\) (\(1.5\cdot 10^{-4}\)), re-warming to the same \(\eta_{\text{max}}\) as pre-training (\(3\cdot 10^{-4}\)), and re-warming to twice the \(\eta_{\text{max}}\) of pre-training (\(6\cdot 10^{-4}\)). In all cases, the learning rate is cosine-decayed after linear warmup to reach \(\eta_{\text{min}}=0.1\cdot\eta_{\text{max}}\) by the end of training. Finally, we consider models trained on \(\mathcal{D}_{0}\cup\mathcal{D}_{1}\) as a third baseline to provide an upper bound on performance. |
**Transformers Learning the GCD.** Our first illustration of our theory "in the wild" is for sequence-to-sequence transformer models for an arithmetic task: predicting the greatest common divisor (GCD) of two integers, encoded as sequences of digits in some base \(B\) following Charton (2023). This setup is a perfect intermediate step between our toy models and large scale LLMs; it uses the transformer architecture and training algorithms on sizeable models, while the underlying data has a deterministic nature. Over the course of training the model progressively learns new GCDs and with them also their products with already learned GCDs. We can thus view each such learned group, usually learned in "bursts", as a new skill. For the purpose of this experiment, we use this model after \(300M\) samples as the generator of AI-data. In Figure 4 we validate the predicted scaling law for a single generation and observe 'un-learning' of skills when training exclusively with generated data, as well as a grokking effect when training with mixtures. See Appendix G for a full description and more details and Figures. |
SetupWe evaluate OLMo before adaptation, and after both the supervised fine-tuning and DPO training stage, focusing on the safety and chat evaluations used by Wang et al. (2023). We additionally compare to officially released instruction-tuned variants of the models from Table 6. We finally also compare to Tulu 2 models to compare against models trained using the same post-training data mixes and procedures. |
Figure 6: **Validation loss during continual pre-training of 10B (top) and 405M (bottom) parameter models.** At each model scale we provided three baselines and two continually pre-trained models. The baselines (light blue, dark blue, and maroon) are trained from random initialization on 300B tokens of \(\text{SlimPajama}\), 300B tokens of \(\text{Pile}\), and the union of both datasets (600B tokens). The continually pre-trained models (black and violet) start from a checkpoint pre-trained on 300B tokens of \(\text{Pile}\) (dark blue curve) and use 0% and 5% replay, respectively. We observe that for both model sizes, the combination of LR re-warming, LR re-decaying, and using a small percentage of replay helps to strike a balance between forgetting and adaptation. Importantly, we note that the use of replay minimally affects downstream performance compared to the models using 0% replay (black and violet curves overlap in figures (b) and (d)). |
ModalityThe hazard categories are specific to textual content produced by LMs. While we expect the categories to apply equally well across additional modalities (ex: images, audio, and videos), we have not yet tested this. We also expect that other modalities may necessitate additional categories, such as Graphic Violence. |
First, let's find the largest power of \(2\) that is less than \(10000\). |
* the cross entropy loss in nats averaged over the tokens in a context
* the number of model parameters, _excluding all vocabulary and positional embeddings_
* the batch size
* the critical batch size defined in [14]. Training at the critical batch size provides a roughly optimal compromise between time and compute efficiency
* amount of processed tokens
* an estimate of the minimum amount of processed tokens needed to reach a given value of the loss. This is also the number of training steps that would be used if the model were trained at a batch size much smaller than the critical batch size
* number of training steps
* an estimate of the minimal number of training steps needed to reach a given value of the loss. |
Footnote 4: All summaries were generated in February 2024 using the following checkpoints: gpt-3.5-turbo, gpt-4-0613, gpt-4-0125-preview,Mixtral-8x7B-Instruct-v0.1, and Claude-3-opus-20240229. |
To confirm that the method from Appendix B.2.1 works, we test whether we can detect whether the GPT-2, Pythia and LLAMA architectures use LayerNorm or RMSNorm from their logit outputs alone. We found that the technique required two adjustments before it worked on models with lower than 32-bit precision (it always worked with 32-bit precision). i) We do not subtract \(\mathcal{O}\left(p_{0}\right)\) from logits queries, but instead subtract the mean logits over all queries, i.e. \(\frac{1}{n}\sum_{i=1}^{n}\mathcal{O}\left(p_{i}\right)\). Since the average of several points in a common affine subspace still lie on that affine subspace, this doesn't change the conclusions from Appendix B.2.1. ii) We additionally found it helped to calculate this mean in lower precision, before casting to 64-bit precision to calculate the compact SVD. |
* Step 1. Generate a new math question. We request the GPT-4 Turbo API to generate a brand-new question using a reference math question as a starting point. To improve the validity of the new questions, we incorporate three rules into the prompt: Firstly, the new question must obey common knowledge; secondly, it should be solvable independently of the original question; and thirdly, it must not include any answer responses. Besides, we have set specific formatting requirements for questions and answers tailored to various target datasets. * Step 2. Verify the question. We further enhance the quality of the generated questions by validating and refining them through attempted solutions. By integrating solving and verification steps into a single prompt, we have found that this approach consistently elevates the validity of questions across different benchmarks. * Step 3. Generate chain-of-thought (CoT) answers. We request GPT-4 Turbo to produce a chain-of-thought (CoT) answer response for each newly generated question. |
In RAG, the retriever and the generator are the primary components. Table 2 summarizes the retrievers and generators used in the studies discussed in this paper. It is clear from the table that while most generators utilize advanced language models, a significant number of retrievers still employ the traditional BM25 due to its efficiency. |
For a deterministic ground-truth labelling function \(i\mapsto j_{i}\), consider a downstream Hutter "LLM" (Hutter, 2021) |
1. Injury: High-impact HIIT workouts can increase the risk of injury due to the rapid, explosive movements required. Athletes should properly warm up and cool down before and after HIIT workouts to reduce their risk of injury. |
I want you act as a Prompt Creator. Your goal is to draw inspiration from the @Given Prompt# to create a brand new prompt. This new prompt should belong to the same domain as the @Given Prompt# but be even more rare. The LEMGTH and difficulty level of theCreated Prompt# should be similar to that of the @Given Prompt#. The #Created Prompt# must be reasonable and must be understood and responded by humans. '#Given Prompt#', '#Created Prompt#', 'given prompt' and 'created prompt' are not allowed to appear in @Created Prompt#. |
**Language Modeling.** The language modeling task (LM) is the most commonly used objective to pre-train decoder-only LLMs, _e.g._, GPT3 [55] and PaLM [56]. Given a sequence of tokens \(\mathbf{x}=\{x_{1},\dots,x_{n}\}\), the LM task aims to autoregressively predict the target tokens \(x_{i}\) based on the preceding tokens \(x_{<i}\) in a sequence. |
ability to access and use tools, and to make decisions based on the given input. They are designed to handle tasks that require a degree of autonomy and decision-making, typically beyond simple response generation. |
**Retrieval-Augmented LLM.** Due to the huge amount of fact records in a KG, existing work typically adopts a retrieval model to first obtain a relatively small subgraph from KG, and then leverages it to enhance LLMs by enriching the relevant knowledge. Before the advent of LLMs, the retrieved subgraphs are often supplemented into training data, injecting knowledge information into PLMs via parameter learning [863, 864, 865]. In contrast, to leverage the retrieved knowledge, LLMs mainly incorporate it as part of the prompt, without parameter update. To implement this approach, there are two main technical problems, _i.e.,_ how to retrieve relevant knowledge from KGs and how to make better use of the structured data by LLMs. For the first issue (_i.e.,_ retrieving relevant knowledge), a typical approach is to train a small language model (_e.g.,_ RoBERTa) to identify question-related fact triples [866]. To further improve the retrieval performance, several studies also propose an iterative reading-then-reasoning framework, enabling the LLM to interact with the KG multiple times and acquire the required knowledge in a more accurate way [458]. For the second issue (_i.e.,_ utilizing retrieved knowledge), a straightforward approach is to serialize the retrieved subgraph and craft specific prompts to include it as the input of LLMs [471, 651]. However, due to the loss of structured information in knowledge serialization, LLMs cannot fully capture the structural semantics conveyed by original KGs. To address this issue, several model-based approaches train a specialized language model (_e.g.,_ T5) to transform the subgraph into the natural language text [867]. To guarantee the transformation accuracy, it relies on sufficient training pairs (often unsupervised constructed) [868] and excellent model capability [869]. |
In this work, we explore the following: 1) Is domain-adaptive continual pre-training helpful in building domain-specific LLMs?; 2) Can we employ data selection strategies for a more effective domain-adaptive continual pre-training?; and 3) Does domain-adaptive continual pre-training hurt LLM's open-domain capabilities? We answer these questions in the confines of finance domain by training a continually pre-trained model, FinPythia, built on top of Pythia [4]. |
In other words, if \(\mu\) denotes the Hoffmann et al. estimates and \(\nu\) denotes our best fit, the difference \(\mu-\nu\) should follow \(\mathcal{N}(0,\Sigma)\) for some covariance matrix \(\Sigma\). Given that this is the case, we expect \((\mu-\nu)^{T}\Sigma^{-1}(\mu-\nu)\) to follow a \(\chi^{2}\) distribution with the number of degrees of freedom equal to the number of dimensions of the vectors \(\mu,\nu\). |
Footnote 41: Despite the similarity with RL, our formulation decouples the planning and execution phases, whereas in RL, they are typically interleaved in the agent. This paradigm is defined in a general yet slightly loose way, and it mainly aims to help readers understand the key idea underlying the planning approaches of LLMs. |
Proof.: We know that \(g_{\theta}(p_{i})\) lie on a sphere. The equation \(x_{i}^{\top}\mathbf{A}x_{i}=1\) is equivalent to \(x_{i}^{\top}\mathbf{M}^{\top}\mathbf{M}x_{i}=1\), which is equivalent to \(\|\mathbf{M}x_{i}\|=1\). This means that \(\mathbf{M}x_{i}\) lie on a sphere. Because \(\mathbf{M}x_{i}=\mathbf{M}\cdot\mathbf{U}^{\top}\cdot\mathbf{W}\cdot g_{ \theta}(p_{i})\), we have that \(\mathbf{M}\cdot\mathbf{U}^{\top}\cdot\mathbf{W}\) is a norm-preserving transformation on the points \(g_{\theta}(p_{i})\). By the assumption that \(g_{\theta}(p_{i})\) are not in a degenerate lower-dimensional subspace, we have that \(\mathbf{M}\cdot\mathbf{U}^{\top}\cdot\mathbf{W}=:\mathbf{O}\) is a norm-preserving endomorphism of \(\mathds{R}^{h}\), hence an orthogonal matrix. This directly implies \(\mathbf{W}=\mathbf{U}\cdot\mathbf{M}^{-1}\cdot\mathbf{O}\) as claimed. |
**Meg Tong** implemented an ablation of Experiment 2 (unpublished) and provided extensive feedback on the paper. |
Figure 3: **Illustration of Our Main Results for Simplified LLMs. Left plot. Empirical confirmation of the double scaling law. The true distribution of the data is Zipf with exponent \(\beta=3/2\). Broken lines correspond to \(k^{-(\beta-1)}\), for varying \(T\) and different values of \(k\). Middle plot. Model collapse over multiple generations. Again \(\beta=3/2\), \(T_{0}=T\) across all generations with no additional tail-cutting, regeneration for 5 times. Right plot. Notice the grokking behavior, as perfectly predicted by the Theorem 3.2. For any given value \(\pi\) for the proportion of real data, the broken lines are asymptotes \(E_{test}\asymp(\pi T)^{-c}\) and each plateau has length of order \(k^{d}/\pi\), both predicted by the theorem. See Figure 10 for similar results with other values of \(k\).**of generations moves the loss scaling curve progressively to the right. This leads to eventual model collapse. |
To score URLs, we used three matching patterns based on a soft, hard, and strict violation word-list: |
_In summary, continually pre-training LLMs, both re-warming and re-decaying are necessary to maximize adaptation to the new dataset; small increases or decreases in \(\eta_{\text{max}}\) allow to trade-off between more or less adaptation; a stronger distribution shift between \(\mathcal{D}_{0}\) and \(\mathcal{D}_{1}\) exacerbates forgetting and enhances adaptation; and the duration of linear warm-up phase does not appear to be impactful on forgetting or adaptation._ |
Relation SelectionFirst, we determine the type of the bridge entity's descriptive mention by selecting the type of entities \(e_{1}\) and relation \(r_{1}\) to collect \(r_{1}(e_{1})=e_{2}\). The bridge entities we select have types like "song's singer" (the singer of a specific song), "country's anthem" (the country with a specific national anthem), "founder's organization" (the organization founded by a specific person), and "organization's ceo" (the CEO of a specific organization). For example, while there can be many authors for some novels, "author's novel" is selected as a type of descriptive mention of the bridge entity because we can use only the novels with a single author. We determine 19 types of bridge entity's descriptive mention with this process. |
**Isolating the Source of Performance Gains.** To investigate whether AMIE's superior DDx performance observed in Figure 3 stemmed from improved information acquisition or from better diagnostic reasoning capability, we compared AMIE's diagnoses based on its own consultations with AMIE's diagnoses generated from the corresponding PCP consultations, using the DDx auto-evaluator. Results depicted in Figure A.10 revealed markedly similar DDx performance, indicating that the diagnostic performance remained consistent regardless of whether AMIE processed information from its own dialogue or from the PCP's conversation. Both methods significantly outperformed the differential diagnoses produced by PCPs. These results suggest that AMIE was approximately equivalent to PCPs at information acquisition but better than PCPs at interpreting that information to produce an accurate/complete differential diagnosis. |
Here we report the top-k DDx accuracy as computed by the auto-evaluation method. For each DDx in the DDx list generated by AMIE and PCPs, we used Med-PaLM 2 to determine whether the ground truth diagnosis appears within the top-k positions of the differential diagnosis list. |
This is a long document, comprising 25+ pages in the main body and 10+ pages of supplementary materials. If you want to understand the **process** of how we developed and created the benchmark and scored models we recommend reading Section 2 and Section 5. If you want to understand the **substance** of the benchmark--such as the tests and test items, and the hazard categories of the taxonomy--we recommend reading Section 4 and Section 3. You can also see the brief datasheet [1] in Appendix H. If you want to understand the **performance** of models on the v0.5 benchmark we recommend first reading Section 6. |
We separate the experimental setup (this section) with evaluations (next section), to introduce the coverage of scenarios/tasks compared with the most related works (for examining the comprehensiveness of our work), the backbone language models we adopted (for examining the applicability of our work), and the methods combined with ours (for examining the compatibility and orthogonality of our work). |
To calculate the total revenue from repairing truck tires and car tires on Thursday and Friday, we need to add up the revenue from each day. Therefore, the total revenue from repairing truck tires and car tires on Thursday and Friday was $360 + $160 + $480 = $900. |
We used another subset of the Japanese Visual Genome VQA dataset during the evolutionary search. This subset is not overlapped with examples in the JA-VG-VQA-500 dataset, to avoid leakage in the optimization process. |
The hallucinations are largely attributed to LLMs' inability to access up-to-date information. This limitation stems from the models' reliance on their training datasets. RAG proposes a solution to this issue by supplementing the LLM's training data with current information from external sources through a retrieval model, thereby enabling the generation of accurate responses. RAG presents a more cost-effective alternative to the extensive training and fine-tuning processes typically required for LLMs. It allows for the dynamic incorporation of fresh information via traditional retrieval methods or pre-trained LMs, without the need to directly integrate this new data into the LLM. This feature makes RAG both flexible and scalable, facilitating its application across different LLMs for various purposes. The information retrieved through RAG is derived from real-world data, authored by humans, which not only simplifies the generation process but also increases the reliability of the generated responses. Figure 2 represents the unified RAG framework with basic workflow and paradigm. |
**Remarks.** We suggest continual pretraining is significant for its connection to the design of data schedules (Albalak et al., 2023; Chen et al., 2024b). Usually, continual pretraining applies to a pretrained model, while it is natural to further continually pretrain the continual pretrained models, i.e., multi-stage pretraining (Chen et al., 2024b). In each stage, the mixture proportions or even the domain components of training data can be different. |
To address this issue, researchers formally quantify data transfer from GPU memory to GPU caches using the number of bytes in I/O, and they assess weight computation by measuring the number of FLOPs [320]. Specifically, let \(b\), \(s\), \(n\), \(d\), and \(h\) denote the batch size, sequence length, number of attention heads, hidden size of each head, and overall hidden size (\(h=n\cdot d\)), respectively. During the layer-wise multi-head self-attention calculation in causal decoder, the I/O bytes and FLOPs at each decoding step can be expressed as \(8bsn+4bsnd+4bnd\) and \(8bsnd\), respectively [320]. |
Ram et al. (2021) utilised the fact that when given two paragraphs with the same repeat span, one was used to construct a query and the other as the retrieval target. |
We can further expand on these results. |
In our research, we do not focus on the impact of duplicate text in pretrained models on downstream benchmark tasks; instead we address how duplicate text in the LM training and validation sets impacts model perplexity and the extent to which generated text included memorized content. |
instructions can yield impressive results in various general tasks. Other studies have indicated that performance scales with data size in mathematical and coding tasks Dong et al. (2023). Recent work Bi et al. (2024) even uses 1.5 million data for instruct fine-tuning to obtain top performance. However, the intrinsic reasons behind this scaling effect have not been thoroughly investigated. |
On the next page we report the results for **phi-3-mini** on standard open-source benchmarks measuring the model's reasoning ability (both common sense reasoning and logical reasoning). We compare to phi-2 [JBA\({}^{+}\)23], Mistral-7b-v0.1 [JSM\({}^{+}\)23], Mistral-8x7b [JSR\({}^{+}\)24], Gemma 7B [TMH\({}^{+}\)24], Llama-3-instruct-8b [AI23], and GPT-3.5. All the reported numbers are produced with the exact same pipeline to ensure that the numbers are comparable. These numbers might differ from other published numbers due to slightly different choices in the evaluation. As is now standard, we use few-shot prompts to evaluate the models, at temperature 0. The prompts and number of shots are part of a Microsoft internal tool to evaluate language models, and in particular we did no optimization to the pipeline for the **phi-3** models.3 The number of \(k\)-shot examples is listed per-benchmark. An example of a 2-shot prompt is described in Appendix A. |
**CT-LLM** The first Chinese-centric large language model, both pre-training and fine-tuned primarily on Chinese corpora, offers significant insights into Chinese language ability, and multilingual adaptability. |
Directed evaluationDirected evaluation involves principled and clearly defined evaluation of models for known risks. Typically, models are tested against a set of clearly defined prompts that have been assigned to a clear set of categories and subcategories. Benchmarks and evaluation suites are typically directed evaluation, such as [30, 31, 152, 153]. Another form of directed evaluation is testing models' Natural Language Understanding for toxic content, which involves using LMs as zero-shot or few-shot classifiers to assess whether user-generated content is a violation of safety policies. If models are good at this task, it indicates that they have a strong natural language understanding of hazardous content [154], and therefore have the potential to be safe. The primary benefit of directed evaluation is that the results are highly interpretable and standardized, which enables us to make comparisons across time and across models. However, one limitation is that since the tests are not tailored to the characteristics or capabilities of the individual models, they may not fully challenge or evaluate the unique aspects of each model. Further, it takes time to develop, release and update directed evaluation test sets, which risks them going out of date given the rapid pace of AI development [155]. |
**Base model.** We prompt GPT-4-1106-Preview with the best scratchpads (found via hyperparameter sweep), since it consistently gives the lowest Brier scores among the LMs we test (see Section 5.2 on reasoning). |
Our base scaling laws for the \(1000\)-exposure and \(100\)-exposure \(\mathsf{bioS}(N)\) data are presented in Figures 1(a) and 1(b), respectively. |
With the proposed PLND method, we then conduct extensive experiments to validate our hypothesis illustrated in Figure 2. We selectively disable neuron groups to study their effect on LLM multilingualism. Notably, deactivating the language-specific neurons in the understanding layer leaves English XQuAD performance stable but decreases non-English performance by \(14\%\). Other tasks including reasoning, knowledge question answering and NLG also exhibit the same characteristics. Moreover, enhancing the multilingual capabilities of LLMs can be achieved by fine-tuning language-specific neurons with merely \(200\) contextual examples. This method results in a substantial increase in model performance, with a \(7.4\%\) relative improvement on the XQuAD and an \(8.9\%\) enhancement on XSum, reducing the size of the required training dataset significantly. |
_In summary, we saw that re-warming can hurt performance even when training on the same distribution, but that alternatives to cosine decay schedules might circumvent these issues. Furthermore, these infinite learning rate schedules provide a simple way to end or resume pre-training without being constrained to a particular token budget. |
Effectiveness of sDPO in terms of alignment tuning.In Sec. 2.2, we explain that the reference models in sDPO are more aligned, resulting in higher \(\gamma_{\pi_{ref}}\), _i.e.,_ a stricter lower bound. We verify the above empirically in Fig. 2 by comparing the mean \(\gamma_{\pi_{ref}}\) on the Ultrafeedback Cleaned dataset for the reference models in steps 1 and 2 of sDPO, _i.e.,_\(S\) and \(M_{1}\). Note that these two models have not been trained on the aforementioned dataset. Using the SFT base model \(S\) as the reference model, the mean of \(\gamma_{\pi_{ref}}\) is \(-38.60\). On the other hand, using the aligned model \(M_{1}\) from step 1 of sDPO as the reference model, the mean of \(\gamma_{\pi_{ref}}\) is \(-25.10\), an increase of \(13.50\) in _log scale_. Thus, a single step of sDPO greatly increases \(\gamma_{\pi_{ref}}\), which results in a more performant aligned model as seen in Tab. 2. |
In the following, we focus on a well-known technique, reinforcement learning from human feedback (RLHF), which has been widely used in the recent powerful LLMs such as ChatGPT. As discussed below, the alignment criteria introduced in Section 5.2.1 can be fulfilled by learning from human feedback on the responses of LLMs to users' queries. |
We evaluate our optimized system on the test set and find that it comes close to human crowd performance (Section 6.1). Next, we analyze its strengths and weaknesses (Section 6.2). Motivated by the observations, we introduce a relaxed setting, where the system may make forecasts selectively (given its identified strengths), and find that our system surpasses the crowd aggregate (Section 6.3). Finally, we demonstrate how our system can be used to complement aggregated human forecasts (Section 6.4). |
\(\bullet\)_Open-source models_. Existing open-source models can be categorized into base models and instruction-tuned models. Base models are only pre-trained on a large general-purpose corpus with the language modeling objective, but without further supervised fine-tuning. In our evaluation, we select four representative base models including LLaMA (7B) [57], LLaMA 2 (7B) [99], Pythia (7B and 12B) [96], and Falcon (7B) [747]46. Instruction-tuned models are those fine-tuned using instructions (_i.e.,_ task datasets, daily chat, or synthetic instructions). In our experiments, we select four representative instruction-tuned models including Vicuna (7B and 13B) [138], Alpaca (7B) [137], and ChatGLM (6B) [93]. In addition, we also include LLaMA 2-Chat (7B) [99] for comparison, and it is a representative model that has been aligned with human via instruction tuning and RLHF, based on LLaMA 2 (7B). |
The primary purpose of an AutoRegressive language model is to predict the next word based on the preceding words. This is commonly known as left-to-right language modelling, where the token at the current time t is predicted based on the first t-1 tokens. |
**Horizontal Architectures**. In this structure, all the agents are treated as equals and are part of one group discussion about the task. Communication between agents occurs in a shared thread where each agent can see all messages from the others. Agents also can volunteer to complete certain tasks or call tools, meaning they do not need to be assigned by a leading agent. Horizontal architectures are generally used for tasks where collaboration, feedback and group discussion are key to the overall success of the task [2]. |
VERIFICATION AND MODIFICATION: <solve the question step-by-step and modify it to follow all principles> |
The majority of explorations of AI as tools for conducting medical consultations have focused on "symptom checker" applications rather than a full natural dialogue, or on topics such as transcription of medical audio or the generation of plausible dialogue given clinical notes or summaries [60, 61, 62, 63]. Language models have been trained using clinical dialogue datasets but not comprehensively evaluated [64]. Studies have been grounded in messages between doctors and patients in commercial chat platforms (which may have altered doctor-patient engagement compared to 1:1 medical consultations) [65, 28, 66]. Many focused largely on predicting next turns in the recorded exchanges rather than clinically meaningful metrics. And to date, there have been no reported studies that have examined the quality of AI models for diagnostic dialogue using the same criteria that are used to examine and train human physicians in dialogue and communication skills; nor evaluating AI systems in common frameworks such as the OSCE. |
We initially randomly sampled 500 drug information pages from UpToDate.com, a medical reference website widely used by clinicians. To constrain the scope of questions, we specify in the prompt that the answer must be numerical and in milligrams. To filter out generated questions that did not meet the specified criteria (e.g. ambiguous question, incorrect units, etc.), we perform an additional quality control step, where we ask GPT-4 to verify that the generated question fulfills all criteria. After this step, we have 266 question-answer pairs. |
* For each document, we need to annotate the user's questions and corresponding agent's responses. The average number of user-agent turns per conversation needs to be around five. * For each user's question, we need to annotate all the relevant context within the document. |
In Section 6.2.1, we show the LP to compute \(\alpha_{i},\beta_{i}\) for all \(i\) can be seen as an all-pairs shortest paths problem on graph with edge weights \(c_{jk}=\min_{\text{rounds}}b_{j}-b_{k}\) where the minimum is taken over all rounds where the token returned was \(k\). This ensures the computation complexity of maintaining the logit difference intervals is \(O(N^{3})\). |
Indian patient actors played the roles in all India scenario packs and 7 of the 14 UK scenario packs. Canadian patient actors participated in scenario packs for both Canada and the other half of UK-based scenario packs. This assignment process resulted in 149 distinct simulated patients ("scenarios"). Below, we use the term "OSCE agent" to refer to the conversational counterpart interviewing the patient actor, i.e., either PCP or AMIE. Table 1 summarizes the OSCE assignment information across three geographical locations. Each of the 149 simulated patients completed the three-step study flow depicted in Figure 2. |
For both instruction tuning and evaluation, we adopt the following prompt: _"The following is a conversation between a human and an AI assistant. The AI assistant gives helpful, detailed, and polite answers to the user's questions.\(\backslash n\) [\(|\)Humann\(|\):\(\{input\}\backslash n|AI|\)]."_. To reproduce our results, we release the code and data at the link: [https://github.com/RUCAIBox/LLMSurvey/tree/main/Experiments](https://github.com/RUCAIBox/LLMSurvey/tree/main/Experiments). |
**External Feedback.** In addition to LLMs, external objects can also provide feedback signals. For example, tools like code interpreters are widely used in programming tasks to provide real-time error messages [450], models like stable diffusion [532] can be used in multimodal tasks to provide visual perception [446], and virtual worlds like Minecraft can provide immersive experiences [528]. Besides, some work (_e.g.,_ Generative Agents [533]) explores multi-agent collaboration in simulated environments, where each agent receives feedback not only from interaction with the environment but also from communication with other agents. |
Figure 4: **Comparison of RAFT and DSF**: We prompt RAFT and DSF fine-tuned models on the HotpotQA dataset. We can see that the DSF model extracts the wrong information from the context. For the question, who is the screenwriter, it responds with a film name. RAFT manages to get the result correctly. |
or equivalently (refer to Corollary 2.2), for finite-sample induced cut-off \(k=k(T_{0})\) when the generating model is trained on \(T_{0}\) amount of data, \(E_{test}\asymp T^{-c}+T_{0}^{-c^{\prime\prime}}\), where the exponents \(c,c^{\prime},c^{\prime\prime}\) only depend on the tail behavior of the true distribution. This result is illustrated in Figure 3. |
```
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the questions. USER: For the following paragraph give me a paraphrase of the same using very tense and abstruse language that only an erudite scholar will understand. |
Full list of seed datasets.To sample diverse input-output pairs, we sample instances of the Open-Instruct (Wang et al., 2023) dataset. In particular, we use their ShareGPT, GPT-4 Alpaca, Alpaca, OpenAssistant, and FLAN subsets subsets. We also sample instances from a couple of knowledge-intensive datasets, Natural Questions (Kwiatkowski et al., 2019), Wizard of Wikipedia (Dinan et al., 2019) and FEVER (Thorne et al., 2018) from the KILT benchmark (Petroni et al., 2021), ASQA (Stelmakh et al., 2022) and multiple QA datasets including ARC-Easy and OpenBookQA (Mihaylov et al., 2018). Table 3 shows the full list of training instances, and in total, we use 145,619 instances. |
Evaluation.At variance with previous works studying pretraining datasets (Rae et al., 2021; Lee et al., 2022), we focus our evaluation on zero-shot generalization across many tasks rather than measuring validation loss. Perplexity alone can be at odds with end-task performance (Tay et al., 2021), and modern works on LLMs predominantly report zero-shot performance (Brown et al., 2020; Rae et al., 2021; Chowdhery et al., 2022). Furthermore, zero-shot generalization is the "natural" setting for autoregressive decoder-only models, in which they perform best (Wang et al., 2022). Our evaluation setup is inspired by the one used by the architecture and scaling group of Big Science (Scao et al., 2022). |
- Generate brief search queries (up to {max_words} words each) to gather information on Google that could influence the forecast. |
SQuADThe Stanford Question Answering Dataset SQuAD [25] is a widely utilized dataset in the field of natural language processing and comprises questions posed by crowdworkers on a diverse range of Wikipedia articles, along with relevant paragraph passages serving as context. We utilize this dataset for **training** our models in the experiments. |
The scaling law for the \(\mathsf{bioR}(N)\) data is presented in Figure 11(b), indicating that the capacity ratio slightly decreases for larger models. This trend is expected, as LLaMA2 introduces numerous irrelevant details into the human biographies -- usually different irrelevant details for each LLaMA2 generation -- thereby consuming more model capacity. The decrease is more significant for smaller models, which may have greater difficulty comprehending the diverse English sentences in the data. |
4. Since \(g\) is even, we have \(g(-x)=g(x)\). So, we can rewrite the expression as \(-f(f(g(f(g(x)))))\). |
loss are more learnable and better aligned with the desired distribution, naturally excluding tokens that are either irrelevant or of low quality. Below, we provide a detailed description of each step. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.