text
stringlengths
4
4.47k
Data Dimensionality and PerformanceSharma & Kaplan (2022) link the scaling laws observed across pretrained models to data dimensionality, through the lens of Intrinsic Dimension (Camastra & Staiano, 2016). While they show that Singular Value Decomposition (SVD) is not suited for studying the dimensionality of the data manifold in the universal approximation paradigm, we argue that it is well-suited, to a certain extent, when studying the performance of a linear classifier limited by the dimensionality of input representations.
\(\bullet\)_Absolute position embedding._ In the vanilla Transformer [22], absolute position embeddings are employed. At the bottoms of the encoder and the decoder, the absolute positional embeddings are added to the input embeddings. There are two variants of absolute position embeddings proposed in the vanilla Transformer [22], _i.e._, sinusoidal and learned position embeddings, where the latter is commonly used in existing pre-trained language models.
We perform base model evaluation at two stages: _online_ evaluation to make decisions for model design and _offline_ evaluation to evaluate model checkpoints. For the offline stage, we use the Catwalk framework (Groeneveld et al., 2023), a publicly available evaluation tool with access to a wide range of datasets and task formats. Using Catwalk, we perform downstream evaluation as well as intrinsic language modeling evaluation on the new perplexity benchmark, Paloma (Magnusson et al., 2023).
**Agent Persona**. An agent persona describes the role or personality that the agent should take on, including any other instructions specific to that agent. Personas also contain descriptions of any tools the agent has access to. They make the agent aware of their role, the purpose of their tools, and how to leverage them effectively. Researchers have found that "shaped personality verifiably influences Large Language Model (LLM) behavior in common downstream (i.e. subsequent) tasks, such as writing social media posts" [21]. Solutions that use multiple agent personas to solve problems also show significant improvements compared to Chain-of-Thought (CoT) prompting where the model is asked to break down its plans step by step [28, 29].
In total, 73,632 reasonings are generated from which 13,253 meet the above desiderata. Finally, we fine-tune GPT-4-06132 on the 6,000 most recent points for 2 epochs, due to budget constraint (Figure 2, right).
We find that existing language modeling datasets contain many near-duplicate examples and long repetitive substrings. As a result, over \(1\%\) of the unprompted output of language models trained on these datasets is copied verbatim from the training data. We develop two tools that allow us to deduplicate training datasets--for example removing from C4 a single 61 word English sentence that is repeated over \(60{,}000\) times. Deduplication allows us to train models that emit memorized text ten times less frequently and require fewer training steps to achieve the same or better accuracy. We can also reduce train-test overlap, which affects over \(4\%\) of the validation set of standard datasets, thus allowing for more accurate evaluation. Code for deduplication is released at [https://github.com/google-research/deduplicate-text-datasets](https://github.com/google-research/deduplicate-text-datasets).
We want to highlight that the discrepancy of the performances among the CKL methods between encoder-decoder LM (T5) and decoder-only LM (GPT-2) may not solely be on the LM architecture, but also on the learning rate and the evaluation method (light-tuning was used to evaluate GPT-2 while we evaluated T5 in a zero-shot manner). We leave further exploration of training ever-changing decoder-only LMs such as GPT-2 as future work.
4. Training: Train the model using RLHF methods to improve its performance and accuracy. This can be done by fine-tuning the pre-trained model on a specific task or by training the model from scratch.
\(\bullet\)_LLM-based approaches._ Another line of work selects demonstrations by making use of LLMs. For example, LLMs can be utilized to directly measure the informativeness of each example according to the performance gain after adding the example [484]. In addition, EPR [429] proposes a two-stage retrieval approach that first recalls similar examples with an unsupervised method (_e.g.,_ BM25) and then ranks them using a dense retriever (trained with positive and negative examples labeled by LLMs). As an alternative approach, the task of demonstration selection can be formulated into a RL problem, where LLMs serve as the reward function to provide feedback for training the policy model [485]. Since LLMs perform well for text annotation [486], some recent studies employ LLM itself as the demonstration generator without human intervention [487].
clear pitfalls -- for example, if we took thousands of wikipedia articles about unrelated topics and appended the same email at the end of each article, they might be clustered together.
We conduct comprehensive experiments to evaluate CodecLM using different LLMs on multiple representative benchmarks, closely following well-established evaluation settings for open-domain instruction following in prior work (Xu et al., 2023; Chen et al., 2023). We also conduct a case study in Appendix A.8 to illustrate how CodecLM tailors an instruction step by step.
**Parameter 9** (Figure 16, Figure 17).: In the 1000-exposure setting for GPT2-MoE models with 32 experts, we slightly increase the learning rates while keeping other parameters nearly identical to Parameter 1:
We start the evolution from a given initial instruction dataset \(D^{(0)}=\left(I_{k}^{(0)},R_{k}^{(0)}\right)_{1\leq k\leq N}\), where \(I_{k}^{(0)}\) is the \(k\)-th instruction in \(D^{(0)}\), \(R_{k}^{(0)}\) is the corresponding response for the \(k\)-th instruction, and \(N\) is the number of samples in \(D^{(0)}\). In each evolution, we upgrade all the \(I^{(t)}\) in \(D^{(t)}\) to \(I^{(t+1)}\) by applying a LLM instruction evolution prompt, and then use the LLM to generate corresponding responses \(R^{t+1}\) for the newly evolved \(I^{t+1}\). Thus, we obtain an evolved instruction dataset \(D^{t+1}\). By iteratively performing \(M\) evolutions, we can sequentially obtain \(M\) evolution datasets \([D^{(1)}\cdots D^{(M)}]\). Our work focuses on open-domain instruction data, where instructions have varying inputs and tasks without a clear distinction between the instruction part and the input.
Following previous literature (Strubell et al., 2019; Patterson et al., 2021; Wu et al., 2022; Dodge et al., 2022), we estimate the total energy consumed and carbon released while pretraining our models by calculating the total power consumption required for training, and then multiplying it by the carbon emission intensity of the power grid where the model was trained. While reporting these operational emissions is standard practice, it does not account for other sources of emissions such as the embodied emissions due to the manufacturing, transportation and disposal of hardware and datacenter infrastructure, lifetime operational emissions due to use, rebound effects, or other environmental impacts such as water consumption or mining. Thus our estimates should be viewed as lower bounds.
\(\bullet\)_A larger model scale leads to a better instruction following performance._ By comparing the performance of LLaMA (7B) and LLaMA (13B) models fine-tuned with the same set of instruction data, we can see that LLaMA (13B) mostly achieves a better performance. It indicates that scaling the model size is helpful for improving the instruction following capability. Besides, we can see that the QA performance has been improved a lot, _e.g._, from 38.11 to 47.49 in MMLU. It is likely because that the larger models generally have better knowledge utilization and reasoning capability [33, 55], which can accurately answer more complex questions.
Unlike greedy search that only considers the next most probable token, beam search takes into account the **N** most likely tokens, where **N** denotes the number of beams. This procedure is repeated until a predefined maximum sequence length is reached or an end-of-sequence token appears. At this point, the sequence of tokens (AKA "beam") with the highest overall score is chosen as the output. For example for beam size of 2 and maximum length of 5, the beam search needs to keep track of \(2^{5}=32\) possible sequences. So it is more computationally intensive than greedy search.
Furthermore, we investigated the differences in token filtering across various checkpoints during the training process and tested the perplexity of these tokens on different checkpoints. As illustrated in Figure 8, we found that the tokens selected by later checkpoints tend to have higher perplexity towards the later stages of training and lower perplexity in the earlier stages. This may suggest that the model first optimizes tokens with a larger learnable space, thereby increasing learning efficiency. Moreover, we noticed a sample-wise "double descent" (Nakkiran et al., 2021) on the loss of selected tokens, where the select token's perplexity initially increases before decreases. This might be an effect of selecting tokens based on excess loss, targeting those most in need at each checkpoint.
To map the SVG coordinates to the model size and training FLOP values, we used the location of the labels or ticks on the respective axes. This allowed us to establish a correspondence between the SVG coordinates and the actual data values represented in the plot.
For questions that resolve before they close, we exclude all dates occurring after the question has been resolved. Under this geometric retrieval schedule, we retain 86% of retrieval dates on average across all questions (Figure 10(b)). The average question window in our corpus is approximately 70 days, and the average time until resolution is 42 days.
In a realistic scenario, tools like LLaMA2 can rewrite pretrain data like we did in \(\mathsf{bioR}\). Rewriting data 40 times can produce 40 distinct English paragraphs, sometimes with (different) hallucinated contents. Does this require the model to be 40x larger? No, our comparison between \(\mathsf{bioS}\) and \(\mathsf{bioR}\) shows that, if trained for the same duration (40 rewrites each for 25 passes), the model's capacity ratio remains nearly the same, slightly lower due to irrelevant data introduced by LLaMA2.
Chinese Alpaca is trained on a combination of instruction-following datasets. Each example in the dataset consists of an instruction and an output. The supervised fine-tuning task is similar to the causal language modeling task: the model is prompted with the instruction and trained to generate the output autoregressively. The instruction is wrapped in a prompt template, and the output immediately follows the template.
We replicated the Amber model utilizing the Llama2-7B configuration. The tokenized data from Amber, originally processed with a sequence length of 2048, was further detokenized and re-encoded to a sequence length of 4096 as per the preprocessing strategy of Megatron-LM (Shoeybi et al., 2020). In aligning with the Llama2 model's architecture and hyperparameters, we adopted a sequence length of 4096 and a batch size of 4 million tokens. In order to increase the training efficiency, we incorporate GQA technologies, utilizing a configuration with 32 attention heads and a group size of 4.
Vascepa is safe for you, tell your doctor if you have: 1 liver disease; 2 diabetes; 3 a thyroid disorder; 4 problems with your pancreas; 5 a bleeding or blood-clotting disorder; 6 if you are allergic to fish or shellfish; or, 7 if you drink large amounts of alcohol, Vascepa (icosapent) works in the liver and bloodstream to reduce very low-density triglycerides.##
Now, it is only possible to view logprobs of _generated_ tokens. And since only the very last token is generated, we can only view four logprobs for this single longer query. This, however, presents a potential approach to reduce the query and token cost: if there were some way to cause the model to emit a specific sequence of tokens \(\begin{bmatrix}p_{n+1}&p_{n+2}&\dots&p_{n+m}\end{bmatrix}\), then we could inspect the logprob vector of each generated token.
Total salary = Adrien's salary four years later + Lylah's salary four years later = $56000 + $39200 = $95200
**Stable Training Stage.** We utilize around 1T data (see Section 11 for data distribution), with the majority of the data sourced from open datasets. We use the optimal configuration discovered during the model wind tunnel experiments, WSD LRS, with a batch size of 3.93 million and a max learning rate of 0.01.
Further improving quality and diversity of synthetic data.While existing methods for generating synthetic data have shown promise, there is still room for improvement in terms of creating high-quality, attributed synthetic samples that closely mimic real-world data. Future research should focus on developing new advanced techniques (or based on existing ones such as Generative Adversarial Networks (GANs) (Goodfellow et al., 2020) or Diffusion Models (Ho et al., 2020), _inter alia_) that can control and manipulate specific attributes of the generated data, enabling the creation of diverse and customizable synthetic datasets. Additionally, researchers should explore methods that can incorporate domain-specific knowledge to ensure the generated data adheres to the underlying constraints and patterns present in the target domain (e.g., via Retrieval Augmented Generation (RAG) (Borgeaud et al., 2022; Lewis et al., 2020)) while maintaining the data quality. By advancing the state-of-the-art in attributed synthetic data generation, we can unlock new opportunities for privacy-preserving analysis (Assefa et al., 2020), and model training across various fields, from healthcare (e.g., synthetic medical images (Frid-Adar et al., 2018; Wei et al., 2019)) and finance (e.g., simulated trading trajectories (Zheng et al., 2022)) to social sciences (Argyle et al., 2023; Park et al., 2023) and beyond.
On the other hand, as models keep scaling, the world knowledge encoded in their parameters does too [16]. Many previous efforts have shown that language models are able to memorize a significant amount of world knowledge and achieve competitive performance on tasks such as open-domain question answering when they just use their parametric knowledge for solving the task [20, 1, 34, 35].
If we write the relationship between how many duck eggs Janet has left, how many she eats, and how many she bakes for the muffins, then we can see how many eggs she has left to sell at the farmers' market.
Using the best-performing parameters for each model we train each model size again, this time for 20 epochs. We use five seeds for each model size. Again we do not observe any convergence. Instead the accuracy fluctuates randomly between 0 and 7. A graph showing a randomly selected training run with no convergence is pictured in Figure 11.
Pre-training plays a key role that encodes general knowledge from large-scale corpus into the massive model parameters. For training LLMs, there are two commonly used pre-training tasks, namely language modeling and denoising autoencoding.
Recent research has highlighted a "scaling law" in the field of context-based language models (Kaplan et al., 2020; Hernandez et al., 2021; Anil et al., 2023), showing a proportional relationship between the size of the model plus the training data and the resulting performance improvements. Consequently, this has led to the advent of Large Language Models (LLMs). In contrast to earlier models, LLMs can perform in-context learning, which includes abilities such as zero-shot learning (Radford et al., 2019) and few-shot learning (Brown et al., 2020), allowing them to adapt and perform tasks without the need for weight adjustments. These emergent abilities of LLMs, absent in their smaller counterparts, signal a significant evolution in language model capabilities (Wei et al., 2022).
For individuals working with non-English languages, creating a LLM from scratch can be computationally intensive. As a result, many turn to adopt open-source, English-based pre-trained LLMs, such as BLOOM (Workshop et al., 2023), LLaMA2 (Touvron et al., 2023), and Mistral-7B (Jiang et al., 2023), as foundational models. Inspired by Ouyang et al.
In our experiments, we show that our approach outperforms baseline models on long-context language modeling benchmarks while having 114x comprehension ratio in terms of memory size. The model achieves even better perplexity when trained with 100K sequence length. A 1B LLM naturally scales to 1M sequence length and solves the pasaskey retrieval task when injected with Infini-attention. Finally, we show that a 8B model with Infini-attention reaches a new SOTA result on a 500K length book summarization task after continual pre-training and task fine-tuning.
code. Its features include providing detailed explanations of error messages, suggesting potential fixes, and ensuring the accuracy of the code. PENTESTGPT [125] is a penetration testing tool based on LLMs, which can effectively identify common vulnerabilities, and interpret source code to develop exploits. DB-GPT [41] utilizes the capabilities of LLMs to systematically assess potential root causes of anomalies in databases. Through the implementation of a tree of thought approach, DB-GPT enables LLMs to backtrack to previous steps in case the current step proves unsuccessful, thus enhancing the accuracy of the diagnosis process.
The representation degeneration problem is a common phenomenon that affects self-supervised learning methods used for textual data (Gao et al., 2019; Lai et al., 2023), among other modalities (Jing et al., 2022; Godey et al., 2024). Many observations on the intermediate representations of Language Models (LMs) have shed light on their low angular variability (or _anisotropy_) (Zhou et al., 2021; Rajee & Pilehvar, 2022) or on outlier dimensions that emerged during training (Puccetti et al., 2022). However, these observations were mostly made on relatively small-scale models of dimensions comparable to BERT (Devlin et al., 2019) or models from the GPT-2 family (Radford et al., 2019).
Broadly speaking, ExactSubstr-Cut might remove text mid-sentence resulting in disconnected text; ExactSubstr-Mask does not have this issue, but might be less efficient as a significant portion of the training tokens will not directly contribute to updating the model's weights; ExactSubstr-Drop might still keep considerable duplicated sections in its Partial version, especially on larger documents, while the Any version might be overly aggressive. Following ablations in Appendix E.1, we choose to stick with the vanilla approach, ExactSubstr-Cut.
We prompt GPT-4-1106-Preview with the optimal scratchpad prompt (Figure 15), along with the 2 next best scratchpad prompts identified in Section 5.2. For our fine-tuned model, we set temperature \(T=0.5\) and prompt it 3 times to sample 3 additional forecasts. This gives us 6 forecasts in total: 3 from the base model, and 3 from the fine-tuned model. Given these forecasts, the system ensembles them into a final prediction by taking their trimmed mean, as this performs best on the validation set among the ensemble methods we implement (see Section 5.2 on ensembling).
Human alignment has been discussed a lot for traditional LLMs. In the field of LLM-based autonomous agent, especially when the agents are leveraged for simulation, we believe this concept should be discussed more in depth. In order to better serve human-beings, traditional LLMs are usually fine-tuned to be aligned with correct human values, for example, the agent should not plan to make a bomb for avening society. However, when the agents are leveraged for real-world simulation, an ideal simulator should be able to honestly depict diverse human traits, including the ones with incorrect values. Actually, simulating the human negative aspects can be even more important, since an important goal of simulation is to discover and solve problems, and without negative aspects means no problem to be solved. For example, to simulate the real-world society, we may have to allow the agent to plan for making a bomb, and observe how it will act to implement the plan as well as the influence of its behaviors. Based on these observations, people can make better actions to stop similar behaviors in real-world society. Inspired by the above case, maybe an important problem for agent-based simulation is how to conduct generalized human alignment, that is, for different purposes and applications, the agent should be able to align with diverse human values. However, existing powerful LLMs including ChatGPT and GPT-4 are mostly aligned with unified human values. Thus, an interesting direction is how to "realign" these models by designing proper prompting strategies.
As AI model size grows, neural _scaling laws_ have become a crucial tool to predict the improvements of large models when increasing capacity and the size of original (human or natural) training data. Yet, the widespread use of popular models means that the ecosystem of online data and text will co-evolve to progressively contain increased amounts of synthesized data. In this paper we ask: _How will the scaling laws change in the inevitable regime where synthetic data makes its way into the training corpus?_ Will future models, still improve, or be doomed to degenerate up to total _(model) collapse_? We develop a theoretical framework of model collapse through the lens of scaling laws. We discover a wide range of decay phenomena, analyzing loss of scaling, shifted scaling with number of generations, the "un-learning" of skills, and grokking when mixing human and synthesized data. Our theory is validated by large-scale experiments with a transformer on an arithmetic task and text generation using the large language model Llama2.
(3) _External Models_. Previous studies often utilize external models to expand the range of possible actions. In comparison to APIs, external models typically handle more complex tasks. Each external model may correspond to multiple APIs. For example, to enhance the text retrieval capability, MemoryBank [39] incorporates two language models: one is designed to encode the input text, while the other is responsible for matching the query statements. ViperGPT [74] firstly uses Codex, which is implemented based on language model, to generate Python code from text descriptions, and then executes the code to complete the given tasks. TPTU [67] incorporates various LLMs to accomplish a wide range of language generation tasks such as generating code, producing lyrics, and more. ChemCrow [75] is an LLM-based chemical agent designed to perform tasks in organic synthesis, drug discovery, and material design. It utilizes seventeen expert-designed models to assist its operations.
**Event forecasting.** Machine learning systems that make accurate, automated forecasts can help inform human decision-making (Hendrycks et al., 2021). Jin et al.
Here, \(\Theta\) represents the model parameters, \(\mathcal{D}_{\text{SFT}}\) is the fine-tuning dataset, \(\mathbf{x}=(x_{0},x_{1},\ldots)\) represents the tokenized input sequence.
For search query generation, we evaluate the prompts by retrieving articles with the generated queries and examining two metrics: (1) the average relevance score across all retrieved articles, and (2) the average relevance score of articles exceeding a relevance threshold of 4 on a 6-point scale. The 2 high-scoring prompts perform similarly under both metrics and generate queries with little overlap. As a result, we use both prompts (Figure 12) to generate queries and take the union.
Perplexity on LM1B.Figure 7 is the same as Figure 2 of the main paper, except with perplexity on LM1B included. LM1B was omitted from the main paper's figure in order to improve readability.
Studies such as FiD Izacard and Grave (2021), COKLi et al. (2023), and Query2doc Wang et al. (2023) emphasize the significance of creating new queries or refining existing ones to achieve more pertinent retrieval results. These research efforts highlight the necessity of efficiently gathering evidence from multiple passages and tailoring queries to suit various knowledge sources, whether structured or unstructured. Techniques ranging from the creation of pseudo-documents to enhance queries have shown to bolster retrieval performance across diverse information retrieval datasets.
Figure 2: **The performance-vs-loss curves of smaller models pre-trained with different numbers of training tokens**. Each data point is the loss (\(x\)-axis) and performance (\(y\)-axis) of the final checkpoint of one model, i.e., each point corresponds to one model trained from scratch. We mark the results of random guess in black dashed lines.
**Tasks and Datasets.** Next, we set up the evaluation tasks and datasets for the abilities discussed in Section 7.1 and Section 7.2. We mainly evaluate the zero-shot performance of LLMs on these datasets. For more complex tasks that are hard to be solved in the zero-shot manner (_e.g.,_ mathematical reasoning and tool manipulation), we mainly report the 3-shot performance, considering the context length limit of open-source models.
This is the same objective optimized in prior works [49; 38; 1; 26] using the DPO-equivalent reward for the reward class of \(r_{\phi}\). In this setting, we can interpret the normalization term in \(f(r_{\phi},\pi_{\text{ref}},\beta)\) as the soft value function of the reference policy \(\pi_{\text{ref}}\). While this term does not affect the optimal solution, without it, the policy gradient of the objective could have high variance, making learning unstable. We can accommodate for the normalization term using a learned value function, but that can also be difficult to optimize. Alternatively, prior works have normalized rewards using a human completion baseline, essentially a single sample Monte-Carlo estimate of the normalizing term. In contrast the DPO reparameterization yields a reward function that does not require any baselines.
This is well known for LLM pre-training Kandpal et al. (2023), and we see in this case that this holds for fine-tuning as well. The rationale for this hypothesis is that mere memorization of sentences does not entail knowledge of their content, as was already shown in Berglund et al. (2023). By providing the information in numerous forms (like the data augmentation process we used), the various relationships in the data (e.g., \(a\implies b,\ b\implies c\)) stand a higher chance of appearing naturally. We believe this can potentially both increase \(\mathcal{L_{M,Q}}\) in general, as well as ameliorate Berglund et al.'s _Reversal Curse_. While promising, this result still warrants further research.
This section presents the researchers' efforts on the RALM architecture as a whole, including End-to-End Training and Build intermediate modules.
**Synthetic Datasets.** This kind of datasets are typically constructed by instructing LLMs, based on pre-defined guidance rules or methods. In this category, Self-Instruct-52K [143], Alpaca [142] and Baire [175] are three commonly used synthetic datasets for LLMs.
Model merging in the parameter space (PS) aims to integrate the weights of multiple foundational models into a unified entity with the same neural network architecture, yet outperforming the individual models. While various strategies for combining model parameters exist [34; 48], our approach leverages task vectors analysis to understand each model's strengths, based on the specific tasks they are optimized for or excel in [21].
**Token cost:** the number of tokens the adversary sends to (or receives from) the model during the attack. Most APIs charge users per-token, so this metric represents the monetary cost of an attack (after scaling by the token cost).
To our knowledge, our work is the first to theoretically and empirically analyze model collapse in the context of scaling laws and emergent abilities to provide a rich new landscape of AI-data induced phenomena.
Model integrators(e.g., deployers and implementers of models and purchasers). This category primarily covers developers who use AI models, such as application developers and engineers who integrate a foundation model into their product. Typically, model integrators will use a model created by another company (or team), either using openly released model weights or black box APIs. Our community outreach and research indicates that model integrators' objectives include (i) comparing models and making a decision about which to use; (ii) deciding whether to use safety filtering and guardrails, and understanding how they impact model safety; (iii) minimizing the risk of non-compliance with relevant regulations and laws; and (iv) ensuring their product achieves its goal (e.g., being helpful and useful) while being safe.
RAG combines retrieval methods and advanced deep learning to address two main questions: effectively retrieving relevant information and generating accurate responses. The workflow of RAG is outlined in Section 2, categorizing the methodologies into pre-retrieval, retrieval, post-retrieval, and generation phases. These sections, from 3 to 6, provide an in-depth analysis of the technologies within these phases. Section 7 offers summaries of the reviewed studies, along with the retrievers and generators utilized. Section 8 details the evaluation methodologies for RAG. Section 9 explores future research directions, concentrating on text-based studies and extending to image and multimodal data considerations. The conclusion is presented in Section 10.
GoalThe original scaling-law paper is comprehensive, encompassing a wide range of content. To emphasize the key aspects useful for pre-training large language models, this paper concentrates on estimating the following three functions, which serve as foundations of scaling laws.
To provide more intuition, we discuss the meanings of the coefficients in Eqn. 7. In general, \(k_{i}>0\), thus the exponential term is always positive and the prediction loss is strictly greater than the constant \(c\). Hereby, \(c_{i}\) represents losses that are not reducible by adjusting the data mixture. \(t_{ij}\), depending on both training domain \(i\) and validation domain \(j\), shows the interaction between them. A negative \(t_{ij}\) indicates that training data of domain \(j\) helps reduce validation loss on domain \(i\) and vice versa. Besides, rewriting the coefficient \(k_{i}\) into \(\exp(\log k_{i})\) makes it a bias term on the exponent which adjusts the aggregate effect of all training domains.
Considering that each input remains the same when we increase the number of agents, the sampling phase can be optimized to reduce the cost. Nonetheless, such a challenge of escalating costs commonly exist in works requiring multiple LLM calls (Wang et al., 2023; Du et al., 2023). We leave it as a future work to optimize.
MetaMath: According to Yu et al. (2023), GPT-3.5-Turbo is employed to rephrase queries and responses in both MATH and GSM8K datasets and to introduce reverse engineering problems.
For simplicity, assume \(N\geq k+1\) (otherwise, we have all of \(p\)). Build a "Hutter" LLM from an iid sample of size \(T\) from this distribution (this is equivalent to mixing \(T\) samples from \(q\) and \(T\) samples from \(\pi\).
Wei et al. (2022) first propose chain-of-thought prompting (Few-shot CoT) by manually providing natural language form rationales to the demonstrations. To further ensure certainty in the reasoning process and reduce inconsistencies between reasoning path and answers, PAL Gao et al. (2023), PoT Chen et al. (2022) and NLEP Zhang et al. (2023) leverage programming language as annotated rationales, which transforms the problem-solving into an executable Python program. Meanwhile, to take both advantages of natural language and programming language and raise the confidence of reasoning output, MathPromter Imani et al. (2023) uses the zero-shot chain-of-thought prompting to generate multiple algebraic expressions or Python functions, which can verify each other and improve the reliability of results. Furthermore, since the reasoning complexity of samples in demonstrations, such as chains with more reasoning steps, results in performance improvement Fu et al. (2023) proposes complexity-based prompting, where voting among high-complexity rationales is performed to get the final answer.
**Pros and Cons of RLHF**. RLHF was early explored in the literature of deep RL [79], then borrowed to improve the capacity of language models (_e.g.,_ summarization [129]), and subsequently adopted as the fundamental technique to develop InstructGPT [66]. Recently, increasing evidence [99, 371] has demonstrated the effectiveness of RLHF in mitigating the harmful responses and enhancing the model capacity. Specially, LLaMA 2 has demonstrated that RLHF can improve both the helpfulness and harmlessness scores [99], and attributed this to a better human-LLM synergy for data annotation. They explain this reason in two major aspects as follows. First, since human annotators mainly provide preference annotations for RLHF, it can largely alleviate the discrepancies of annotators as that in SFT. Secondly, preference annotation is much easier than writing the demonstration data, and annotators can even judge the quality of more superior generations than those they create, making it possible to explore a broader state space beyond what can be demonstrated by human annotators. Another key point is that RLHF essentially encourages LLMs to learn correct policies by contrasting the self-generated responses (discriminating between good and bad responses). It no longer forces the model to imitate external demonstration data, and thus can mitigate the hallucination issues with SFT as discussed above31. Actually, RLHF has been demonstrated to be an important approach to reduce the hallucination behaviors in GPT-4 [46]. However, RLHF inherits the drawbacks of classic RL algorithms, _e.g.,_ sample inefficiency and training instability. When adapted to LLMs, RLHF further relies on a strong SFT model as initial model checkpoint for efficiently achieving good performance. In addition, human annotators are involved in a complex iterative optimization process, in which a number of important details (_e.g.,_ the prompt selection, the schedule of reward model training and PPO training, and the settings of hyper-parameters) have important impact on the whole model performance.
(Bai et al., 2022; Ouyang et al., 2022)), the model can correctly solve 97.7% of GSM8K questions and 72.0% of MATH questions, when selecting the best answer from 256 random generations, as indicated by the orange star marks in Figure 1. It is noteworthy that the accuracy has even outperformed those reported for the GPT-4 model, which achieved 92.0% on GSM8K and 42.5% on MATH 1. Therefore, we conclude that the LLaMA-2 7B model has indeed developed strong mathematical capabilities. The primary issue is the lack of guarantee that the correct answer will be digged out, as most generations are incorrect. In fact, the accuracy drops to 49.5% on GSM8K and 7.9% on MATH if we consider only one random generation per question. We refer to this as the _instability issue_.
Formally, we can extract the log probability of word \(\log p(v)=f(v)-\log Z\) as follows: First, find a logit bias \(b_{v}\) that makes word \(v\) more probable than highest probability word \(v^{*}\).
Upon conclusion of the consultation, the patient actor and OSCE agent each filled in a post-questionnaire in light of the resulting consultation transcript (Figure A.3). The post-questionnaire for patient actors consisted of the complete GMCPQ (Table A.1), the PACES components for "Managing Patient Concerns" and "Maintaining Patient Welfare" (Table A.2), and a checklist representation of the PCCBP category for "Fostering the Relationship" (Table A.3). Responses patient actors provided to the post-questionnaire are referred to as "patient actor ratings" below. The post-questionnaire for the OSCE agent asked for a ranked differential diagnosis (DDx) list with a minimum of 3 and no more than 10 conditions, as well as recommendations for escalation to in-person or video-based consultation, investigations, treatments, management plan, and the need for a follow-up.
Discover savings up to $8,086 on one of 1,258 Chrysler 200s near you. Get expert and consumer car reviews, dealer reviews, car comparisons, and pricing tools from Edmunds. We have 4,850,420 listings for 2015 Chrysler 200 Sedan 4D 200C I4 prices, used values, and more. While we wrote about the stalling problem with the 2011 Chrysler 200, we still receive occasional calls regarding the issue. However, a more significant issue has taken over the phone lines recently - 2015 Chrysler 200 transmission problems that leave drivers with check engine lights, harsh shifting, and occasional loss of power. Despite the premium price for its style and horsepower, rear-seat room and handling are better bargains elsewhere. The 2015 Chrysler 200 is rated 8.4 by The Car Connection.
title: Bengal fox. "Valpes bengalensis" is a relatively small fox with an elongated muzzle, long, pointed ears, and a busy tall about 50 to 60% of the length of the head and body. Its dorsal please is very variable, but mostly grayish and paler unitrally, it is legs tend to be brownish or or rolus. It is more almittly hain than “Valpes cubes”. The tail is busy with a prominent black tip which distinguishes it from “V. vulpes”. Back of ears are dark brown with black margin. Its tiniariation is naked and the lips are black, with small black hair patches on upper or far wake (ahird) in front of eyes.
\[\pi^{*}(y|x)=\frac{1}{Z(x)}\pi_{\text{ref}}(y|x)\exp\left(\frac{1}{\beta}r(x,y)\right),\]which is a valid probability distribution as \(\pi^{*}(y|x)\geq 0\) for all \(y\) and \(\sum_{y}\pi^{*}(y|x)=1\).
Task: Extract all the country names in the paragraph, list them separated by commas. Example 1 Paragraph: Dr. No is the sixth novel by the English author Ian Fleming to feature his British Secret Service agent James Bond. Written at Fleming's Goldeneye estate in Jamaica, it was first published in the United Kingdom by Jonathan Cape in 1958. In the novel Bond looks into the disappearance in Jamaica of two fellow MI6 operatives who had been investigating Doctor No. Bond travels to No's Caribbean island and meets Honeychile Rider, who is there to collect shells. They are captured and taken to a luxurious facility carved into a mountain. The character of Doctor No, the son of a German missionary and a Chinese woman, was influenced by Sax Rohner's Fu Manchu stories. Dr. No was the first of Fleming's novels to face widespread negative reviews in Britain, but it was received more favourably in the United States. Output: English, British, Jamaica, the United Kingdom, German, Chinese, Britain, the United States.
Recently, the linear time series modeling of the State Space Model has attracted widespread attention, demonstrating strong performance in the field of natural language processing. Inspired by these progress, many SSM-based vision models have been proposed, including classification task [60, 61, 68, 61, 68, 69, 76, 83, 92, 93, 94, 95, 96, 97, 98, 99, 101, 112, 137, 138], detection task [109, 110, 117], segmentation task [70, 82, 85, 89, 91, 106, 108, 111], medical tasks [63, 64, 69, 72, 87, 97, 98, 100], restoration task [77, 110, 56], generation task [31, 32, 33], video understanding [56, 58, 90], track task [88], and others task [32, 59, 62, 73, 74, 75, 103, 104, 105, 107, 116, 118, 120, 121].
The results are in Figure 4.
In this section, we focus on reviewing the related works on the SSM architectures and applications. We divide the related works into the following domains, i.e., the origin and variation of SSM, natural language processing, computer vision, graph, multi-modal and multi-media, point cloud/event stream, time series data, and others. In the following subsections, we will introduce these algorithms one after another.
**AlexaTM:** In [89], Soltan et al. demonstrated that multilingual large-scale sequence-to-sequence (seq2seq) models, pre-trained on a mixture of denoising and Causal Language Modeling (CLM) tasks, are more efficient few-shot learners than decoder-only models on various task. They trained a 20 billion parameter multilingual seq2seq model called Alexa Teacher Model (AlexaTM 20B) and showed that it achieves state-of-the-art (SOTA) performance on 1-shot summarization tasks, outperforming a much larger 540B PaLM decoder model. AlexaTM consist of 46 encoder layers, 32 decoder layers, 32 attention heads, and \(d_{model}=4096\).
Parity (Petrov et al., 2023), which has been recently proposed, assesses how fairly a tokenizer treats equivalent sentences in different languages. A tokenizer \(T\) achieves parity for language \(A\) with respect to language \(B\) if \(\frac{|T(s_{A})|}{|T(s_{B})|}\approx 1\), where \(s_{A}\) and \(s_{B}\) denote the sets of all sentences in the corpora of languages \(A\) and \(B\), respectively, and the ratio \(\frac{|T(s_{A})|}{T(s_{B})|}\) is defined as premium. We use the FLORES-200 (Goyal et al., 2022) parallel corpus, consisting of the same sentences human-translated into 200 languages. We calculate the parity values for each tokenizer and the four non-English languages with respect to English (see Fig. 2 for an overview).
'<s> Q: Talking to the same person about the same thing over and over again is <|startofthought|>n\n(a) a one-to-one correlation\n\n(b) a one-to<| endofthought|> something someone can what?'
We therefore propose a method for extracting next-token probabilities from APIs where the full probability distribution is not immediately available. We take advantage of the fact that even when API services do not return the full probabilities, they typically allow users to add a _logit bias_ to adjust the distribution. In addition to providing a logit bias per API call, they typically allow setting the temperature parameter to zero to provide argmax of the distribution.
Notably, but not surprisingly, preference tuning on English datasets even makes the models underperform in Korean tasks. For example, LLaMA-2-chat variants, which are the preference-tuned version of LLaMA-2 checkpoints, show improved performances in English tasks (Llama-2-7b 0.7774 \(\rightarrow\) LLama-2-7b-chat 0.7976 in English BoolQ), while underperforming in Korean tasks (Llama-2-7b 0.5242 \(\rightarrow\) LLama-2-7b-chat 0.5157 in Korean BoolQ), which highlights the importance of Korean-specific training for LLMs. On the other hand, we observe that preference tuning our models on Korean instruction datasets doesn't hurt the model performance in English tasks, rather even improving it. We posit that it is because the embedding spaces are already well-aligned between Korean and English tokens, thus fine-tuning on a specific language doesn't incur a significant change in model parameters.
We hypothesize that the Cosine LR performs exceptionally well when \(T=S\) because of the following two reasons: (1) Cosine LRS with \(T=S\) has a longer duration of _high learning rate_ training compared to \(T<S\) and other LRS such as Linear LRS. This high learning rate might help the model find a better global optimum. (2) Cosine LRS with \(T=S\) has a more thorough learning rate decay phase compared to Cosine LRS with \(T>S\) and Constant LRS. This learning rate decay may involve unique training dynamics that enable the model to find a better local optimum.
To demonstrate our method's practicality, we must ensure the cost of selecting data is significantly less than this. As described in Section 3.4, selecting data via D4 involves: first, embedding documents via a 125M OPT model; second, computing K-Means indices + distance to indices. The first step is completed on a single machine with 96 CPU cores in approximately one day. Given the two orders of magnitude difference between the prices of CPU and GPU cores 1, we consider this cost negligible. For the second step, embedding 400B tokens with a 125M parameter model takes approximately 888 GPU hours, using the same A100 GPUs. Subtracting this from the _naive_ efficiency gain of 4300 GPU hours, we arrive at an _overall_ efficiency gain of 3412 GPU hours. This is how much compute D4 saved us in practice when training our single 6.7B parameter model. In Fig.
The simplest technique to find duplicate examples would be to perform exact string matching between all example pairs, but as we will show, this is insufficient. We introduce two complementary methods for performing deduplication. First, using a suffix array Manber and Myers (1993), we remove duplicate substrings from the dataset if they occur verbatim in more than one example. Second, we use MinHash Broder (1997), an efficient algorithm for estimating the \(n\)-gram similarity between all pairs of examples in a corpus, to remove entire examples from the dataset if they have high \(n\)-gram overlap with any other example.
Hyper-parameters have a significant impact on the performance of a model. However, adjusting hyper-parameters for each model in traditional training is not feasible for LLMs. Even for SLM like MiniCPM, extensive experiments on hyper-parameters search take a lot of resources. Tensor Program (Yang et al., 2022; 2023) proposes a framework to stabilize the hyper-parameters for models with different scales. The main part of the Tensor Program is the width scaling (Yang et al., 2022) and the depth scaling (Yang et al., 2023). The former technique supports CerebrasGPT (Dey et al., 2023) to predict the loss of LLMs more accurately. In MiniCPM, we use both two scaling techniques. The specific scaling operations is listed in Table 7. We do not apply the attention softmax scaling techniques (Yang et al., 2022). Despite Yang et al. (2023) observing that depth scaling for a network with block depth larger than two is not satisfying, we find the resulting optimal learning rate is stable empirically. Details of the hyper-parameters and Tensor Program Operations are in Appendix A.1.
logits produced by the original model. This method ensures the efficient scaling of the model by optimizing its architecture based on the internal processing dynamics of its layers.
More similar to our work, Mallen, Alex Troy and Asai, Akari and Zhong, Victor and Das, Rajarshi and Khashabi, Daniel and Hajishirzi, Hannaneh [22] propose a dataset and method for measuring when non-parametric information needs to be retrieved. They present the PopQA dataset that contains 14K questions about a set of entities with varying popularity. The popularity of an entity is measured by the page views of its Wikipedia page. In order to solve this QA task, they use a popularity score threshold calculated on the PopQA dataset. If the popularity score of an individual entity is below the threshold they perform a retrieval step. On the contrary, if the score is greater than the threshold they directly answer the question. This method yields better results than vanilla retrieval but it requires the calculation of a popularity score that is not available in realistic QA scenarios.
For any \(i\), on average it takes \(1/p_{i}\) iid samples from \(p\) to see the context \(i\) at least once. The effect of tail-cutting at rank \(k\) is effectively to replace the sample size \(T\) by \(\min(T,T_{k})\), where \(T_{k}=\max\{1/p_{i}\mid i\in[k]\}\). In the case where \(p=Zipf(\beta)\), we have \(T_{k}=1/p_{k}\asymp k^{\beta}\).
In addition to the aforementioned domains, the SSM can also be adopted in many other applications. Real-world sensors are mostly nonlinear and subject to interference from external variables, which renders traditional local linear prediction algorithms ineffective in practical scenarios. Bhirangi [179] et al. established a benchmark for the task of continuous sequence prediction (CSP) and concurrently proposed the Hierarchical State Space Model (HiSS). This model constructs a temporal hierarchy by stacking multiple layers of structured spatial state models with varying resolutions.
As pre-trained language models (_e.g._, BERT) have originated in the field of NLP, the technical advances of language models has an important impact on the research of NLP. In this part, we discuss the application of LLMs on five kinds of classic NLP tasks, including word-level, sentence-level, sequence tagging, relation extraction, and text generation tasks, which had been the foundation of many existing NLP systems and applications. Note that we do not intend to comprehensively cover all NLP tasks, but instead try to analyze the impact of LLMs for fundamental NLP research through the basic tasks. We also omit the discussion of several tasks (_e.g._, language modeling) that have been discussed early in this survey.
Mathematical capabilities have long been considered so challenging that they are thought to emerge in common language models only at a very large scale. For instance, studies by (Wei et al., 2022, 2020) suggest that only models with size exceeding 50 billion parameters can attain meaningful accuracy or benefit from chain-of-thought processing on math problems. A strategy to equip smaller language models with mathematical abilities involves creating math-specific base models trained on hundreds of billions of math-related pre-training data (Lewkowycz et al., 2022; Azerbayev et al., 2023). However, the accuracy of such models remains modest; for example, Lemma-7B (Azerbayev et al., 2023) only achieves 36.4% on the GSM8K dataset (Cobbe et al., 2021) and 18.0% on the MATH dataset (Hendrycks et al., 2021).
(2) The two components of RALM, the Retriever and the Language Model, are described in detail, and the different interaction modes of these two components are precisely defined for the first time.
**Handcrafting Method**: in this method, agent profiles are manually specified. For instance, if one would like to design agents with different personalities, he can use "you are an outgoing person" or "you are an introverted person" to profile the agent. The handcrafting method has been leveraged in a lot of previous work to indicate the agent profiles. For example, Generative Agent [22] describes the agent by the information like name, objectives, and relationships with other agents. MetaGPT [23], ChatDev [18], and Self-collaboration [24] predefine various roles and their corresponding responsibilities in software development, manually assigning distinct profiles to each agent to facilitate collaboration. PTLLM [25] aims to explore and quantify personality traits displayed in texts generated by LLMs. This method guides LLMs in generating diverse responses by manfully defining various agent characters through the use of personality assessment tools such as IPIP-NEO [26] and BFI [27]. [28] studies the toxicity of the LLM output by manually prompting LLMs with different roles, such as politicians, journalists and businesspersons. In general, the handcrafting method is very flexible, since one can assign any profile information to the agents. However, it can be also labor-intensive, particularly when dealing with a large number of agents.
During the training process, we utilized the AdamW optimizer with \(\beta_{1}\) set to 0.9, \(\beta_{2}\) set to 0.95, weight decay set to 0.1, and performed gradient clipping to limit it to 1.0. For continual pre-training, we start with a base learning rate of 5e-5, followed by a warm-up phase of 2000 steps, and then gradually reduced the learning rate according to a cosine schedule until it reached 10% of the base learning rate. The model is pre-trained for 23063 steps. For supervised fine-tuning, we start with the learning rate 1e-5 and train the model for 3 epochs. The model is trained on 32 Tesla V100 32GB GPUs.
Jailbreak prompts were manually written by a panel of NLP experts. Prompts were tested with and without newlines prepended and with and without taking the first line of output. Table 5 contains a list of all jailbreak prompts tested in order of descending effectiveness. A plot of performance by model and dataset is available in Figure 5.
our method disrupts zero-shot performance on common evaluation tasks: BoolQ (Clark et al., 2019), PIQA (Bisk et al., 2020), SIQA (Sap et al., 2019), HellaSwag (Zellers et al., 2019), WinoGrande (Sakaguchi et al., 2021), ARC easy and challenge (Clark et al., 2018), OpenBookQA (Mihaylov et al., 2018). We also report 5-shot performance on the aggregated MMLU benchmark (Hendrycks et al., 2020). Evaluation results are summarized in Table 7. We observe that our entity reversal trained model is slightly better than the standard data-matched 1.4B model trained in the standard forward direction, and is only 1.8 points behind the compute-matched model in accuracy on average, despite being trained on half of the tokens. We note that token reversal works slightly better than entity reversal on these standard benchmarks, and hence superior to the data-matched standard training as well.
* _Fine-tuning with Real-world Datasets_. Inaddition to building datasets based on human or LLM annotation, directly using real-world datasets to fine-tune the agent is also a common strategy. For example, in MIND2WEB [89], the authors collect a large amount of real-world datasets to enhance the agent capability in the web domain. In contrast to prior studies, the dataset presented in this paper encompasses diverse tasks, real-world scenarios, and comprehensive user interaction patterns. Specifically, the authors collect over 2,000 open-ended tasks from 137 real-world websites spanning 31 domains. Using this dataset, the authors fine-tune LLMs to enhance their performance on web-related tasks, including movie discovery and ticket booking, among others. In SQL-PALM [90], researchers fine-tune PaLM-2 based on a cross-domain large-scale text-to-SQL dataset called Spider. The obtained model can achieve significant performance improvement on text-to-SQL tasks.
single agent. This permanent storage in AIOS is achieved through a variety of durable mediums such as local files, databases, or cloud-based solutions, ensuring data integrity and availability for future reference or analysis. The storage manager supports retrieval augmentation [61]. Through storing user preferences and maintaining historical interaction logs, the storage manager can enrich the agent knowledge update and enhancing the long-term user experience.
**Is there a label or target associated with each instance?** Yes, each prompt contains a label for the hazard category, as well as subcategory and sub-subcategory where applicable. Each prompt also has other labels for the persona, speech act, tense, and the template and sentence fragment used to construct it.
* Metrics like ROUGE [147] and BLEU [148] are common for assessing text similarity, focusing on intrinsic hallucinations. * Advanced metrics such as PARENT [149], PARENT-T [150], and Knowledge F1 [151] are utilized when structured knowledge sources are available. These metrics, while effective, have limitations in capturing syntactic and semantic nuances.
We evaluate CodecLM on four widely-used open-domain instruction-following benchmarks with diverse instruction distributions to reduce evaluation bias. Our test benchmarks include Evol-Instruct (Xu et al., 2023), Vicuna (Chiang et al., 2023), Self-Instruct (Wang et al., 2022) and Koala (Geng et al., 2023). To complement the evaluation, we also evaluate on two standard NLPbenchmarks MMLU Hendrycks et al. (2020) and BBH Suzgun et al. (2022) in Appendix A.7. Please refer to Appendix A.1 for benchmark details.
* **JA-VG-VQA-500:** A 500-sample test set extracted from the Japanese Visual Genome VQA dataset [42]. * **JA-VLM-Bench-In-the-Wild:** A Japanese version of LLaVA-Bench-In-the-Wild [32]. We compiled a rich collection of 42 images, accompanied by a total of 50 questions, featuring a variety of Japanese cultural elements and objects found in Japan. The QAs were crafted with the assistance of GPT-4V [1] and underwent a human-in-the-loop filtering process to eliminate nonsensical outcomes. Compared to the JA-VG-VQA-500 dataset, our set poses more complex challenges, demanding more nuanced and detailed responses.