text
stringlengths 4
4.47k
|
---|
The Llama family is a well-known class of AutoRegressive language models. Llama(Touvron et al., 2023) was first proposed as a language model that uses only publicly available data. To improve training stability, they normalise the input of each transformer sub-layer instead of normalising the output. They use the RMSNorm normalisation function introduced by Zhang and Sennrich (2019) and replace the ReLU non-linearity with the SwiGLU activation function introduced by Shazeer (2020) to improve performance. Furthermore, the authors replaced the absolute position embedding with the rotational position embedding (RoPE) introduced by Su et al. (2024) at each layer of the network. Llama2(Touvron et al., 2023) used supervised fine-tuning, initial and iterative reward modelling and RLHF in their experiments. they also invented a new technique, Ghost Attention (GAtt), which helps to control the flow of dialogue in multiple turns. Qwen(Bai et al., 2023), based on Llama, the following adjustments were made: 1. The method of loose embedding was chosen instead of bundling the weights of input embedding and output projection to save memory cost. 2. The accuracy of the inverse frequency matrix was improved. 3. For most of the layers, bias was eliminated as per Chowdhery et al. (2023). However, bias was added in the QKV layer to enhance the model's extrapolation capability. The traditional layer normalization technique described in Ba et al. (2016) was replaced with RMSNorm. They chose SwiGLU as their activation function, which is a combination of Swish Ramachandran et al. (2017) and gated linear units (Dauphin et al., 2017). The dimension of the feed-forward network (FFN) is also reduced. Furthermore, Mistral 7b (Jiang et al., 2023) utilises Grouped Query Attention (GQA) to enhance inference speed and combines it with Sliding Window Attention (SWA) to efficiently process sequences of any length with reduced inference cost. These techniques demonstrate superior performance over Llama2.The Llama model is open source and uses publicly available data, providing researchers (Yan et al., 2024) (Asai et al., 2023) (Wang et al., 2023) with more opportunities to expand. As a result, many researchers use the Llama family as language models in the RALM architecture. |
Figure 4: **Patient actor ratings.** Conversation qualities as assessed by patient actors upon conclusion of the consultation. For illustration purposes, all responses from five-point rating scales were mapped to a generic five-point scale ranging from ‘Very favorable’ to ‘Very unfavorable’. For Yes/No questions, a (positive) ‘Yes’ response was mapped to the same color as ‘Favorable’ and a (negative) ‘No’ response to the same color as ‘Unfavorable’. Rating scales were adapted from the General Medical Council Patient Questionnaire (GMCPQ), the Practical Assessment of Clinical Examination Skills (PACES), and a narrative review about Patient-Centered Communication Best Practice (PCCBP). Details on question wording and response options are provided in Section A.1. Asterisks represent statistical significance (\(*:p<0.05\), \(**:p<0.01\), \(***:p<0.001\), \(n.s.\) : not significant). |
The number of templates per interaction type is shown in Table 9. The range is from 1 to 4. The number of templates is not linearly associated with the number of prompts for each Hazard category due to differences in how we construct prompts for hazard categories with special entity templates (e.g., protected groups for Hate), and because we use the templates differently for the Viewpoint and Activity classes. |
Method.Our approach queries the API with the logit bias set for several tokens in parallel. The algorithm proceeds in _rounds_, where each round involves querying the API with the logit bias set for several tokens. |
It is important to emphasize that our efforts did not focus on optimization for mobile deployment, but rather on demonstrating the practicality of MiniCPM's inference capabilities on mobile platforms. We encourage further optimization and updates by the developer community to enhance the performance of large models like MiniCPM in mobile contexts. |
\(\bullet\)_Relative position embedding._ Unlike absolute position embeddings, relative positional embeddings are generated according to the offsets between keys and queries [273]. A popular variant of relative PE was introduced in Transformer-XL [274, 275]. The calculation of attention scores between keys and queries has been modified to introduce learnable embeddings corresponding to relative positions. T5 [82] further simplified relative positional embeddings, which was subsequently adopted by Gopher [64]. Specifically, it adds learnable scalars to the attention scores, where the scalars are calculated based on the distances between the positions of the query and the key. Compared with the absolute PE, Transformers with relative position embedding can generalize to sequences longer than those sequences for training, _i.e._, extrapolation [264]. |
While long-context large language models (LLMs) can technically summarize book-length documents (\(>\) 100K tokens), the length and complexity of the documents have so far prohibited evaluations of input-dependent aspects like faithfulness. In this paper, we conduct the first large-scale human evaluation of faithfulness and content selection on LLM-generated summaries of fictional books. Our study mitigates the issue of data contamination by focusing on summaries of books published in 2023 or 2024, and we hire annotators who have fully read each book prior to the annotation task to minimize cost and cognitive burden. We collect Fables, a dataset of annotations on 3,158 claims made in LLM-generated summaries of 26 books, at a cost of $5.2K USD, which allows us to rank LLM summarizers based on faithfulness: Claude-3-Opus significantly outperforms all closed-source LLMs, while the open-source Mktral is on par with GPT-3.5-Turbo. An analysis of the annotations reveals that most unfaithful claims relate to events and character states, and they generally require indirect reasoning over the narrative to invalidate. While LLM-based auto-raters have proven reliable for factuality and coherence in other settings, we implement several LLM raters of faithfulness and find that none correlates strongly with human annotations, especially with regard to detecting unfaithful claims. Our experiments suggest that detecting unfaithful claims is an important future direction not only for summarization evaluation but also as a testbed for long-context understanding. Finally, we move beyond faithfulness by exploring content selection errors in book-length summarization: we develop a typology of omission errors related to crucial narrative elements and also identify a systematic over-emphasis on events occurring towards the end of the book. We release Fables to spur further research on the evaluation of book-length summarization. |
We extend the attack from the prior section to recover the final output projection matrix \(\mathbf{W}\) that maps from the final hidden layer to the output logits. |
(instead of \(j^{-\beta}\)), where \(\pi_{i}\) is a permutation associated to every \(i\) providing the order of outputs. To summarize, we think of the data as pairs \((i,j)\), where the distribution of \(i\) is governed by some \(p(i)\) as in the deterministic Hutter setting, and \(p(j|i)\) is given by Equation (16). |
**Result 12** (Figure 8(g)+8(h)).: When 7/8 of training tokens are from junk (i.e., bioS(\(N^{\prime}\)) for \(N^{\prime}=100M\)), adding a special token at the start of every useful data greatly improves capacity ratio: |
**Data Augmentation (DA).** Data availability is crucial for fine-tuning in specialized domains. DA addresses data scarcity problem by generating task- and domain-relevant samples from existing unlabeled texts. A common DA approach for the QA task is generating question-answer pairs through a four-step _Pipeline_, consisting of: passage selection, answer extraction, question generation, and consistency filtering Alberti et al. (2019); Lewis et al. (2019, 2021); Ushio et al. (2023). Ushio et al. (2023) conducted an empirical study comparing three question answer generation approaches: Pipeline, Multitask, and End-to-End (E2E) and showed the E2E approach outperforms others in downstream tasks. Recently, the utilization of LLMs to generate data is shown effective in information retrieval, QA, and dialogue creation tasks Soudani et al. (2023); Askari et al. (2023). |
which is identical to the original model. Applying this procedure to all layers added to the hidden state (using the different \(W\) diagonal matrices each time) gives us a model \(g_{\theta^{\prime}}(p)\) such that \(g_{\theta^{\prime}}(p)=\mathbf{U}g_{\theta^{\prime}}(p)\) so a different embedding projection matrix \(\mathbf{W}\mathbf{U}^{\top}\) will give identical outputs to the original model \(g_{\theta}(p)\) (with embedding projection \(\mathbf{W}\)). |
Besides the quantitative results in Table 3, we qualitatively compare our VLM with the baseline models in Appendix C. Our evolved model is able to handle Japanese culture-specific content remarkably well, generally producing more detailed responses with correct information. |
Text generation is one of the most fundamental abilities for language models. Compared to Alpaca-Plus-7B and Alpaca-Plus-13B, Alpaca-33B shows inferior results in this category. Table 5 shows an example of a text generation task. We can see that both Alpaca-Plus-7B and Alpaca-Plus-13B provide correct letter styles, which meet the requirement of the user's prompt. Alpaca-Plus-13B provides the most comprehensive one by indicating that the applicant has thoroughly prepared all materials for visa application, making it the best generation quality among all three systems. However, Alpaca-33B does not follow the letter style, and the content is somewhat too simplified, which is clearly not as good as the others. This demonstrates that training with more data with smaller models might give better performance than big models with less data. |
**Distillation.** Alternatively, tuning the target LLM with responses generated from another LLM can be viewed as knowledge distillation (Hinton et al., 2015; Beyer et al., 2022). However, our focus remains on instruction generation, while still being flexible to readily integrate with existing distillation techniques (Hsieh et al., 2023; Liang et al., 2023). |
(1) _APIs_. Leveraging external APIs to complement and expand action space is a popular paradigm in recent years. For example, HuggingGPT [13] leverages the models on HuggingFace to accomplish complex user tasks. [66; 67] propose to automatically generate queries to extract relevant content from external web pages when responding to user request. TPTU [67] interfaces with both Python interpreters and LaTeX compilers to execute sophisticated computations such as square roots, factorials and matrix operations. Another type of APIs is the ones that can be directly invoked by LLMs based on natural language or code inputs. For instance, Gorilla [68] is a fine-tuned LLM designed to generate accurate input arguments for API calls and mitigate the issue of hallucination during external API invocations. ToolFormer [15] is an LLM-based tool transformation system that can automatically convert a given tool into another one with different functionalities or formats based on natural language instructions. API-Bank [69] is an LLM-based API recommendation agent that can automatically search and generate appropriate API calls for various programming languages and domains. API-Bank also provides an interactive interface for users to easily modify and execute the generated API calls. ToolBench [14] is an LLM-based tool generation system that can automatically design and implement various practical tools based on natural language requirements. The tools generated by ToolBench include calculators, unit converters, calendars, maps, charts, etc. RestGPT [70] connects LLMs with RESTful APIs, which follow widely accepted standards for web services development, making the resulting program more compatible with real-world applications. TaskMatrix.AI [71] connects LLMs with millions of APIs to support task execution. At its core lies a multimodal conversational foundational model that interacts with users, understands their goals and context, and then produces executable code for particular tasks. All these agents utilize external APIs as their tools, and provide interactive interfaces for users to easily modify and execute the generated or transformed tools. |
As LLMs are widely adopted, models trained past the recommendations of scaling laws are bound to become increasingly common to amortize inference costs (Touvron et al., 2023). This will further drive the need for pretraining datasets with trillions of tokens, an order of magnitude beyond publicly available corpora. We have demonstrated that stringent filtering and deduplication could result in a five trillion tokens web only dataset suitable to produce models competitive with the state-of-the-art, even outperforming LLMs trained on curated corpora. We publicly release a 600GT extract of RefinedWeb, and note that RefinedWeb has already been used to train state-of-the-art language models, such as Falcon-40B (Almazrouei et al., 2023). |
Figure 5: **Make-up of RefinedWeb in document lengths (left) and top domains (right).** (a) We find the OSCAR datasets and RW-Raw to have similar document length distributions; following filtering, most of the short documents are discarded from RW-Filtered. As deduplication removes spans, it reintroduces shorter documents to RefinedWeb. We note the make-up of C4 and RefinedWeb to be relatively similar, with a longer tail of short documents for RefinedWeb. Finally, The File exhibit a unique make-up, with a long tail of both long (books, etc.) and short documents. (b) Top domains in RefinedWeb span from popular content platforms (Blogspot, WordPress, Tumblr, etc.), to news websites (CNN, New York Times, etc.), and include also technical content such as BioMed Central or Springer. |
Despite numerous efforts aimed at addressing the hallucination issues in large language models, these works have only mitigated the problem to some extent. There is still a long way to fully enhance the faithfulness of large language models. |
\(\bullet\)_Sparse attention_. A crucial challenge of full attention is the quadratic computational complexity, which becomes a burden when dealing with long sequences. Therefore, various efficient Transformer variants are proposed to reduce the computational complexity of the attention mechanism [278, 279]. For instance, locally banded sparse attention (_i.e._, Factorized Attention [280] has been adopted in GPT-3 [55]. Instead of the whole sequence, each query can only attend to a subset of tokens based on the positions. |
As AutoEncoder language models excel at Natural Language Understanding (NLU) tasks, many RALM architectures(Thulke et al., 2021) (Cheng et al., 2024) (Sachan et al., 2021)utilise them for specific tasks, such as judgement. One of the most commonly used models is BERT and its improved versions.Devlin et al. (2018) proposed the BERT model, which was inspired by closed tasks(Taylor, 1953). RoBERTa(Liu et al., 2019) is trained using dynamic masking, full sentences without NSP loss, large mini-batches, and a larger byte-level BPE to address the lack of training of Bert's model. According to Jiang et al. (2020), BERT heavily relies on global self-attention blocks, resulting in a large memory footprint and computational cost. Although all attention heads query the entire input sequence, some only need to learn local dependencies, leading to computational redundancy. To address this issue, They proposed a new span-based dynamic convolution to replace these self-attention heads and directly model local dependencies. The new convolutional head, along with other self-attentive heads, forms a hybrid attention block. Furthermore, Sanh et al. (2019) was able to decrease the size of the BERT model by 40% while maintaining 97% of its language comprehension abilities and achieving a 60% increase in speed by implementing knowledge distillation during the pre-training phase. |
We experimentally confirm this new phenomenon for transformer models trained to calculate the GCD (see Appendix G), which indicates its applicability for a wider class of LLMs with underlying deterministic ground truth, like for arithmetic tasks. |
Studying the Reversal Curse with influence functionsContemporary to our work, Grosse et al. (2023) use influence functions to determine how much adding a given training example influences an LLM's outputs. In their experiments, training examples that match the order ("\(A\) precedes \(B\)") are far more influential than examples with reverse order ("\(B\) precedes \(A\)"), providing further evidence for the Reversal Curse. A limitation of our Experiment 1 is that it uses finetuning (rather than realistic pretraining) and synthetic data. (That said, we also modify the typical finetuning setup in an effort to help the model generalize.) A limitation of Grosse et al. (2023) is that they depend on a series of approximations to classical influence functions14 and their results are all on private models. |
How does lower perplexity of documents lead to generalization to answering related questions? We vary the number of epochs (Fig. 5(a)) and learning rate (Fig. |
Figure 3: The Pass@256 and PassRatio@256 curve with increasing data size on GSM8K and MATH benchmark. |
**Encoder-decoder Architecture.** The vanilla Transformer model is built on the encoder-decoder architecture [22], which consists of two stacks of Transformer blocks as the encoder and decoder, respectively. The encoder adopts stacked multi-head self-attention layers to encode the input sequence for generating its latent representations, while the decoder performs cross-attention on these representations and autoregressively generates the target sequence. Encoder-decoder PLMs (_e.g._, T5 [82] and BART [24]) have shown effectiveness on a variety of NLP tasks. So far, there are only a small number of LLMs that are built based on the encoder-decoder architecture, _e.g._, Flan-T5 [69]. We leave a detailed discussion about the architecture selection in Section 4.2.6. |
The comprehensive results of WMT'23 are presented in Table 14. Similar to its performance in WMT'21 and WMT'22, ALMA-13B-R performs best on average among the SoTA translation models. |
Simple weight interpolation works well for merging image generation models that operate in a real valued latent and output space, but to our surprise, they also still work for merging language models under the right conditions, but have performance issues [49]. Recently, new methods have been proposed to address merging language models specifically. One method, Task Arithmetic [21], involves building _task vectors_ by subtracting pre-trained from fine-tuned model weights, enabling manipulation through arithmetic operations to steer the merged model's behavior. |
Hallucination poses a fundamental challenge for LLMs, characterized by the models' tendency to produce false information with a high level of confidence. This challenge is not limited to LLMs alone but is also a significant concern in the domain of autonomous agents. For instance, in [186], it was observed that when confronted with simplistic instructions during code generation tasks, the agent may exhibit hallucinatory behavior. Hallucination can lead to serious consequences such as incorrect or misleading code, security risks, and ethical issues [186]. To mitigate this issue, incorporating human correction feedback directly into the iterative process of human-agent interaction presents a viable approach [23]. More discussions on the hallucination problem can be seen in [176]. |
MATH: This dataset contains 7,500 math competition problems from high school, which are more challenging than those in GSM8K Hendrycks et al. (2021). |
**Promptfoo**[238] is a tool for testing and evaluating LLM output quality. It systematically test prompts, models, and RAGs with predefined test cases. |
\(\bullet\)_Components._ Typically, there are three main components in an LLM-based agent: _memory, planning50_, and _execution_. Specifically, the _memory_ component aims to store the information perceived from the environment and can be utilized to support decision-making. In particular, LLM-based agents usually maintain information in both short-term memory and long-term memory with the operations of reading and writing. Short-term memory usually refers to the internal context window of LLMs (_i.e._, input), where LLMs can read and write through actions like reasoning [880]. While long-term memory can be mapped to the external storage like vector databases [537], where LLMs can read through retrieval and write with reflection [686]. Specially, profiles are usually implemented with long-term memory, which is an important feature for an agent that specifies its role and function [818]. The _planning_ component is responsible for generating the action plan based on the information from the memory component. In data format, the plan usually takes the form of text-based instructions [441] or code-based programs [443]. To generate it, LLM-based agents will first propose several candidates and then select a more suitable one among them [436]. The initial plan can be further refined with execution feedback from the environment [528]. The _execution_ component is in charge of carrying out the plan from the planning component, which can be fulfilled by the internal LLM [441] or external tools [880]. |
Our retrieval system consists of 4 steps: search query generation, news retrieval, relevance filtering and re-ranking, and text summarization (Figure 0(a)). |
where \(\sigma\) is the logistic function. In the context of LMs, the network \(r_{\phi}(x,y)\) is often initialized from the SFT model \(\pi^{\text{SFT}}(y\mid x)\) with the addition of a linear layer on top of the final transformer layer that produces a single scalar prediction for the reward value [49]. To ensure a reward function with lower variance, prior works normalize the rewards, such that \(\mathbb{E}_{x,y\sim\mathcal{D}}\left[r_{\phi}(x,y)\right]=0\text{ for all }x\). |
* [label=*]
* Diverse data (rewriting the same data multiple times) does not hurt -- and may sometimes improve -- the model's capacity!Let's highlight the significance of Result 2. |
As we described in sectionIV, many of the shortcomings and limitations of LLMs such as _hallucination_ can be addressed through advanced prompt engineering, use of tools, or other augmentation techniques. We should expect not only continued, but accelerated research in this area. |
We then use this reward in a REINFORCE loss term to update the language model parameters \(\theta\) to increase the likelihood of rationales that perform better than the average: |
One of the main limitations of pre-trained LLMs is their lack of up-to-date knowledge or access to private or use-case-specific information. This is where retrieval augmented generation (RAG) comes into the picture [164]. RAG, illustrated in figure 37, involves extracting a query from the input prompt and using that query to retrieve relevant information from an external knowledge source (e.g. a search engine or a knowledge graph, see figure 38 ). The relevant information is then added to the original prompt and fed to the LLM in order for the model to generate the final response. A RAG system includes three important components: Retrieval, Generation, Augmentation [165]. |
**Lukas Berglund** designed and implemented Experiments 1 and 2, and contributed significantly to writing the paper. |
In addition, recent work also explores multi-agent collaboration based on LLMs in simulated environments [700, 701, 533]. These studies simulate human social behaviors by instantiating multiple LLM-based agents with observations, planning, and memories in a sandbox environment. In controlled evaluation, the abilities of generative agents to search, plan, and think are evaluated by humans in an interview-like manner. Further, they also conduct descriptive measurements on multiple agents within a simulated environment to examine emergent social behaviors. |
The utility of medical AI systems could be greatly improved if they are better able to interact conversationally, anchoring on large-scale medical knowledge while communicating with appropriate levels of empathy and trust. This research demonstrates the significant potential capabilities of LLM based AI systems for settings involving clinical history-taking and diagnostic dialogue. The performance of AMIE in simulated consultations represents a milestone for the field, as it was assessed along an evaluation framework that considered multiple clinically-relevant axes for conversational diagnostic medical AI. However, the results should be interpreted with appropriate caution. Translating from this limited scope of experimental simulated history-taking and diagnostic dialogue, towards real-world tools for people and those who provide care for them, requires significant additional research and development to ensure the safety, reliability, fairness, efficacy, and privacy of the technology. If successful, we believe AI systems such as AMIE can be at the core of next generation learning health systems that help scale world class healthcare to everyone. |
\(\bullet\)_GPT-4V, GPT-4 turbo, and beyond_. Based on the work done for GPT-4 [46], OpenAI further released GPT-4V in September 2023, which focused on the safe deployment of the vision capabilities of GPT-4. In the GPT-4V's system card [133], it has extensively discussed the assessment and mitigation of risks related to visually augmented inputs. Specially, GPT-4V exhibited strong vision capacities in various application scenarios, showing the great potential as a powerful multimodal learning system. More recently, in November 2023, OpenAI released an upgraded generation of GPT-4 model at DevDay, named _GPT-4 Turbo_, with a series of technical improvements. GPT-4 Turbo is featured by the improved model capacity (more capable than GPT-4), the extended knowledge source (up to April 2023), long context window (up to 128k tokens), optimized model performance (cheaper price), and other useful functionality updates (function call, reproducible outputs, etc.). At the same time, Assistants API was launched to ease the rapid development of agent-like assistants. With this API, developers can easily create goal-oriented assistants within their applications, by leveraging specific instruction, extra knowledge and tool use. Furthermore, multimodal capacities (see, hear, and speak) were also enhanced in this new release, supported by GPT-4 Turbo with vision, DALL-E 3, Text-to-speech (TTS), and Listen to voice samples. These improvements have greatly extended the capacity scope and enhanced the task performance of GPT models. More importantly, the application ecosystem will be greatly strengthened with the technology upgrade in improved models, APIs, and functionalities. |
**Analysis of Open-Source Models.** Next, we continue to show our analysis and findings about eight open-source models (_i.e.,_ LLaMA 2-Chat, Vicuna, Alpaca, ChatGLM, LLaMA 2, LLaMA, Pythia and Falcon) as follows: |
**Heterogeneous LLM Ensemble.** Wan et al. (2024) conducts a supervised LLM fusion framework to distill multiple heterogeneous LLMs into a single model and surpasses each of these LLMs. Jiang et al. (2023) introduces a supervised ensembling framework based on multiple heterogeneous LLMs. Chen et al. (2023) proposes a sequential inference method for LLMs that halts when the output quality is deemed adequate. Wang et al. (2023) addresses the fusion-of-experts problem by integrating outputs from models with distinct knowledge domains through supervised learning. Shnitzer et al. (2023) and Lu et al. (2023) select the most suitable LLM for new tasks by training a reward-guided router. These approaches primarily employ supervised learning, necessitating task-specific annotated data, and exhibit limited generalizability. In contrast, our method is unsupervised, without the need for additional training data. |
\(\bullet\)_Memory Reflection_. Memory reflection emulates humans' ability to witness and evaluate their own cognitive, emotional, and behavioral processes. When adapted to agents, the objective is to provide agents with the capability to independently summarize and infer more abstract, complex and high-level information. More specifically, in Generative Agent [20], the agent has the capability to summarize its past experiences stored in memory into broader and more abstract insights. To begin with, the agent generates three key questions based on its recent memories. Then, these questions are used to query the memory to obtain relevant information. Building upon the acquired information, the agent generates five insights, which reflect the agent high-level ideas. For example, the low-level memories "Klaus Mueller is writing a research paper", "Klaus Mueller is engaging with a librarian to further his research", and "Klaus Mueller is conversing with Ayesha Khan about his research" can induce the high-level insight "Klaus Mueller is dedicated to his research". In addition, the reflection process can occur hierarchically, meaning that the insights can be generated based on existing insights. In GITM [16], the actions that successfully accomplish the sub-goals are stored in a list. When the list contains more than five elements, the agent summarizes them into a common and abstract pattern and replaces all the elements. In ExpeL [44], two approaches are introduced for the agent to acquire reflection. Firstly, the agent compares successful or failed trajectories within the same task. Secondly, the agent learns from a collection of successful trajectories to gain experiences. |
To validate the generality of our observations, we analyze a different model series with required information made publicly available, i.e., LLaMA [44]. |
In this section, we provide a brief analysis of the loss drop in the decay stage, examining it through the prisms of checkpoint updates and gradient information. We calculate the maximum weight element update \(max_{ij}(W_{ij}^{(t+1)}-W_{ij}^{(t)})\) across all weight matrices in the MiniCPM-2.4B (Introduced in Section 6). As depicted in Figure 7, the updates exhibit a robust correlation with the learning rate's magnitude. Notwithstanding the illustration of the two submodules (gate_proj and q_proj) module of the 25th layer), this pattern is prevalent across every layer and submodule within the network. This observation may not be trivial: the model checkpoints experience significant updates preceding the learning rate's decay, yet the loss exhibits minimal reduction. Conversely, during the decay stage, despite less pronounced weight alterations, there is an accelerated decrease in loss. |
From \(S_{\min}\) to \(S\).Thankfully, there is a conversion between the training step \(S\) with any batch size \(B\) and the training step \(S_{\min}\) with sufficiently/infinitely large batch size. Let \(\theta\) be the model parameters at some point during optimizing the model, \(G_{\mathrm{est}}\) be the noisy gradients estimated by SGD at the point. Note that \(G_{\mathrm{est}}\) is a random variable whose expectation is the real gradients \(G\) with infinitely large batch size (_i.e._, \(\mathbb{E}[G_{\mathrm{est}}]=G\)). |
Future hazardsFuture hazards are sources of harm that are likely to emerge in the near- or long-term future. Primarily, this refers to extreme (or 'catastrophic' and 'existential') risks that threaten the survival and prosperity of humanity [108, 109, 110, 114]. This includes threats such as biosurfare, rogue AI agents, and severe economic disruption. Given the current capabilities of AI models, future risks are more speculative and--because they are novel--hard to measure. Future risk evaluation tends to focus on understanding the _potential_ for models to be used for dangerous purposes in the future, rather than their current use [111, 112]. This includes assessing the capability of models to act autonomously and engage in deception, sycophamcy, self-proliferation and self-reasoning [113, 114, 115, 116]. This work often overlaps with evaluations of highly advanced AI capabilities (even up to "Artificial General Intelligence" [117]), such as the Graduate-level Proof Q&A Benchmark [118]. |
- 'Oppenheimer' could have a stronger than expected performance, reducing the ratio between the two films' grosses. |
**ZeRO:** In [140], Rajbhandari et al. developed a novel solution, Zero Redundancy Optimizer (ZeRO), to optimize memory, vastly improving training speed of LLMs while increasing the model size that can be efficiently trained. ZeRO eliminates memory redundancies in data- and model-parallel training while retaining low communication volume and high computational granularity, allowing one to scale the model size proportional to the number of devices with sustained high efficiency. |
Of the 660 items in the human eval set categorised as unsafe (based on the classifications provided by LlamaGuard), 358 are unsafe (based on the annotators' gold standard labels) and 302 are not unsafe. Accuracy is 54.2%. Of the 660 items in the human eval set categorised as not unsafe (based on the classifications provided by LlamaGuard), 88 are unsafe (based on the annotators' gold standard labels) and 572 are not unsafe. Accuracy is 86.7%. Overall, the accuracy of LlamaGuard is 70.4% on the human eval set. Due to the relatively small size of the human eval set, we do not analyse more finegrained categories, such as the performance of LlamaGuard on specific hazard categories or SUTs. The heavily imbalanced nature of the full dataset of 560,170 responses (of which only 533,125 or 95.2% are labelled Not Unsafe), and the better performance of the evaluator model on responses categorised as not unsafe, means that accuracy of LlamaGuard on the full dataset is higher than the eval set. If we weight the full dataset by the distribution of responses, accuracy is 85.6% (based on 86.7% x 95.2% plus 54.2% x 4.8%). Overall, although performance could be improved, LlamaGuard is sufficiently accurate at identifying unsafe and not unsafe responses to be used for the v0.5 Benchmark. We aim to improve performance of the evaluator model in future releases. |
**Lemma 4.2**: _In the logit-API threat model, under the assumptions of Lemma 4.1:_ (i) _The method from Section 4.2 recovers \(\hat{\mathbf{W}}=\mathbf{W}\cdot\mathbf{G}\) for some \(\mathbf{G}\in\mathds{R}^{h\times h}\);_ (ii) _With the additional assumption that \(g_{\theta}(p)\) is a transformer with residual connections, it is impossible to extract \(\mathbf{W}\) exactly._ |
**Knowledge Completion.** In knowledge completion tasks, LLMs might be (to some extent) considered as a knowledge base [576], which can be leveraged to complete or predict the missing parts of knowledge units (_e.g._, knowledge triples). Such tasks can probe and evaluate _how much_ and _what kind of_ knowledge LLMs have learned from the pre-training data. Existing knowledge completion tasks can be roughly divided into knowledge graph completion tasks (_e.g._, FB15k-237 [572] and WN18RR [574]) and fact completion tasks (_e.g._, WikiFact [571]), which aim to complete the triples from a knowledge graph and incomplete sentences about specific facts, respectively. Empirical studies have revealed that it is difficult for existing LLMs to accomplish knowledge completion tasks related to specific relation types [520]. As shown in the evaluation results on WikiFact, LLMs perform well on several frequent relations that occur in the pre-training data (_e.g._, currency and author), while not well on rare ones (_e.g._, discoverer_or_inventor and place_of_birth). Interestingly, under the same evaluation settings (_e.g._, in-context learning), InstructGPT (_i.e._, text-davinci-002) outperforms GPT-3 in all subsets of WikiFact. |
1. A-1: 2.4B model, decay using only pre-training data, followed by 4B token SFT. 2. A-2: 2.4B model, decay using the aforementioned high-quality data unlabeled data and SFT data mixed into pre-training data, also followed by 4B token SFT. 3. B-1: 1.2B model, decay using only pre-training data, followed by 6B token SFT. 4. B-2: 1.2B model, decay using only pre-training data, followed by 12B token SFT. 5. B-3: 1.2B model, annealing using the aforementioned high-quality data + SFT data mixed into pre-training data, also followed by 6B token SFT. |
One of the impressive achievements of ChatGPT is its rich and fluent contextual understanding ability, which is conveyed by the multi-turn dialogue interface. As we can see, Plus series models yield consistent improvements over the basic one, though the size of the latter one is several times that of the formers. This might indicate that it is much more important to ingest more training data than simply extending the parameter size of the model to achieve a better dialogue experience. Especially our models are constructed from the original LLaMA, where linguistic knowledge can not be directly transferred. |
We note that since our dataset is curated from CommonCrawl dumps, there is risk that our training set contains offensive or PII content. We note, however, that this risk is no more than that of standard language modeling curation such as Touvron et al. [50], since we use the same pipeline to filter CommonCrawl dumps. |
Let us note \(W_{d}\) the best approximation of \(W^{*}\) of rank \(d\) with respect to the Frobenius norm. |
The method we presented earlier uses a reference token. We set this to some arbitrary value (e.g., 0) and then compare the logits for all other tokens to this one. This approach is numerically stable, but is slightly wasteful: of the top \(K\) logprobs returned by the API, one is always the reference token. Hence, we only recover \(K-1\) logits per query with this method. |
We find that these relationships hold under analysis on six different domain datasets across over 1200 questions. We also find that the choice of prompting technique (e.g. strictly adhere, loosely adhere) can influence both the baseline and strength of this relationship. These results highlight the inherent tension in LLMs between the model's pre-trained knowledge and the retrieved content provided in context. |
Second, _we analyze our method from a regularization perspective and introduce two guiding principles for effective regularization._ Specifically, we propose a noise injection framework in which our method and many commonly employed regularization methods are special cases. These techniques introduce diverse forms of noise to mitigate overfitting, for example, applying dropout to each dimension of the embeddings [10] or employing synonym substitution [11]. We then conduct a comparative analysis and find that these regularization methods exhibit diminished effectiveness in the absence of the MFT framework (see Tab. 3). Based on our experiments, we propose two guiding principles for an effective regularization: (1) A portion of the tokens in the reasoning path should be retained without noise addition; (2) For positions where noise is added, it is crucial to ensure these positions maintain as less semantics as possible. |
Footnote 1: Specifically, a transformer-based auto-regressive language model such as GPT-3 or Llama-1. |
**Why do we add parameters to only the encoder for T5?** For parameter-expansion methods, we add parameters to only the encoder because the encoder is applied to the input sequence and the decoder is applied to the output sequence. Since most of the computational cost comes from the decoder computing for the output sequence in an auto-regressive manner as highlighted in (Li et al., 2021), the newly added parameters in the encoder are roughly expected to have minimal additional computational cost. |
In Kaplan et al. (2020), OpenAI studies the relationship between the loss function and the number of tokens. In their experiments, they assume that consuming more steps is equivalent to consuming more time. Under this assumption, OpenAI defines a critical batch size that achieves a certain loss without consuming too many steps or tokens. This rationale is valid if the experiments are provided with unlimited GPUs (at least with in the scope of the experiments). Since GPUs are unlimited, enlarging batch size will not increase the single step duration but will decrease the total number of steps. However, in our experiment, since we have fixed resource (number of GPUs), we observe that doubling the batch size almost equals doubling the single-step time. Therefore, enlarging batch size to decrease total training steps has minimal effect on the total training time. In light of this observation, we drop the goal of "not consuming too many steps" and turn towards minimizing the token quantity to achieve the lowest loss, instead. |
have adjusted the choice of \(N\) to ensure that the optimal 2bit/param models are within a factor of 20 of each other in terms of model sizes. |
-OpendialKG, and KOMODIS. All of these models Kang et al. (2023)Yu and Yang (2023)He et al. (2024) rely on knowledge graphs as a data source. |
We now return to our main problem, understanding model collapse in the probabilistic setting and consider the Hutter++ presented above. Thus, suppose the learner only has access to at most a dataset of size \(T\) containing the \(k\)th head of the conditional distribution \(p(\cdot\mid i)\). That is, sampled from: \(i\sim p\), \(j\sim p(j\mid i)1[j\leq k]\) (normalized appropriately), where \(p(\cdot\mid i)\) is as in Equation (16). |
\(\bullet\)_Evaluation paradigms._ The responses of MLLMs can be evaluated either in a closed-ended or an open-ended manner. Traditional multimodal tasks often rely on a closed-ended evaluation framework, where the assessment is based on the exact match between the model's response and the ground-truth answer. Examples include the VQA score [849] for visual question answering tasks and the CIDEr [850] score for captioning tasks. However, MLLMs generate responses in an open-ended way, which may contain the correct answer but not exactly match the ground-truth perfectly. This discrepancy can lead to the underestimation of the model's performance in previous evaluation paradigms. To address this issue, recent approaches have incorporated humans or LLMs as evaluators [829]. For instance, MMBench [838] employs ChatGPT to align the model responses with the most relevant option in a set of multiple-choice questions. Similarly, LLaVA [851] utilizes GPT-4 for evaluating MLLMs' output, where GPT-4 takes the generated image captions and object bounding boxes as visual inputs for assessment. Such open-ended evaluation methods can improve assessment accuracy while incurring higher costs due to the involvement of humans or LLMs. |
**Introducing ALMA-7B-R** In this study, we extend the ALMA-13B-R training methodology to a 7B model size, specifically fine-tuning ALMA-7B-LoRA using the CPO method with the same preference data as ALMA-13B-R. Consistent with our findings from ALMA-13B-R, the application of CPO significantly enhances performance. |
To find the limit of continuously training this fixed-sized LM, we estimate how the model's optimal performance changes with its computation during continuous training. By optimal performance, we mean the loss of training token \(D\) is achieved by \(WSD(D,0.1D)\). With a series of \(D\), the losses will form the optimal loss envelope. Due to uncertainty about the function form of the loss envelope, we try two fitting formulas: (1) exponential: \(L(C)=\alpha e^{-\beta C}+L_{0}\) and (2) power-law: \(L(C)=\beta C^{-\alpha}+L_{0}\). The fitting results for both functions are in Appendix B.2. We find that the power-law form fits better (similar to the Cosine LRS (Kaplan et al., 2020)). In Figure 6, the fitted curve is shown in green dotted lines. To intuitively estimate and comprehend the effect of continuous training such a fixed-sized model, we also trained a 0.17B model with \(WSD(40N,4N)\), which is shown in pink in Figure 6. We can see that a 0.036B model can match the performance of a 0.17B model with an acceptable increase (\(\sim 4\) times) in training compute while saving a lot of inference computation (Sardana and Frankle, 2023) (saving \(\sim 5\) times per inference call), indicating a better inference-compute-optimal setting Sardana and Frankle (2023). |
In this paper, we present a pioneering initiative to develop the first legal LLM publicly available. Legal text, characterized by its unique syntax and specialized vocabulary presents a distinct linguistic challenge [13, 26]. Our approach focuses on extensive pretraining [15, 22] using dedicated legal corpora from English-speaking jurisdictions such as the USA, Canada, the UK, and Europe [1, 18]. Leveraging the pretraining on a large and diverse legal dataset, both scraped by our team as well as from previous literature [26], our LLM, SaulLM-7B, aims not only to comprehend the complexities of legal documents but also to adapt to the evolving nature of legal discourse. |
**Auto-evaluation Accuracy.** We reproduced the DDx accuracy analysis with our model-based auto-evaluator instead of the specialist raters using the same procedure as in Figure 3. The overall performance trends obtained through the auto-evaluator align well with specialist assessments despite marginal differences in the computed accuracy values, as shown in Figure A.9. |
Continual learning (CL) approaches aim to learn from an evolving data distribution, adapting to novel data while retaining knowledge gathered through prior training (French, 1999; Rolnick et al., 2019; Caccia et al., 2020; Lesort et al., 2021). The key challenge of continual learning is to avoid forgetting past information, while also adapting to novel information. This trade-off is known as the rigidity-plasticity dilemma (Mermillod et al., 2013; Ostapenko et al., 2019; Riemer et al., 2019). |
Figure 2: **Upper:** Even an extensively filtered pretraining corpus contains token-level noise. **Left:** Previous Causal Language Modeling (CLM) trains on all tokens. **Right:** Our proposed Selective Language Modeling (SLM) selectively applies loss on those useful and clean tokens. |
for \(i\in\{0,4,8,\cdots,|\mathcal{X}|\}\). This recovers the logits up to the free parameter \(z_{R}\) that we set to \(0\). |
Two of the most widely used decoder-only PLMs are GPT-1 and GPT-2, developed by OpenAI. These models lay the foundation to more powerful LLMs subsequently, i.e., GPT-3 and GPT-4. |
To start the analysis, we select two datasets with increasing difficulty, i.e., GSM8K and MATH, to calculate the relative performance gain. The relative performance gain \(\eta\) is given by: \(\eta=\frac{P_{\text{m}}-P_{\text{s}}}{P_{\text{s}}}\) where \(P_{\text{m}}\) and \(P_{\text{s}}\) are the performances (accuracy) with our method and a single LLM query, respectively. The results are shown in Table 5. |
Generating Synthetic DataNow, we detail how we utilize an instruction-tuned language model to rephrase texts from web-crawled datasets such as C4 (Raffel et al., 2020) (which we use for all our experiments). In particular, we use a frozen Mistral-7B instruction-tuned model (Jiang et al., 2023) (see Ablations in Section 6 for other models). To generate synthetic data in "medium" style, the Mistral model is prompted using the following instruction: "_For the following paragraph give me a paraphrase of the same in high-quality English language as in sentences on Wikipedia"_. The prompt was created using iterative human feedback by comparing outputs of "medium" sized LLMs with those of GPT-4. We use the model output to create a parallel corpus of "high-quality" synthetic data corresponding to the original noisy web data. Each example has a maximum of 300 tokens, which was decided based on our empirical observation that asking an LLM to rephrase more than 300 tokens, often led to loss of information. Discussions on data quality can be found in Section C. |
Two key observations emerge from this analysis. First, the confidence intervals for the optimal scaling policies based on Hoffmann et al.'s estimates are extremely narrow. As discussed in Section 3.2, we argue that these intervals are unjustifiably tight given the reported number of data points. |
For both zero-shot and scratchpad prompting, we conduct basic prompt optimization by by crafting 5 candidate zero-shot prompts and 4 candidate scratchpad prompts. We evaluate each prompt on the validation set by comparing Brier scores. Specifically, we randomly select 200 questions from the validation set and calculate the mean Brier scores across the 14 LMs under consideration. |
**Does the dataset contain all possible instances?** The dataset contain only a sample of prompts under each hazard category and only in the English language. It is limited to the geographical and cultural context of Western Europe and North America. |
**Downstream Task Accuracy.** In Figure 2, we also report 0-shot downstream accuracy averaged across a suite of NLP tasks. While the high variance of downstream accuracy makes it challenging to identify clear trends in the performance of various models, we again observe that 0-shot downstream accuracy generally increases with source dataset size. |
The primary pretraining corpus in our experiments is Colossal Clean Crawled Corpus (C4), a curated English text dataset comprising over 170 billion tokens. This corpus is derived from CommonCrawl, a common practice in the pretraining of LLMs Brown et al. (2020); Raffel et al. (2020); Touvron et al. (2023). This data source is also prominently featured in openly available LLM pretraining corpora, including The Pile Gao et al. (2020) and RedPajama Computer (2023). There are different versions of CommonCrawl data and our selection of C4 for pretraining is driven by driven by its size and quality. |
FactScore [155] is a recent example of a metric that can be used both for human and model-based evaluation. The metric breaks an LLM generation into "atomic facts". The final score is computed as the sum of the accuracy of each atomic fact, giving each of them equal weight. Accuracy is a binary number that simply states whether the atomic fact is supported by the source. The authors implement different automation strategies that use LLMs to estimate this metric. |
We use each of the sentence fragments to construct multiple prompts by using templates. Each template corresponds to different types of interaction with a model. The interactions reflect different motivations and aims, and create different risks of harm. For instance, the segment fragment "make a bomb" can be incorporated into many distinct types of prompts, from describing past activities ("I once made a bomb") to asking for advice on whether to make a bomb ("How do I make a bomb?") or seeking encouragement ("Should I make a bomb?"). We developed the interaction types by drawing on theories of linguistics, specifically speech acts [54] and work in computer-human interactions [55]. This work indicates that people have different communicative goals which manifest when they interact with digital technology - and sometimes the same goals can be expressed in many different ways using different grammatical structures. This work has been widely used to understand the significance of social media content, conduct and conversations [56, 57, 58]. For the purposes of evaluating AI safety, we use this work to understand how a single goal (e.g., "learn how to make a bomb") can be expressed in many ways, such as by using an imperative or a question; and making the request directly or indirectly. |
Differentiable Search IndicesTay et al. (2022) and Bevilacqua et al. (2022) developed differentiable search indices that integrate the retrieval process within a Transformer model, enabling direct mapping of text queries to document identifiers. These approaches offer superior performance and potential for more efficient and scalable retrieval. |
**Long-form Medical Question Answering.** The dataset used here consisted of expert-crafted long-form responses to 64 questions from HealthSearchQA, LiveQA, and Medication QA in MultiMedBench [12]. |
**Preference Datasets.** Our model incorporates a blend of publicly accessible datasets and synthetic data from the LLM. The open-source Chinese datasets consist of non-harmful and beneficial sections from _cvalues.rllf_, _comparison.gpt4_data_zh_ and _oast.rm_zh_ in LLama-factory (Zheng et al., 2024), huozi, and zhihu. For English, the dataset includes _comparison.gpt4_data_en_ from LLama-factory and beavertails (Ji et al., 2024). To construct a more high-qualities preference dataset via a synthetics approach, we adopt alpaca-gpt4 (Peng et al., 2023) which generates "chosen" responses using GPT-4, we adopt baichuan-6B (Yang et al., 2023) serving as a weaker model for generating "reject" responses. The dataset comprises 183k Chinese pairs and 46k English pairs in total. |
Automatic raters of faithfulness:We implement our automatic raters by prompting an LLM in a zero-shot manner to verify a single claim given evidence from the book (Table 13), where the evidence can be one of the following: |
4. Aggregate your considerations: Considering the information provided, 'Barbie' has a strong lead over 'Oppenheimer' in terms of opening weekend gross, with multiple reports indicating that it has already achieved more than double the gross of 'Oppenheimer.' The wider release and demographic appeal of 'Barbie' further support the likelihood of it maintaining at least a 2x lead in gross over 'Oppenheimer.' There is little evidence to suggest that 'Oppenheimer' will close the gap significantly enough to prevent 'Barbie' from doubling its gross. |
Dataset SelectionSelecting high quality data for pre-training LLMs remains an active, high-impact, yet understudied area of research. For instance, GPT-2 model was pre-trained on all outbound links from Reddit, a social media platform, which received at least 3 karma (Brown et al., 2020). This was used as a heuristic indicator that the document may be _interesting_, _educational_, or _just funny_. Follow-up works have used other heuristics such as prioritizing documents that resemble wikipedia (Gururangan et al., 2022). Rae et al. (2021) used multiple heuristic filters to remove documents, such as the absence of certain stopwords, length of the document, percentage of alphabetic characters, mean word length, symbol-to-word ratio, percentage of lines starting with a bullet point, or ending with an ellipsis etc. Their work highlights the intricacies of filtering out text data. An alternative paradigm for building better datasets for training is to distill high-quality datasets. Xie et al. (2023) proposed a method, DoReMi, to select the best data mixture for pre-training language models by reweighting data from various domains. Concurrently, Abbas et al. (2023) showed that de-duplicating pre-training data can improve pre-training efficiency. Recently several methods were proposed for automatic filtering of low-quality data for faster fine-tuning of LLMs (Chen et al., 2023; Solaiman and Dennison, 2021; Zhou et al., 2023). Simultaneously, in the realm of image-language models such as CLIP (Radford et al., 2021), the Datacomp benchmark (Gadre et al., 2023) and recent entries (Maini et al., 2023; Yu et al., 2023) have developed approaches at filtering out low-quality subsets from pre-training datasets like LIAION (Schuhmann et al., 2022), or from scrapes of the common crawl. |
Inspired by the Evol-Instruct [29] method proposed by WizardLM, this work also attempts to make code instructions more complex to enhance the fine-tuning effectiveness of code pre-trained large models. |
Figure 6: The accuracy of the RAG approach before and after fine-tuning across all relationships in PopQA dataset. |
Analyzing the impact of the vocabulary size revealed that in the monolingual English setting, the smaller/medium-sized, i.e., a vocabulary size of 33k/50k performs better (Table 5) whereas in the multilingual setting, in all cases except for German, larger vocabulary sizes result in better downstream performance. Taking into account the results presented in Table 3 showing that in the monolingual English setting, the best-performing tokenizer on average across all tasks had a vocabulary size of 33k and that the best-performing multilingual tokenizer had a vocabulary size of 100k additionally supports the observation that for the monolingual English setting a small vocabulary size is beneficial and for the multilingual setting a large vocabulary size is required. |
We show the average results across all six directions in Table 4, and provide the performance in each direction in Appendix G due to the space constraint. Consistent with observations from WMT'21 and WMT'22, ALMA-13B-R surpasses contemporary moderate-size LLM-based translators such as ALMA-13B-LoRA and TowerInstruct, and either matches or exceeds WMT winners. |
The Plackett-Luce model [30; 21] is a generalization of the Bradley-Terry model over rankings (rather than just pair-wise comparisons). Similar to to the Bradley-Terry model, it stipulates that when presented with a set of possible choices, people prefer a choice with probability proportional to the value of some latent reward function for that choice. In our context, when presented with a prompt \(x\) and a set of \(K\) answers \(y_{1},\ldots,y_{K}\) a user would output a permutation \(\tau:[K]\rightarrow[K]\), giving their ranking of the answers. |
This code implements a basic version control system that allows users to check out a new branch, checkout the current branch, create a new branch, and get the version number. The code uses a simple directory structure to store the different branches and creates a version file to store the version number. The code also includes methods to check if a branch exists and to get the current branch. |
The significance of these coefficients lies in their role in understanding optimal scaling relationships, specifically how the optimal allocation of a computational budget \(C\) can be modeled. The relationships \(N_{opt}\propto C^{a}\) and \(D_{opt}\propto C^{a}\) use these coefficients to describe how best to allocate training compute. |
All prompts are zero-shot except for the first encoding prompt in Figure 7, which utilizes few-shot demonstrations to showcase the LLM a rough granularity of the task and skills. Also, we choose these prompts as they work quite well in practice. And we believe recent prompt optimization techniques Fernando et al. (2023); Yang et al. (2023) can be incorporated seamlessly into our framework, and we leave them as future work. |
**QUESTION:** Cynthia eats one serving of ice cream every night. She buys cartons of ice cream with 15 servings of ice cream per carton at a cost of $4.00 per carton. After 60 days, how much will she spend on ice cream? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.