Textbooks Are All You Need II: phi-1.5 technical report

Authors: Yuanzhi Li, Sébastien Bubeck, Ronen Eldan, Allie Del Giorno, Suriya Gunasekar, Yin Tat Lee

Submitted to arXiv on 11 Sep. 2023
License: CC BY 4.0
Abstract

We continue the investigation into the power of smaller Transformer-based language models as initiated by \textbf{TinyStories} -- a 10 million parameter model that can produce coherent English -- and the follow-up work on \textbf{phi-1}, a 1.3 billion parameter model with Python coding performance close to the state-of-the-art. The latter work proposed to use existing Large Language Models (LLMs) to generate ``textbook quality" data as a way to enhance the learning process compared to traditional web data. We follow the ``Textbooks Are All You Need" approach, focusing this time on common sense reasoning in natural language, and create a new 1.3 billion parameter model named \textbf{phi-1.5}, with performance on natural language tasks comparable to models 5x larger, and surpassing most non-frontier LLMs on more complex reasoning tasks such as grade-school mathematics and basic coding. More generally, \textbf{phi-1.5} exhibits many of the traits of much larger LLMs, both good -- such as the ability to ``think step by step" or perform some rudimentary in-context learning -- and bad, including hallucinations and the potential for toxic and biased generations -- encouragingly though, we are seeing improvement on that front thanks to the absence of web data. We open-source \textbf{phi-1.5} to promote further research on these urgent topics.

The papers around it, by date and closeness

Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper

How to read this map? Illustrated guide

Closest papers Prior work it builds on Papers that cite it

