Mistral 7B
Paper · 2023 · Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch et al.
Summary
A system that answers questions well can still be expensive to run. As a conversation or document grows, each new piece of text can require more work and more memory. The authors of Mistral 7B address both sides of this problem. They build a language model with 7 billion parameters and evaluate whether it can compete with larger systems while reducing the cost of generating text. It follows the transformer design used by Llama and changes how attention reads and stores information about earlier text.
The design combines grouped-query attention, which lets several attention heads share the information they consult, with sliding window attention, which limits each layer’s direct access to nearby positions. Earlier information can still travel through the stack of layers. The local window also lets the system reuse the same cache slots as a sequence grows. With a window of 4096 tokens, the authors report a 2x speed improvement over ordinary attention for a sequence of 16K tokens using adaptations to FlashAttention and xFormers. At 32k tokens, they report an 8x reduction in cache memory. These measurements concern different aspects of inference, the work of using a trained system to generate a response.
In a common evaluation pipeline, Mistral 7B beats Llama 2 13B on all the reported base-system metrics. It compares favorably with Llama 1 34B on mathematics, code generation and parts of the reasoning evaluation. Its programming performance approaches that of Code Llama 7B while it retains strong results on tasks unrelated to code. The comparison with the Llama 2 family varies by task. The paper describes a greater than 3x equivalent-size advantage for reasoning, comprehension and the MMLU evaluation, compared with 1.9x on its world-knowledge benchmarks.
The authors also use fine-tuning on public instruction data from Hugging Face to produce Mistral 7B – Instruct. It leads the tested 7B systems on MT-Bench, compares competitively with 13B chat systems there, and receives 5020 preferences against 4143 for Llama 2 13B in an anonymous human comparison. An optional system prompt induces refusals on all 175 unsafe requests in a separate test. When asked to classify prompts for moderation, Mistral 7B – Instruct yields 99.4% precision and 95.6% recall with acceptable prompts as the positive class. The base and instruction-tuned variants were released under Apache 2.0, with a reference implementation accompanying the release.
Deep dive: Mistral 7B
Mistral 7B uses local attention and a fixed-size cache to make generation cheaper while competing with larger systems on language benchmarks. · about 72 minutes to read
The problem and its context
What it costs to answer
The paper begins with a familiar tradeoff in language generation. Increasing the number of learned parameters can improve the answers a system gives, while adding to the computation needed to produce those answers. The effect matters at deployment, where a trained system has to respond to incoming requests repeatedly. The authors identify both the expense of that computation and the time a user waits as barriers to practical use. Their aim is to find a design that gives good answers at a smaller scale and makes the work of answering cheaper.
Parameter count describes the size of the learned system. A request introduces a different quantity, the amount of text over which it has to operate. A brief prompt and a long document can go through the same learned weights and still impose very different demands. A conversation adds another source of growth, since the system generates a continuation and then uses the generated text as part of the history for its next decision. Managing that history is a central part of the paper’s engineering problem.
A token is a unit of text processed by the transformer. A prompt is presented as a sequence of these units, and the output is generated by extending that sequence. At each step the system has to use the prompt and the continuation already produced to decide what can come next. The cost of keeping earlier information available can therefore affect even a short answer when the prompt that precedes it is long. It can also affect a long answer that began with a short request.
The authors discuss two practical effects of this growing demand. Latency is the time an operation takes. Throughput concerns the amount of work a system completes over time, potentially across several requests. A system can serve requests in a batch, processing them together, if enough memory is available for the individual sequences. The authors connect lower memory use during generation with the ability to use larger batches. Their argument for efficiency encompasses the work done for a single sequence and the room available to serve other sequences alongside it.
The benchmark program follows from this framing. A reduction in attention work would leave the main question open if the resulting system performed poorly on the tasks people wanted it to do. A high task score would likewise leave the deployment problem open if obtaining the answer demanded substantially more computation or memory. The authors collect evidence about both task performance and the cost of handling longer sequences. The benchmark scores, attention speed comparison and cache measurement address different parts of that objective.
Why attention becomes expensive
The architectural starting point is the transformer introduced in Attention Is All You Need. Its attention mechanism lets the representation of a token draw on representations at other positions. In a system that generates text in order, this access is causal. A position can draw on information available up to that point. Positions belonging to a future continuation are unavailable when the system decides what comes next.
In ordinary causal attention, each successive position is eligible to consult a longer prefix. A position near the beginning has little text behind it, while one near the end can consult almost all the text that came before. Over a whole sequence, the number of operations grows quadratically with its length, as the paper notes. Each additional stretch of text supplies new positions that can consult the prefix, and it adds positions for the later queries to consult in turn.
Memory grows in a different way. At inference time, the system can retain the attention information it has already calculated for previous positions. These stored records are the keys and values. A query uses keys to determine which positions are relevant and values to bring information from those positions into the current representation. Saving the records lets the next generation step read them directly. Under full attention, the set of positions it might need continues to grow, and the memory occupied by that history grows linearly with the number of tokens.
A long context thus poses a problem for both processing and storage. During the initial processing of the prompt, a long sequence offers many possible attention connections. During generation, earlier records continue to occupy space because future tokens may consult them. The paper’s design addresses attention connections and the saved records together. The permitted range of connections determines which parts of the saved history the system will need later.
A second question is how much information must be saved for each position. A transformer layer can use several attention heads, meaning several sets of attention operations that contribute to its representation at a position. Grouped-query attention was already available as a way to have multiple query heads share keys and values. The Mistral paper cites the earlier work on GQA and adopts the mechanism to reduce the memory required in decoding and to accelerate inference. Here, decoding is the phase in which the system extends the sequence token by token.
The choice of a sliding window also has precedents. The authors cite earlier work on sparse transformers for long sequences and Longformer. The shared idea relevant to Mistral is that attention in a layer can be restricted to a local neighborhood. A sparse pattern selects a subset of possible connections. For a causal sliding window, that subset follows the query through the sequence, so a later position looks at a correspondingly later stretch of the past.
A local window raises a question about the usefulness of distant text. The authors’ answer relies on the order of operations in a transformer stack. A representation entering an upper layer has already drawn information from other positions in layers below. A query can consult a nearby representation and thereby be influenced by information that began farther away. The design can consequently use a bounded attention window in every layer while allowing a broader span of influence across the full stack.
These precedents help locate the paper’s contribution. The authors describe changes relative to the Llama design and combine prior attention techniques with a cache and prompt-processing procedure that use the same local window. Their engineering emphasis is on how the mechanisms fit together during inference. The same window that describes the attention pattern determines the lifetime of a cache entry and can determine the size of a piece of prompt processed at once.
Why the comparisons span different tasks
Llama provides the architectural point of departure and a family of comparison systems. The paper is interested in whether a smaller parameter count can support useful performance across several kinds of work. A broad comparison helps because a system can excel at one sort of task and give weaker answers on another. The authors distinguish familiar reasoning problems, factual knowledge, reading comprehension, mathematics and code, alongside benchmark suites that aggregate different tasks.
The comparison with a code specialist addresses a related question. Code Llama offers a benchmark for the performance of a system aimed at programming. A general-purpose release can be assessed both on the distance to that coding baseline and on the breadth of its performance outside programming. The paper treats those as properties worth examining together. Simply placing a general system on the same coding test as a specialist would leave the breadth of its capabilities unmeasured.
The practical setting also includes what happens after the base training. The authors release weights and a reference implementation, and they describe integration with Hugging Face and deployment through the vLLM inference server and SkyPilot. They cite PagedAttention in connection with vLLM. This serving context concerns how people can use the released system. The rolling cache described in the architecture is the paper’s account of how Mistral manages the attention history itself.
Finally, the authors discuss the problem in relation to earlier work on compute-optimal training. They describe prior scaling analysis as a relationship between capability and the cost of training. For a system that will answer many requests, they propose considering the cost of inference alongside those quantities. Training establishes the learned weights. Inference incurs a cost each time those weights are used on an input. Their framing helps explain why the experiments examine performance relative to other parameter sizes and measure specific operations involved in serving long inputs.
The method, step by step
What happens when a prompt arrives
Mistral 7B uses a stack of transformer layers. At each position, a layer receives a representation carrying information derived from the text and the layers below. Attention updates that representation by letting it draw on other positions. The updated state can then participate in the next layer’s attention. Repeating this process gives information several opportunities to travel through the sequence before the system produces its next-token prediction.
There are two phases to handling a generation request. The prompt is known at the start. The system can prepare its representations and populate the cache before beginning to produce the response. This preparation is called pre-fill. During decoding, each generated token becomes available only after the preceding generation step, so the system extends the sequence in order. The distinction explains why the paper describes a way of processing pieces of a known prompt alongside a way of updating the cache as tokens arrive.
At either phase, the attention calculation needs information associated with earlier positions. The cache stores that information in the form of keys and values. It can be updated as soon as the attention records associated with new positions are available. The design uses both grouped-query attention and a rolling buffer to control how large those records are and how long they remain in storage.
Attention and cache handling in Mistral 7B
The steps in order.
The chunking step applies when the prompt is long enough to benefit from being processed in pieces. The attention steps also apply during decoding, since every new position has to pass through the stack. The cache is already populated with the relevant recent prompt positions when decoding begins. The process continues with new positions from the answer, which use the same rules as the positions that were supplied in advance.
Sharing attention records across heads
A query expresses what an attention head is looking for at a particular position. Keys give it information against which to compare that query. Values carry the information that contributes to the head’s output. An attention head can give different weight to different eligible positions depending on its query and the keys it encounters. The same basic division of roles holds when queries share the keys and values they look at.
Grouped-query attention keeps several query heads while giving a group of them a common set of keys and values. The heads in a group can still form distinct queries, so their attention can differ even though they consult the same stored records. For decoding, this sharing matters because what gets carried from one step to the next is the information associated with past positions. A shared set has to be saved for the group. The queries used at the current position can consult it as needed.
This is a change to the amount stored per position. Consider a new token whose attention can see a particular earlier position. With grouped-query attention, several heads can consult the key and value for that earlier position from the same group’s records. Their query-dependent behavior is distinct from the logistics of saving the records. The paper points to that smaller storage requirement as a reason for faster decoding and the possibility of serving larger batches.
Sliding window attention addresses the number of positions for which those records have to be retained. Grouping can reduce the amount reserved for a position that remains in view. A window can reduce the number of positions in view in the first place. Because the techniques act on different parts of the cache’s organization, they can be used together. The paper explains the window and rolling storage in detail and presents grouped-query attention as an adopted architectural mechanism.
Restricting direct attention to nearby positions
The window follows the position making the query. Near the start of a sequence, the available past consists of the prefix already present. Once there is enough history to fill the window, each advance admits a newer position and leaves the oldest part of the previous window behind. The causal rule continues to apply throughout. A token’s representation uses positions that are available at its own point in the text.
The authors describe the local reach at a position using a backward boundary.
i − W
Here, i is the position of the token whose state is being updated, and W is the window size in tokens. The subtraction moves backward from that position by the window size. The paper uses this boundary and the current position to describe which hidden states from the previous layer can contribute. A hidden state is the vector of information associated with a position at a given layer.
The diagrams show how the available positions shift as a query moves along a sequence. Ordinary causal attention makes the accessible prefix longer in each successive row of its attention mask. A mask specifies which positions a query is allowed to use. The sliding version first grows with the available prefix and then keeps the permitted part concentrated near the current token. In the figure’s example, the window is W = 3, with attention eligibility appearing as a narrow band as the sequence proceeds.
The boundary notation expresses the distance argument behind the architecture. The mask examples make the accounting of positions in a window concrete by including the current position among the eligible entries. This matters when reading an implementation diagram. At the beginning of a prompt, some potential preceding positions simply do not exist. During pre-fill of a later chunk, positions earlier in the current chunk and usable positions in the cache together supply the eligible history.
Each layer repeats a local operation of this kind. The benefit for attention work comes from controlling how many positions can qualify for each query once the sequence has filled the window. The additional tokens of a long prompt still have to be processed, and each generated token still requires a new computation. The amount of earlier text directly eligible for each query is bounded by the window. This is how a lengthening sequence can continue to have a manageable local attention pattern.
How an earlier token can still matter
The effect of a local mask is easiest to see by following a piece of information. Suppose it begins in an early part of the prompt. A later position within its reach can incorporate something about it while computing its state. In the layer above, a position farther along can draw on that updated state. The upper layer can therefore receive information from the original position along a chain of intermediate representations.
The paper describes the maximum distance for such a path as follows.
W × k
Here, W is the sliding window size measured in tokens and k is the number of attention layers traversed. The multiplication combines the maximum forward reach attributed to each layer with the number of successive layers. It describes how far a token in the input layer can, in principle, influence a state in the stack. Each step along the path is still subject to the local mask for its layer.
In the window illustration, lower representations pass information diagonally forward across positions as the diagram goes upward through the stack. Middle representations act both as recipients of information from below and as sources that later positions can consult farther up. By the top of the diagram, several such connections can bridge a distance wider than the immediate window of the last attention operation. This is the architecture’s explanation for influence from positions outside the current window.
For Mistral 7B the paper gives the window size explicitly.
W = 4096
Here, W is the width of the sliding attention window in tokens, and the equality sets it to 4096. For the final layer, the authors estimate a theoretical span of roughly 131K tokens. That estimate concerns the existence of a path through the architectural stack. Whether particular information survives the intervening updates depends on what the states represent and what the queries draw from them.
A reader can distinguish two requests that might be made of such a system. In one, an earlier passage provides a general topic that is carried forward as the surrounding text develops. In another, the exact content of an old position must be recovered on demand. The attention path gives a way for earlier information to affect both predictions, but the existence of a path alone says how information can move. The benchmark program would need to measure the success of a particular retrieval task to establish how reliably the system fulfills it at a given distance.
The distinction is also what reconciles a wide theoretical span with a compact cache. At generation time, the system can still consult recent states that already reflect previous computations. Old key and value records can expire when they cease to be directly eligible. Any influence they have already had on the states of later tokens can persist through those later states while they are available. The design bounds access to stored records at each layer while preserving the possibility of indirect influence across layers.
Reusing cache slots
The rolling buffer gives the local window a corresponding storage layout. Once a cache entry is older than the window allows, later attention operations have no direct use for that entry. The system can reuse its slot for the keys and values of a newly processed position. A fixed collection of slots consequently suffices for the cache even when the sequence contains many more positions than can fit in it at once.
The paper assigns positions to slots by a remainder operation.
i mod W
Here, i is the sequence position whose keys and values are being stored. W is the size of the buffer, also determined by the attention window. mod is the remainder operation. The remainder identifies a slot within the fixed buffer. When sequence positions wrap around the available slots, a later position can occupy the same physical slot previously used by an older position.
The rolling-buffer illustration shows a cache with W = 4. A sequence that has already filled its available slots goes back to the first slot for its next write. Another sequence shown alongside it can still have unused space. Hence, even when sequences are displayed at the same generation step, the relevant write location depends on the sequence’s own current position. The illustration distinguishes newly written entries from entries carried over from the preceding step.
At the point where a write wraps around, the physical slot order and the chronological token order can diverge. The newest record can occupy a slot at the start of the buffer while other still-eligible records remain farther along in storage. The remainder rule assigns storage locations. The attention window describes eligibility in terms of the order of positions in the sequence. Keeping those two roles straight explains why rolling storage can save memory while implementing the same local attention rule.
The cache fills progressively at the beginning of a sequence. After the window is full, each new position takes the place of a position whose records can expire. This is a limit on the memory used by the key-value history. Other parts of running inference, including the work of applying the transformer’s layers to new positions, continue to be required. The cache reduction reported in the paper compares the space occupied by those saved records on a long sequence.
The authors describe the memory saving as leaving quality unaffected. Within the sliding-window design, the justification for reusing a slot is that its expired information is already outside the eligible direct attention range. The buffer is a way of storing the relevant history for that design. Its operation can be understood independently of the question of how the quality of local attention would compare with full attention in a separately controlled training experiment.
Filling the cache from a long prompt
Pre-fill uses the fact that the supplied prompt arrives before generation starts. The system can process a group of its positions together because their token identities are known. Attention within the group still follows the causal pattern. A representation for a token near the beginning of the group uses only its available prefix, even though the system has also received the rest of the text.
For a long prompt, the authors divide the sequence into chunks to limit the memory needed during pre-fill. They explain that the window size can serve as the chunk size. The attention for a chunk draws on two sources. The retained cache contains eligible positions from earlier in the prompt, and the chunk itself contains the current positions being processed. A query’s position determines how much it can use from each source.
The earliest token of a new chunk has little history within that chunk. It can draw on recent cached positions that still fall within its own window. Later tokens in the same chunk have more preceding positions in the chunk available. Their windows shift forward, so fewer of the cached positions remain eligible. A mask controls both effects simultaneously. It enforces causal order among positions in the current piece and the sliding window across the boundary with the cache.
The paper’s pre-fill illustration follows a sentence split into several pieces. It separates earlier text, the recent history kept in the cache, and the piece currently being processed. For the illustrated chunk, the oldest text contributes no direct connections. The cached section supplies a short stretch of recent history for the first query, and the remaining queries progressively draw more of their directly accessible text from the current piece. The end of the illustrated chunk can attend entirely within that piece.
Treating the chunk boundary as the start of an independent prompt would lose the eligible history immediately before it. Treating the entire cache as visible to every query in the next piece would let some queries reach too far back. The diagram shows how both concerns are handled by a single position-dependent pattern. Within a chunk the causal mask decides which entries are available as time moves forward. Across the boundary the window decides which entries are still close enough.
When the system has processed the prompt, the cache contains the recent attention records that can matter directly at the beginning of the answer. A generated token then adds its own records. Generation proceeds in order because no later response token is known until the system produces it. Once the buffer has filled, advancing through the response replaces expired records just as advancing through a long prompt does. Chunking organizes the processing of known input, and the buffer organizes the history retained as new positions are processed.
This division also clarifies what the system does with a prompt that extends beyond a window. Every chunk is processed, and the more recent chunks take their turn in the cache. Older positions leave the direct range as the window moves. They can have affected the computation for positions that remain. This accounts for the paper’s claim that the architecture can keep processing a growing sequence with bounded cache storage, while the usefulness of a particular remote fact in that sequence depends on the representations formed along the way.
Implementing the attention pattern
A mask describes the mathematical pattern of eligible connections. An implementation has to realize the savings that pattern makes possible. The authors report changes to FlashAttention and xFormers for this purpose. At 16K tokens with W = 4096, the reported speed comparison uses ordinary attention as the baseline. The result is evidence about the implemented windowed operation under those stated conditions.
The other engineering comparison concerns retaining the cache at a sequence length of 32k tokens. Its mechanism follows directly from the allocation rule. Storage is reused rather than extended as older positions become irrelevant to direct attention. The timing comparison and the storage comparison therefore address separate engineering questions. One asks how quickly the attention design runs in the stated implementation. The other asks how much memory its history occupies at a specified length.
The authors make the reference implementation available along with the release and describe using vLLM and SkyPilot to deploy it. They also describe integration with Hugging Face. The implementation, serving arrangements and released weights are different pieces of the release. The architecture explains what should happen to attention and storage during generation. The deployment arrangements provide ways to run the released system in the environments the authors discuss.
Adapting the base system to instructions
The authors start with the base Mistral 7B and then fine-tune it on public instruction datasets available through Hugging Face. Fine-tuning adapts the learned system through additional training. Here the purpose is to produce a variant that responds to instructions, which the paper calls Mistral 7B – Instruct. The authors present it as an initial demonstration of how the base can be adapted.
The training account identifies the kind and provenance of the data used in this stage. The examples are instructions from publicly available datasets, and the authors say the demonstration used neither proprietary data nor special training tricks. The account of this stage is distinct from the description of the transformer architecture. An instruction-tuned variant demonstrates the usability of the base for a further training step. Its chat performance reflects the resulting system after that step.
The paper’s architectural description specifies the attention connections, cache indexing and handling of long prompts more fully than the base training procedure. The supplied training detail for the instruction variant concerns the source and purpose of the data. That sets the scope of what can be reconstructed about the progression from base weights to an instruction follower. The comparisons that follow evaluate the completed variants in roles appropriate to each.
Asking for constrained answers or moderation labels
The paper treats output guardrails as an optional part of how a front-facing application uses the instruction-tuned variant. The application can supply a system prompt, a standing instruction that accompanies the user’s request. The authors write a prompt directing the system to be helpful and careful and to avoid producing harmful or unfair content. Activating it changes the instructions at generation time. It can be used with the released instruction-tuned weights as they are.
The paper also describes a self-reflection prompt for moderation. In this use, the instruction asks the system to judge a piece of text. That text can be a user request or an answer already generated. The output is a decision about acceptability or about the category into which the content falls. This gives an application a way to make a filtering decision based on a label, separately from the answer it might send to the user.
The authors distinguish illegal activity, hateful or harassing and violent content, and advice in areas where qualifications matter. They give legal, medical and financial advice as examples of the last category. The intent of providing categories is to let an application decide which kinds of material to filter for its own use. The evaluation in the paper tests the prompt’s classifications on a curated dataset. Its precision and recall are reported with acceptable prompts as the positive class, which determines how those figures should be read.
Experiments and results
Comparing base systems under the same protocol
The main evaluation compares the base release with Llama 2 7B and Llama 2 13B, with Code Llama 7B included in the detailed comparison. The authors also show results against Llama 1 34B in their category-level figure. They explain that they use the earlier Llama release for the 34B comparison because Llama 2 at that size had not been openly released. A separate analysis uses results from Llama 2 7B, 13B and 70B to examine how performance changes across sizes in that family.
The paper reruns benchmarks through a common evaluation pipeline. A pipeline here is the procedure that constructs the inputs, obtains the system’s outputs and scores them. This matters because a benchmark name can stay the same while the prompt, examples or data subset change. Giving competing systems the same procedure makes the resulting differences easier to interpret. They concern the systems’ performance under the chosen conditions.
One condition is the number of examples included in a test prompt. A 0-shot test presents the task without worked demonstrations in the prompt. A few-shot learning setup provides examples that show the kind of answer expected. The number is a property of test-time input. The comparisons use these examples to set up the task for the base systems, while the instruction-tuned variant is produced separately through additional training.
Equal test conditions matter particularly when the benchmark mixes tasks that expect different kinds of outputs. A question may ask for a choice, a passage may ask for a short answer, and a programming task may ask for code. The pipeline gives each system the instructions and demonstrations selected for the benchmark. Comparing performance within that setup is more direct than comparing independently published scores that may have depended on different instructions or different inputs.
The authors identify two concrete departures from the evaluation reported in the Llama 2 paper. For MBPP, their programming evaluation uses the hand-verified subset. For TriviaQA, the prompt omits Wikipedia context. The subset determines which problems count toward the MBPP result. The context choice changes the information available to answer a TriviaQA question. Both choices apply to the reruns, and both matter when interpreting how the reported comparison relates to an evaluation carried out elsewhere.
The base evaluation covers several classes of task and reports both detailed benchmark results and category-level comparisons. Accuracy is the measure shown in the category comparison. The evaluation procedures underlying the categories vary, as the math use of majority voting illustrates. A category-level result describes a group of tasks under the authors’ evaluation choices. The results on particular datasets give the more specific evidence about what was asked of the systems.
Commonsense, knowledge and reading questions
For commonsense reasoning, the authors use 0-shot prompts across the category. HellaSwag, WinoGrande and PIQA are among the benchmarks. WinoGrande is associated with the Winograd Schema challenge, and PIQA focuses on everyday physical reasoning. The category also includes SIQA, which concerns social interactions, and OpenbookQA, a question-answering dataset.
The remaining commonsense benchmarks are ARC-Easy, ARC-Challenge and CommonsenseQA. The two ARC settings come from the ARC challenge. Including both settings broadens the comparison within a common question-answering benchmark. Across the category, the questions give the systems several ways to demonstrate commonsense reasoning under the same 0-shot convention. The resulting comparison concerns how well each handles this collection of tasks.
The world-knowledge evaluation consists of Natural Questions and TriviaQA, both run with 5-shot prompts. Here the demonstrations show how to respond to the questions. Omitting Wikipedia passages from TriviaQA also makes the result more dependent on what the system can bring to the request from its learned information and the prompt as supplied. This is the world-knowledge setting used in the paper’s size analysis.
The reading comprehension category uses BoolQ and QuAC with 0-shot prompts. BoolQ asks yes-or-no questions, while QuAC concerns answering questions in context. The category addresses the ability to use material accompanying a question. This supplies a comparison with the world-knowledge configuration, where a factual answer can depend on information the system has learned before the test.
World knowledge and reading comprehension both require producing answers, but the experiment emphasizes a different source of relevant information in each. A system may use a passage effectively when the passage is present and still have difficulty answering a factual question without one. Conversely, factual recall alone would say little about the ability to follow a passage presented in a request. The separate categories allow the authors to examine how the comparison with larger Llama systems changes between these cases.
The reported pattern favors Mistral 7B over Llama 2 13B across the detailed metrics. The knowledge category is the close comparison in the authors’ size analysis, where they characterize Mistral as roughly on par with Llama 2 13B. That characterization can coexist with a lead in the detailed comparison. A benchmark lead may be small enough that the systems look similar when results are combined or used to estimate matching parameter sizes.
Mathematics and code
The mathematics evaluation uses GSM8K with an 8-shot setup and maj@8. For MATH, the corresponding settings are 4-shot and maj@4. The shot count describes how many example solutions are in the prompt. The majority-vote notation describes how many candidate answers contribute to deciding which answer is scored. The reported result thus depends both on the task demonstrations and on the procedure for selecting an answer across attempts.
These settings distinguish the authors’ mathematics tests from an evaluation that scores a single continuation per question. Repeated attempts give the scoring procedure an opportunity to favor an answer that recurs. Every system included in the comparison faces the same benchmark setup. The relative results show how the systems perform with that evaluation procedure in place. They leave open how their ordering or margins might change with another number of demonstrations or a different answer-selection rule.
For code, the paper uses HumanEval at 0-shot and MBPP at 3-shot. These are program synthesis tests, where the system is asked to produce code for a described task. The HumanEval test supplies no worked demonstrations in its prompts, while the MBPP setting supplies examples and uses the hand-verified portion of the dataset. This gives the coding comparison two test conditions with different amounts of demonstration.
Mistral 7B comes close to Code Llama 7B on coding performance in the paper’s account. The specialist comparison provides a different reference point from Llama 2 13B. A system can make gains over a general baseline on programming and still have a substantial gap to a system chosen specifically for its code abilities. The authors use Code Llama to show where Mistral stands relative to that more specific comparison. They pair it with the broader benchmark results to show the range of tasks on which the base release remains competitive.
The reported category comparisons with Llama 1 34B are particularly favorable to Mistral 7B in mathematics and code. The larger system is a different Llama generation from the 13B counterpart in the detailed comparison. The larger comparison shows that parameter count alone does not determine the ordering of these releases on the paper’s math and programming tasks. It supports a claim about performance for the parameter count under these conditions, with benchmark procedures held common across the systems being compared.
Math and code also show why a broad label such as reasoning needs elaboration. The math tasks use demonstrations and a procedure for combining attempted answers. The coding tasks require programs and use different demonstration settings. A system that does well in both provides evidence of breadth across these evaluation formats. How it behaves on any individual reasoning suite remains a separate empirical question.
Aggregate evaluations
The authors include MMLU in a 5-shot setting and BBH in a 3-shot setting. They also evaluate AGI Eval with 3-5-shot prompts, restricted to English multiple-choice questions. The AGI Eval result accordingly describes that portion of the benchmark. The paper groups these suites as commonly used aggregate evaluations that offer additional comparisons beyond the individually named categories.
MMLU has a further role in the paper’s analysis of parameter efficiency. The authors discuss it alongside reasoning and comprehension when comparing the base release with a size curve for Llama 2. They use the result to examine how much larger a member of that family might need to be to produce comparable task performance. Because the suites are run under specific prompting conventions, those conventions are also part of what the estimated equivalence describes.
The authors report that Mistral 7B leads Llama 2 13B on all evaluated metrics in this comparison. Their discussion of Llama 1 34B highlights strong performance in code, mathematics and reasoning. The category comparison is more varied against the larger system than against Llama 2 13B. It shows strengths for Mistral on MMLU and AGI Eval while the larger Llama retains advantages in other categories, including world knowledge and BBH. The broad statement about reasoning is best read with the individual categories in view.
The way the results are organized makes the scope of the all-metrics claim specific. It applies to the evaluations run in the paper’s common pipeline and to the comparison with Llama 2 13B. It includes tasks that ask for short answers, tasks where several sampled answers contribute to the final choice, and tasks that ask for code. The evidence is broad across these chosen tasks, and each test still brings its own definition of a successful response.
What equivalent size measures
The paper’s size analysis asks what parameter count in the Llama 2 family would give a result comparable to that of Mistral 7B. The authors plot measured performance at 7B, 13B and 70B for Llama 2. They place the Mistral 7B score alongside those points. By relating that score to the Llama performance curve, the figure estimates the size associated with a similar score in each category.
This is a performance comparison across a particular family. It uses parameter count as the quantity along which the comparison varies. A score can match a point on a curve between the actual systems used to draw it. In that case, the implied size is an estimate from the displayed relationship. The comparison is useful for asking where a compact system sits relative to a family of larger ones on a given test.
The authors describe the estimated equivalent sizes for reasoning, reading comprehension and MMLU as suggesting performance associated with a Llama 2 system more than 3x the size of Mistral 7B. For world knowledge they report a smaller factor of 1.9x, using the Natural Questions and TriviaQA results. This contrast across tasks is an important feature of the analysis. Matching another family on a comprehension benchmark does not entail matching it at the same size on factual questions.
The authors offer an explanation for the lower world-knowledge factor. A smaller parameter count may constrain how much factual information the system can store. The premise is consistent with the relatively close scores on the world-knowledge tests and with a larger advantage on some of the other evaluations. The experiment observes answers under a specific protocol. The storage explanation is the authors’ interpretation of the difference in the response scores.
Equivalent size and inference cost are related as parts of the authors’ motivation, but they describe different measurements. The equivalent-size estimate compares test performance and parameter count. The attention speed and cache figures come from deployment-oriented comparisons with specified sequence lengths. A matching task score gives a basis for comparing capability at different sizes. Runtime measurements give a separate basis for assessing particular costs.
The result also depends on the comparison family. The authors build the curve from Llama 2 at the available sizes and with their own test setup. Another family would supply its own measured points. Even for Llama 2, the curve drawn for world knowledge differs from the one drawn for reading comprehension because their measured scores change differently with size. The paper’s performance-per-parameter argument rests on these specific task and family relationships.
Measuring speed and cache memory
For a sequence length of 16K, the authors report a 2x speed improvement with a window of 4096 and their changes to FlashAttention and xFormers. The comparison is with a vanilla attention baseline. This result gives an observed speed for an implemented local attention pattern in the stated setting. The result connects the smaller set of eligible attention positions with an implementation that can take advantage of it.
The storage result uses a sequence length of 32k tokens. At that length, the paper reports an 8x reduction in cache memory from using the rolling buffer. The benchmark quantity is the space occupied by the stored key-value history. It follows the architectural decision to retain only the recent positions necessary for local attention and to overwrite expired records when incoming positions need space.
The two results address complementary questions about longer inputs. Speed concerns how much time the implemented attention operation takes under the timing setup. Cache size concerns how much history can be retained in memory as a request proceeds. A reduction in the latter can matter even in a setting where latency depends heavily on other operations, because the saved history competes for the memory available to other requests. The authors connect such savings with serving larger batches.
The 16K and 32k measurements also have different baselines implicit in their designs. The speed comparison explicitly uses ordinary attention. The cache result expresses the effect of keeping a bounded history as the number of processed positions increases. The paper attributes the ability to bound the store to the fixed attention window. The fact that earlier positions can continue to influence states across layers explains how the windowed computation and the rolling storage belong to the same design.
The benchmark results for reasoning, reading, mathematics and code establish what the released architecture achieves on those tasks. The long-sequence measurements establish benefits of specific attention and cache procedures at their stated lengths. Taken together, they are the evidence for the paper’s practical argument. One set concerns whether the compact system gives useful answers across tasks. The other concerns particular costs of computing with many tokens.
Evaluating the instruction-tuned release
The comparison changes when the paper moves from base benchmarks to Mistral 7B – Instruct. An instruction-tuned system is expected to respond to a user in a form that suits a request. Chat evaluations can reflect qualities a fixed-answer test captures only in part, such as whether the system gives a directly pertinent recommendation or explains its answer at a useful level of detail.
The automated comparison uses MT-Bench. The authors describe Mistral 7B – Instruct as outperforming the other tested 7B systems and comparing well with 13B chat systems. That is the relevant parameter-size comparison for the adapted variant. The human evaluation supplies another view of the outputs, using participants’ direct preferences between responses to the same question.
The independent human test presents two anonymized answers and asks participants to choose the one they prefer. Anonymity removes the system name from the choice as presented. The observed quantity is a count of preferences. As of October 6, 2023, the paper records 5020 preferences for the Mistral variant and 4143 for the Llama 2 comparator. The counts describe the votes collected through that date in the reported comparison.
Mistral and Llama answers compared by human preferences in the llmboxing evaluation
Participants preferred answers from the instruction-tuned Mistral system more often.
The numbers
| System or setting | preference count |
|---|---|
| Llama 2 13B – Chat | 4143 |
| Mistral 7B – Instruct (this paper) | 5020 |
One example asks for an accessible introduction to quantum physics. The paper describes the Mistral answer as recommending a book more specifically relevant to the request and giving a fuller account of its contents. It describes the Llama answer as pointing to a more general physics book. The example makes the preference judgment concrete. Both systems can produce a recommendation, and the useful comparison is how well each recommendation fits the particular subject and the level the user asked for.
In the human test, a vote favors one complete answer over another. The task does not assign a separate numerical score to relevance, accessibility or detail. Those qualities help explain why a reader might make a choice in the example, while the collected counts measure the outcome of the choices across the evaluation. MT-Bench and the human test therefore give different forms of evidence about the instruction-tuned variant.
The base and chat comparisons also answer different questions. The base tests compare trained systems on shared tasks with specified prompt and scoring conventions. The chat tests assess what the additional instruction training makes available in the released variant. The authors’ public-data procedure shows one way of obtaining that variant, and its benchmark performance is the result of evaluating the adapted release directly.
Refusing unsafe requests and answering benign ones
For the system-prompt experiment, the authors use 175 prompts they classify as unsafe. With the recommended prompt active, they record refusals on 100% of the harmful questions in that set. The quantity being measured is the fraction of those unsafe requests that the system declines under the prompt condition. A high value here reflects the ability to follow the guardrail instruction when faced with this collection of requests.
The authors also consider the utility side of using a standing safety instruction. They illustrate it with a technical question about stopping a Linux process. The wording can appear alarming if read without the computing context, even though terminating a process is an ordinary operating-system task. With the system prompts activated, Mistral 7B – Instruct answers correctly and Llama 2 13B – Chat declines. With the system prompts disabled, both answer correctly.
The example makes the evaluation issue concrete. A guardrail can prevent an unwanted answer, and the same standing instruction can affect an ordinary request. The unsafe prompt set measures the first behavior for the tested requests. The Linux example shows the second behavior for a specific request where both systems demonstrate the relevant technical ability under the disabled condition. The comparison shows how the response changes with the instruction in place.
The authors present system prompting as a means of choosing how strongly to constrain a front-facing system. That choice involves whether the answer preserves useful assistance as well as whether the system refuses harmful requests. The paper’s refusal count gives a uniform measure over the unsafe set. Its benign example demonstrates why such a measure is only one part of assessing the output behavior of a system used for general questions.
Measuring moderation separately
The moderation experiment gives Mistral 7B – Instruct an explicit classification task. The authors evaluate it on a manually curated, balanced collection of adversarial and standard prompts. Here an adversarial prompt is one constructed to challenge the classification procedure. A standard prompt supplies a more ordinary case. The dataset is the basis for measuring how the moderation instruction performs on the classification task.
The result is 99.4% precision with 95.6% recall, using acceptable prompts as the positive class. Precision asks how many prompts judged acceptable by the system were acceptable according to the evaluation labels. Recall asks how many of the prompts labeled acceptable in the dataset the system successfully identifies as such. The choice of positive class matters since it specifies which decisions are counted in the denominators of these metrics.
Under this convention, a truly unacceptable prompt marked acceptable lowers precision. A truly acceptable prompt that fails to receive the acceptable label lowers recall. These are distinct mistakes for an application that uses a moderation decision to decide whether content can pass. The results characterize the tested dataset and the stated classification direction. The paper reports the combined acceptability metrics and describes the finer categories the moderation prompt can produce.
The moderation and refusal results arise from different requests to the same instruction-tuned system. The refusal test asks it to respond to users under a standing guardrail, and scores what it does with the unsafe requests. The moderation test asks it to inspect text and label it. An application can use a label to decide which content categories to filter, which is why the authors discuss moderation as a separate use of the release.
What the ablations show
The paper reports no component-by-component ablation of the trained architecture. Its closest controlled comparisons concern the attention implementation and the effect of activating system prompts, while its benchmark reruns and size analysis compare completed systems.
What the attention comparison isolates
A component ablation would ask what happens when an otherwise comparable system is built without a particular design choice. For the attention window, that would mean comparing systems trained under matched conditions with different rules for which positions their layers can consult. The paper instead compares the speed of an implemented windowed attention operation with a vanilla attention baseline. That comparison can answer an engineering question even without a controlled training experiment. A local mask gives the implementation an opportunity to skip work. The timing establishes that the software changes realize a speed benefit under the tested condition.
There are two pieces to that result. The attention rule defines which interactions belong in the calculation. The implementations in FlashAttention and xFormers determine how the calculation is carried out. Software could express a local mask while still doing work over a larger region than the mask requires. The reported comparison concerns the combination of a local rule and implementations adapted to execute it. The paper gives a speed comparison for that combination. It does not vary the mask and the implementation independently, so the contribution of each to the measured result cannot be read from the timing alone.
The scope matters when asking which operation became cheaper. A sequence passes through a transformer and the attention calculation forms part of that work. A speed gain for that calculation leaves the time spent elsewhere unspecified. The benchmark is therefore most informative about whether limiting eligible connections can pay off in the implementation used by the authors. To estimate the effect on a complete response, a reader would need to know how much of the response time comes from the tested operation, as well as how that share changes with the length of the prompt and the generated continuation.
Window width is another variable the experiment leaves open. The authors time a particular width on a particular sequence length. The comparison demonstrates a working setting. It does not show how speed and answer quality move together when the window is made narrower or wider. A narrower window would change which representations a query can reach directly. Its effect on usefulness would depend on whether the tasks require information that is no longer directly available and whether the layers carry enough of that information forward. A wider window would make more positions directly eligible. The paper gives no series of trained variants or repeated task evaluations that would locate the chosen width along that tradeoff.
Grouped-query attention is a separate source of potential savings. Its mechanism changes how many sets of keys and values there are to store for a position. The local attention rule changes which positions are eligible to be read. The reported timing is introduced as a comparison with vanilla attention for the windowed implementation. It does not supply a matched decoding experiment in which the number of key-value groups alone varies. The paper accordingly provides a reason to expect lower storage requirements from sharing and a reason to expect a speed advantage from efficient windowing. It leaves the individual contribution of grouping to measured response time unresolved.
The same distinction applies to task performance. The authors benchmark the released base system, which uses both attention choices. Its strong results establish that the combination can coexist with useful performance across the evaluated tasks. A reader cannot assign the gains over Llama to grouping, windowing or their interaction using those results. The systems being compared are separately developed releases. Holding the evaluation procedure common controls what is asked and how answers are scored. It leaves differences in how the competing systems were built and trained in place.
What follows from the cache rule
The rolling-buffer analysis provides a different kind of evidence. For a fixed local attention rule, an expired key or value can no longer contribute directly to later attention at that layer. Reusing its slot follows from the rule itself. The performance question for this kind of storage change is whether the buffer presents the same eligible records to the calculation that a complete history with the same local mask would present. If it does, both layouts supply the same attention inputs. The savings come from how much history is kept available in memory.
That reasoning gives the authors’ quality claim for rolling storage a specific comparison. An older record can be discarded once the local rule excludes it. Keeping the record in an ever-growing store would leave it unused by that same rule. Full attention would be a different comparison because it could still read the old record. The cache argument establishes why the rolling layout is compatible with local attention. It leaves the question of how the local rule affects predictions relative to full attention for a separate quality experiment.
The reported cache comparison concerns a long sequence and the memory used for saved key-value records. It is particularly easy to interpret because the quantity being bounded belongs to the mechanism itself. Once the buffer fills, advancing the sequence does not require another slot for that sequence at the layer in question. A speed measurement adds dependence on how the implementation performs its calculations. The size of the retained history follows directly from the storage policy. The paper supplies a numerical instance of the saving under that policy.
Prompt chunking has a similar distinction between intended behavior and measured benefit. The attention mask in the chunking example shows how the current chunk can still use eligible entries from before the chunk boundary. The logical position of each token determines what it sees. The mere placement of a boundary in the pre-fill procedure does not reset the sequence. A correct implementation therefore preserves the intended local attention pattern while organizing the calculation into smaller pieces.
The illustration is an explanation of that arrangement. The paper does not compare a range of chunk lengths under matched workload and memory conditions. It gives no basis for deciding from the experiment whether setting the chunk size to the window is optimal for a particular prompt distribution. Some requests would include only a short prompt. Others would spend much more of their processing on pre-fill. The diagram identifies what a valid chunk computation must include. It leaves the comparative performance of valid schedules open.
Together, these analyses separate a test of an implemented operation from a consequence of an architectural rule. The speed comparison shows a benefit that depends on the implementation taking advantage of sparsity. The memory comparison shows the effect of retaining only records that can still be used. The chunking diagram explains how to honor the same rule when processing a known input in pieces. None of these comparisons varies the learned system that produces the representations going into attention.
What matching the evaluation controls
Rerunning the base benchmarks in a common pipeline removes an ambiguity that would otherwise affect the comparison with Llama. Suppose a programming task is evaluated on a selected subset for one system and on a broader collection for another. Even a difference in scores on a benchmark with the same name could reflect which problems were included. A shared subset makes the systems face the same tasks. The same logic applies when a factual question is presented with a relevant passage in one evaluation and without it in another. The experiment becomes easier to interpret when the available information is held common.
The paper’s choices for MBPP and TriviaQA illustrate this control especially well. They identify where the authors’ procedure differs from an earlier published procedure. They do not compare the effects of both procedures within the Mistral evaluation. A reader can therefore use the reruns for a comparison under the stated settings. Estimating the effect of the hand-verified subset, or of omitting Wikipedia context, would require scores for the corresponding alternatives. The paper makes these choices visible so that a difference between published reports need not be mistaken for a difference arising entirely from the tested systems.
The same evaluation also makes the Code Llama comparison informative within its domain. The code specialist provides a reference for programming performance, while the other benchmarks show the breadth of the Mistral release. This design can answer how close the general-purpose release comes to a specialist on the selected tests. It cannot identify the effect of code specialization as a training intervention. That would require the same starting point and a controlled change to the training procedure. The paper compares the finished releases that a reader might choose between for a task.
The equivalent-size analysis changes the question again. It takes a group of observed Llama 2 performance points and asks where the Mistral score sits in relation to them. Within this comparison, the estimated match differs across tasks. That difference is evidence that a single parameter-count comparison would conceal meaningful variation. A compact system can compare especially well on one collection of tasks while occupying a much closer position to the smaller Llama systems on another.
The comparison is strongest as a description of the observed pattern. Parameter count provides the horizontal scale. Benchmark performance provides the vertical scale. A relationship between them within the evaluated family can place Mistral’s performance in context. For a category where the Mistral score lies between measured Llama 2 points, the estimated matching size depends on how the relationship between those points is represented. The estimate says how the score relates to the displayed curve. It supplies no additional trained system at the matching size.
In world knowledge, the authors explain the smaller equivalent-size advantage by suggesting that a compact system has less capacity to store facts. The result motivates that interpretation because the comparison with Llama 2 tightens on the selected factual tests. The procedure does not measure stored facts directly or control what factual information entered each system’s training. A correct answer can also depend on whether the question elicits knowledge in a usable form. The analysis identifies the type of task on which the size comparison is less favorable. The proposed explanation remains a hypothesis about why.
This is one place where the distinction between an evaluation control and a construction control is especially important. Giving each system the same question makes the answers comparable. It leaves open why one answer differs from another. Similar reasoning applies to the finding that the compact release performs strongly on mathematical problems. The pipeline can establish how well the finished systems respond under the same demonstration and voting conventions. It does not assign the difference to the attention design or to an individual decision made during training.
What changes when a system prompt is active
The example about stopping a Linux process offers a direct comparison of behavior with a setting changed at response time. Each system has a condition with its guardrail prompt active and a condition with the prompt disabled. For the illustrated question, both give a correct answer in the disabled condition. The difference appears when the prompts are active. The comparison thus identifies a case where the response policy, as expressed by the added instruction, affects whether the system makes use of an ability it displays under another condition.
The cross-system comparison and the within-system comparison each contribute something. Comparing the active conditions shows that the two resulting configurations behave differently on the same benign request. Comparing each configuration with its disabled condition shows where activation coincides with a changed response. Since the systems use their respective prompts, the difference between them could reflect prompt wording, differences in how they follow instructions, or both. The example does not identify which explanation accounts for the different responses.
The judgment is unusually interpretable for an individual example. The request has a benign technical meaning, and a correct response was observed from both systems when the standing instructions were absent. The refusal in the active condition therefore has a clear utility cost in this case. The example addresses a particular ambiguity in ordinary language that a broad refusal test on unsafe requests could miss. It supports the authors’ decision to inspect useful responses alongside safety behavior.
Its evidentiary reach remains the request illustrated. A different benign question could interact differently with the same system prompts. The paper reports the refusal result for a set of harmful requests, while the Linux example establishes a separate point about usefulness. Those observations have different units. A collection of unsafe requests can show how frequently a guardrail succeeds at declining those requests. An individual benign example can expose a possible cost of applying the guardrail. Estimating the frequency of that cost would require a defined collection of acceptable requests and judgments across it.
The moderation experiment uses a further form of prompting. It asks for a classification and evaluates the labels against the authors’ curated data. Its measured performance shows what the chosen procedure can achieve on that dataset. The paper does not report a comparison that removes individual elements of the classification instruction or tests several prompt variants. It is therefore possible to evaluate the outcome of the full moderation procedure while leaving the contribution of particular instructions unknown.
The instruction fine-tuning experiment likewise demonstrates the resulting chat system by testing it against other finished releases. It does not isolate which sources of instruction data or which aspects of the training produce the observed preferences. A direct study of the fine-tuning intervention could hold the base fixed and compare different training conditions on the same response tasks. Here the public instruction data and the competitive outcomes establish the feasibility of the authors’ adaptation. The experiment is a demonstration of a resulting system, with the causal questions about its training still open.
Limitations
Where the authors qualify their claims
The authors call the attention span of roughly 131K tokens theoretical. The qualifier is essential. A position at that distance can be connected to a later prediction through successive local operations in the stack. Connection is an architectural property. Success on a task that calls for an exact detail from a distant passage is a behavioral property. The paper’s diagrams establish the first kind of claim. A distance-controlled retrieval evaluation would be needed to establish the second.
The two long-sequence measurements also carry stated conditions. The 2x speed result is for the implemented attention comparison at 16K tokens with the stated window width. The 8x saving at 32k tokens concerns cache memory. These measurements involve different quantities and sequence lengths. Their scope is clear as written. A reader can connect them to the practical cost of long inputs without treating either as a factor that applies to every operation in inference.
In the benchmark analysis, the authors identify world knowledge as the category with a smaller parameter-efficiency advantage. They offer limited storage capacity as a likely explanation for that pattern. This is a qualified interpretation of benchmark results, and the qualification matters because other parts of the experiment are measurements of behavior. The authors evaluate answers to factual questions. Their explanation goes a step further by linking the relative difficulty to the amount of knowledge the trained system can hold.
The authors also identify departures from the Llama 2 evaluation protocol. The acknowledged differences in the MBPP subset and the material supplied to TriviaQA affect the meaning of a score. This is a limitation on cross-paper comparison even when the within-paper comparison is fair. The reruns give readers a shared basis for comparing the systems in this study. A score from another study needs to be read in light of the inputs and scoring procedure used there.
There is a practical limit on what the comparison at 34B can establish. The authors explain that they use Llama 1 at that size because the corresponding Llama 2 system had not been released openly. That makes the comparison relevant to the released options available to them. It also means the larger system belongs to a different generation from the main Llama 2 baselines. Parameter count is consequently one of several properties that differ in the comparison.
The instruction-tuned variant is explicitly described as preliminary. The authors use it to demonstrate that a base release can be adapted with publicly available instruction data and evaluated competitively against chat systems. The claim is appropriately specific to the resulting version. It leaves open the extent of improvement available from other data choices and training procedures. The paper’s conclusion has a similar forward-looking qualification about efficiency. It argues for considering training and inference costs together and says there is further work in finding the best tradeoff.
Long sequences and usable context
A close reading of the architecture brings out a limit beyond the authors’ use of the word theoretical. A rolling buffer can admit successive positions without needing a new slot for each one. That property concerns the ability to continue consuming a sequence. Using the content of that sequence depends on where relevant information appears and how it travels through the layers. The evidence for bounded storage is compatible with different patterns of accuracy as the distance between a question and its evidence increases.
Consider a request that asks for a name mentioned early in a long passage. The hidden states available near the question could in principle carry information from that early passage. Whether they carry the exact name is a separate matter. A question about the overall subject of the passage could succeed if the states retain a broader theme. The same states might be insufficient for recovering the name precisely. The architecture describes which token positions can influence those states. It does not specify which textual distinctions the trained computation will preserve.
Distance alone also leaves out how the evidence is distributed. A relevant detail can recur throughout an input, making it available near the eventual query. A detail mentioned once creates a different test of whether information travels forward. Several related facts scattered across a passage introduce another demand, since a successful answer may have to combine them. The paper’s general benchmark suite provides evidence of reading and reasoning performance under its standard prompts. It does not separately measure these conditions as characteristics of long inputs.
The capacity to process text in chunks has an analogous limit. The mask example establishes how a chunk can attend across its immediate boundary. It says little about the accuracy of an answer after many boundaries have passed. A chunk boundary is a division of work during pre-fill, while attention distance is a property of the token positions. An evaluation of long prompts would need to examine where the evidence sits with respect to those positions and what the task demands of it. The illustration answers how the calculation is organized.
The evidence from the paper therefore supports different levels of confidence for different long-input claims. Fixed storage for the retained history follows from slot reuse. Indirect influence over a wider distance follows from the attention connections across layers. Accurate extraction or reasoning over long inputs would depend on results for those tasks at specified distances. The paper measures the cost of selected computations at long sequence lengths and reports scores on a broad benchmark program. It does not give a curve connecting long-input quality to input length or evidence placement.
This also affects how to interpret the word “context.” It can refer to the text processed as input, the positions an individual layer is allowed to consult, or the part of an input whose content measurably helps answer a question. In the paper, these are related through chunking, the local mask and the stack. They are distinct quantities in an evaluation. A sequence length used to measure cache memory, for example, supplies a condition for that measurement. It supplies no separate estimate of how much of that sequence remained useful to a later question.
Which costs were measured
The speed and storage results are evidence of concrete savings in parts of inference. An end-to-end serving comparison would need to specify the rest of the workload. It would distinguish the length of incoming prompts from the length of outgoing responses, describe how requests are batched, and report the timing quantities of interest. The paper explains why smaller caches can make room for more requests. The measurements do not show how much throughput rises for a particular mix of requests.
Latency is likewise a family of practical questions. A user might care about waiting for the first part of an answer. Another measurement might concern how steadily the rest arrives. Processing a long supplied prompt before generation bears directly on the former. Working through a long continuation token by token bears on the latter. The paper’s separation of pre-fill and decoding explains why they can have different costs. Its reported attention timing does not give both user-facing latency measurements for the released system.
The cache result measures memory reserved for saved keys and values. A deployed system also needs room for its learned weights and for the work in progress. The proportion attributable to the history depends on the request and how it is served. Even a large cache saving can coexist with a smaller change in total memory if other allocations dominate. Conversely, when the history occupies an important share of available space, keeping it bounded can be consequential. The paper gives the reduction for that history and an architectural explanation for how it can help batching.
The reported performance relative to parameter count cannot fill those gaps in measurements. Parameter count is pertinent to the authors’ goal of a compact release. Equivalent size relates that count to benchmark scores for Llama 2. Translating any estimated match into latency, memory during service or a cost per request requires measurements of those quantities. The paper introduces inference cost as a dimension that scaling studies should consider. Its size analysis and its engineering measurements supply separate pieces of that comparison.
Training cost is the other quantity needed for the broader claim. The reported benchmark advantage does not establish how much training computation was needed to produce either system’s scores. Without a matched training-cost comparison, the paper cannot establish where Mistral sits on a joint frontier of capability, training cost and inference cost. It offers an example of why that frontier matters. A compact release can have favorable scores and specific inference savings, while the resources required to obtain those learned weights remain a separate question.
What can be reconstructed about training
The release makes the resulting weights and a reference implementation available. That helps establish how to use the trained system and how its attention is intended to operate. Reconstructing the learning process would require a different level of information. The paper does not characterize the base training corpus, its composition, or the sequence of steps that produced the base weights in enough detail to reproduce that training. It does not provide a matched account of those choices for the comparison systems either.
This matters to causal interpretation of both the favorable and less favorable benchmark comparisons. A difference in world-knowledge performance might involve the breadth of training material, the emphasis given to particular information, or how readily that information is elicited at evaluation time. A difference on code or mathematics might also involve the training experience of the respective systems. Those are possibilities left open by the setup. The paper observes the outcome of comparing complete systems and gives specific architectural reasons to expect savings during inference.
The public origin of the instruction datasets is a useful disclosure, especially for a release intended as a base for adaptation. The paper identifies Hugging Face as the repository and describes the data as instruction examples. It does not give a complete accounting of the individual datasets, their selection and weighting, or the full settings used to train the instruct variant. As a result, the adaptation is documented as an example of what was done with public data, with limited information for recreating the same training run.
The distinction between an available release and a reproducible training procedure is consequential for an engineer testing a change. A released checkpoint supplies a common starting point. A training experiment that varies an attention choice from the beginning would need to specify the training material and hold other influential decisions stable. These are different experiments with different demands. The paper makes the first kind of investigation more accessible through the weights and implementation and leaves the second kind underdocumented.
Assessment of the training data would also help interpret evaluation overlap. The paper’s authors rerun standardized benchmarks and describe the prompt conditions. They do not report a check that would allow a reader to establish how the base or instruction data overlap with the benchmark material. This is a limit on the inference available from the scores. It gives no ground for asserting that overlap occurred. It leaves the question open when considering what experience might contribute to performance on a particular test.
How far the task comparisons extend
The benchmark program is broad, with collections for commonsense, knowledge and reading alongside mathematics, code and mixed suites. Breadth across selected tests establishes more than a single favorable result would establish. It still yields comparisons under particular prompts, datasets and scoring methods. The ordering observed there is a statement about those conditions. Other conditions would have to be evaluated before extending the comparison to them.
The number of demonstrations is an example of a condition that affects interpretation. The main math results involve both demonstrations and majority voting among attempted answers. A production task may call for a single answer with a tighter limit on time or generated text. The paper’s math results are informative about the tested decision procedure. They leave the relative value of the systems with a single attempt undetermined. They also leave open how much the voting procedure contributes to each score under the selected shot count.
For factual questions, including or excluding contextual passages changes the task materially. The protocol without Wikipedia context on TriviaQA provides a comparison under the input the authors choose to supply. The result cannot settle how the systems compare at selecting evidence from a passage or reconciling several passages. Those tasks would give the reader and the system additional information to work with. They would need their own measurement if the purpose were to assess source-grounded answers.
For code, the hand-verified MBPP subset defines the problems included in the reported comparison. A more detailed analysis of correctness would also need the scoring conditions and a view of the kinds of mistakes systems make. A coding score can tell a reader whether generated answers satisfy the evaluation used for the test. It offers less information about what happens when the problem statement leaves room for interpretation or when success depends on cases beyond those the evaluation checks. The paper establishes the comparison for its coding benchmarks and leaves these broader engineering questions open.
The English multiple-choice restriction on AGI Eval is another explicit boundary. It controls which questions enter that aggregate score. It leaves performance on excluded formats and languages unmeasured. The same general point applies to treating an aggregate reasoning result as a statement about reasoning in every setting. The benchmarks provide particular tasks that can be asked and scored. The paper’s comparison with larger systems can vary across those tasks, as the results for Llama 1 34B illustrate.
The paper also gives point results and qualitative comparisons without a detailed account of uncertainty for the claims it emphasizes. A small gap and a large advantage have different implications for how likely an ordering might be to recur. The knowledge results are especially sensitive to this distinction because the authors themselves describe the systems as close there. Without distributions over repeated runs or an analysis of variability across questions, the most exact reading is the one the setup supports. The observed ordering belongs to the measurements under the authors’ pipeline.
Category comparisons bring a further interpretive limit. An aggregate can move because gains are spread widely or because results improve substantially on a smaller part of the collection. The paper’s task inventory and detailed comparison are important for giving the categories meaning. A category score alone cannot establish uniform improvement within that category. It answers the question set by the aggregation used in the evaluation. A reader interested in a particular workload needs the evidence most closely aligned with that workload.
Interpreting the chat comparison
Anonymous presentation strengthens the human comparison by withholding the visible system identity during a choice. The counts measure which responses participating readers preferred during the reported period. They do not explain which properties of the answers drove those choices across the evaluation. A preferred answer might be more pertinent, easier to read, more complete, or simply closer to a participant’s expectation. The paper’s recommendation example illustrates one such judgment. It does not establish how common that reason was.
The counts also describe preferences registered in the evaluation, instead of an estimate for every population of users or type of instruction. The interpretation depends on the questions that were shown and the people who supplied choices. The paper gives the setup and the counts through the stated date. It provides no breakdown here that would show the distribution of preferences across tasks or the extent to which frequent participation affects the totals. Those details would matter to an attempt to generalize the observed preferences.
The automated comparison brings a separate evaluation instrument. The authors use MT-Bench to put the instruction-tuned release alongside other chat systems. Its results and the human preferences provide evidence from different procedures. The paper does not decompose agreement between them by response or task. An automated benchmark lead and a human preference lead can support the same broad account of a competitive instruction variant while reflecting different aspects of the answers.
The adaptation itself is also one part of the comparison. Mistral 7B – Instruct and Llama 2 13B – Chat have different base and post-training histories. A difference in the final responses can involve both. The paper shows that the Mistral base can be turned into a chat system that receives favorable evaluations with the authors’ public-data procedure. Assigning that outcome to a particular training stage would require comparisons beginning from the same base or varying clearly specified stages under common conditions.
Refusal and moderation coverage
The refusal set establishes that the recommended prompt works on the harmful requests used in the test. The result is bounded by the set and by the prompt being active. It gives no estimate of performance on unseen forms of the same requests, on substantially different interactions, or on prolonged exchanges that change the context for a request. A statement about general robustness would require evaluation across such variations. The paper presents a demonstration of optional guardrails with a defined test.
A set devoted to harmful requests also leaves the overall rate of unnecessary refusal unidentified. For that quantity, an evaluation needs acceptable requests whose successful answers can be judged. The Linux example gives one such request with a clear comparison between prompt conditions. An application handling many kinds of requests would need to know how the guardrail behaves on the relevant range of benign questions. The paper shows why this dimension of utility belongs in the assessment and provides an illustration of it.
The moderation metrics have a related limit arising from how the labels are treated. The reported positive class is acceptable content. Precision and recall therefore describe the system’s performance at identifying and accepting that class on the curated set. The paper describes a finer set of labels, but its headline values do not give the reliability of each category individually. A system could have different rates of error for different categories and still have the same combined acceptability scores.
The curated dataset is described as balanced and as including adversarial and standard prompts. An application could receive these kinds of input in very different proportions. Precision depends on which examples the system encounters as well as how it classifies them. Accordingly, the measured precision belongs to the evaluation distribution. It cannot be carried over unchanged to another setting solely because the same moderation prompt is used.
There is also a distinction between what the moderation instruction is designed to inspect and the material scored in the reported experiment. The authors describe it as applicable to prompts or generated answers, and report results on a prompt dataset. Generated answers are an additional kind of input that can have different properties from user requests. The prompt evaluation establishes the behavior measured for those requests. It supplies no separate estimate of error rates when the same procedure is used to label responses.
Finally, classification and refusal concern different outputs. A correct classification can help an application decide whether material should be filtered. It leaves open how a system would respond if allowed to answer. A refusal test observes the response under an instruction to constrain output, with no requirement that the system attach a category label. The paper gives evidence for both modes under their own evaluations. Their reported measures answer different questions about behavior in a front-facing application.
What came after
The later works cite Mistral 7B from several lines of research. Their titles identify what each investigates, and the citation establishes a connection to the paper. Architectural adoption, experimental reuse and direct descent are more specific relationships. They need evidence about what a work actually built or evaluated. Where the connection is known through a citing title, the relationship is clearest at the level of the research question.
Capability at practical sizes
The Llama 3 Herd of Models continues work on the Llama family, which provides the main point of comparison in the Mistral study. Mistral’s equivalent-size results are tied to the members of Llama 2 that the authors tested. The later title identifies a new family report, making the family and generation important parts of any later comparison. A size estimate established against one release can be reevaluated when the reference systems change. The earlier estimate still describes its original curve and benchmarks.
Gemma presents open systems based on Gemini research and technology. Its stated subject connects to the role of a released general-purpose base in Mistral 7B. Availability gives other researchers something they can evaluate under common conditions or adapt for a new task. The description also identifies a distinct source of the work, Gemini research and technology. The citation situates Mistral in this area of open releases without establishing that the same attention and cache choices were used.
Gemma 2 explicitly frames improvement around a practical size. This carries forward a question that Mistral makes measurable through its comparisons with larger releases. Selecting a practical size requires deciding which capabilities matter and which serving conditions are relevant. The Mistral study gives examples of how the answer can vary between factual questions and other tasks. Gemma 2’s stated focus puts the same general relationship between compactness and capability at the center of a later open release.
The Phi-3 technical report makes local operation on a phone part of its stated objective. The setting gives practical size a more specific meaning. Mistral studies operations that affect deployment generally, including attention and the memory occupied by retained history. A phone defines a concrete deployment target for a later system. The connection is a shared interest in usable capability under resource constraints. The title supplies no basis for attributing the local operation to Mistral’s buffer or attention method.
The Phi-4 technical report and the InternLM2 technical report cite Mistral in reports on their respective releases. Those titles identify the systems covered and leave their technical use of Mistral unspecified. Their place in the citing literature shows that Mistral remained a point of reference as further systems were documented. It takes evidence about the later comparisons or methods to say whether a reference serves as motivation, a benchmark baseline or an architectural precedent.
DeepSeek LLM addresses the scaling of open systems. It relates most directly to the question Mistral raises about the axes on which scaling should be evaluated. Larger parameter counts, training effort and the work of using a trained system are distinct quantities. Mistral’s analysis compares capability with parameter size using a specific reference family and separately measures some inference costs. The later title identifies scaling as its subject and gives a context in which to read that earlier comparison.
A Survey of Large Language Models connects Mistral to a wider overview of the field. A survey draws value from being able to place an individual release beside alternatives. Mistral supplies a documented combination of a compact base, efficient attention and a publicly available instruction variant. Those features explain the relevance of a release paper to the scope of such a survey. The citation alone leaves open which aspect of the release the survey discusses.
Serving and the resources behind a release
Sarathi-Serve addresses the relationship between throughput and latency in inference serving. The serving question operates at the level of requests sharing a system. Mistral’s architectural argument starts lower down, with how much attention work is done and how much history each sequence retains. A change at that level can affect what a serving system has room to do. It leaves the scheduling question open. The later work’s stated subject makes the tradeoff between amount of work completed and time spent waiting an object of study in its own right.
Mistral’s method distinguishes processing the prompt from generating a continuation. That same distinction gives readers a way to understand why serving is a different research problem from bounding one attention cache. Requests can arrive with different amounts of initial text and continue for different lengths. Even when the per-sequence storage rule is understood, the latency experienced by a user will depend on how those requests share time and available memory. The citing relationship with Sarathi-Serve connects the paper’s concern with efficient operations to an explicitly serving-oriented study.
Dolma addresses a different resource by presenting an open corpus for pretraining research. The connection is especially informative when considering what openness makes available for examination. Mistral releases trained weights and an implementation and identifies the public origin of the data for its instruction adaptation. A corpus paper makes training material itself the subject. Access to such a resource supports questions about what goes into pretraining. The citation gives no indication that Dolma was used to train Mistral or that its design comes from the Mistral report.
LlamaFactory addresses efficient fine-tuning through a unified approach spanning many systems. Its scope is broader than the single demonstration of instruction adaptation in Mistral 7B. Mistral shows the result of adapting one base and compares the resulting variant in chat evaluations. The later title identifies the repeated process of adapting releases as its concern. The shared problem is how to make available base weights useful in further training. The title and citation do not specify the particular Mistral procedure used, if any.
These works raise separate questions about the resources an open release gives a researcher. A serving procedure concerns how a trained system handles requests. A corpus concerns the material available for producing learned weights. A fine-tuning system concerns the process of adapting an existing release. Mistral’s paper touches all of these areas through its motivation, architecture and demonstration, while providing substantially more detail on some than others. The later titles identify research efforts devoted more directly to the corresponding problems.
Post-training, preferences and alignment
Zephyr investigates direct distillation for alignment. Distillation here names the later work’s chosen training problem. Mistral 7B – Instruct supplies a nearby point of reference because its additional training is also intended to improve the behavior of a base system in response to a user. Mistral demonstrates that adaptation with public instruction data and reports automated and human evaluations. Zephyr’s title identifies a more specific alignment approach. The citation does not by itself identify the starting weights, training examples or exact comparison.
Tulu 3 focuses on open post-training. Post-training is the stage of adapting a base after its initial training. The Mistral paper includes such a stage to establish that the compact release can support a competitive instruction follower. The later title takes that stage as its primary research subject. The connection matters because decisions made after base training can substantially shape the responses evaluated in a chat comparison, even when those responses originate from a common architectural family.
RewardBench studies how to evaluate reward systems used with language generation. These provide judgments that can be used to evaluate or guide behavior. Mistral’s human comparison gathers judgments of completed responses from people asked to pick the one they prefer. RewardBench’s stated topic concerns evaluation of the judging systems themselves. This shifts attention from which answer receives a favorable judgment to the reliability of an instrument that supplies judgments. The citation does not establish that it uses the particular votes or examples reported by Mistral.
These lines of work help explain why the instruction demonstration has a different place in the paper from the base benchmark results. A base release gives later research a starting point. Adaptation then poses questions about how training signals are obtained, what behavior they encourage and how the resulting responses are judged. Mistral answers the narrower question of whether its own public-data adaptation can yield competitive chat results. The later works’ stated topics make distinct parts of the adaptation and evaluation process the focus of inquiry.
Specialized mathematical and programming evaluations
DeepSeekMath studies mathematical reasoning in open systems. Mistral shows why mathematics can be an informative comparison for a compact general-purpose release. A specialist study can devote more of its attention to the way mathematical performance is trained and evaluated. The connection is through the capability being studied. A citation alone leaves open whether DeepSeekMath uses Mistral as a baseline, as a starting point or as evidence that open systems already perform usefully on those tasks.
MetaMath focuses on bootstrapping mathematical questions. That places part of the research effort on constructing questions for learning or improvement. Mistral’s math evaluation starts with existing benchmark questions and evaluates the answers under a defined prompting and voting procedure. The later title identifies question construction as its subject. This is a way in which the mathematical capability observed in a general release can become the object of a more specific data question.
WizardMath addresses mathematical reasoning through reinforced Evol-Instruct. Its title names a specific adaptation approach in a domain where Mistral reports comparative results. Mistral’s benchmarks establish how its finished base performs with examples and answer voting. WizardMath’s stated concern is how reasoning ability can be developed. The citing relationship supplies context for that research aim. It gives no shared training recipe or controlled comparison between the methods.
Math-Shepherd studies step-by-step verification and reinforcement without human annotations. The granularity is the important connection to Mistral’s math evaluation. Mistral combines candidate answers for a final scored decision. Correctness at the level of a solution step would expose where a chain of reasoning succeeds or fails before its final answer is produced. The later title makes stepwise verification explicit. It does not establish that Mistral’s majority-vote procedure was reused or changed in the later work.
Is Your Code Generated by ChatGPT Really Correct? investigates rigorous evaluation of generated programs. The question connects directly to how a code result in Mistral should be read. Mistral compares a general release with a coding specialist on specified benchmarks and uses a hand-verified subset in one of them. A study centered on correctness emphasizes how much the evaluation design determines what a programming result establishes. The citation leaves open which Mistral outputs or benchmark comparisons the later work used.
The Qwen2.5-Coder technical report and StarCoder 2 and The Stack v2 cite Mistral from work focused on code. Their titles identify a coding release in the former case and a release presented alongside The Stack in the latter. The Mistral comparison with Code Llama makes the distinction between general and specialized performance visible on common tests. Further coding releases give that comparison new points of reference. Any claim about their scores relative to Mistral would need common tasks and procedures or evidence that the later authors reran the comparison.
The connection across mathematics and code is primarily an evaluation question. A broad study can establish that a compact system reaches useful performance across both domains. Dedicated work can give individual tasks richer evidence about how outcomes arise, how training material is constructed or how correctness is checked. A solution trace and a program each admit tests more specific than a broad category average. The later works’ subjects make these finer questions explicit, without changing what the original benchmark comparison measures.
More demanding benchmarks and more specific safety tests
MMLU-Pro presents a more robust and challenging multitask language understanding benchmark. It connects to a measurement with a special role in the Mistral paper. MMLU helps the authors compare performance across releases and estimate where Mistral falls relative to the Llama 2 size curve. A changed benchmark gives an opportunity to ask how well an ordering established under the earlier tasks carries over. It would generate a new result for the later benchmark under its own conditions.
HarmBench addresses standardized automated red teaming and robust refusal. Red teaming in this context is evaluation designed to challenge safeguards. The connection is to the unsafe prompt test in Mistral, which demonstrates behavior under a recommended system instruction for a defined collection of requests. The later work makes standardization and robustness explicit goals. Those goals matter when comparing refusal behavior across different systems or safeguard configurations, because the questions used to test safeguards determine how demanding the test is.
XSTest targets exaggerated safety behavior. Its focus makes a broader testing problem out of the utility issue illustrated by the Linux example in Mistral. A benign request can share wording with a harmful one while calling for ordinary assistance. Testing such requests can show where a safeguard is applied too widely. The citation connects the two works through that evaluation concern. It does not establish that the later suite adopted the illustration or that it produced a particular result for Mistral.
The two safety titles address complementary observations in the original paper. Refusing harmful requests is one behavior to measure. Answering acceptable requests under the same standing instructions is another. A procedure can perform well in the former setting while its value to users still depends on the latter. Mistral demonstrates both concerns at different scales in its evidence. HarmBench and XSTest identify separate testing programs in which those concerns can be examined more systematically.
Applications beyond the original task suite
FinGPT concerns open systems for financial applications, and MEDITRON-70B focuses on scaling medical pretraining. They connect the general release literature to settings where subject matter shapes what questions are worth asking. Mistral’s broad test suite compares systems across general capabilities. The existence of a domain-specific study makes a different evaluation question visible, concerning performance on the material and tasks that matter within that domain. Neither citing title identifies a particular Mistral component transferred into the domain system.
Improving Text Embeddings with Large Language Models studies text embeddings, representations of text that can be used by another procedure. This gives an application for a language system beyond producing an answer directly. Mistral reports the quality of completed outputs on its benchmarks and the costs of the attention used to generate text. An embedding study gives the representation an evaluative role of its own. The citation leaves open the exact place of Mistral in the later method.
Large Language Models are Zero-Shot Rankers for Recommender Systems examines whether such a system can rank recommendations in a zero-shot setting. Ranking asks for a relative ordering of candidates. The Mistral paper’s evaluation uses zero-shot prompts for some tasks, with other tasks given demonstrations. The shared idea of testing a capability directly through a prompt carries into a different output format in recommendation. The later title identifies that format and setting. It supplies no result for Mistral on recommendation tasks.
Large Language Models for Information Retrieval surveys their role in search and retrieval. This provides a different context for Mistral’s distinction between knowledge questions answered under the supplied prompt and reading questions that provide material to use. In a retrieval application, finding relevant material can itself be part of the task. The Mistral paper evaluates answers with the context conditions fixed by its benchmarks. The citing survey places language systems in a setting where the selection and use of material are broader research concerns.
MVBench addresses multimodal video understanding. Its stated task concerns inputs and evaluations beyond the text and code setups of the Mistral benchmark program. A citation in that setting shows the reach of the release paper as a point of reference. It supplies no evidence that Mistral was evaluated on video or that local attention in the original release solves the problems posed by a video benchmark. Those claims would require a method and results specific to that input.
Across these later works, the most direct continuities are questions that remain identifiable when the releases, tasks or deployment settings change. Sarathi-Serve makes the cost of handling requests an explicit serving problem. MMLU-Pro revisits how broad task capability is measured. XSTest examines the loss of useful assistance that an overbroad safeguard can cause. The work on post-training and specialized domains asks what an open base can support after release. These are separate ways to carry forward the research program around a compact, adaptable system whose practical value depends on both the quality of its answers and the conditions under which it produces them.
Cite
Cite as Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix and William El Sayed. 2023. Mistral 7B. arXiv:2310.06825.
@misc{jiang2023mistral,
title = {{Mistral 7B}},
author = {Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego {de las Casas}, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven {Le Scao}, Thibaut Lavril, Thomas Wang, Timothée Lacroix and William {El Sayed}},
year = {2023},
doi = {10.48550/arxiv.2310.06825},
eprint = {2310.06825},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2310.06825}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/jiang-2023-mistral-7b/
References
- Joshua Ainslie, James Lee-Thorp, Michiel de Jong, Yury Zemlyanskiy, Federico Lebrón, and Sumit Sanghai. Gqa: Training generalized multi-query transformer models from multi-head checkpoints. arXiv preprint arXiv:2305.13245, 2023. our card
- Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021. our card
- Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150, 2020. our card
- Yonatan Bisk, Rowan Zellers, Jianfeng Gao, Yejin Choi, et al. Piqa: Reasoning about physical commonsense in natural language. In Proceedings of the AAAI conference on artificial intelligence, 2020. our card
- Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. our card
- Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019. our card
- Eunsol Choi, He He, Mohit Iyyer, Mark Yatskar, Wen-tau Yih, Yejin Choi, Percy Liang, and Luke Zettlemoyer. Quac: Question answering in context. arXiv preprint arXiv:1808.07036, 2018. our card
- Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. Boolq: Exploring the surprising difficulty of natural yes/no questions. arXiv preprint arXiv:1905.10044, 2019. our card
- Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv:1803.05457, 2018. our card
- Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021. our card
- Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. FlashAttention: Fast and memory-efficient exact attention with IO-awareness. In Advances in Neural Information Processing Systems, 2022. OpenAlex ↗ · Scholar ↗
- Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300, 2020. our card
- Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021. our card
- Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Thomas Hennigan, Eric Noland, Katherine Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karén Simonyan, Erich Elsen, Oriol Vinyals, Jack Rae, and Laurent Sifre. An empirical analysis of compute-optimal large language model training. In Advances in Neural Information Processing Systems, volume 35, 2022. OpenAlex ↗ · Scholar ↗
- Mandar Joshi, Eunsol Choi, Daniel S Weld, and Luke Zettlemoyer. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. arXiv preprint arXiv:1705.03551, 2017. our card
- Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453–466, 2019. our card
- Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles, 2023. our card
- Benjamin Lefaudeux, Francisco Massa, Diana Liskovich, Wenhan Xiong, Vittorio Caggiano, Sean Naren, Min Xu, Jieru Hu, Marta Tintore, Susan Zhang, Patrick Labatut, and Daniel Haziza. xformers: A modular and hackable transformer modelling library. https://github.com/facebookresearch/xformers, 2022. OpenAlex ↗ · Scholar ↗
- Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering. arXiv preprint arXiv:1809.02789, 2018. OpenAlex ↗ · Scholar ↗
- Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, et al. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950, 2023. our card
- Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Winogrande: An adversarial winograd schema challenge at scale. Communications of the ACM, 64(9):99–106, 2021. our card
- Maarten Sap, Hannah Rashkin, Derek Chen, Ronan LeBras, and Yejin Choi. Socialiqa: Commonsense reasoning about social interactions. arXiv preprint arXiv:1904.09728, 2019. our card
- Mirac Suzgun, Nathan Scales, Nathanael Schärli, Sebastian Gehrmann, Yi Tay, Hyung Won Chung, Aakanksha Chowdhery, Quoc V Le, Ed H Chi, Denny Zhou, , and Jason Wei. Challenging big-bench tasks and whether chain-of-thought can solve them. arXiv preprint arXiv:2210.09261, 2022. our card
- Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. Commonsenseqa: A question answering challenge targeting commonsense knowledge. arXiv preprint arXiv:1811.00937, 2018. our card
- Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023. our card
- Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023. our card
- Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017. our card
- Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence? arXiv preprint arXiv:1905.07830, 2019. OpenAlex ↗ · Scholar ↗
- Wanjun Zhong, Ruixiang Cui, Yiduo Guo, Yaobo Liang, Shuai Lu, Yanlin Wang, Amin Saied, Weizhu Chen, and Nan Duan. Agieval: A human-centric benchmark for evaluating foundation models. arXiv preprint arXiv:2304.06364, 2023. our card