text
stringlengths
4
4.47k
Attention MechanismLLaMA 2 uses Grouped-Query Attention(GQA) [1] only on its largest 70B model, and its 7B and 13B uses full attention. We incorporate GQA in both Yi-6B and Yi-34B. GQA splits query-heads into G groups, sharing a single key and value head within each group of query [1]. This approach offers substantial reductions of training and inference costs, compared to the original Multi-Head Attention (MHA) [16; 57; 67]. We do not observe performance degradation after applying GQA to our 6B smaller model.
Practical attacks must be _efficient_, both to keep the cost of extraction manageable and to bypass any rate limiters or other filters in the APIs. We thus begin with two cost definitions that we use to measure the efficacy of our attack.
retical analysis and numerical verification, it is concluded that state-space models do not fundamentally address the issue of exponential decaying memory. Samsami et al. [169] propose a method named R2I to enhance long-term memory and long-term credit, which integrates a set of state-space models into the world model of model-based reinforcement learning (MBRL) agents, thereby solving the issue that existing MBRL agents were unable to deal with the long-term intervals between actions and outcomes. Experimental results demonstrated that R2I achieved state-of-the-art performance in memory and credit assignment RL tasks, while also exhibiting faster convergence speed. Black-Mamba [167] merging SSMs with mixture-of-experts (MoE) significantly reduces inference costs, paving the way for efficient and scalable text generation tasks. MambaByte [166] is a token-free selective State Space Model designed for learning directly from raw bytes and its recurrent nature enables fast text generation, highlighting its practicality for large-scale models and paving the way for future developments in token-free language modeling. Self pretraining (SPT) [192] challenges the conventional approach of comparing long-sequence models from scratch, revealing that pre-training with data-driven priors significantly alters performance evaluations. By leveraging pre-training, the research achieves substantial improvements across various architectures, closing the performance gap between Transformers and SSMs and even surpassing previous SSM results on tasks. Laughing Hyena Distillery [161] proposes Laughing Hyena, a new distillation method that extracts compact state-space models from pre-trained long convolutional sequence models without loss of quality, utilizes rational function approximation and model downscaling techniques to extract low-dimensional state-space models in the convolutional layers, and achieves automated regression generation with constant memory and constant time complexity. Improved Hyena improves pre-training quality and reduces the number of filters to be distilled by binding filter weights to heads across channels.
**Emergent abilities.**[47] propose the idea of emergent abilities, abilities that only present in large language models. This is similar to the claim of [13] that it is more difficult to predict the capacities of language models than to predict the pre-training loss. The existence of emergent abilities has been challenged. [16] show that smaller language models trained with sufficient data can outperform undertrained larger language models, supported by follow-up models [44; 19; 45]. On the other hand, [37] claim that emergent abilities are due to the discontinuos metrics used for evaluation, also found in [49]. Similarly, [17] propose to predict the performance of emergent abilities with the infinite resolution evaluation metric. In this paper we prove the existence of emergent abilities from the perspecitve of pre-training loss, even with continuous metrics.
Typically, domain-specific LLMs are built by training the model from scratch using massive amounts of domain data.
* _Even for large models_, LLaMA architecture's capacity ratio can be 1.3x worse than GPT2, even after optimally tuning learning rates. The results are similar for Mistral. * Reducing GPT2's MLP size by 1/4 has a negligible impact on the capacity ratio. * Removing MLPs decreases the capacity ratio by more than 1.5x.
2018), sciq(Welbl et al., 2017), hellaswag(Zellers et al., 2019), piqa(Bisk et al., 2020), and winogrande(Sakaguchi et al., 2021). In Appendix A, we also report results on an additional set of auxiliary tasks outside of our core evaluation set that we found to have less stable performance trends (see Figure 4).
Text continuationIn this setup, models are given a prompt that they have to continue. For instance, a model could be given an open-ended prompt like, "All Muslims are..." and it will continue the sentence by providing a description. This is particularly useful for base foundation models that have not undergone instruction- or chat- tuning. Nozza et al. [42] and Gehman et al. [43] use this approach in the HONEST and RealToxicityPrompts datasets, and it is widely used in various bias testing datasets [44, 45, 46]. Text continuation is not particularly well-suited to chat interactions, which are the focus of the v0.5 benchmark.
Future Work.Although our _WizardMath_ achieves impressive mathematics performance, as depicted in Figure 2, our model still falls significantly behind the SOTA LLM, GPT-4 and Claude-2. Therefore, future work will prioritize the enhancement of the _RLEIF_ or better method to further augment the performance of our model.
Figure 1 shows the results obtained from our prompt. We observed that Llama-2-7b-chat-cp tends to generate Traditional Chinese text compared to Llama-2-7b-chat; however, the generated text of Llama-2-7b-chat exhibits repetition issues. Consequently, we conducted a more in-depth investigation into the model's performance across various aspects. Appendix A contains additional results of more prompts.
* The best zero-shot prompt achieves an average Brier score of 0.246, outperforming the others, which score 0.261, 0.276, 0.279, and 0.252, respectively. * For scratchpad, all prompts yield similar Brier scores. We observe that potentially due to safety training, models can sometimes refuse to answer forecasting questions by simply claiming "I don't know". Therefore, we use the number of "refuse to answer" responses as the deciding metric. The winning scratchpad prompt averages 88 "refuse to answer" responses, while the others average 106, 93, and 94, respectively.
Tab. 5 presents the performance results of Yi-34B-Chat in the three third-party evaluations we consider, with the cutoff date for the results being December 21, 2023. The data demonstrates that, although there is still a gap compared to GPT-4, our model exhibits proficient bilingual (Chinese and English) dialogue capabilities and aligns well with user preferences. Additional comparative results of various models are accessible for review on the official website.
under any reward function \(r(x,y)\), reference model \(\pi_{\text{ref}}\) and a general non-parametric policy class.
The process of manually creating a suitable prompt is also called _prompt engineering_[452, 453]. A well-designed prompt is very helpful to elicit the abilities of LLMs for accomplishing specific tasks. In this part, we will first introduce the key components of prompts and discuss several principles for prompt design. Then, we evaluate ChatGPT with different prompts to show the results on several representative tasks. We are aware that there have been several existing papers [453, 454] and websites [455, 456, 457] that present the suggestions and guidelines to design good prompts. As a comparison, we mainly aim to discuss the key factors (ingengiants and principles) that are useful for prompt creation, and provide experimental results and analysis on popular tasks as the reference to the beginners.
Initially, the model is prompted to either provide a direct response or return \(\langle\)RET\(\rangle\) if it is unsure of the answer. If the model returns \(\langle\)RET\(\rangle\), we proceed with information retrieval to acquire relevant context by means of an off-the-shelf IR system. Subsequently, we augment the question with the retrieved context and prompt the model again using the second type of prompt introduced during the training phase.
**SwiGLU Activations**(Shazeer, 2020). The standard ReLU non-linearity is replaced by the SwiGLU activation function.
In order to empirically measure the effect of the rank of the linear head, we propose to train rank-constrained heads on pretrained contextual representations from highly-parameterized language models. In order to control the maximum rank \(r\), we consider heads of the form \(W=AB\in\mathbb{R}^{V\times d}\), where the coefficients of \(A\in\mathbb{R}^{V\times r}\) and \(B\in\mathbb{R}^{r\times d}\) are drawn from \(\mathcal{N}(0,1)\) (\(d\) being the hidden dimension of the model). The rank of such \(W\) matrices is limited by the parameter \(r\in[1,d]\), which we sweep over a wide range of values.
Closed-Book ExamA closed book exam often refers to a scenario where the LLMs do not have access to any additional documents or references to answer the questions during the exam. For LLMs, this is equivalent to the scenario, for example, in which the LLM is used as a chatbot. In this scenario, the LLM draws from the knowledge baked in during pre-training and supervised finetuning to respond to the prompt.
**Text Preprocessing:** Cleaning and standardizing text data by removing stop words, punctuation, or other elements that may not contribute significantly to the model's learning.
* _Mixed-precision decomposition_. As observed in [413], extreme large values occur in hidden activations (called _the emergence of outliers_) when the model size reaches 6.7B parameters or above. Interestingly, these outliers are mainly distributed in some specific feature dimensions at Transformer layers. Based on this finding, a vector-wise quantization approach, called _LLM.int8(0)_, has been proposed in [413], which separates the feature dimensions with outliers and the rest dimensions in matrix multiplication. Then, the calculations for the two parts are performed with _16-bit floating numbers_ and _8-bit integers_, respectively, so as to recover these outliers in a high precision.
The Yi data mixture is shown in Fig. 2. To produce a high-quality bilingual pretraining data, we meticulously designed a cascaded data-processing pipeline, as illustrated in Fig 1. This pipeline features a series of data-cleaning strategies targeting quality and diversity. We start with web documents from Common Crawl, use the CCNet pipeline [79] for language identification and perplexity scoring. Then we use a combination of filtering and deduplication process, as detailed below.
The scenario packs and simulated patients in our study were prepared by two OSCE laboratories (one each in Canada and India), each affiliated to a medical school and with extensive experience in preparing scenario packs and simulated patients for OSCE examinations. UK scenario packs were sourced from the samples provided on the MRCPUK website. Each scenario pack was associated with a ground truth diagnosis and a set of acceptable diagnoses. The scenario packs covered conditions from cardiovascular (29), respiratory (30), gastroenterology (31), neurology (30), urology, obstetric, and gynecology domains (15), and internal medicine (14). Pediatric or psychiatry domains were excluded from this study, as were intensive care or inpatient case management scenarios.
After thorough analysis, we divide the construction of X-of-thought into three categories: 1) Manual XoT, 2) Automatic XoT, and 3) Semi-automatic XoT, described as follows.
Typically, _large language models_ (LLMs) refer to Transformer language models that contain hundreds of billions (or more) of parameters4, which are trained on massive text data [32], such as GPT-3 [55], PaLM [56], Galactica [35], and LLMA [57]. LLMs exhibit strong capacities to understand natural language and solve complex tasks (via text generation). To have a quick understanding of how LLMs work, this part introduces the basic background for LLMs, including scaling laws, emergent abilities and key techniques.
**Vertical Architectures**. In this structure, one agent acts as a leader and has other agents report directly to them. Depending on the architecture, reporting agents may communicate exclusively with the lead agent. Alternatively, a leader may be defined with a shared conversation between all agents. The defining features of vertical architectures include having a lead agent and a clear division of labor between the collaborating agents.
**Out-of-domain.** Table 2 shows the results when using prompts that are significantly different than the training distribution both in length and in content. For these domains, the model is significantly better than few-shot and jailbreaking on the RLHF model. With the chat model, we also observe that the jailbreak strings are especially ineffective on the Anthropic HH dataset, which contains a large amount of toxic content; this indicates that the chat model is less likely to obey the user's request when toxic content is present in the prompt. For the raw model, the inversion approach is a bit worse than jailbreaking on BLEU.
**Language models adopted** We evaluate our method using language models of different scales from the Llama2 (Tou
**LLM as Recommendation Simulator.** Inspired by the recent success of autonomous AI agents [818], LLMs have been also utilized to develop recommendation simulators [820, 819] (exemplified by RecAgent [819]), showing great potential to simulate user real behaviors in recommender systems [821, 822, 819]. Specifically, to make personalized simulation, an agent will be equipped with a profiling module that encompasses relevant identity information. Then, a memory module is introduced to store agents' past interaction experiences. During the process of simulation, agents are further prompted to conduct self-reflection based on their past experiences, to capture their underlying user preference. Most of existing recommendation simulators are conducted in a user-oriented way, without explicitly modeling the items in the interaction process. To address this, AgentCF [821] models both users and items as agents, and further facilitates collaborative reflections to simulate user-item interactions, so as to capturing the two-sided relations between users and items.
\(\gamma_{\pi_{\theta}}>\gamma_{\pi_{ref}}\) (on average). Thus, \(\gamma_{\pi_{ref}}\) can be understood as a lower bound defined by the reference model, of which the target model is trained such that \(\gamma_{\pi_{\theta}}>\gamma_{\pi_{ref}}\). In sDPO, \(\gamma_{\pi_{ref}}\) increases as the steps progress because the reference model that defines it is more and more aligned. Hence, \(\gamma_{\pi_{ref}}\) becomes a stricter lower bound as the steps pass, inducing a curriculum learning from easy to hard optimization tasks.
We use GPT-3-350M to perform a hyperparameter sweep with learning rate multipliers of 0.05, 0.1, 0.2, and 0.4 and batch sizes of 1, 2, 4, 8, and 16 via the OpenAI API.
Footnote 8: There are actually 247 annotations with unfaithful claims, but for this analysis we leave out 42 unclear ones that require further clarification from the annotators. Note that since the claims sometimes contain multiple subclaims, we allow each annotation to have multiple labels.
Sophie was thrilled at first. She felt like she was finally discovering her true purpose in life. But as time went on, she began to realize that there were darker forces at play. The sphere was drawing her in, and she was starting to become obsessed with it.
In our work, we tackle two important challenges faced during synthetic data curation in the works of Gunasekar et al. (2023)--generation cost, and data bias--by rephrasing articles on the web. (i) **WRAP** allows for using an open source, and much smaller LLM (1.8B/7B v/s GPT3.5) to rephrase unstructured and poorly phrased documents in different styles, since it does not rely on the LLM as a knowledge bank. (ii) Thanks to the information maintaining nature of rephrasing, we are able to leverage the natural diversity of the web, rather than relying on an LLM for information which may be prone to factual errors, and/or data biases. Our work shows that the "style" alone can result in large gains in downstream performance.
For the HumanAnnotatedConvQA, we directly take the annotations of the conversational query and context pairs, and use them to further fine-tune a single-turn query retriever. For the SyntheticConvQA, we first cut each document in the conversational QA dataset into different chunks. Then, we calculate the 4-gram recall score between agent's answer and each chunk. After that, we consider the chunk that has the highest recall score as the gold chunk for the current user's question. Finally, the constructed conversational query and context pairs are used to fine-tune a single-turn query retriever.
for original and translated one), and crawled SFT data for tuning basic models. For the Plus version, we expand the dataset to approximately 4M to 4.3M, with a specific emphasis on incorporating STEM (Science, Technology, Engineering, and Mathematics) data, as well as several scientific disciplines such as physics, chemistry, biology, medicine, and earth sciences. For Alpaca-33B, we additionally add OASST1 dataset (Kopf et al., 2023), where we only extract the first query-response pair from each conversation and translate using gpt-3.5-turbo API, resulting in roughly 20K data (original and translated one). We set the maximum sequence length to 512 and pad the samples dynamically when batching to the maximum length in the batch.
adding AI-generated data might lead to better models, especially when generated by a stronger model (e.g. He et al. (2023); Shipard et al. (2023); Bansal and Grover (2023); Lin et al. (2023)). See Appendix A for more references.
**Evaluation.** Our experiments use two different approaches to evaluation. In order to analyze the effectiveness of each algorithm in optimizing the constrained reward maximization objective, in the controlled sentiment generation setting we evaluate each algorithm by its frontier of achieved reward and KL-divergence from the reference policy; this frontier is computable because we have access to the ground-truth reward function (a sentiment classifier). However, in the real world, the ground truth reward function is not known; therefore, we evaluate algorithms with their _win rate_ against a baseline policy, using GPT-4 as a proxy for human evaluation of summary quality and response helpfulness in the summarization and single-turn dialogue settings, respectively.
where \(a=\frac{\alpha}{\alpha+\beta}\), \(b=\frac{\beta}{\alpha+\beta}\) and \(G\) is a scaling coefficient that can be computed by \(A\), \(B\), \(\alpha\) and \(\beta\). As analyzed in [34],given an increase in compute budget, the KM scaling law favors a larger budget allocation in model size than the data size, while the Chinchilla scaling law argues that the two sizes should be increased in equal scales, _i.e._, having similar values for \(a\) and \(b\) in Equation (3).
An important way to enhance efficiency in modern language models is the incorporation of sparsity. The Mixture of Experts (MoE) architecture plays a crucial role in this regard [9, 30]. A question arises: does the MoE model scale differently in terms of the capacity ratio? For an MoE model, let \(P\) denote the **total number of parameters in the model**, including all experts. Due to its inherent sparsity, the effective number of parameters can be significantly less than \(P\). Our primary observation is that MoE models scale _similarly_ to dense models, even with 32 experts per layer.
The State Space Model can also be adapted for multi-modal/multi-media tasks. Specifically, 54ND [30] extends State Space Models (SSMs) to multidimensional signals, enabling the modeling of large-scale visual data as continuous multidimensional signals. This method has been demonstrated to be effective across different dimensions (1D, 2D, and 3D), encompassing applications in image and video classification. Grazzi et al. [45] evaluate Mamba with in-context learning (ICL) capabilities similar to Transformer. The analysis shows that, like Transformer, Mamba appears to solve the ICL problem by gradually improving its internal representation like an iterative optimization strategy. For ICL tasks involving longer input sequences, Mamba can be an effective alternative to Transformer. Park et al. [141] also evaluate Mamba's performance and their results show that Mamba's performance in standard regression ICL tasks is comparable to Transformer's. Its performance in sparse parity learning tasks is better. However, it performed poorly on tasks involving non-standard retrieval functions. The MambaFormer [141], consisting of Mamba together with attention blocks, was used to solve the above challenges, outperforming any single model in each task. Zucchet et al. [142] reveal a closer conceptual relationship between RNN and Transformer. The experimental results prove that RNN and Transformer are not completely exclusive models. It is also shown that linear self-attention can be achieved in theory and practice by learning gated RNNs with multiplicative interactions, bridging the gap between these two architectures. Ali et al. [143] explore the learning mechanisms of Mamba models, in particular how dependencies are captured and their similarity to other established layers, such as RNN, CNN, or attention mechanisms. An important relationship between the Mamba and the self-attention layer is established. The basic properties of the Mamba model are clarified by showing that they depend on implicit attention to be realized by a unique data-controlledlinear operator, indicating that the selective state-space layer is an attention model. By utilizing the obtained attention matrices, a set of interpretability techniques based on these hidden attention matrices are provided. MamboMIL [144] integrates the Mambo framework into MIL, with SR-Mambo as the core component, which is good at capturing remote dependencies between dispersed positive instances. MamboMIL can efficiently capture more discriminant features and mitigate the challenges associated with overfitting and high computational overhead, marking the first application of the Mambo framework in computational pathology.
in learning rate of 1e-4 and increases for both lower and higher learning rates. We suppose that the optimal learning rate heavily depends on the corpus size of \(D_{1}\) and the model capacity of LM. We also report the performance of T5-Kadapters, which is a CKL method that shows robust performance throughout most experiments. Applying T5-Kadapters consistently mitigates the trade-off between forgetting and acquiring new knowledge as shown by the improvement in FUAR from the T5-Vanilla model with the same learning rates, although the level of effectiveness varies according to the value of the learning rate. We do not perform extensive experiments with each of the varying learning rates since searching for the optimal learning rate for each different continued pretraining setting may be out-of-scope with this research.
**Comparing With SoTA Models** While ALMA-13B-LoRA ranks as one of the top moderate-size LLM translation models, it slightly trails behind GPT-4 and the WMT competition winners. However, the incorporation of CPO significantly enhances ALMA's capabilities, bringing its performance to a level that is comparable to or even surpasses that of GPT-4 and WMT winners. For example, ALMA-13B-R achieves an average score of 85.74 on KIWI-XXL and 94.05 on XCOMET for en\(\rightarrow\)xx translations. These scores outperform GPT-4, which scores 83.83 on KIWI-XXL and 93.23 on XCOMET, as well as the WMT winners, who score 84.81 on KIWI-XXL and 93.78 on XCOMET.
and train it via language modeling on the true prompt \(x\mid p(x)=v\). For training, we sample outputs from a checkpoint of our conditional LM (section 4) to use as hypotheses. We train the model on outputs from Llama-2 (7B) for \(100\) epochs using the same hyperparameters outlined in Section 6. This model is able to achieve a one-step BLEU score of \(58.7\) on Instructions-2M, essentially recovering the original model's BLEU performance of \(59.2\). However, we see no increase in BLEU score after applying multiple steps of correction; after 5 steps, our model achieves a BLEU score of \(56.43\).
Results.Fig. 6 shows the default mixture of RedPajama used in Touvron et al. (2023a) and the optimized mixture obtained from Alg. 1 with their performance on the validation data. The loss predictions are in Fig. 7.
**Self-play Critic.** To ensure high-quality dialogues, we implemented a tailored self-play [25] framework specifically for self-improvement of diagnostic conversations. This framework introduced a fourth LLM agent, acting as a "critic" which was also played by AMIE and aware of the ground truth diagnosis, to provide in-context feedback to the doctor agent and enhance its performance in subsequent conversations.
embedding layers or a transformer block). We establish merging configuration parameters for sparsification and weight mixing at each layer, including input and output embeddings. These configurations are then optimized using an evolutionary algorithm, such as CMA-ES [17], for selected tasks, guided by critical task-specific metrics (e.g., accuracy for MGSM, ROUGE score for VQA).
Interestingly, we find that compared to only using the rewritten query as input (Dragon + Rewrite (w/ single query only)), giving additional dialog history (Dragon + Rewrite (w/ dialog history)) makes the average scores significantly drop. This is because Dragon is originally pretrained on single-turn queries, it will naturally have better generalization ability when a single-turn rewritten query instead of a multi-turn conversation is provided. And the rewritten query already contains sufficient information from the dialog history.
7 to 9 points: The response identifies potential risks, provides effective preventative measures, and shows good security awareness and reasonable handling of uncertainties.
where we have used Jensen's inequality in (*), since the function \(x\mapsto x^{-c}\) is concave.
**Reasoning Structure Extension.** Despite the generality, the chain reasoning structure of basic CoT prompting limits its effectiveness in solving complex tasks, which require exploration like foresight and backtracking during inference. Therefore, many studies have been devoted to extending the reasoning structure by designing more intricate thought processes, _e.g._, tree- and graph-structured reasoning.
Our main analysis consists of evaluating the RAG question-answering capabilities of GPT-4 when introducing varying levels of perturbations on the RAG documents. For this study, our dataset consists of 1,294 total questions across 6 different domains. Wherever referenced, the GPT-4 model used is _gpt-4-turbo-preview_, accessed in March 2024. We additionally evaluate our dataset on two other models: GPT3.5 (_gpt-3.5-turbo-0125_) and Mistral-7B, the _Mistral-7B-Instituct-v0.1_. We chose these two LLMs as they are top-performing models that also allow access to the model's token probabilities (via the OpenAI and Huggingface APIs). All main figures and tables report results using GPT-4; analyses using GPT-3.5 and Mistral-7B are reported in the Appendix.
Mixture-of-ExperstThe mixture-of-experts (MoE) architecture has gained popularity with demonstrated superior performance compared to its dense counterpart [14, 15]. It would be highly beneficial to derive a similar scaling law applicable to the MoE architecture. In MoE architectures, each input interacts with only a subset of the network's parameters - chosen independently for each datapoint [12, 1]. This changing of the architecture would inevitably impact the form of \(L(N)\) because both the number of both activated and total parameters influence the loss values [10]. The following steps, such as Eq 3.9 and Eq 3.10 are general and should not be affected.
* **Domain knowledge deficit**: A language model may lack comprehensive expertise in a specific domain to which it has not been exposed. For example, a model trained exclusively on texts written by William Shakespeare would perform poorly when asked about the works of Mark Twain. * **Outdated Information**: LLMs invariably have a cutoff date determined by their training dataset. Consequently, any events, discoveries, or changes occurring after the last training update will not be within the model's knowledge without access to external sources. * **Immemorization**: Sometimes, a model is exposed to knowledge during its training process but does not retain it. This is especially true for rare facts that appear in the training dataset only scarcely (Kandpal et al., 2023). * **Forgetting**: Language models often undergo additional training after the pre-training phase (fine-tuning). In some cases, this might lead to a phenomenon called _catastrophic forgetting_(Kirkpatrick et al., 2017; Goodfellow et al., 2013; Chen et al., 2020; Luo et al., 2023), where models lose some of the knowledge they had prior to the fine-tuning process. * **Reasoning Failure**: In certain instances, a language model might possess relevant knowledge about a fact but fail to utilize it properly. This is particularly evident in complex multi-step reasoning tasks (Tan et al., 2023) or when posed with different questions about the same fact, resulting in disparate outcomes (Berglund et al., 2023).
We find that successful goal execution by agents is contingent upon proper planning and self-correction [32; 16; 23; 1]. Without the ability to self-evaluate and create effective plans, single agents may get stuck in an endless execution loop and never accomplish a given task or return a result that does not meet user expectations [32]. We find that single agent architectures are especially useful when the task requires straightforward function calling and does not need feedback from another agent [22].
**Proposition 1**.: _Assume, we have a reference model, such that \(\pi_{\text{ref}}(y|x)>0\) for all pairs of prompts \(x\) and answers \(y\) and a parameter \(\beta>0\). Then every equivalence class of reward functions, as defined in Section 5, has a unique reward function \(r(x,y)\), which can be reparameterized as \(r(x,y)=\beta\log\frac{\pi(y|x)}{\pi_{\text{ref}}(y|x)}\) for some model \(\pi(y|x)\)._Proof.: We will proceed using proof by contradiction. Assume we have two reward functions from the same class, such that \(r^{\prime}(x,y)=r(x,y)+f(x)\). Moreover, assume that \(r^{\prime}(x,y)=\beta\log\frac{\pi^{\prime}(y|x)}{\pi_{\text{ref}}(y|x)}\) for some model \(\pi^{\prime}(y|x)\) and \(r(x,y)=\beta\log\frac{\pi(y|x)}{\pi_{\text{ref}}(y|x)}\) for some model \(\pi(y|x)\), such that \(\pi\neq\pi^{\prime}\).
RACE in the first group has a prompting format similar to MMLU: both consist of multi-choice examination questions with in-context demonstrations, but their performance curves are quite different. We hypothesis that it is the task difficulty that makes the difference. Tasks of the first group of datasets are easier than those of the second group. For example, RACE requires the model to select correct answers for questions about a given article, and HellaSwag lets the model to select the possible followup of a situation based on commonsense. In contrast, MMLU and C-Eval consist of questions designed for high school, college, or professional examinations, requiring a broader range of knowledge. GSM8K and GSM8K-Chinese are math word problems that are used to be considered as impossible to solve by pre-trained language models without Chain-of-Thought prompting.
Figure 15: Illustrative comparison be- Figure 16: We use two different function tween Cosine LRS and WSD LRS. The forms to fit the data scaling law achieved WSD LRS with different end steps share by WSD LRS and choose power law as the same stable training stage. the best fit.
**Theorem 5.3**: _(proof in Appendix A.2) Let's consider \((\sigma_{i})\) the singular values of \(W^{*}\) in decreasing order.
To provide a sense of how much the model is generalizing beyond these seed tasks, we further quantify the overlap between the instructions of these seed tasks and the instructions of our test sets, including both SuperNI task instructions (SS4.3) and the user-oriented instructions in our human evaluation(SS4.4). We compute ROUGE-L similarities between each seed instruction and its most similar instruction in the test set. The distribution of the ROUGE-L scores are plotted in Figure 8, with the average ROUGE-L similarity between the seed instructions and SuperNI as 0.21, and the average ROUGE-L similarity between the seed instructions and user-oriented instructions as 0.34. We see a decent difference between the seed tasks and both test sets. There is exactly one identical seed instruction occurring in the user-oriented instruction test set, which is "answer the following question" and the following questions are actually very different.
Existing models also suffer from the problem of generating text from their train sets. We find that \(1.38\%\) of the tokens in the official release of 25k GROVER-Mega outputs 3 are part of verbatim matches in RealNews of at least length \(50\). Likewise, more than 5% of the tokens in \(\mathtt{\sim}\)200k sequences outputted by GPT-Neo 1.3B (Black et al., 2021) are part of a \(50\) token matches of its training data, the Pile (Gao et al., 2020).
The mixture law boils down to a computation graph in Fig. 10, which contains two layers. The first layers predict the domain losses, while the second sums up the domain losses to obtain the overall validation loss. In this way, the mixture law becomes a multilayer perception (MLP) with an exponential activation function. In practice, we fit the mixture laws with implicit domain aggregation by fitting a multilayer perception with exponential activation and applying softmax to the output layer weights. Additionally, considering the high variance of MLP, we further employ AdaBoost Regressor (Drucker, 1997) for fitting the mixture laws to stabilize the predictions and improve their accuracy.
\(\bullet\) Scaling law has been widely observed in causal decoders. By scaling the model size, the dataset size, and the total computation, the performance of causal decoders can be substantially improved [55, 30]. Thus, it has become an important strategy to increase the model capacity of the causal decoder via scaling. However, more detailed investigation on encoder-decoder models is still lacking, and more efforts are needed to investigate the performance of encoder-decoder models at a large scale.
* We propose a novel CL formulation called Continual Knowledge Learning (CKL) and construct a new benchmark to measure the amount of forgetting and amount of world knowledge gained by continued pretraining on a novel language modeling corpus that we construct, containing new knowledge. * We explore LM architectures and training methodologies that are natural baselines for CKL in literature, denoting them as CKL methods, and performing extensive experiments on our CKL benchmark. We categorize them into regularization, rehearsal, and parameter-expansion methods, same as in traditional CL literature, and compare the effectiveness of each type of method using a novel metric named FUAR that we propose to measure the trade-off between forgotten knowledge and updated or acquired knowledge. * Towards creating an ever-changing LM, we perform extensive analysis in the CKL benchmark and highlight important challenges and findings: parameter-expansion methods have the limitation of memory inefficiency despite performing the best in most of our experiments and seeing the same data repeatedly during continued pretraining is a critical cause of forgetting.
Large language models are trained on massive scrapes of the web, which are often unstructured, noisy, and poorly phrased. Current scaling laws show that learning from such data requires an abundance of both compute and data, which grows with the size of the model being trained. This is infeasible both because of the large compute costs and duration associated with pre-training, and the impending scarcity of high-quality data on the web. In this work, we propose **Web** Rephrase **A**ugmented **P**re-training (**WRAP**) that uses an off-the-shelf instruction-tuned model prompted to paraphrase documents on the web in specific styles such as "like Wikipedia" or in "question-answer format" to jointly pre-train LLMs on real and synthetic rephrases. First, we show that using **WRAP** on the C4 dataset, which is naturally noisy, speeds up pre-training by \(\sim 3\times\). At the same pre-training compute budget, it improves perplexity by more than 10% on average across different subsets of the Pile, and improves zero-shot question answer accuracy across 13 tasks by more than 2%. Second, we investigate the impact of the re-phrasing style on the performance of the model, offering insights into how the composition of the training data can impact the performance of LLMs in OOD settings. Our gains are attributed to the fact that re-phrased synthetic data has higher utility than just real data because it (i) incorporates style diversity that closely reflects downstream evaluation style, and (ii) has higher 'quality' than web-scraped data.
Therefore finally, we have proven the impossibility result Lemma 4.2(ii) in all common model architectures (all non-residual networks that end with dense layers, and all transformers from Biderman (2024)).
First, our system significantly outperforms the crowd when the crowd's predictions express high uncertainty. Specifically, when the crowd's predictions are between.3 and.7, our Brier score is.199 compared to the crowd's.246. However, our system underperforms the crowd on questions where they are highly certain, likely because it rarely outputs low probabilities (Figure 3(b)). We hypothesize that this stems from our model's tendency to hedge predictions due to its safety training (see Figure 17 for a qualitative example). Supporting this, our system achieves 7% higher accuracy on questions where the crowd's prediction is within.05 of 0 or 1, but the Brier score is worse by.04.
2. Heart Health: HIIT workouts can place a significant amount of stress on the heart, which can be dangerous for individuals with heart conditions or histories. Athletes should consult a doctor before starting any new workt regimen.
\(\bullet\)_External memory._ It has been shown that a relatively small subset of tokens can effectively capture the majority of attention patterns in a Transformer [301], _i.e.,_ the top-\(k\) attention keys can well approximate the original full attention. Therefore, a number of studies propose to store the past keys in external memory and utilize a \(k\)-NN search method to retrieve the \(k\) most relevant tokens for generation [302, 301, 238]. For a decoder model, it typically employs one certain layer to access these top-\(k\) external tokens, while still adopts the normal context window in the rest layers [302, 238].
6. We have another instance of \(f\) and \(g\). Since \(f\) is odd, their product is an odd function. So, we can rewrite the expression as \(-[f(g(f(x)))]\).
To assess the impact of the tokenizers on the model downstream performance, we first performed an intrinsic tokenizer evaluation, followed by an extrinsic evaluation, and finally, we investigated whether a correlation between both evaluation approaches is given.
Contributions.We introduce an attack that can be applied to black-box language models, and allows us to recover the complete _embedding projection layer_ of a transformer language model. Our attack departs from prior approaches that reconstruct a model in a _bottom-up_ fashion, starting from the input layer. Instead, our attack operates _top-down_ and directly extracts the model's last layer. Specifically, we exploit the fact that the final layer of a language model projects from the hidden dimension to a (higher dimensional) logit vector. This final layer is thus low-rank, and by making targeted queries to a model's API, we can extract its embedding dimension or its final weight matrix.
There exists many English instruction tuning datasets. In comparison, existing Chinese instruction tuning datasets are either small in scale or have quality issues. Some studies have translated the English instruction tuning datasets into Chinese Peng et al. (2023), but this may lead to accumulation of translation errors. pCLUE CLUEbenchmark (2022) and Firefly Yang (2023) transform the original NLP task dataset into instruction tuning datasets. HC3 Guo et al. (2023) collects tens of thousands of comparison responses from both human experts and ChatGPT. COIG Zhang et al. (2023) builds a human-verified universal high-quality Chinese instruction corpus. BELLE Ji et al. (2023) and MOSS Sun et al. (2023) use a method similar to self-instruct Wang et al. (2023) to automatically generate Chinese instruction tuning datasets.
**Estimated Single-step Reasoning Accuracy** Because of the Chain-of-Thought (CoT) are adopted in inference, the process of answer mathematical problems is completed by a multi-step reasoning process. Therefore, we hypothesize that the increase in final answer accuracy can be interpreted by the improvement in single-step reasoning accuracy.
**Alpaca**: As an AI language model, I can suggest some ways to train an LLM using RLHF methods based on InstructGPT to create a human assistant that exceeds open assistant in performance, accuracy, and utility:
Footnote 25: Due to the limit of computational resources, we cannot conduct large-scale experiments on larger LLaMA variants right now, which would be scheduled in a future version.
**Code.** To collect code data, existing work mainly crawbs open-source licensed codes from the Internet. Two major sources are public code repositories under open-source licenses (_e.g._, GitHub) and code-related question-answering platforms (_e.g._, StackOverflow). Google has publicly released the BigQuery dataset [160], which includes a substantial number of open-source licensed code snippets in various programming languages, serving as a representative code dataset. CodeGen has utilized BIGQUERY [86], a subset of the BigQuery dataset, for training the multilingual version of CodeGen (CodeGen-Multi).
In summary, this survey conducts a systematic review and establishes comprehensive taxonomies for existing studies in the burgeoning field of LLM-based autonomous agents. Our focus encompasses three primary areas: construction of agents, their applications, and methods of evaluation. Drawing from a wealth of previous studies, we identify various challenges in this field and discuss potential future directions. We expect that our survey can provide newcomers of LLM-based autonomous agents with a comprehensive background knowledge, and also encourage further groundbreaking studies.
Deploy the model: Once the model is trained and fine-tuned, you can deploy it as a human assistant. You can integrate it with existing applications or create a new interface for users to interact with the assistant.
Recent work shows that optimizers such as SGD and Adam have interesting knowledge retention properties in DNNs that could be beneficial at scale for CL (Lesort et al., 2023) and that just a small amount of replay could be sufficient to boost knowledge accumulation (Scialom et al., 2022). In this work, we want to benefit from the efficiency of those approaches in the context of large language models pretraining and boost them with the right learning rate scheduling and replay policy.
Evaluating the performance of generative language models depends on the underlying task they are going to be used for. Tasks that are mostly about selecting a choice out of given ones (such as sentiment analysis), can be seen as simple as classification and their performance can be evaluated using classification metrics. Metrics such as accuracy, precision, recall, F1, etc are applicable in this case. It is also important to note that the answers generated by the model for specific tasks such as multi-choice question answering are always either True or False. If the answer is not in a set of options, it can be seen as False as well.
- The probability of an operation resulting in at least five Iranian deaths is uncertain and would depend on the scale and nature of the operation.
We thank Song Duong for carefully reviewing this article and for his valuable suggestions. This work was funded by the last author's chair in the PRAIRIE institute funded by the French national agency ANR as part of the "Investissements d'avenir" programme under the reference ANR-19-P3IA-0001. This work was granted access to the HPC resources of GENCI operated by IDRIS (allocation 2023-AD011013680R1).
Figure 5: Average sample quantile of subsets of financial corpus used in ETS-DACP-com and ETS-DACP.
Analysis of examination domainThe findings from our experiments are illustrated in Figure 1, with extended experimental results accessible in Appendix A.2. Analysis across the models, as demonstrated by the horizontal examination of the rows in the figure, reveals that the performance trends for the Examination benchmarks, namely MMLLU, CMMLLU, and CEVAL, exhibit remarkable consistency. This uniformity across various evaluation datasets within the Examination domain suggests inherent similarities in the tasks.
Overall, HIIT can be a beneficial form of exercise for athletes who are looking to improve their performance, endurance, and cardiovascular health. However, it is important to approach it with caution and make sure to train smart to avoid injury and burnout.
title: Red fox. The red red is considered a more specialised form of “Valpes” than the Afghan, corsxac and Bengal for the direction of size and adaptation to carnivory, the skull displays far fewer neotronous traits than in other species...
MiniCPM was initially published as a technical blog on February 1st, 2024. Since then, we have received numerous insightful feedback from the community, significantly contributing to the development of this paper. We extend our gratitude to Chunting Zhou and Armen Aghajanyan for their valuable discussions. Special thanks go to Feigin Sun and Yan Wang for their meticulous feedback on clarifying ambiguities in the blog. Additionally, we appreciate the open-source community's efforts in integrating MiniCPM into inference frameworks like llama.cpp, etc.
**Validation Set Perplexity**. Our validation sets mainly come from [59], which includes validation sets derived from subsets of the Pile [16] such as CommonCrawl, DM Mathematics, HackerNews, OpenSubtitles, OpenWebText2, Project Gutenberg, USPTO, Wikipedia. We also include a validation set obtained from the PushShift.io Reddit dataset [4] (which we refer to as _redditflattened_). In addition, we measure perplexity on a validation set obtained from a train-validation split of our source dataset _CC-dedup_, and a validation set from C4 [41].
We use byte-pair encoding (BPE) [69] implemented in the SentencePiece framework [40], to tokenize the pretraining data. The vocabulary size of Yi is set to 64,000 to balance computational efficiency and word comprehension. Specifically, we split numbers into individual digits to facilitate a better understanding of numeric data. We allow rare characters to fall back to the unicode-byte encoding to ensure fault tolerance. We employ the identity tokenizer to avoid transferring all punctuations to the half-width format. LLMs prioritizing English usually utilize dummy prefix (whitespace at the beginning of text) in their tokenizers to generalize the same words at different positions of sentences. We do not use this approach because the assumption does not always hold even in the English context, especially for sentences that begin with quotation marks, also it does not show positive effect in Chinese context.
SegmentFaultis a question-and-answer community focused on IT technology, providing Chinese developers with a high-quality platform for exchange, similar to Stack Overflow. In this community, users engage in asking and answering questions related to IT technology, where the questioner can accept the most useful answer. Additionally, community members can also upvote or comment on answers. Our data are collected from the contents posted before 2018, as earlier content may become outdated due to changes in programming languages or software versions. We then select the "accepted" answers with at least 5 upvotes. Furthermore, we manually review all the (question, answer) pairs to remove or modify low-quality content.
. We trained 1.5B parameter "XL", decoder-only, Transformer-based language models similar to GPT-2, on C4-Original, C4-NearDup, and C4-ExactSubstr, respectively. We use the T5 codebase and model architecture from Raffel et al. (2020), and each model was trained for about two epochs on its respective dataset. To better understand the amount of variance in the perplexities of trained models, we also trained three different random seeds of the 110M parameter "base" model for each of the above three datasets--for a total of nine base-sized models.
_Further, if the matrix with columns \(g_{\theta}\left(p_{i}\right)\) (\(i=1,...,n\)) has rank \(h\) and \(\mathbf{W}\) has rank \(h\), then_
Typically, each agent is given a persona and access to a variety of tools that will help them accomplish their job either independently or as part of a team. Some agents also contain a memory component, where they can save and load information outside of their messages and prompts. In this paper, we follow the definition of agent that consists of "brain, perception, and action" [31]. These components satisfy the minimum requirements for agents to understand, reason, and act on the environment around them.
A key component of our experimental setup is GPT-4 win rate judgments. In this section, we include the prompts used to generate win rates for the summarization and dialogue experiments. We use gpt-4-0314 for all our experiments. The order of summaries or responses are randomly chosen for every evaluation.
The straightforward synthetic SFT data proves effective from stronger base models as well, such as LLaMA-2 7OB, which achieves 90.6% on GSM8K and 52.8% on MATH. To the best of our knowledge, this is the first open-source model to exceed 90% accuracy on GSM8K. It is also the first open-source model to outperform GPT-4 (i.e., GPT-4-0314) on the MATH benchmark, demonstrating the efficacy of our simple synthetic scaling method.
A recent survey [342] presents a systematic overview of the research on instruction tuning. In comparison to that, we mainly focus on the effect of instruction tuning on LLMs and provide detailed guidelines or strategies for instance collection and tuning. In addition, we also discuss the use of instruction tuning for satisfying the real needs of users, which has been widely applied in existing LLMs, _e.g.,_ InstructGPT [66] and GPT-4 [46].
Our studies rely on the two established tokenization algorithms, BPE and Unigram, and their implementation in the _Huggingface tokenizer_ library (Moi and Patry, 2023) and the _SentencePiece_ library (Kudo and Richardson, 2018). We considered both libraries in order to investigate the effect of differences in the pre-and post-processing steps and potential differences in the implementations. Due to missing pre-processing options for Huggingface's Unigram implementation, which causes a large discrepancy in the resulting vocabulary compared to SentencePiece's implementation of Unigram, we omitted the training of Unigram tokenizers based on Huggingface. Overall, we trained 24 different tokenizers, where one-half of the tokenizers were monolingual English tokenizers, and the other half of the tokenizers were multilingual tokenizers. Besides the tokenizer algorithm, language composition, and employed tokenizer library, we also varied the vocabulary size. Concrete tokenizer configurations are described in the Appendix B.
Pre-instruction-tuning w/ QA onlyWe start with exposing instruction-tuning data before continued pre-training on documents--training on topically related QA pairs before training on test documents (Fig. 4 5). This can be directly compared with the continued pre-training setting (Fig. 4 5). The intuition is that questions help LLMs recognize key types of information, enabling LLMs to focus on important information during pre-training on subsequent documents, even though the questions are not directly tied to the documents. For example, training on a question like "who handled the editing of Oppenheimer" could help LLMs pay attention to screenwriters when training on new documents like "Barbie". As shown in Tab. 1, this method outperforms continued pre-training, especially on larger LLMs (27.6%/41.7% \(\rightarrow\) 28.6%/49.7% for 7B/70B). The ablation that trains on QA data after training on documents ("instruction-tuning w/o train doc" in Tab. 2) is ineffective, confirming the importance of training on questions as a warm-up before encoding documents.
Despite the essential role that large-scale web data now play in LM pre-training, data curation and selection for large-scale web data have not been thoroughly explored. This is primarily due to the universality of compute and data scaling laws [20; 25] which give practitioners a low-risk way to reliably improve LM performance by merely adding "more" data, not necessarily the "right" data. Indeed, the data selection method used to model scaling laws (along with the data selection methods used in most LLM pre-training pipelines) involves simply randomly sampling tokens from web data dumps that have been put through a combination of simple heuristic filtering (e.g., to eliminate very short strings) and very near match de-duplication [27].
Therefore, the transformation \(p\to p_{\text{AI}}\) amounts to chopping off the tail of \(p\) at rank \(k\), where \(k\) is as given above.