text
stringlengths
4
4.47k
Estimating \(N_{c}\) and \(\alpha_{N}\).To estimate the two constant scalars, we can train a series of \(k\) models with various numbers of parameters (say, \(N=1M,10M,\ldots,10(k-1)M\)) on the _infinite training data_ until these models converge and obtain their final test losses. With these pairs of \((N_{0},L_{0}),\ldots,(N_{k-1},L_{k-1})\), we can obtain \(k\) equations in the form of \(\alpha_{N}\log N_{c}-\alpha_{N}\log N_{i}-L_{i}=0\big{|}_{i=0}^{k-1}\), which are linear w.r.t. \(\alpha_{N}\) and \(\log N_{c}\). \(N_{c}\) and \(\alpha_{N}\) can then be estimated by parametric fitting using linear regression. In practice, we find that setting \(k=7\) is sufficient for an accurate estimation.
Figure 7: BLEU scores across the \(100_{0}00\) training hypotheses for our iterative refinement experiment. Most training examples have a BLEU score below \(20\).
based on the preceding sentences, since the number of fish remains unknown up to that point, and the LLM must read the remaining sentences and calculate the number of fish first. However, the prediction from GPT-3.5-turbo instead uses the number calculated in the previous step (i.e., the number of rabbits) to calculate the number of gerbils, resulting in an error. Such a failure mode is less common with PaLM 2-L, but still constitutes a non-negligible proportion of prediction errors for the other LLMs. We present more examples of model predictions in Appendix C.
COK (Li et al., 2023) presents the Progressive Rationale Correction technique, aimed at iteratively refining rationales with retrieved knowledge. This method constitutes a continuous optimization process, significantly enhancing the relevance and quality of information used in content generation. Self-RAG (Asai et al., 2023) introduces a self-reflection mechanism to efficiently filter out irrelevant content. By employing critique tokens, this approach evaluates the relevance, supportiveness, and utility of retrieved passages, ensuring the integration of only high-quality information into the content generation process.
The v0.5 Benchmark only tests for whether models give unsafe responses. An additional concern is whether models refuse to engage with safe prompts, which is also known as "false refusal" [31]. This is a problem, as it reduces free use of models and can lead to censorship and restrictions on free expression. Because all of the prompts associated with the typical adult user persona are benign, we have a set of test items that could be used to test false refusal. However, this is not included in v0.5, as we do not have the resources to actually assess whether models' responses constitute a false refusal.
To compute the final Brier score, we first average the Brier scores across retrieval dates for each question, then average across questions. We also report standard errors; however, note that the computation of standard errors assumes the data are i.i.d., while our data are in fact time-series, so this likely underestimates the true error. Finally, we also measure calibration with root mean square (RMS) calibration error.
A key design challenge in creating a benchmark is aggregating the performance of SUTs on individual tests (and test items) into a single grade. This is the purpose of a scoring system, which is a common mechanism in many domains and use cases. For instance, age ratings are used for rating movies and games16 star ratings are used for the energy efficiency of buildings17) and the safety of automobiles18 and traffic light labels are used to show the nutritional values of food 19.
- [No support / Contradictory] - The output completely ignores evidence, is unrelated to the evidence, or contradicts the evidence. This can also happen if the evidence is irrelevant to the instruction.
**vLLM**[229] is a fast and easy-to-use library for LLM inference and serving. vLLM seamlessly supports many Hugging Face models, including the following architectures: Aquila, Baichuan, BLOOM, ChatGLM, DeciLM, Falcon, GPT BigCode, LLaMA, LLaMA 2, Mistral, Mistral, MPT, OPT, Qwen, Yi, and many more.
We use NarrativeQA for this study, since each question has a corresponding long document. For NarrativeQA, we originally use a summary of the long document as the context, which contains the answer. To incorporate discontinuous contexts, we first cut the long document into 300-word chunks. Then, we use Dragon retriever to retrieve top-4 chunks to the question as the additional context. Finally, we take the retrieved four chunks and the summary of the long document as the "top-5" chunks. 7 We use this reconstructed NarrativeQA to replace the original one for the stage-2 instruction tuning.
The hyperparameters for instruction fine-tuning are listed in Table 3. Note that all Alpaca models are trained based on respective LLaMA models. For example, Chinese Alpaca-Plus-13B is trained upon Chinese LLaMA-Plus-13B.
Empirical results on six tasks, including reasoning and long-form generation, demonstrate that Self-Rag significantly outperforms pre-trained and instruction-tuned LLMs that have more parameters and widely adopted RAG approaches with higher citation accuracy. In particular, Self-Rag outperforms retrieval-augmented ChatGPT on four tasks, Llama2-chat (Touvron et al., 2023) and Alpaca (Dubois et al., 2023) on all tasks. Our analysis demonstrates the effectiveness of training and inference with reflection tokens for overall performance improvements as well as test-time model customizations (e.g., balancing the trade-off between citation previsions and completeness).
Thought CoT is an emerging ability primarily observed in LLMs, with limited advancements in small models. However, enhancing small models' CoT ability is conceivable through techniques like distillation. Magister et al. (2023) demonstrates that fine-tuning T5 with reasoning chains generated by larger teacher models and utilizing an external calculator for answer resolution can substantially enhance task performance across diverse datasets. Ho et al. (2023) generates and filters multiple reasoning paths to enrich the diversity.
**Retrieval Augmented Generation.** RAG enhances LLMs by integrating external knowledge sources with input queries, enriching the model with additional context for knowledge-intensive tasks Lewis et al. (2020). It utilizes an information retrieval system to find relevant documents and adds them to the input prompt to enhance response generation of an LLM Asai et al. (2023, 2023).
Faithfulness and content selection in summarization:Our paper builds on prior work in evaluating hallucination and inconsistency in summarization (Maynez et al., 2020; Kryscinski et al., 2020; Ladhak, 2024) which are even challenging for humans (Daume and Marcu, 2005). Pagnoni et al. (2021) introduce the FRANK dataset, where they use human annotations of generated summaries to produce a taxonomy of factual errors based on linguistic analysis, resembling the work of Goyal and Durrett (2020) and Goyal and Durrett (2021). Closest to our work, Krishna et al. (2023) perform human evaluation of faithfulness on summaries of short stories, whereas we study book-length inputs. Our exploration of omission errors is rooted in prior research on content selection (Nenkova and Passonneau, 2004; Gillick and Liu, 2010; Ladhak et al., 2020).
In this study, to gain an initial understanding of the multilingual mechanisms within LLMs, we analyze the decoded embeddings after each layer when processing inputs in various languages other than English. We then classify these embeddings as corresponding to either English or non-English tokens (see details in Appendix A). As illustrated in Figure 1, the models initially represent non-English user instructions in non-English form. However, asthe instructions are processed through the layers of the model, the representation surprisingly becomes English-centric. In the final layers, we observe a reversion to a predominance of non-English embeddings, as the initial instructions are posted in non-English languages. This pattern suggests a complex interplay between languages within LLMs, as they negotiate between instruction fidelity and a possible English-oriented processing bias.
Reference Model TrainingTo train our mathematical reference model, we gathered a dataset of 0.5B high-quality, math-related tokens. This dataset is a blend of synthetic data from GPT (Yu et al., 2024; Huang et al., 2024) and manually curated data (Yue et al., 2024; Ni et al., 2024). For the general reference model, we compiled a corpus of 1.9B tokens from open-source datasets, such as Tulu-v2 (Ivison et al., 2023) and OpenHermes-2.5 (Teknium, 2023). We trained the reference models for 3 epochs. The maximum learning rate was set at 5e-5 for 1B models and 1e-5 for 7B models, applying a cosine decay schedule. We set the maximum sequence lengths to 2048 for 1B models and 4096 for 7B models, packing multiple samples into these lengths for model input. In all main experiments, we initialized the continual pretraining model and the reference model with the _same_ base model.
\end{table} Table 9: Example of a summary produced by GPT-4-Turbo along with the extracted set of claims for “Divine Rivals,” a novel by Rebecca Ross. Examples by the other models can be found in Table 8, Table 10, Table 11 and Table 12.
Figure 6: **Results for Experiment 3. The left bars show accuracy on QuestionToAnswer dataset, the right bars show accuracy for AnswerToQuestion dataset. Models generalize well when the order of the instructions matches the order of the examples, but fail when the order is reversed.**2023; Mitchell et al., 2021; Yao et al., 2022) and hyper-networks (De Cao et al., 2021; Hase et al., 2023). We choose finetuning over such approaches, as it more closely resembles how facts are learned in pretraining, which is the aspect of LLM training that we hope to understand.
We introduce our training data distribution in Figure 11. In the figure, CommonCrawl_Chn in a Chinese Corpus is derived from CommonCrawl raw corpus and goes through thorough cleaning. Dolma (Soldaini et al., 2024), C4 (Raffel et al., 2019), and Pile (Gao et al., 2020; Biderman et al., 2022) are English corpora. They are deduplicated inner corpus and across corpus using MinHash algorithms (Broder, 1997). The Code Pre-train data contains the stack (Kocetkov et al., 2022) and StarCoder Li et al. (2023), with inner deduplication and cross deduplication. In the decay stage, the data mixture contains more diverse data and proprietary data, including UltraChat (Ding et al., 2023), SlimOrca (Lian et al., 2023;3b), OssInstruct (Wei et al., 2023), EvolInstruct (Xu et al., 2023). The data with the suffix SFT is our proprietary data including LectCode questions, Kindergarten through 12th grade (K12) textbooks and questions, etc.
We extend our appreciation to the ASUS Open Cloud Infrastructure Software Center for generously providing valuable resources. Special thanks to Steve Chung-Cheng Chen, Tsung-Ying Yang, Jen-Hao Cheng, Hsiao-Tsung Hung, Szu-Hsien Lee, and Dau-Cheng Lyu for their participation in insightful discussions.
MMLU BenchmarkTo properly evaluate the capabilities of LLMs on knowledge-intensive tasks, we selected four distinct tasks from the Massively Multilingual Language Understanding Evaluation (MMLU) benchmark (Hendrycks et al., 2021) in the topics of anatomy, astronomy, college biology, college chemistry and prehistory. The chosen tasks were selected based on their emphasis on factual knowledge and the minimal reliance on reasoning. As a heuristic, we opted for tasks where the questions are short and involve no context. In practice we selected four STEM subjects as well as one humanities subject, to ensure the evaluation is not limited to certain fields. Note that prehistory involves questions spanning all non-modern history. This approach aims to enable us to test LLM proficiency in comprehending and manipulating information in isolation from its reasoning processes.
* The GatedMLP architecture _slows down_ the model's learning speed, and we observe less stable training with its use.27 Footnote 27: For example, mixed-precision fp16 training can sometimes fail for LLaMA/Mistral models smaller than 100M; hence, we use mixed-precision bf16 instead. Conversely, GPT2 models up to 1B can be trained with fp16. * Removing MLP layers entirely _slows down_ the model's learning speed, whereas adjusting the size of MLP layers (e.g., from \(8d^{2}\) to \(10.5d^{2}\) or down to \(2d^{2}\)) may not have a significant impact.
\(\bullet\)_Supervised fine-tuning._ To make the LM initially perform desired behaviors, it usually needs to collect a supervised dataset containing input prompts (instruction) and desired outputs for fine-tuning the LM. These prompts and outputs can be written by human labelers for some specific tasks while ensuring the diversity of tasks. For example, InstructGPT [66] asks human labelers to compose prompts (_e.g._, _"List five ideas for how to regain enthusiasm for my career"_) and desired outputs for several generative tasks such as open QA, brainstorming, chatting, and rewriting. Note that the first step is optional in specific settings or scenarios.
In our initial exploration of un-curated web data, we embedded a large sample of web documents, clustered these embeddings, and manually inspected the resulting clusters. We quickly identified several high density clusters with documents that had little to do with the natural distribution of human language and were artifacts of the web crawling: for example, advertisements of Nike shoes that were automatically generated from a single underlying template with minor modifications (see Section A.9 for details).
forms other sequence models by at least \(23\%\) in terms of mean squared error (MSE) across multiple real-world sensor datasets. LOCOST [168] introduced an encoder-decoder architecture based on state-space models for conditional text generation tasks with long-context inputs. This approach effectively reduced computational complexity and memory usage, significantly enhancing the speed of both training and inference stages. MambaStock [178] utilizes the structured state space (S4) architecture to capture the nonlinearity in stock data, enabling accurate predictions of future stock prices. Lu et al. [163] proposed an improvement to the simplified structured state-space sequence model (S5), enabling the reset of hidden states within trajectories during the model training phase. Specifically, to enable the model to handle variable-length sequences, this paper modifies the association operator and introduces a reset annotation that preserves association properties in S5. Additionally, to test the generalization ability of the model, a challenging Meta-RL setup is also introduced. [188] introduces a new method for developing a realistic digital dynamic range compressor model for digital audio production by analyzing its simulation prototype. The learned representations are often affected by the high order of the model, which makes them unsuitable for control design. [189] proposes a system theory based model order reduction technique specifically for linear dynamic blocks in SSM to address this challenge.
Beyond the scope of this article, we argue that our work demonstrates that last-layer anisotropy is symptomatic of performance saturation, and is thus likely not a desirable property of language models. We also advocate that this work paves the way towards a better understanding of the structure of the contextual probability distribution, which could also enhance our interpretation of the scaling laws.
The Benchmark tests whether the SUTs' responses contain hazards. In principle, SUTs can give hazardous responses to any prompt. However, in practice, such responses are much more likely when prompts invite, or at least relate to, hazards. With this in mind, we aim to test a range of prompts (see below), which elicit different responses from models.
Now, let us analyze Eq. 3.13, which is the relation between the loss value \(L\) and the training step \(S\) under a fixed finite batch size \(B\). All other quantities are constant scalars that have been worked out before (\(N_{c},\alpha_{N},S_{c},\alpha_{S},B_{*}\) and \(\alpha_{B}\)). The difficulty of computing the loss value \(L(N,S,B)\) is that it appears on both sides of the equation. Although there is no analytical solution to isolate \(L(N,S,B)\) here, we can numerically estimate \(L(N,S,B)\) by any root-finding method (_e.g._, the bisection method) because it is the only unknown quantity in Eq. 3.13.
Footnote 1: Code for reproducing all experiments is available at github.com/jxmorris12/vec2text. Our dataset of prompts will be provided upon paper publication.
To ensure that our results are not specific to GPT-3 models trained with the OpenAI API, we also perform a hyperparameter sweep using Llama-7b. Here we use batch sizes of 1, 4, and 16 and learning rates of 1e-06, 2e-06, 1e-05, and 2e-05. We use Adam as our optimizer and DeepSpeed level 3 for memory efficiency. We perform full finetuning and do not use any parameter efficient finetuning techniques. The results are shown in Figure 8.
**NOTE:** The model hallucinates information based on brief mentions of author’s social media accounts.
We use the following techniques to improve prompt distribution selection, response formatting, and chain-of-thought formatting: (1). for prompt distribution selection, drawing inspiration from WizardLM[83], we develop compound instructions and progressively evolved them to increase their complexity. This approach has significantly reduced the size of SFT data in our experiments; (2). for response formatting, we generally use a default style extended from LIMA[94]. Overall, the responses are structured in an introduction-body-conclusion format where the body is usually a list of bullet point; (3). for CoT data formatting, we have use a "Step-Back" pattern, inspired by Zheng et al. [92], by performing abstraction to formulate higher-level solutions before delving into reasoning about the original, more concrete questions.
Large language models (LLMs) encapsulate a vast amount of factual information within their pre-trained weights, as evidenced by their ability to answer diverse questions across different domains. However, this knowledge is inherently limited, relying heavily on the characteristics of the training data. Consequently, using external datasets to incorporate new information or refine the capabilities of LLMs on previously seen information poses a significant challenge. In this study, we compare two common approaches: unsupervised fine-tuning and retrieval-augmented generation (RAG). We evaluate both approaches on a variety of knowledge-intensive tasks across different topics. Our findings reveal that while unsupervised fine-tuning offers some improvement, RAG consistently outperforms it, both for existing knowledge encountered during training and entirely new knowledge. Moreover, we find that LLMs struggle to learn new factual information through unsupervised fine-tuning, and that exposing them to numerous variations of the same fact during training could alleviate this problem.
SUTs' performance on the **benchmark** is scored by aggregating over their grades for each of the seven tests. There are several ways of doing this final aggregation, such as taking the most frequent grade; the highest grade; or the lowest grade. We take the lowest grade to minimize the risk that we overstate the safety of SUTs.
Figure 17: Scaling laws for the GPT2 MoE models with 32 experts on the \(\mathsf{bioS}(N)\) data for \(\mathsf{100}\) exposures. This figure complements Figure 16 by comparing the effects of varying _topk_ and _cap_factor_ in the 100-exposure insufficiently-trained regime. **Conclusion:** minimal differences are observed across these settings, though deeper models (e.g., GPT2-16-4 with 32 experts) seem easier to train with _topk_ = _cap_factor_ = 2.
2022) dataset. Closely related to our work is Chang et al. (2023), but while they focus on evaluating summary coherence (which requires only judging the model generation), we address faithfulness and content selection (which requires relating model generations back to the long source inputs).
(3) A comprehensive overview of the RALM work schedule is provided, along with a summary of the common and novel applications of current RALM, accompanied by an analysis of the associated limitations. Potential solutions to these limitations are proposed, along with recommendations for future research directions.
* Freeze Attn.: Freeze the self-attention modules in each layer of the model. * Only Attn.: Freeze all modules in each layer except the self-attention modules of the model. * Freeze MLP: Freeze the feed-forward modules in each model layer. * Only MLP: Freeze all modules in each layer except the feed-forward modules of the model.
While there are different forms of compressive memory proposed in the literature (Hopfield, 1982; Kanerva, 1988; Schlag et al., 2019; Munkhdalai et al., 2019), for simplicity and computational efficiency, in this work we parameterize the memory with an associative matrix (Schlag et al., 2020). This approach further allows us to cast the memory update and retrieval process as linear attention mechanism (Shen et al., 2018) and to leverage stable training techniques from the related methods. Specially, we adopt the update rule and retrieval mechanism by Katharopoulos et al. (2020) mainly due to its simplicity and competitive performance.
In this paper, we build a family of ChatQA models, varying in model sizes from 7B to 70B. Comprehensive evaluations on 10 conversational QA datasets show that our best ChatQA-70B model can remarkably outperforms GPT-3.5-turbo and perform on par with GPT-4 without using any synthetic data from ChatGPT models. In addition, we demonstrate that fine-tuning a single-turn query retriever using our curated conversational QA data performs comparable to the state-of-the-art LLM-based query rewriting model, without the need of extra computational time and potential API cost from rewriting. Furthermore, we show that incorporating a small amount of "unanswerable" samples can significantly enhance our model's capability to handle scenarios where answers are unavailable. The unanswerable case evaluation highlights that our best model ChatQA-70B only has a slight gap compared to GPT-4.
At a high level, existing methods instill the desired behaviors into a language model using curated sets of human preferences representing the types of behaviors that humans find safe and helpful. This preference learning stage occurs after an initial stage of large-scale unsupervised pre-training on a large text dataset. While the most straightforward approach to preference learning is supervised fine-tuning on human demonstrations of high quality responses, the most successful class of methods is reinforcement learning from human (or AI) feedback (RLHF/RLAIF; [12; 2]). RLHF methods fit a reward model to a dataset of human preferences and then use RL to optimize a language model policy to produce responses assigned high reward without drifting excessively far from the original model. While RLHF produces models with impressive conversational and coding abilities, the RLHF pipeline is considerably more complex than supervised learning, involving training multiple LMs and sampling from the LM policy in the loop of training, incurring significant computational costs.
For example, in some of the tasks, performance is evaluated by the first word the model predicts, and this word is expected to be a _Yes/No_. This means that if the response is a bit verbose it will be counted as incorrect, even if a human would classify it as a correct answer. To remedy this shortcoming, we refine the prompts by 1) removing distracting few-shot examples and 2) concluding with a specific instruction for the model to generate tags (see Table 3).
Retrieval-Augmented GenerationRetrieval-Augmented Generation (RAG) augments the input space of LMs with retrieved text passages (Guu et al., 2020; Lewis et al., 2020), leading to large improvements in knowledge-intensive tasks after fine-tuning or used with off-the-shelf LMs (Ram et al., 2023).
The value of \(\log_{2}10000\) is between the consecutive integers \(m\) and \(n\). Find \(m+n\).
#### 4.2.1 AMIE surpassed PCPs in conversation quality, per specialists and patient actors.
Coig-PcThe COIG-PC Dataset is a comprehensive collection of Chinese NLP tasks, aimed at advancing Chinese NLP research. The goal of this dataset is to provide a rich set of resources to researchers and developers, which they can use to improve the capabilities of language models in handling Chinese text. It offers a comprehensive suite of resources for researchers and developers, facilitating advancements in language model capabilities across various domains including text generation, information extraction, sentiment analysis, and machine translation, etc. Initially, we selected 1,413 tasks involving both Chinese and English languages from COIG-PC. Then, we manually select 250 tasks that meet our quality criteria, including information extraction, classification, summary, and others, primarily sourced from traditional NLP datasets. Through temperature sampling, we eventually sample 3,000 (instruction, response) pairs, which are further verified by human to ensure quality.
In this section, we begin to introduce MiniCPM model that aggregates the aforementioned observations and techniques.
We delve into the reasons behind this. By adjusting LLaMA's architecture (e.g., switching GatedMLP back to normal MLP), as shown in Figure 5, we find that replacing LLaMA's GatedMLP with a standard MLP is necessary to match GPT2's scaling law. Notably, for a strong comparison, when using GatedMLP we select the best result from three learning rates, whereas for a standard MLP, akin to GPT2, we use a single learning rate.
Unless noted otherwise, we use a \(\beta=0.1\), batch size of 64 and the RMSprop optimizer with a learning rate of 1e-6 by default. We linearly warmup the learning rate from 0 to 1e-6 over 150 steps. For TL;DR summarization, we use \(\beta=0.5\), while rest of the parameters remain the same.
Large language models in some cases are hallucinating answers simply because they are next-token prediction machines. Hallucination is one of the important factors in measuring how much a large language model is trustworthy and reliable. Measuring hallucination on the other hand is also not easy as it seems because each fact can be written in different styles and even the smallest changes in writing make it hard to detect. It is fair to assume if any particular LLM is more capable to detect hallucination of false information in text, it is also more trustworthy. HaluEval is one of the datasets that aims to measure hallucination in this field [205]. Evaluation can also be performed by another model judging the response with regard to the actual answer [206]. Table X shows the evaluation of different models based on these datasets.
Modify PersonU's questions to use pronouns or common nouns to refer back to words or phrases in PersonU's previous questions or PersonA's previous responses.
LLM-based autonomous agents have shown great potential in assisting and enhancing engineering research and applications. In this section, we review and summarize the applications of LLM-based agents in several major engineering domains.
In the first experiment, we train three models with 1.5B, 6B, and 32B parameters and observe their behaviors until trained on 3T, 3T, and 2.5T tokens, respectively. The training hyperparameters are shown in Table 3 (Appendix).
Footnote 22: Except for GPT2-28-20 we run out of GPU memory so reduce to batch size 1280.
We can further quantify this lack of good fit by recasting the Huber loss minimization problem as a maximum likelihood problem and perform a likelihood ratio test.
We selected 240 chunks at random for each task and created two paraphrases per chunk. These were set aside to be used as validation sets for hyperparameter tuning. For the current events dataset, we created ten paraphrases for each chunk used in the fine-tuning process described in Section 6.
We extend our deepest gratitude to 01.ai for sharing the Yi-34B model's intermediate checkpoint performance analysis curves, which greatly contributed to our research.
**Question:** What environmental concern was raised by some scientists as a result of the 2023 Hawaii wildfires?
We additionally train 1.3B GPT-2-XL models at 150B tokens, reducing the number of steps by half. We show Pile perplexity averaged across the 20 domains is much lower than for that of the model trained only on C4 in Figure 13, and even lower than 1.3B models trained only on C4 in Figure 1c for twice as long. We also show an increase of 2% across specialized knowledge tasks, and roughly 2.5% on general understanding tasks in Tables 10-11 when adding QA rephrases. We also experimented with medium rephrases at this smaller scale, and report similar findings consistent with other small-scale experiments.
**Mixture-of-Denoisers.** Mixture-of-Denoisers (MoD) [89], also known as UL2 loss, was introduced as a unified objective for pre-training language models. MoD regards both LM and DAE objectives as different types of denoising tasks, namely S-denoiser (LM), R-denoiser (DAE, short span and low corruption), and X-denoiser (DAE, long span or high corruption). Among the three denoising tasks, S-denoiser is similar to the conventional LM objective (Equation (6)), while R-denoiser and X-denoiser are similar to DAE objectives (Equation (7)) but differ from each other in the lengths of spans and ratio of corrupted text. For input sentences started with different special tokens (_i.e._, {[R],[S], [X]}), the model will be optimized using the corresponding denoisers. MoD has been applied in the latest PaLM 2 model [120].
**Context Window Management.** To address challenges posed by long contexts that surpass the context window limit of LLMs, context manager also needs to manage potential expansion of context window. Specifically, context manager in AIOS supports basic text summarization and incorporates other expansion techniques [59; 60] to manage the context window. In this way, it can help enhance the LLM's ability to process and understand extensive contexts without compromising the integrity or relevance of the information.
**Sample Efficiency.** For online RL, it is necessary to sample diverse and better reasoning paths to achieve better results than using a static dataset.
To summarize, data duplication offers significant advantages and no observed disadvantages. In the remainder of this paper we present our text deduplication framework in SS4, and study the extent of duplicate content in common NLP datasets (e.g., C4, Wiki-40B, and LM1B) in SS5. We then examine the impact of deduplication on test perplexity (SS6.1) and on the frequency of emitting memorized content (SS6.2). Finally, we analyze to what extent perplexity on existing, released models are skewed as a result of overlap between the train and test/validation splits (SS6.3).
Lemma 5.1 shows that by approaching \(W^{*}\) directly, we can asymptotically expect to close the performance gap.
**Evaluation Framework.** In contrast to prior works, we anchored our evaluation in criteria already established to be relevant for assessing physicians' communication skills and history-taking quality. We performed more extensive and diverse human evaluation than prior studies of AI systems, with ratings from both clinicians and simulated patients perspective. Our raters and scenarios were sourced from multiple geographic locations, including North America, India and the UK. Our pilot evaluation rubric is, to our knowledge, the first to evaluate LLMs' history-taking and communication skills using axes that are also measured in the real world for physicians themselves, increasing the clinical relevance of our research. Our evaluation framework is considerably more granular and specific than prior works on AI-generated clinical dialogue, which have not considered patient-centred communication best practice or clinically-relevant axes of consultation quality [64, 65, 66, 29, 67, 68].
where \(L(\cdot)\) denotes the cross entropy loss in nats, and a follow-up study [58] from OpenAI has shown that the language modeling loss can be decomposed into two parts, namely _irreducible loss_ (the entropy of the true data distribution) and _reducible loss_ (an estimate of the KL divergence between the true and model distributions). The three laws were derived by fitting the model performance with varied data sizes (22M to 23B tokens), model sizes (768M to 1.5B non-embedding parameters) and training compute, under some assumptions (_e.g._, the analysis of one factor should be not bottlenecked by the other two factors). They showed that the model performance has a strong dependence relation on the three factors.
HUMAN: Question: Bellahas twotimes as many marbles asfrisbees. * She also has 20 morefrisbees than deck cards.
**BLOOM:** In [93], Scao et al. presented BLOOM, a 176B-parameter open-access language model designed and built thanks to a collaboration of hundreds of researchers. BLOOM is a decoder-only Transformer language model trained on the ROOTS corpus, a dataset comprising hundreds of sources in 46 natural and 13 programming languages (59 in total). An overview of BLOOM architecture is shown in Fig 23.
100PoisonMpts addressing issues of anti-discrimination and empathy, spans various dimensions including jurisprudence, psychology, child education, obscure facts, intimate relationships, etc. It involves human-generated prompts that evoke bias and discrimination, followed by expert-crafted responses that align with human values. To enhance the harmlessness of the CQIA, we sample all the data from 100PoisonMpts.
Despite the importance of tokenizers and the potentially severe impact of poorly performing tokenizers, there exists no extensive study so far that holistically investigates the intrinsic and extrinsic tokenizer performance in a monolingual and multilingual setting with a focus on decoder-only models, which represent the backbone of current LLMs.
Yi uses a modified version of the classical decoder-only Transformer architecture [78] where the code is based on LLaMA's [77] implementation. The main parameter setting is summarized in Table 1.
Self-RAG (Asai et al., 2023) offers a strategy that incorporates reflection tokens within a customizable decoding algorithm. This technique permits dynamic adjustment of the model's retrieval and generation behaviors based on the specific task, facilitating more versatile response generation. Depending on the requirements, this approach can be tuned for accuracy or creativity, providing flexibility in generating outputs that meet diverse needs.
A: If she eats 3 duck eggs for breakfast, in the morning equals \((3\) times 2 = 6\).
PersonA: One way to make adobo sauce at home is by using smoked jalapeno peppers called chipotles. You can stew the chipotles in a sauce with tomatoes, garlic, vinegar, salt, and spices. It's also possible to find canned adobo sauce in the Hispanic foods section of many grocery stores.
Answer the question based on the provided information.Question: Can the given reasoning \(d\)? (a) Yes.(b) No.
In addition to the above practical strategies and tricks, existing work has also used other tricks, _e.g.,_ concatenating multiple examples into a single sequence to approach the max length [355].
Recent studies have put into question the belief that emergent abilities [47] in language models are exclusive to large models. This skepticism arises from two observations: 1) smaller models can also exhibit high performance on emergent abilities and 2) there is doubt on the discontinuous metrics used to measure these abilities. In this paper, we propose to study emergent abilities in the lens of pre-training loss, instead of model size or training compute. We demonstrate that the models with the same pre-training loss, but different model and data sizes, generate the same performance on various downstream tasks. We also discover that a model exhibits emergent abilities on certain tasks--regardless of the continuity of metrics--when its pre-training loss falls below a specific threshold. Before reaching this threshold, its performance remains at the level of random guessing. This inspires us to redefine emergent abilities as those that manifest in models with lower pre-training losses, highlighting that these abilities cannot be predicted by merely extrapolating the performance trends of models with higher pre-training losses.
In our knowledge analysis, we assess our model's performance across four benchmarks: **ARC**, **Hellaswag**, **MLU**, and **C-eval-tw**. We employ EleutherAI/lm-evaluation-harness3**Gao et al. (2021) to assess the model performance on these benchmarks. These benchmarks consist of multiple-choice questions. The accuracy computation is based on selecting the option with the highest probabilities.
All in all, these results underscore the efficacy of the adaptive retrieval approach in dynamically determining the necessity of context for accurate question answering, resulting in improved performance compared to fixed strategies of always or never retrieving context.
Footnote 4: Formally, let \(D\) be the training distribution. Let \(n=d\) and \(n^{\prime}=d^{\prime}\) denote instances of “<name> is <description>" where the names and descriptions appear in \(D\) individually but have been randomly paired up. We claim that if \(n\!=\!d\sim D\), then \(P_{D}(d\!=\!n)>P_{D}(d^{\prime}\!=\!n^{\prime})\).
The generation phase is tasked with producing text that is both relevant to the query and reflective of the information found in the retrieved documents. The usual method involves concatenating the query with the retrieved information, which is then fed into an LLM for text generation (Li et al., 2022). Although ensuring the generated text's alignment and accuracy with the retrieved content presents challenges, it is also essential to strike a balance between adhering closely to the source material and infusing the output with creativity. The generated text should accurately convey the information from the retrieved documents and align with the query's intent, while also offering the flexibility to introduce new insights or perspectives not explicitly contained within the retrieved data.
In this study, we introduced AMIE, an LLM based AI system optimised for clinical dialogue with diagnostic reasoning capabilities. We compared AMIE consultations to those performed by PCPs using a randomized, double-blind crossover study with human simulated patients in the style of an Objective Structured Clinical Examination (OSCE). Notably, our study was not designed to be representative of clinical conventions either for traditional OSCE evaluations, for remote- or tele-medical consultation practices, or for the ways clinicians usually use text and chat messaging to communicate with patients. Our evaluation instead mirrored the most common way by which people interact with LLMs today, leveraging a potentially scalable and familiar mechanism for AI systems to engage in remote diagnostic dialogue. In this setting, we observed that AMIE, an AI system optimised specifically for the task, outperformed PCPs on simulated diagnostic conversations when evaluated along multiple clinically-meaningful axes of consultation quality.
Harmlessness: Assesses whether the answer avoids unethical or harmful content, adhering to ethical norms. A high-quality answer should uphold ethical principles, avoiding the propagation of harmful or immoral information.
Recent advancements in large language models (LLMs) such as PaLM Chowdhery et al. (2022), GPT-4 OpenAI (2023), LLaMA Touvron et al. (2023), and Mistral Jiang et al. (2023) have dramatically transformed traditional natural language processing (NLP) tasks, integrating seamlessly into daily and professional uses. Thanks to their extensive pretraining on massive corpora mixed with different languages, these models demonstrate remarkable capabilities in understanding and generating text across multiple languages Huang et al. (2023); Zhu et al. (2023); Zhang et al. (2023); Zhao et al. (2024).
where \(K=(\frac{\alpha C_{N}}{\beta C_{D}})^{\frac{1}{\alpha+\beta}}\), and \(\eta=\frac{\beta-\alpha}{\alpha+\beta}\). The derivation of \(N_{opt}\) closely follows Hoffmann et al. (2022) by substituting \(D\) with \(\frac{C}{6N}\) in Equation 2, and minimize \(L(N)\) given \(C\). Similar way is adopted for \(D_{opt}\). From Equation 3, when \(\alpha=\beta\), \(N_{opt}/D_{opt}\) is a constant, supporting Hoffmann et al. (2022)'s claim, and when \(\alpha<\beta\), we should emphasize more on parameter scaling (Kaplan et al., 2020), and vise versa.
Figure 5: **General pretraining results. We continual pretraining Tinyllama-1B on 80G general tokens.
An important reason to fine-tune LLMs is to align the responses to the expectations humans will have when providing instructions through prompts. This is the so-called **instruction tuning**[133]. We dive into the details of how to design and engineer prompts in section IV-B, but in the context of instruction tuning, it is important to understand that the instruction is a prompt that specifies the task that the LLM should accomplish. Instruction tuning datasets such as Natural Instructions [134] include not only the task definition but other components such as positive/negative examples or things to avoid.
but since in general \(n\) and \(\mathbf{S}\) do not commute, we cannot conclude that the \(\mathbf{S}\) transformations preserve the transformer's outputs. We will show that if we take \(\mathbf{S}=\mathbf{U}\) an orthogonal matrix, then we still get a general impossibility result.
While passively collecting and transcribing real-world dialogues from in-person clinical visits is feasible, two substantial challenges limit its effectiveness in training LLMs for medical conversations: (1) existing real-world data often fails to capture the vast range of medical conditions and scenarios, hindering its scalability and comprehensiveness; (2) the data derived from real-world dialogue transcripts tends to be noisy, containing ambiguous language (including slang, jargon, and sarcasm), interruptions, ungrammatical utterances, and implicit references. This in turn, may limit AMIE's knowledge, capabilities, and applicability.
5. Evaluation: Evaluate the model's performance using standard benchmarks and metrics. This will help to measure the model's accuracy and identify areas that need improvement.
We start with the most scalable approach, NearDedup. We remove similar documents by applying MinHash (Broder, 1997), whereby a signature/sketch supporting efficient approximate similarity queries is computed for each document in the dataset, and document pairs with a high \(n\)-gram overlap are identified.
Figure 4: Detecting whether models use **LayerNorm** or **RMSNorm** by singular value magnitudes.
Footnote 5: In this work, we use a fixed set of seed tasks for prompting the instance generation, and thus only generate a small number of instances per task in one round. Future work can use randomly sampled tasks to prompt the model to generate a larger number of instances in multiple rounds.
**S&P**Plausible but only partially supported. The Reference [1] does not explicitly mention the person is born in Moscow and there is no description about the Russian Guild of Film Producers.
and then convert the loss minimization problem from Equation 2 into the following negative log-likelihood minimization problem:
RAG-aware prompting techniquesBecause of the importance of RAG to build advanced LLM systems, several RAG-aware prompting techniques have been developed recently.
Some methods adopt ranking, such as Cobbe et al. (2021), which trains a verifier to select high-confidence reasoning chains through ranking. Meanwhile, other methods select reasoning chains through a voting mechanism. Self-consistency Wang et al. (2023) selects the most consistent answer by majority voting among sampled reasoning chains based on final answers. Furthermore, Fu et al. (2023) proposes Complex CoT, which utilizes a complexity-based voting strategy that leans towards selecting answers generated by more complex reasoning chains. However, answer-based voting mechanisms do not take into account the correctness of reasoning chains. Miao et al. (2023) takes the reasoning steps into account when voting, which can obtain both consistent answers and trustworthy reasoning processes simultaneously. Moreover, to consider the relations between intermediate steps across chains, Yoran et al. (2023) mixes information between reasoning chains and selects the most relevant facts to perform meta-reason over multiple reasoning chains. GRACE Khalifa et al. (2023) trains a discriminator through contrastive learning and uses this discriminator to rank each intermediate reasoning step. Previous methods sample based on the probability distribution, while Diversity-of-Thought Naik et al. (2023) obtains multiple reasoning paths by prompting with different instructions.
**ASDiv**Miao et al. (2021). This dataset contains a set of math problems with diverse language patterns and types of questions. We adopt the test set of 2,305 problems as evaluation benchmark.
You are a patient chatting with a doctor over an online chat interface. The doctor has never met you before. <patient vignette> Respond to the doctor's questions honestly as they interview you, asking any questions that may come up.