Papers around this one

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close Groundwork for this paper Cited by this paper Used in depth by this paper A method it uses
    Textbooks Are All You Need
    Suriya Gunasekar, Yi Zhang, J. Aneja et al. · 2023 · arXiv.org · preprint, not peer reviewed · cited 691 times · Not summarized yet

    Textbooks Are All You Need introduces phi-1 and textbook-quality training data, the approach phi-1.5 applies to common-sense reasoning.

    Abstract

    We introduce phi-1, a new large language model for code, with significantly smaller size than competing models: phi-1 is a Transformer-based model with 1.3B parameters, trained for 4 days on 8 A100s, using a selection of ``textbook quality"data from the web (6B tokens) and synthetically generated textbooks and exercises with GPT-3.5 (1B tokens). Despite this small scale, phi-1 attains pass@1 accuracy 50.6% on HumanEval and 55.5% on MBPP. It also displays surprising emergent properties compared to phi-1-base, our model before our finetuning stage on a dataset of coding exercises, and phi-1-small, a smaller model with 350M parameters trained with the same pipeline as phi-1 that still achieves …

  2. Close Builds on this paper Cites this paper
    Phi-4 Technical Report
    Marah Abdin, Jyoti Aneja, Harkirat Behl et al. · 2024 · Computation and Language · preprint, not peer reviewed · cited 882 times · AI summary available

    Phi-4 extends the Phi model family with a 14-billion-parameter model trained using synthetic data and data-quality-focused techniques.

    Abstract

    We present phi-4, a 14-billion parameter language model developed with a training recipe that is centrally focused on data quality. Unlike most language models, where pre-training is based primarily on organic data sources such as web content or code, phi-4 strategically incorporates synthetic data throughout the training process. While previous models in the Phi family largely distill the capabilities of a teacher model (specifically GPT-4), phi-4 substantially surpasses its teacher model on STEM-focused QA capabilities, giving evidence that our data-generation and post-training techniques go beyond distillation. Despite minimal changes to the phi-3 architecture, phi-4 achieves strong perfo…

  3. Close Review
    A Survey on Large Language Models with some Insights on their Capabilities and Limitations
    Andrea Matarazzo, Riccardo Torlone · 2025 · Computation and Language · preprint, not peer reviewed · cited 100 times · AI summary available

    The survey reviews LLM capabilities and limitations, including commonsense reasoning, code generation, and arithmetic relevant to phi-1.5.

    Abstract

    The rapid advancement of artificial intelligence, particularly with the development of Large Language Models (LLMs) built on the transformer architecture, has redefined the capabilities of natural language processing. These models now exhibit remarkable performance across various language-related tasks, such as text generation, question answering, translation, and summarization, often rivaling human-like comprehension. More intriguingly, LLMs have demonstrated emergent abilities extending beyond their core functions, showing proficiency in tasks like commonsense reasoning, code generation, and arithmetic. This survey paper explores the foundational components, scaling mechanisms, and archite…

  4. Close Broader context
    TrueTeacher: Learning Factual Consistency Evaluation with Large Language Models
    Zorik Gekhman, Jonathan Herzig, Roee Aharoni et al. · 2023 · Computation and Language · cited 119 times · AI summary available

    TrueTeacher generates synthetic training data to evaluate factual consistency, while phi-1.5 reports hallucinations as a limitation of language models.

    Abstract

    Factual consistency evaluation is often conducted using Natural Language Inference (NLI) models, yet these models exhibit limited success in evaluating summaries. Previous work improved such models with synthetic training data. However, the data is typically based on perturbed human-written summaries, which often differ in their characteristics from real model-generated summaries and have limited coverage of possible factual errors. Alternatively, large language models (LLMs) have recently shown promising results in directly evaluating generative tasks, but are too computationally expensive for practical use. Motivated by these limitations, we introduce TrueTeacher, a method for generating s…

  5. Close Broader context
    Talking About Large Language Models
    Murray Shanahan · 2022 · Computation and Language · cited 569 times · AI summary available

    Talking About Large Language Models examines anthropomorphic descriptions such as models that “think,” a trait phi-1.5 reports in its step-by-step reasoning.

    Abstract

    Thanks to rapid progress in artificial intelligence, we have entered an era when technology and philosophy intersect in interesting ways. Sitting squarely at the centre of this intersection are large language models (LLMs). The more adept LLMs become at mimicking human language, the more vulnerable we become to anthropomorphism, to seeing the systems in which they are embedded as more human-like than they really are. This trend is amplified by the natural tendency to use philosophically loaded terms, such as "knows", "believes", and "thinks", when describing these systems. To mitigate this trend, this paper advocates the practice of repeatedly stepping back to remind ourselves of how LLMs, a…

  6. Close Same method, another problem Cites this paper Uses this paper in depth
    A Comprehensive Evaluation of the Phi Family of Small Language Models in Healthcare
    R. Awasthi, S. Shree, A. Bhattad et al. · 2026 · IEEE International Conference on Healthcare Informatics · Not summarized yet

    The healthcare evaluation studies Phi-family models, including phi-1.5, for healthcare use rather than common-sense reasoning.

    Abstract

    Language Models are set to transform healthcare delivery and revolutionize digital health. Amid this transformation, one of the biggest challenge in selecting the most appropriate model. Traditionally, model selection has relied primarily on performance metrics. However, the foundation model era introduces additional selection criteria, including computational efficiency, cost, ease of use, and data privacy. Open-source Large Language Models (LLMs) are often computationally demanding, while closed-source models raise concerns regarding data privacy and API costs. To address these limitations, Small Language Models (SLMs), such as the Phi family, have been developed to improve usability and o…

  7. Close Review Cites this paper
    A Comprehensive Survey of Small Language Models in the Era of Large Language Models: Techniques, Enhancements, Applications, Collaboration with LLMs, and Trustworthiness
    Fali Wang, Zhiwei Zhang, Xianren Zhang et al. · 2025 · ACM Transactions on Intelligent Systems and Technology · cited 174 times · Not summarized yet

    The survey covers small language model techniques, applications, and trustworthiness, topics that include phi-1.5’s capabilities and risks.

    Abstract

    Large language models (LLMs) have demonstrated emergent abilities in text generation, question answering, and reasoning, facilitating various tasks and domains. Despite their proficiency in various tasks, LLMs like PaLM 540B and Llama-3.1 405B face limitations due to large parameter sizes and computational demands, often requiring cloud API use, which raises privacy concerns, limits real-time applications on edge devices, and increases fine-tuning costs. Additionally, LLMs often underperform in specialized domains such as healthcare and law due to insufficient domain-specific knowledge, necessitating specialized models. Therefore, Small Language Models (SLMs) are increasingly favored for the…

  8. Close Review
    From Code Foundation Models to Agents and Applications: A Practical Guide to Code Intelligence
    Jian Yang, Wei Zhang, Shark Liu et al. · 2025 · Software Engineering · preprint, not peer reviewed · cited 19 times · AI summary available

    The practical guide synthesizes code foundation models and applications, while phi-1.5 reports basic coding performance among its capabilities.

    Abstract

    Large language models (LLMs) have fundamentally transformed automated software development by enabling direct translation of natural language descriptions into functional code, driving commercial adoption through tools like Github Copilot (Microsoft), Cursor (Anysphere), Trae (ByteDance), and Claude Code (Anthropic). While the field has evolved dramatically from rule-based systems to Transformer-based architectures, achieving performance improvements from single-digit to over 95\% success rates on benchmarks like HumanEval. In this work, we provide a comprehensive synthesis and practical guide (a series of analytic and probing experiments) about code LLMs, systematically examining the comple…

