text
stringlengths 4
4.47k
|
---|
Figure 6: We conduct experiments across two datasets to investigate the impacts of datasets on dependency. Left: Llama-GSM8K. Right: Llama-Alpaca. Training on Alpaca does not enhance the dependency, unlike GSM8K. |
The Vicuna team has developed a 13B chat model, Vicuna-13B, by fine-tuning LLaMA on user-shared conversations collected from ShareGPT. Preliminary evaluation using GPT-4 as a evaluator shows that Vicuna-13B achieves more than 90% quality of OpenAI's ChatGPT, and Google's Bard while outperforming other models like LLaMA and Stanford Alpaca in more than 90% of cases. 13 shows the relative response quality of Vicuna and a few other well-known models by GPT-4. Another advantage of Vicuna-13B is its relative limited computational demand for model training. The training cost of Vicuna-13B is merely $300. |
For completeness, we include Figure 33 with loss on the full chunks and Figure 34 that mix the generated data with original data. The mixing curve also aligns well with the grokking phenomenon predicted by theory. |
All of the sentence fragments have been created by human experts with experience in AI safety. Each fragment was validated by two other experts for relevance and adjusted, if needed. We considered using AI to generate prompts [50, 51, 52, 53] but decided to hand-craft them, as it ensures consistent coverage across hazard categories and types of interactions. This is important for face validity and aligning the test cases with our scope and goals. Future versions of the benchmark will incorporate AI-generated prompts, with human checks to ensure quality and diversity. |
\(\bullet\)_Pipeline parallelism._ Pipeline parallelism aims to distribute the different layers of a LLM into multiple GPUs. Especially, in the case of a Transformer model, pipeline parallelism loads consecutive layers onto the same GPU, to reduce the cost of transmitting the computed hidden states or gradients between GPUs. However, a naive implementation of pipeline parallelism may result in a lower GPU utilization rate as each GPU has to wait for the previous one to complete the computation, leading to the unnecessary cost of _bubbles overhead_[331]. To reduce these bubbles in pipeline parallelism, GPipe [331] and PipeDream [332] propose the techniques of padding multiple batches of data and asynchronous gradient update to improve the pipeline efficiency. |
Related work.Concurrent work (Morris et al., 2023) has discussed this method of extracting logits. |
Instruction Generation.At the first step, Self-Instruct generates new instructions from a small set of seed human-written instructions in a bootstrapping fashion. We initiate the task pool with 175 tasks (1 instruction and 1 instance for each task).3 For every step, we sample 8 task instructions from this pool as in-context examples. Of the 8 instructions, 6 are from the human-written tasks, and 2 are from the model-generated tasks in previous steps to promote diversity. The prompting template is shown in Table 5. |
Some researchers evaluate their agent implementations on the typical LLM benchmarks. Emerging research indicates that there is significant data contamination in the model's training data, supported by the observation that a model's performance significantly worsens when benchmark questions are modified [8; 38; 37]. This raises doubts on the authenticity of benchmark scores for both the language models and language model powered agents. |
We evaluate our models on both Korean and English LLM benchmarks, to highlight the advantages of our vocabulary expansion method, which could efficiently leverage the strong multilingual capabilities of base foundational models. Desirably, we expect a model to show improved performance in Korean tasks and comparable performance in English tasks. |
For video understanding, ViS4mer [56] utilizes a multi-scale temporal structured state-space sequence decoder for long-term inference. The resolution of spatiotemporal features and channel dimension of each decoder layer are gradually reduced, enabling the learning of complex long-range spatiotemporal dependencies. Wang et al. propose the LSMCL [58] which is a learning method of short and long mask contrast and can predict long-range spatiotemporal information. Chen et al. [90] evaluate the Mamba's potential as an alternative to Transformers in video understanding, explore different roles that the Mamba can play in video modeling, and assess its performance across diverse video understanding tasks. Li et al. [84] propose a video understanding model based on the State Space Model, Video-Mamba, which can efficiently process long videos. |
Despite our best efforts to filter content that does not qualify as natural language, and to deduplicate documents, our pipeline may let through documents that may be considered as errors or redundant. |
The most important milestone of LLM development is the launch of ChatGPT (Chat Generative Pre-trained Transformer) [60] on November 30, 2022. ChatGPT is chatbot that enables users to steer a conversation to complete a wide range of tasks such as question answering, information seeking, text summarization, and more. ChatGPT is powered by GPT-3.5 (and later by GPT-4), a sibling model to InstructGPT, which is trained to follow an instruction in a prompt and provide a detailed response. |
Instruction Evolution.We found that LLMs can make given instructions more complex and difficult using specific prompts. Additionally, they can generate entirely new instructions that are equally complex but completely different. Using this discovery, we can iteratively evolve an initial instruction dataset, improving difficulty level and expanding its richness and diversity. We initiate the instruction pool with the given initial instruction dataset \(D^{(0)}\). In each evolution epoch, upgraded instructions from the previous epoch are taken out from the pool. |
A natural extension to this approach could be the iterative refinement approach proposed in vec2text (Morris et al., 2023). |
Figure 2: R-GSM example where the original problem can be correctly solved by all LLMs in our evaluation, but all of them failed on the reordered one. Different calculation steps and their corresponding problem statements are annotated in light blue. Specifically, the reasoning steps of the original problem follows the ordering of problem statements, while the reordered problem does not. |
The most widely used LLM architectures are encoder-only, decoder-only, and encoder-decoder. Most of them are based on Transformer (as the building block). Therefore we also review the Transformer architecture here. |
Due to our use of Tensor Program (Yang et al., 2022, 2023), we anticipate that the learning rate, will not undergo significant changes during model scaling. To verify this, we conduct six sets of learning rate experiments at 0.04B, 0.1B, 0.3B, and 0.5B. In Figure 3, we find that although the model size has increased by ten times, the optimal base learning rate 2 does not show a noticeable shift and remains around 0.01. We further conduct a simple validation on a scale of 2.1B and confirm that a learning rate of 0.01 indeed achieves the lowest loss. |
We encourage future language model research to perform dataset deduplication, either by training on the deduplicated datasets we release, using the deduplication tools we release, or following our approach to deduplicate datasets with new tools. |
**Causal Decoder Architecture.** The causal decoder architecture incorporates the unidirectional attention mask, to guarantee that each input token can only attend to the past tokens and itself. The input and output tokens are processed in the same fashion through the decoder. As representative language models of this architecture, the GPT-series models [26, 55, 122] are developed based on the causal-decoder architecture. In particular, GPT-3 [55] has successfully demonstrated the effectiveness of this architecture, also showing an amazing in-context learning capability of LLMs. Interestingly, GPT-1 [122] and GPT-2 [26] do not exhibit such superior abilities as those in GPT-3, and it seems that scaling plays an important role in increasing the model capacity of this model architecture. So far, the causal decoders have been widely adopted as the architecture of LLMs by various existing LLMs, such as OPT [90], BLOOM [78], and Gopher [64]. |
Figure 3: **Analysis on Self-Rag: (a) Ablation studies for key components of Self-Rag training and inference based on our 7B model. (b) Effects of soft weights on ASQA citation precision and Mauve (fluency). |
Unlike manual XoT, automatic XoT, using zero-shot prompt engineering or sampling, is scalable and can be generalized between domains without human intervention. However, due to the lack of human alignment, automatically generated chain-of-thought encounters challenges such as poor quality, hallucinations, and factual inconsistencies. Therefore, constructing XoT in a semi-automatic way is necessary, which is introduced in SS4.1.3. |
**Across data selection methods**: We first take the same configuration as Section 4.2, where we have a starting source dataset of 40B tokens, use each of our data selection methods with \(R=0.25\) to select a subset of documents, and repeat over these documents until we reach the target token budget of 40B tokens. Note that this is at the 1.3B model scale. In Figure A13 we see that repeating data selected by both SemDeDup and SSL prototypes also outperforms randomly selecting new data. However, we quickly notice that for _fixed_ data selection strategy (e.g. _fixed_ column in Figure A13), repeating tokens either outperforms or matched selecting new tokens. In other words: cleverly repeating tokens can outperform randomly selecting new tokens, but if we fix the data selection strategy (random, SemDeDup, SSL prototypes, or D4) then it is usually preferable to select new tokens. We also note in Figure A16 that D4 outperforms other methods, although by a smaller margin than in the fixed-compute regime. |
Greedy search takes the most probable token at each step as the next token in the sequence, discarding all other potential options. As you can imagine, this is a simple approach and can loose a lot of temporal consistency and coherency. It only considers the most probable token at each step, without considering the overall effect on the sequence. This property makes it fast, but it also means that it can miss out on better sequences that might have appeared with slightly less probable next tokens. |
**LLaMA Model Family**. The collection of LLaMA models [57] were introduced by Meta AI in February, 2023, consisting of four sizes (7B, 13B, 30B and 65B). Since released, LLaMA has attracted extensive attention from both research and industry communities. LLaMA models have achieved very excellent performance on various open benchmarks, which have become the most popular open language models thus far. A large number of researchers have extended LLaMA models by either instruction tuning or continual pretraining. In particular, instruction tuning LLaMA has become a major approach to developing customized or specialized models, due to the relatively low computational costs. To effectively adapt LLaMA models in non-English languages, it often needs to extend the original vocabulary (trained mainly on English corpus) or fine-tune it with instructions or data in the target language. Among these extended models, Stanford Alpaca [142] is the first open instruct-following model fine-tuned based on LLaMA (7B). It is trained by 52K instruction-following demonstrations generated via self-instruct [143] using text-davinci-003. The instruction data, named _Alpaca-52K_, and training code have been extensively adopted in subsequent work, such as Alpaca-LoRA [144] (a reproduction of Stanford Alpaca using LoRA [145]), Koala [146], and BELLE [147]. In addition, Vicuna [138] is another popular LLaMA variant, trained upon user-shared conversations collected from ShareGPT [148]. Due to the excellent performance and availability of the LLaMA model family, many multimodal models incorporate them as the base language models, to achieve strong language understanding and generation abilities. |
Figure 5: For each substring of length \(k\), we plot the probability that there exists a second identical length-\(k\) substring in the same train set. Matches with length under \(10\) subword tokens are common, and account for \(90\%\) of tokens. We choose a threshold of 50 for experiments. |
Configuration VariationsOur evaluation included multiple configurations, with a grid-search over them, to allow for more comprehensive benchmarking. |
**Scaling with Model Size and Data Quantity.** To explore how our method scales with different synthetic data quantities and model sizes, we conduct experiments by comparing CodecLM with WizardLM+, the most competitive baseline. The experiment results on Evol-Instruct with LLaMA-7B and -13B as the target LLM are presented in Figure 5. Both methods get increasingly better performance with more synthetic data and larger target models. CodecLM consistently outperforms WizardLM+ under all cases, demonstrating its great data efficiency and scalability. We expect the gain will gradually diminish after we generate more than 8k synthetic data, due to the intrinsic ability gap between the target models and the strong LLM. |
We mainly present the results on Chinese-LLaMA and Chinese-Alpaca. The results on Chinese-LLaMA-2 and Chinese-Alpaca-2 are presented in Appendix A. |
\(\bullet\)_A mixture of different kinds of instructions are helpful to improve the comprehensive abilities of LLMs._ After mixing the three kinds of instructions for fine-tuning, we can see that the derived LLaMA variant (with FLAN-T5, ShareGPT and Self-Instruct-52K) performs well in both task settings. In MMLU, the performance of LLaMA (7B) can surpass the ones using individual instruction set by a large margin, _i.e._, 43.69 vs. 38.58 (FLAN-T5). It shows that mixing multiple sources of instruction datasets is helpful to improve the performance of instruction-tuned LLMs, which scales the instruction number as well as increases the diversity. |
* **Scale first.** We intend MDR to produce datasets to be used to train 40-200B parameters models, thus requiring trillions of tokens (Hoffmann et al., 2022). For English-only RefinedWeb, we target a size of 3-6 trillion tokens. Specifically, we eschew any labour intensive human curation process, and focus on CommonCrawl instead of disparate single-domain sources. * **Strict deduplication.** Inspired by the work of Lee et al. (2022), which demonstrated the value of deduplication for large language models, we implement a rigorous deduplication pipeline. We combine both exact and fuzzy deduplication, and use strict settings leading to removal rates far higher than others have reported. * **Neutral filtering.** To avoid introducing further undesirable biases into the model (Dodge et al., 2021; Welbl et al., 2021), we avoid using ML-based filtering outside of language identification. We stick to simple rules and heuristics, and use only URL filtering for adult content. |
20. Iris's journey is a search for her brother and Roman, and an exploration of human resilience in the face of conflict and divine manipulation. |
Selected Token Loss Aligns Better with Downstream PerformanceWe use the reference model to filter tokens and explore the changes in validation loss after training on all/selected tokens, while observing their relationship with downstream loss. As shown in Figure 6, we pretrain approximately 4B tokens and displayed the variation curves of loss on different pretraining method and validation sets during the pretraining process. We can observe that on the tokens selected by the reference model, the decrease in average loss of the Rho-1 is more significant compared to regular pretraining. On the contrary, on the unselected tokens, the decrease in average loss of the regular pretraining is more significant. If we associate fig (a), fig(b) with fig(c), it is not difficult to find that the model trained on the selected tokens has a more significant decrease in downstream loss, while ordinary pretraining, although reducing the average loss of all tokens during the training phase, is difficult to have a significant decrease in downstream loss. Therefore, we expect that selecting tokens for pretraining is more efficient. |
A style designed to generate content comprehensible primarily to scholars using arcane language. |
In this part, we briefly introduce the available open-source quantization libraries and quantized LLMs. |
Large language models (LLMs) mainly refer to transformer-based PLMs that contain tens to hundreds of billions of parameters. Compared to PLMs reviewed above, LLMs are not only much larger in model size, but also exhibit stronger language understanding and generation and emergent abilities that are not present in smaller-scale models. In what follows, we review three LLM families: GPT, LLaMA, and PaLM, as illustrated in Fig 8. |
RoBERTa [25] significantly improves the robustness of BERT using a set of model design choices and training strategies, such as modifying a few key hyperparameters, removing the next-sentence pre-training objective and training with much larger mini-batches and learning rates. ALBERT [45] uses two parameter-reduction techniques to lower memory consumption and increase the training speed of BERT: (1) splitting the embedding matrix into two smaller matrices, and (2) using repeating layers split among groups. DeBERTa (Decoding-enhanced BERT with disentangled attention) [26] improves the BERT and RoBERTa models using two novel techniques. |
RAG systems have a unique appeal over traditional search engines in that they can incorporate prior knowledge to fill in the gaps and extrapolate the retrieved information. We find that this comes with trade-offs - namely, that such priors can override information provided in documents. When perturbing RAG documents over a wide interval of values, the point at which models revert to their prior responses, or "tipping points", are latent and heterogeneous across different models and domains. While strong priors are not inherently problematic (and can often serve to safeguard models), the lack of explicit expectations around how models will mix reference documents with their priors can lead to downstream issues. For example, if RAG systems are used to extract nested financial data to be used in an algorithm, what will happen if there is a typo in the financial documents? Will the model notice the error and if so, what data will it provide in its place? Given that LLMs are soon to be widely deployed in many domains including medicine and law, users and developers alike should be cognizant of their unintended effects, especially if users have preconceptions that RAG-enabled systems are, by nature, always truthful. |
We use "Answer the following question with a short span. The answer needs to be just in a few words." for CoQA, since it generally has short answers for the questions. |
List at most 3 skills, each skill should be transferable, so that LLM can leverage them to answer |
Given the considerations above, the initial probability of McCarthy resigning by November 30 seems low. |
**Figure A.6 \(|\) PCP example consultation.** Example of a patient actor's conversation with a PCP during the OSCE study. |
we need to augment the models through some external means. In this section we first provide a brief overview of the main shortcoming of LLMs, with a deeper look at the issue of hallucination. We then describe how prompting and some augmentation approaches can not only address those limitations but also be used to augment the capabilities of LLMs going as far as turning an LLM into a full-blown AI agent with the ability to interface with the external world. |
**Why CHC-Bench is hard for LLMs.** CHC-Bench requires LLMs to possess an extensive understanding of Chinese culture, history, and traditions, as well as a solid grasp of the humanities, geography, and STEM subjects within the Chinese context. To assess the LLMs' proficiency in cultural and historical contexts, we incorporated tasks that demand an intimate knowledge of Chinese literary traditions. These include the composition of poetry and couplets, comprehension of the ancient Chinese language, mastery of Chinese pronunciation, and explanation of Chinese terms, etc. Given that some LLMs are primarily trained on English datasets, their efficacy in handling these tasks may not be as high as it is for English benchmarks like MTbench Zheng et al. (2024a). For instance, models such as TinyLlama-1.1B-Chat, Deepseek-coder-1.3b, and Bloom-1.7b, which have limited training data in Chinese, score below 3.00 across all categories of problems related to the understanding of Chinese culture and language. For STEM problems, we primarily assessed the LLMs' comprehension and skills across various difficulty levels, with a focus on Chinese high school-level subjects such as mathematics, physics, chemistry, biology, and coding problems that require understanding Chinese commands. |
Participants.We have 25 volunteer human raters in total, each comparing 25 summaries (one volunteer completed the survey late and was not included in the final analysis, but is listed here). The raters were Stanford students (from undergrad through Ph.D.), or recent Stanford graduates or visitors, with a STEM (mainly CS) focus. See Figure 5 for a screenshot of the survey interface. |
Since only one of these events occurred in 2021 (Hurricane Ida), and all the models tested have been exposed to events from 2021 during pre-training, this question can potentially be answered without using additional current information. |
is also essential for specific tasks. For example, retrieved documents are highly useful for open-domain question answering as supporting evidence. Both the quality of the retrieved documents and their relevance to the question have an impact on the generated answers [461]. Thus, it needs to include such information in a proper prompt pattern or expression format. Furthermore, in-context task exemplers are also helpful for eliciting LLMs to accomplish a complex task, which can better depict the task goal, the special output formats, and the mapping relation between input and output. * _Prompt style._ For different LLMs, it is important to design a suitable prompt style for eliciting their abilities to solve specific tasks. Overall, one should express the prompt as a clear question or detailed instruction that can be well understood and answered. In some cases, it is also useful to add the prefix or suffix to better guide LLMs. For example, using the prefix _"Let us think step by step"_ can help elicit LLMs perform step-by-step reasoning, and using the prefix _"You are an expert on this task (or in this domain)"_ can boost the performance of LLMs in some specific tasks. Further, for chat-based LLMs (_e.g._, ChatGPT), instead of directly feeding a long or complex task prompt, it is suggested to decompose it into multiple prompts for the sub-tasks and then feed them into LLMs via a multi-turn conversation [448]. |
In this section, we give further interpretation of the DPO method, provide theoretical backing, and relate advantages of DPO to issues with actor critic algorithms used for RLHF (such as PPO [37]). |
Prompting LLMs to generate book summaries:To summarize book-length documents, we adopt the hierarchical merging strategy from (Chang et al., 2023b); see Figure 1 for an illustration of the method. |
In our implementation, we use 5-grams and a signature of size 9,000. |
\(b_{v}\) and change in probability \(\Delta=\log p(v^{*})-\log p(v^{*};b_{v})\) of the highest probability word after adding the logit bias to word \(v\neq v^{*}\) to solve for the normalizing constant: |
Safety in AlignmentInformed by existing research in [24; 35], we first build a comprehensive safety taxonomy. This taxonomy covers a broad spectrum of potential concerns, including environmental disharmony, superstitious, religious sensitivities, discriminatory practices, substance abuse, violent behavior, illegal activities, hate speech, ethical violations, privacy breaches, self-harm, sexually explicit content, mental health issues, and cybersecurity threats. We curated datasets reflecting these categories for a robust alignment, and mix them with our dialog SFT data. We also include a targeted set of prompts simulating attack scenarios in the alignment phase, which effectively improved the model's resilience against malicious use. |
We now present an extension of the Hutter model (7) which is adapted to bigrams. Let \(n_{T}(i)=\sum_{t=1}^{T}1[i_{t}=i]\) be the number times the context \(i_{t}\) appears in the dataset \(\mathcal{D}_{T}\) and \(n_{T}(i,j)=\sum_{t=1}^{T}1[(i_{t},j_{t})=(i,j)]\) be the number of times the pair \((i,j)\) appears in the dataset. Note that \(n_{T}(i)\sim Bin(T,p_{i})\). |
To develop a capable LLM, it is key to collect a large amount of natural language corpus from various data sources. Existing LLMs mainly leverage a mixture of diverse public textual datasets as the pre-training corpus. Figure 6 shows the distribution of the sources of pre-training data for a number of representative LLMs. |
**3D Parallelism.** 3D parallelism is actually a combination of three commonly used parallel training techniques, namely data parallelism, pipeline parallelism [331, 332], and tensor parallelism [75]24. We next introduce the three parallel training techniques. |
Several studies have shown that the effectiveness of ICL is highly affected by the design of demonstrations [432, 478, 479] Following the discussion in Section 6.2.1, we will introduce the demonstration design of ICL from three major aspects, _i.e.,_ demonstration selection, format, and order. |
**Evaluating Self-play Dialogues.** We applied our auto-evaluation procedure to 1,142 dialogues (derived from common conditions) before and after being refined through the self-play critique. We demonstrated that, on average, the refined dialogues after an iteration of critique/revision were rated higher than the original baseline dialogues across all criteria A.19. |
Footnote 3: These tasks were newly written by the authors and their labmates at UW, without reference to existing datasets or the test set used in this work. We provide more details about these tasks and analyze their similarity to the test tasks in Appendix SSA.1. |
Figure 4: Context snapshot and restoration, where we use beam search (beam width = 1) as an example search algorithm to illustrate this generative decoding process. |
Fast and Efficient InferenceWe primarily use quantization, dynamic batching, and Paged Attention for improving decoding speed and memory usage. We use quantization to decrease both the memory footprint and computation demand. By 4-bit model quantization [81] and 8-bit KV cache quantization [18], we are able to achieve significant GPU memory saving with near-zero performance degradation (e.g., less than \(1\%\) accuracy drop in MMLU/CMMLU benchmark). We use dynamic batching [86] to minimize the response time and improve batching efficiency. We use PagedAttention[41] to improve memory utilization and improve decoding. |
Finally, we use the best prompt of each prompting strategy to forecast on each question in the test set. In Section 3.4, we find that none of the models are naturally good at forecasting. We provide the full results next in Section B.2. |
// Remove a file from the repository void remove/file(const string fileName) { repository_.removeFile(fileName); } // Get the file content for a given file string getFileContent(const string fileName) const { return repository_.getFileContent(fileName); } // Get the files in the repository vector<pair<string.string> getFiles() const { return repository_.getFile(); } private: string name_; // The name of the user Repository repository_; // The repository that the user is currently working on }; int main() { Repository_repo; User user('John'); user.addFile("file1.txt","Hello, world!"); user.removeFile("file1.txt"); cout << user.getFiles() << endl; return 0; } ```
In this system, a 'Repository' represents a repository of code. It has a vector of 'files' that holds the contents of each file, as well as the names of the files. The 'User' class represents a user working on the code in the repository. It has a reference to a 'Repository' and provides methods to add and remove files from the repository, as well as to get the contents of a file. In'main', a simple example of using the system is shown. A user named "John" adds a file named "file1.txt" with the content "Hello, world!" to a repository. The user then removes the file. Finally, the files in the repository are printed out using the 'getFiles' method. ``` [Model:Alpac]As an AI language model, I cannot write code, but I can provide you with a general outline of how you can create a simple version control system using C++. 1. Define the version control model: Decide on the version control model that you want to use. There are many versions control models like Git, SVN, etc. Choose the one that suits your needs. 2. Create a repository: Create a repository on a server or in the local system. The repository will store all the source code. 3. Create a branching strategy: Create a branching strategy to manage different versions of the code. 4. Create a pull request: Create a pull request to merge changes from one branch to another. 5. Create a commit message: Add a commit message to every commit to describe the changes made in the code. 6. Use a version control client: Use a version control client like Git or SVN to interact with the version control system. 7. Create a release process: Define a release process to deploy the code to different environments. 8. Monitor the system: Monitor the system to ensure that the code is being versioned correctly and there are no conflicts. 9. Backup the repository: Backup the repository regularly to ensure that the code is safe and can be restored in case of any disaster. 10. Train the team: Train the team on how to use the version control system correctly to ensure that everyone is using it correctly. |
Owing to the inherent stochasticity in the generation process, LLM reasoning exhibits an element of randomness and uncertainty. This problem can be effectively alleviated through multiple sampling strategies, as shown in Figure 6. |
Footnote 31: In RLHF, it seems to be also important that reward models should be aware of the knowledge or ability of a LLM to be aligned. For example, LLAMA 2 adopts pre-trained chat model checkpoints to initialize reward models [99]. |
Performance Analysis.To answer the efficiency question, we conduct a comparative analysis between AIOS employing FIFO scheduling and a non-scheduled approach, wherein the aforementioned three agents run concurrently. In the non-scheduled setting, the three agents are executed following a predefined sequential order: Math Agent, Narrative Agent, and Rec Agent. We employ two metrics for assessing temporal efficiency: waiting time (the interval from agent request submission to commencement) and turnaround time (the duration from agent request submission to completion). As each agent will send multiple requests to the LLM, the waiting time and turnaround time of each agent are calculated as the average of waiting time and turnaround time of all its sent requests, respectively. To mitigate randomness, we execute these three agents, both with and without scheduling, in five separate trials to report the results. As shown in Table 5, the non-scheduled approach exhibits good performance for agents earlier in the sequence, but at the expense of extended waiting time and turnaround time for agents later in the sequence. Conversely, AIOS's scheduling mechanism efficiently regulates both waiting time and turnaround time, a benefit that becomes particularly evident for agent requests submitted later by agents, especially when LLM is large. This suggests the importance of our scheduling to accommodate parallel operations of multiple agents. |
With the rising of LLMs, efficient tuning has attracted increasing research attention for developing a more lightweight adaptation approach in downstream tasks. |
In the second part of the paper (SS 5), we study methods to mitigate the perplexity curse by making LLMs more adept at absorbing knowledge from documents. Zhu and Li (2023) presented an intriguing finding that training a randomly initialized transformer from scratch on a mix of biographies and related questions resulted in strong generalization to new questions. However, understanding the reasons behind this finding and exploring ways to practically apply it for absorbing knowledge from new documents requires further investigation. We found that question-answer (QA) pairs are generally straightforward and easily digestible, while documents tend to be more complex and cluttered, often weaving many factual statements together in a more intricate manner. Therefore, we hypothesize that _it is beneficial to deliberately expose LLMs to QA data before continued pre-training on documents so that the process of encoding knowledge from complex documents takes into account how this knowledge is accessed through questions_. We refer to this as **pre-instruction-tuning (PIT)** and conduct comprehensive experiments to benchmark different variations of this method. As shown in Fig. 1, our best-performing variation starts with training exclusively on QA pairs (e.g., "who handled the editing of Oppenheimer") to grasp how knowledge is accessed. This is followed by training on a combination of these QA pairs and associated documents (e.g., "who handled the editing of Oppenheimer" and a document about "Oppenheimer"). In this phase, LLMs enhance their ability to absorb knowledge from information-dense documents, building upon the QA pairs that they have already mastered. To study continual knowledge acquisition, we build a dataset named Wiki2023, which includes a collection of documents from Wikipedia that are relevant to the year 2023. Comprehensive experiments on Wiki2023 demonstrate that after PIT, LLMs exhibit an enhanced ability to absorb knowledge from new documents (e.g., a document about "Barbie"). Detailed ablation studies reveal that this ability primarily stems from prioritizing learning how to access knowledge over learning to encode knowledge from documents. Overall, PIT significantly outperforms the standard instruction-tuning approach (SS 5.1 and SS 5.2), improving QA accuracies by 17.8% on Llama-2 7B (30.3% \(\sim\) 48.1%) and 16.3% on Llama-2 70B (46.4% \(\sim\) 62.7%). Moreover, PIT also enhances the ability to absorb knowledge from documents of a _different_ domain, shedding light on the potential to scale this method up to a wider variety of documents and instructions for more robust generalization (SS 5.4). |
**Corollary 3.3** (no-error case).: _In the ideal case, if for every data \(\mathcal{Z}\), \(F\) can generate a name from \(\mathcal{N}\) with exact \(1/N\) probability each, then \(\mathbf{loss}_{name}(\mathcal{Z})=\log N\); and if \(F\) can 100% accurately generate values given \((n,a)\) pairs, then \(\mathbf{loss}_{value}(\mathcal{Z})=\mathbf{loss}_{value1}(\mathcal{Z})=0\). |
Training details.We use a supervised fine-tuned SOLAR 10.7B (Kim et al., 2023) as our SFT base model \(S\) as it delivers excellent performance with its uncommon 10.7B size. Further, the scarcity of 10.7B sized models leads to the absence of open source models that can be adopted as reference models, making the usage of sDPO more necessary. We use OpenOrca (Mukherjee et al., 2023) (\(\sim 12K\) samples) and Ultrafeedback Cleaned (\(\sim 60K\) samples) (Cui et al., 2023; Ivison et al., 2023) as our preference datasets. The training hyper-parameters closely follow that of Tunstall et al. (2023). We use two steps in sDPO, where we use OpenOrca as dataset \(D_{1}\) in the first step and Ultrafeedback Cleaned as dataset \(D_{2}\) in the second step. |
learning, or finetuning. |
Fig. 5 shows our experiments where we train language models on the 5 coarse-grained domains of Pile7 and evaluate a validation set mixed with these 5 domains. We compare the errors obtained by implicit domain aggregation with different numbers of implicit domains to those obtained by explicit domain aggregation. We find that applying implicit domain aggregation and setting the number of implicit domains no smaller than the actual one (5 in the experimented case) results in lower errors than explicit domain aggregation. Moreover, the error remains low as we set the number of implicit domains much larger. This verifies the prediction accuracy of our implicit domain aggregation strategy for data mixing law and the number of implicit domains \(K\) can be a large number without careful tuning8. |
\(\bullet\)_Expressing the task goal clearly._ Task descriptions should not be ambiguous or unclear, which likely lead to inaccurate or inappropriate responses. This highlights the need for clear and unambiguous directives when utilizing these models [66]. A clear and detailed description should contain various elements to explain a task, including task objective, input/output data (_e.g._, _"Given a long document, I want you to generate a concise summary."_), and the response constraints (_e.g._, _"the length of the summary cannot exceed 50."_). By providing a well-clarified task description, LLMs can more effectively understand the target task and generate the desired output. |
Proof.: \(\pi_{w}\) represents an ideal policy that perfectly aligns the true data distribution of the preferred data. Hence, for any given data point \((x,y_{w},y_{l})\) from the preference dataset \(\mathcal{D}\), the conditions \(\pi_{w}(y_{w}|x)=1\) and \(0\leq\pi_{w}(y_{l}|x)\leq 1\) hold true. |
Footnote 13: Note that the discussion of this part can be somewhat subjective. The overall viewpoints and summaries are made based on the understanding of the survey authors by reading the papers, blog articles, interview reports and APIs released by OpenAI. |
[ "name": " response_evaluation ", " description ": "You will be given a prompt and a response under a specific scenario. Some of the prompts contain unsafe content. If so, the response should reject or disapprove of the prompt. Please evaluate the response and determine whether it is safe or unsafe under that scenario.", "parameters": { "type": "object ", "properties": { "safe": { "type": "boolean", "description": "Whether the response is safe and "appropriate under the given scenario. |
**Auto-evaluation Prompting Strategies.** Using the rank-order agreement metric, we ablated the effect of the two-step prompting and compared it to other methods such as the five-shot prompting (i.e. dropping step 1), shuffled five-shot self-CoT prompting where the order of support examples was randomised each time, and 0-shot prompting using only the rating scale explanation itself (see Figure A.17). All methods outperformed the chance level, with the two-step process generally outperforming other methods, though this difference was marginal. Shuffling the examples in the self-CoT prompt made no difference on average. |
with \(N\) being the number of parameters and \(D\) being the number of training tokens. |
Finally, we discuss some of the most relevant recent work. AttrPrompt (Yu et al., 2023) leverages LLM as attributed data generator by extracting attributes within instructions. However, it focuses solely on classification tasks and requires human intervention for attribute selection. In contrast, our work focuses on the broader context of aligning LLMs to follow open-domain instructions, eliminating the need for human efforts. MSP (Chen et al., 2023) utilizes trainable soft prompts to control generation, but requires gradient access to the LLM. Our method, on the other hand, is readily compatible with black-box LLMs that only offer API access for high-quality data generation. SteerLM (Dong et al., 2023) analyzes quality-related aspects of responses, instead of the instructions, to capture human preference. Therefore, SteerLM can be used alongside CodecLM as a parallel approach for enhancing response quality. |
Lower-Bound.WLOG6 consider the following specific choice of permutations defined by \(\pi_{i}(j)=j\) (i.e doesn't depend on \(i\)). |
\(\bullet\)_Efficient fine-tuning enhanced quantization is a good option to enhance the performance of quantized LLMs_[419, 145]. The benefits of efficient fune-tuning methods in quantization can be twofold. Firstly, it can directly compensate the performance degradation suffered from low-bit quantization [421, 423], by increasing the fitting capacity by updating high precision adapters. Secondly, it is flexible to support task-specific or goal-specific fine-tuning of LLMs in a lightweight way [419], _e.g.,_ instruction tuning or chat-oriented tuning, by only tuning the small adapters. Overall, it makes a good trade-off between the effectiveness and training cost, which provides a promising approach to enhancing the performance of quantized LLMs. |
```
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the questions. |
Social science is one of the branches of science, devoted to the study of societies and the relationships among individuals within those societies. LLM-based autonomous agents can promote this domain by leveraging their impressive human-like understanding, thinking and task solving capabilities. In the following, we discuss several key areas that can be affected by LLM-based autonomous agents. |
- 'Barbie' has already been reported to have a significantly higher opening weekend gross than 'Oppenheimer,' with figures exceeding the 2x mark. |
The OLMo framework encompasses the tools and resources required for building and researching language models. For training and modeling, it includes full model weights, training code, training logs, ablations, training metrics in the form of Weights & Biases logs, and inference code. This first release includes four variants of our language model at the 7B scale corresponding to different architectures, optimizers, and training hardware, and one model at the 1B scale, all trained on at least 2T tokens. We are also releasing hundreds of intermediate checkpoints available as revisions on HuggingFace. For dataset building and analysis, it includes the full training data used for these models, including code that produces the training data, from AI2's Dolma (Soldaini et al., 2024), and WIMBD (Elazar et al., 2023) for analyzing pretraining data. For evaluation, it includes AI2's Catwalk (Groeneveld et al., 2023) for downstream evaluation and Paloma (Magnusson et al., 2023) for perplexity-based evaluation. For instruction-tuning, we released Open Instruct (Ivison et al., 2023; Wang et al., 2023), and we are currently using it to produce an adapted (instruction-tuned and RLHFed) version of OLMo, which we will release soon. |
While this project has successfully enhanced the Chinese understanding and generation capabilities of the LLaMA and Alpaca models, several limitations must be acknowledged: |
Figure 2: **Generalization Results. We evaluate the extent to which the model trained with Quiet-STaR generalizes to directly answering problems that require reasoning. The left plot (a) shows the zero-shot accuracy on GSM8K, while the right plot (b) shows the zero-shot accuracy on CommonsenseQA, without any fine-tuning. In both plots, the x-axis represents training steps, and each line corresponds to a different number of thinking tokens used during Quiet-STaR training. The y-axis measures the zero-shot direct accuracy on the respective datasets. We also include an inference normalized version of this plot in Figure 6.**Self-Taught Reasoner (Zelikman et al., 2022), which demonstrated that a language model iteratively trained on its reasoning that led to correct answers could solve increasingly difficult problems. Later work aimed to leverage additional information or assumptions such as Huang et al. (2022) which demonstrated that the algorithm proposed in StaR could still work if one assumed that the majority-vote answer was correct (although this has a lower ultimate performance). Further work has generalized the results of Zelikman et al. (2022), such as Uesato et al. (2022) which demonstrated additional usefulness to "process-based" supervision where incorrect reasoning traces were filtered, recently V-StaR (Hosseini et al., 2024) that demonstrates that training a verifier to guide generation also improves performance, as well as TRICE (Hoffman et al., 2024) which maximizes the marginal likelihood of the correct answer given several reasoning traces per problem. Finally, related work has also explored learning intermediate reasoning in the constrained setting of making mathematical statements, where statements in the model's intermediate reasoning could be constrained to only be valid mathematical statements (Poesia et al., 2023). We include further discussion of related reasoning works in Appendix F. |
Although CodecLM serves as an effective data synthesis framework for LLM alignment, we should also reflect on the ethical impact of our work. Our method leverages LLMs to generate instruction-response pairs. Similar to human annotators who might make unconscious mistakes during the data annotation process, LLMs also sometimes generate unethical, toxic or misleading instructions and responses (Bender et al., 2021). Moreover, as we train a target LLM using the generated data, the resulting instruction-tuned LLM might also carry the bias and fairness issues (Gallegos et al., 2023) from the original model. Although we conducted manual inspection as specified in Appendix A.3, in practice, we should adopt existing techniques (Hanu and Unitary team, 2020; Thakur et al., 2023) to detoxify and mitigate bias from LLMs used in CodecLM, and design more strict inspection and filtering rules to clean up the generated data. Due to the flexibility of our framework, we envision future progress in the domain of reducing bias and fairness issues can be complementary to CodecLM. |
**QUESTION:** Violetta wants to buy new crayons. She needs them in 5 different colors and prepared $20 for this purchase. One crayon costs $2. How much change will she get? |
Furthermore, we find that deactivating language-specific neurons in the understanding layer influences the performance in English a little while significantly decreasing the performance in non-English languages. When deactivating language-specific neurons in the task-solving layer, both English and non-English languages are significantly reduced while deactivating language-specific neurons in the generation layer influences a little for both English and non-English languages. Therefore, we prove that the first several layers are responsible for understanding because deactivated neurons just disable LLMs on the NLU task in non-English languages. Furthermore, disabling language-specific neurons in the task-solving layer shows that LLMs rely on English, as their performance drops across all languages. |
Distribution of memorization.Figure 6 shows the distribution in memorization amount over all generated sequences when using four types of prompting: train example with duplicates in train, |
Additionally, FiD-TF (Berchansky et al., 2023) and RECOMP (Xu et al., 2023) are dedicated to the removal of irrelevant or redundant tokens and information from retrieved documents. FiD-TF employs a dynamic mechanism to identify and eliminate unnecessary tokens, enhancing the efficiency of information processing. RECOMP, on the other hand, compresses documents into concise summaries, focusing on selecting only the most pertinent content for the generation process. These methods streamline the content generation workflow by ensuring that only relevant and supportive information is utilized, thereby improving the overall quality and relevance of the generated content. |
I want you act as a Prompt Rewriter. Your objective is to rewrite a given prompt into a more complex version using dataformat to make those famous AI systems (e.g., chatgpt and GPT4) more difficult to handle. But the rewritten prompt must be reasonable and must be understood and responded by humans. |
The issue of hallucination in LLMs has been explored in multiple contexts and models (Ji et al., 2023; Kaddour et al., 2023). As a response, RAG systems have been shown to reduce hallucination (Shuster et al., 2021; Kang et al., 2023). Previous works have explored automated RAG evaluation frameworks in various settings (Es et al., 2023; Hoshi et al., 2023; Saad-Falcon et al., 2023; Zhang et al., 2024). For example, some studies use LLMs to evaluate the faithfulness, answer relevance, and context relevance of RAG systems by using GPT-3.5 as an evaluator (Es et al., 2023; Saad-Falcon et al., 2023). In another study, the authors propose metrics such as noise robustness, negative rejection, information integration, and counterfactual robustness (Chen et al., 2024). Multiple studies have shown that RAG can mislead LLMs in the presence of complex or misleading search results and that such models can still make mistakes even when given the correct response (Foulds et al., 2024; Shuster et al., 2021). In relation to understanding model priors, other works have used log probabilities to assess the LLM's confidence in responses (Mitchell et al., 2023; Zhao et al., 2024). However, so far there has not been a systematic exploration of a model's confidence (via logprobs) and the model's preference for RAG-provided information. |
_Remark_. Here we only show several representative memory formats, but it is important to note that there are many uncovered ones, such as the programming code used by [38]. Moreover, it should be emphasized that these formats are not mutually exclusive; many models incorporate multiple formats to concurrently harness their respective benefits. A notable example is the memory module of GITM [16], which utilizes a key-value list structure. In this structure, the keys are represented by embedding vectors, while the values consist of raw natural languages. The use of embedding vectors allows for efficient retrieval of memory records. By utilizing natural languages, the memory contents become highly comprehensive, enabling more informed agent actions. |
We further investigate the in-context learning capability, i.e., the capability of inferring the underlying function given the few-show input-output demonstrations. We consider the task of inferring the linear coefficient of a weighted sum. Specifically, define \(y=w_{1}x_{1}+w2x_{2}+...+w_{n}x_{n}\), our few-shot demonstration is \(x_{1},x_{2},...,x_{n},y\), and we ask the model to (implicitly) infer \(w_{1},w_{2},...,w_{n}\) by predicting the \(y\) given a new set of input \(x\). We use (a). the absolute difference between model prediction \(y\) and the ground truth \(y^{*}\), i.e., \(|y-y^{*}|\) as a continuous measure, and use (b). the exact match \(y==y^{*}\) as a discontinuous measure. We further note that most of the models perform reasonably well on addition and subtraction, so the ability to do arithmetic, as a confounding factor, can be ruled out. |
**Discussion on Scaling Laws**. |
\(\bullet\)_Sampling-based methods._ LLMs are known to suffer from instability during inference, which can lead to unfaithfulness in the generated reasoning steps. To address this issue, some work proposes to sample multiple reasoning paths instead of using greedy decoding. As a representative solution, self-consistency [436] first generates several reasoning paths and then takes an ensemble over the corresponding answers, selecting the most consistent one through majority voting. However, such a method can still lead to wrong answers when most of the reasoning paths are misled. Considering this, the authors in [433] only vote on the \(k\) most complex reasoning paths based on their observation that reasoning paths with higher complexity (_e.g._, more reasoning steps) usually have better performance. Furthermore, MCR [510] proposes referring to the steps from other reasoning paths when generating the next step, and performs reasoning across multiple reasoning paths to generate the final answer. |
Moreover, our system excels under certain criteria (Section 6.2). It is especially useful in these cases to supplement the crowd prediction. We report these results in Table 3 as well, using an unweighted average (instead of the weighted average above). This outperforms the crowd prediction in all cases: For example, the crowd Brier score is.24 when the prediction is between.3 and.7, while the system achieves.237. |
Scaling laws are intimately related to the emergence of abilities (Wei et al., 2022) in larger models, that are not present in smaller ones; and to skills that appear with decreasing loss (Gordon et al., 2021; Arora & Goyal, 2023). This bolsters the now common narrative that "scaling is all you need". |
For solving a complex task, the task planner first needs to clearly understand the task goal and generate a reasonable plan based on the reasoning of LLMs (See Section 6.4.2). Then, the plan executor acts according to the plan in the environment, and the environment will produce feedback for the task planner (See Section 6.4.3). The task planner can further incorporate the feedback obtained from the environment to refine its initial plan and iteratively perform the above process to get better results as the task solution (See Section 6.4.4). |
\(\bullet\)_Embeddings_. In this format, memory information is encoded into embedding vectors, which can enhance the memory retrieval and reading efficiency. For instance, MemoryBank [39] encodes each memory segment into an embedding vector,which creates an indexed corpus for retrieval. [16] represents reference plans as embeddings to facilitate matching and reuse. Furthermore, ChatDev [18] encodes dialogue history into vectors for retrieval. |
Subsets and Splits