[Paper Review] Textbooks Are All You Need II: phi-1.5 technical report
A 1.3B parameter Transformer (phi-1.5) trained primarily on synthetic textbook-like data achieves comparable common sense and language understanding to larger models and excels at multi-step reasoning and coding, with open-source release to aid research on instruction following, bias, and hallucinations.
We continue the investigation into the power of smaller Transformer-based language models as initiated by extbf{TinyStories} -- a 10 million parameter model that can produce coherent English -- and the follow-up work on extbf{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 extbf{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, extbf{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 extbf{phi-1.5} to promote further research on these urgent topics.
Motivation & Objective
- Investigate how small LLMs can achieve high-level capabilities using synthetic textbook-style data.
- Assess phi-1.5's performance on common sense reasoning, language tasks, and multi-step reasoning compared to larger models.
- Explore the role of data quality vs. scale and the impact of using filtered web data.
- Examine safety, toxicity, and bias characteristics of phi-1.5 relative to web-trained baselines.
- Open-source the model to enable research on in-context learning, interpretability, and safety.
Proposed method
- Construct phi-1.5, a 1.3B-parameter Transformer with 24 layers, 32 heads, context length 2048.
- Train on ~30B tokens composed of 7B from phi-1 plus ~20B synthetic textbook-like data; 80% synthetic data, 20% phi-1 data.
- Use training setup: constant learning rate 2e-4, weight decay 0.1, Adam with (0.9,0.98) momentum, fp16, DeepSpeed ZeRO-2, batch size 2048.
- Create variants phi-1.5-web-only and phi-1.5-web trained on filtered web data (~95B tokens) and a mixed dataset with 40/20/40 proportions (web/synthetic/code).
- Evaluate zero-shot and few-shot performance on common sense benchmarks (WinoGrande, ARC-Easy, ARC-Challenge, BoolQ, SIQA), language understanding benchmarks (PIQA, Hellaswag, OpenBookQA, SQuAD, MMLU), and multi-step reasoning benchmarks (GSM8K, HumanEval/MBPP).
- Compare against open-source baselines (Llama2-7B, Vicuna-13B, Falcon-7B, etc.) and report effects of web data vs. synthetic data on performance.
![Figure 1 : Benchmark results comparing phi-1.5 , its version enhanced with filtered web data phi-1.5-web , and other state-of-the-art open-source LLMs. Sizes range from phi-1.5 ’s 1.3 billion parameters (Falcon-RW-1.3B [ PMH + 23 ] ) to 10x larger models like Vicuna-13B [ ZCS + 23 ] , a fine-tuned v](https://ar5iv.labs.arxiv.org/html/2309.05463/assets/x1.png)
Experimental results
Research questions
- RQ1How far can a 1.3B-parameter LLM trained primarily on synthetic textbook-like data scale in capability to match or exceed larger models?
- RQ2Does synthetic/textbook-quality data reduce toxic content and bias propensity compared to web data?
- RQ3What is the impact of adding filtered web data on common sense reasoning, coding, and multi-step reasoning tasks?
- RQ4Can a smaller model retain high performance in both natural language tasks and coding without instruction fine-tuning or RLHF?
- RQ5What are the practical implications of data quality vs. scale for developing capable, open-source LLMs?
Key findings
- phi-1.5 matches common sense reasoning and language tasks of models an order of magnitude larger and surpasses many non-frontier LLMs on multi-step reasoning.
- phi-1.5-web-only, trained on filtered web data, already outperforms similar-sized models on common sense benchmarks.
- When trained with synthetic data plus phi-1 data (phi-1-web), performance approaches that of models 5x larger on reasoning tasks.
- phi-1.5 exhibits step-by-step thinking and rudimentary in-context learning abilities but also hallucinations and biases similar to larger models; toxicity is reduced relative to web-data baselines due to synthetic data focus.
- Open-sourcing phi-1.5 enables research on in-context learning, interpretability, and mitigation of hallucinations and biased outputs.
![Figure 2 : Safety scores computed on 13 demographics from ToxiGen [ HGP + 22 ] . In accordance with [ HPA23 ] , a subset of 6541 sentences are selected and scored based on scaled perplexity and sentence toxicity. Scores range from 0 to 1, where a higher score indicates the model is less likely to pr](https://ar5iv.labs.arxiv.org/html/2309.05463/assets/x2.png)
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.