Prior work it builds on

  1. Close Broader context A method it uses
    CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis
    E. Nijkamp, Bo Pang, Hiroaki Hayashi et al. · 2022 · International Conference on Learning Representations · cited 1,662 times · AI summary available

    CodeGen releases open language models for program synthesis, whereas phi-1.5 is a small model focused on natural-language common sense and also reports basic coding ability.

    Abstract

    Program synthesis strives to generate a computer program as a solution to a given problem specification, expressed with input-output examples or natural language descriptions. The prevalence of large language models advances the state-of-the-art for program synthesis, though limited training resources and data impede open access to such models. To democratize this, we train and release a family of large language models up to 16.1B parameters, called CODEGEN, on natural language and programming language data, and open source the training library JAXFORMER. We show the utility of the trained model by demonstrating that it is competitive with the previous state-of-the-art on zero-shot Python co…

  2. Close Groundwork for this paper
    TinyStories: How Small Can Language Models Be and Still Speak Coherent English?
    Ronen Eldan, Yuan-Fang Li · 2023 · arXiv.org · preprint, not peer reviewed · cited 584 times · Not summarized yet

    TinyStories introduced a small model producing coherent English, an investigation phi-1.5 continues with a larger model and common-sense reasoning.

    Abstract

    Language models (LMs) are powerful tools for natural language processing, but they often struggle to produce coherent and fluent text when they are small. Models with around 125M parameters such as GPT-Neo (small) or GPT-2 (small) can rarely generate coherent and consistent English text beyond a few words even after extensive training. This raises the question of whether the emergence of the ability to produce coherent English text only occurs at larger scales (with hundreds of millions of parameters or more) and complex architectures (with many layers of global attention). In this work, we introduce TinyStories, a synthetic dataset of short stories that only contain words that a typical 3 t…

  3. Related Groundwork for this paper Used in depth by this paper A method it uses
    On the Dangers of Stochastic Parrots: Can Language Models Be Too Big? 🦜
    Emily M. Bender, T. Gebru, Angelina McMillan-Major et al. · 2021 · Conference on Fairness, Accountability and Transparency · cited 9,409 times · Not summarized yet

    Stochastic Parrots discusses risks of large language models, a concern phi-1.5 also raises by reporting toxic, biased, and hallucinated outputs.

    Abstract

    The past 3 years of work in NLP have been characterized by the development and deployment of ever larger language models, especially for English. BERT, its variants, GPT-2/3, and others, most recently Switch-C, have pushed the boundaries of the possible both through architectural innovations and through sheer size. Using these pretrained models and the methodology of fine-tuning them for specific tasks, researchers have extended the state of the art on a wide array of tasks as measured by leaderboards on specific benchmarks for English. In this paper, we take a step back and ask: How big is too big? What are the possible risks associated with this technology and what paths are available for …

  4. Close Broader context
    PaLM: Scaling Language Modeling with Pathways
    Aakanksha Chowdhery, Sharan Narang, Jacob Devlin et al. · 2022 · Computation and Language · cited 8,589 times · AI summary available

    PaLM studies how scaling affects few-shot learning, whereas phi-1.5 investigates capabilities achieved by a much smaller model.

    Abstract

    Large language models have been shown to achieve remarkable performance across a variety of natural language tasks using few-shot learning, which drastically reduces the number of task-specific training examples needed to adapt the model to a particular application. To further our understanding of the impact of scale on few-shot learning, we trained a 540-billion parameter, densely activated, Transformer language model, which we call Pathways Language Model PaLM. We trained PaLM on 6144 TPU v4 chips using Pathways, a new ML system which enables highly efficient training across multiple TPU Pods. We demonstrate continued benefits of scaling by achieving state-of-the-art few-shot learning resu…

  5. Close Broader context A method it uses
    LLaMA: Open and Efficient Foundation Language Models
    Hugo Touvron, Thibaut Lavril, Gautier Izacard et al. · 2023 · arXiv.org · preprint, not peer reviewed · cited 22,512 times · AI summary available

    LLaMA demonstrates capable language models trained on public data, while phi-1.5 explores performance from textbook-quality data at smaller scale.

    Abstract

    We introduce LLaMA, a collection of foundation language models ranging from 7B to 65B parameters. We train our models on trillions of tokens, and show that it is possible to train state-of-the-art models using publicly available datasets exclusively, without resorting to proprietary and inaccessible datasets. In particular, LLaMA-13B outperforms GPT-3 (175B) on most benchmarks, and LLaMA-65B is competitive with the best models, Chinchilla-70B and PaLM-540B. We release all our models to the research community.

Papers that cite it

  1. Close Same method, another problem
    LLaVA-Phi: Efficient Multi-Modal Assistant with Small Language Model
    Yichen Zhu, Minjie Zhu, Ning Liu et al. · 2024 · cited 93 times · Not summarized yet

    LLaVA-Phi uses the Phi-2 small language model in a multimodal assistant, applying the Phi model family to visual dialogue.

    Abstract

    In this paper, we introduce LLaVA-φ (LLaVA-Phi), an efficient multi-modal assistant that harnesses the power of the recently advanced small language model, Phi-2, to facilitate multi-modal dialogues. LLaVA-Phi marks a notable advancement in the realm of compact multi-modal models. It demonstrates that even smaller language models, with as few as 2.7B parameters, can effectively engage in intricate dialogues that integrate both textual and visual elements, provided they are trained with high-quality corpora. Our model delivers commendable performance on publicly available benchmarks that encompass visual comprehension, reasoning, and knowledge-based perception. Beyond its remarkable performan…

  2. Close Review
    Large language models meet NLP: a survey
    Libo Qin, Qiguang Chen, Xiachong Feng et al. · 2026 · Frontiers of Computer Science · cited 127 times · Not summarized yet

    The survey maps LLM applications across NLP tasks, a broad context for phi-1.5’s natural-language reasoning capabilities.

    Abstract

    Abstract While large language models (LLMs) like ChatGPT have shown impressive capabilities in Natural Language Processing (NLP) tasks, a systematic investigation of their potential in this field remains largely unexplored. This study aims to address this gap by exploring the following questions. (1) How are LLMs currently applied to NLP tasks in the literature ? (2) Have traditional NLP tasks already been solved with LLMs ? (3) What is the future of the LLMs for NLP ? To answer these questions, we take the first step to provide a comprehensive overview of LLMs in NLP. Specifically, we first introduce a unified taxonomy including (1) parameter-frozen paradigm and (2) parameter-tuning paradig…

  3. Close Review
    Implicit Reasoning in Large Language Models: A Comprehensive Survey
    Jin-Dong Li, Ya-Li Fu, Liwen Fan et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 50 times · Not summarized yet

    The survey examines implicit reasoning in LLMs, while phi-1.5 reports explicit step-by-step reasoning as an emergent capability.

    Abstract

    Large Language Models (LLMs) have demonstrated strong generalization across a wide range of tasks. Reasoning with LLMs is central to solving multi-step problems and complex decision-making. To support efficient reasoning, recent studies have shifted attention from explicit chain-of-thought prompting toward implicit reasoning, where reasoning occurs silently via latent structures without emitting intermediate textual steps. Implicit reasoning brings advantages such as lower generation cost, faster inference, and better alignment with internal computation. Although prior surveys have discussed latent representations in the context of reasoning, a dedicated and mechanism-level examination of ho…

  4. Related Review Uses this paper in depth
    Open-Ethical AI: Advancements in Open-Source Human-Centric Neural Language Models
    S. Sicari, Jesus F. Cevallos M., A. Rizzardi et al. · 2024 · ACM Computing Surveys · cited 9 times · Not summarized yet

    The survey reviews methods for open-source models’ alignment and trustworthiness, concerns relevant to phi-1.5’s reported toxic and biased generations.

    Abstract

    This survey summarises the most recent methods for building and assessing helpful, honest, and harmless neural language models, considering small, medium, and large-size models. Pointers to open-source resources that help to align pre-trained models are given, including methods that use parameter-efficient techniques, specialized prompting frameworks, adapter modules, case-specific knowledge injection, and adversarially robust training techniques. Special care is given to evidencing recent progress on value alignment, commonsense reasoning, factuality enhancement, and abstract reasoning of language models. Most reviewed works in this survey publicly shared their code and related data and wer…

  5. Close Same question
    Dissecting Physics Reasoning in Small Language Models: A Multi-Dimensional Analysis from an Educational Perspective
    Nicy Scaria, Silvester John Joseph Kennedy, Krishna Agarwal et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 2 times · Not summarized yet

    The study evaluates small language models’ multistep reasoning on physics problems, while phi-1.5 evaluates reasoning on common sense and grade-school mathematics.

    Abstract

    Small Language Models (SLMs) offer privacy and efficiency for educational deployment, yet their utility depends on reliable multistep reasoning. Existing benchmarks often prioritize final answer accuracy, obscuring'right answer, wrong procedure'failures that can reinforce student misconceptions. This work investigates SLM physics reasoning reliability, stage wise failure modes, and robustness under paired contextual variants. We introduce Physbench, comprising of 3,162 high school and AP level physics questions derived from OpenStax in a structured reference solution format with Bloom's Taxonomy annotations, plus 2,700 paired culturally contextualized variants. Using P-REFS, a stage wise eva…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 5 November 2026.

The illustrated guide to the papers around a paper