Will future LLMs be based almost entirely on synthetic training data? In a new paper, we introduce TinyStories, a dataset of short stories generated by GPT-3.5&4. We use it to train tiny LMs (< 10M params) that produce fluent stories and exhibit reasoning.
High-quality synthetic datasets strike again. Following up on the technique of TinyStories (and many new ideas on top) at
@MSFTResearch
we curated textbook-quality training data for coding. The results beat our expectations.
For skeptics- model will be on HF soon, give it a try.
New LLM in town:
***phi-1 achieves 51% on HumanEval w. only 1.3B parameters & 7B tokens training dataset***
Any other >50% HumanEval model is >1000x bigger (e.g., WizardCoder from last week is 10x in model size and 100x in dataset size).
How?
***Textbooks Are All You Need***
Can we make LLMs unlearn a subset of their training data? In a joint project with
@markrussinovich
, we took Llama2-7b and in 30 minutes of fine-tuning, made it forget the Harry Potter universe while keeping its performance on common benchmarks intact:
Phi-1 is finally out, and there's a bonus: In addition to coding, we also synthesized (loads of) textbooks about... life.
We're releasing *Phi-1.5*, a 1.3B model which outperforms llama2-7b in most common sense reasoning benchmarks. Avail on HF!
Grateful for the invitation to speak at "Current Developments in Mathematics" - a forum that exemplifies the pinnacle of mathematical discourse, jointly hosted by
@Harvard
and
@MIT
. Attached is my open letter addressing a difficult but necessary decision regarding it.
Our new phi-2 model, trained on textbook-quality synthetic data (based on the textbooks-are-all-you-need / TinyStories approach), was just announced by
@satyanadella
at
#MSIgnite
.
Microsoft💜Open Source + SLMs!!!!!
We're so excited to announce our new *phi-2* model that was just revealed at
#MSIgnite
by
@satyanadella
!
At 2.7B size, phi-2 is much more robust than phi-1.5 and reasoning capabilities are greatly improved too. Perfect model to be fine-tuned!
New video by
@EldanRonen
on his TinyStories work w. Yuanzhi Li!
Even Deep Learning experts such as
@karpathy
referred to the work as "inspiring", and I couldn't agree more. Anyone interested in understanding what's happening with LLMs should take a look.
To be proactive about some anticipated critique or skepticism: First and foremost, the models are on
@huggingface
and you're more than welcome to test them yourself.
Reasoning capabilities: We only argue that the models exhibit some basic reasoning, when put in correct context. Of course they are not comparable with the reasoning capabilities of LLMs. The main point is that our models still outperform much larger models in many aspects.
@yoavgo
If you read the paper you'll notice that the llm grading is done *in addition* to standard benchmarks, as another way to check that we're not overfitting to them. Moreover, llm grading overcomes pass/fail dichotomy which many times gives a low grade due to small mistakes.
The dataset consists of stories that follow a common structure, and the models can only generate stories that adhere to it. For instance, you can't just query the model with a question, you need to frame it as a dialogue that could fit in a story.
"Who better to write for an audience of small language models than large ones?"
Pretty much the perfect way to summarize TinyStories (and the emerging related research direction), as put by
@benbenbrubaker
in a
@QuantaMagazine
piece about the paper:
@KerbalFPV
Thanks! We're working on sharing the training code (it's a pretty big mess at this point and using MSFT-specific stuff). But all in all the training is completely vanilla, you can just use the
@huggingface
trainer with a GPT-NEO architecture.
@SebastienBubeck
Another nice side to the story is that it shows that sometimes it's better for science that people upload a paper that has a good idea but also a mistake (even a major one they can't fix), rather than find the mistake, which here would have probably led to the idea being lost.
@visarga
Your estimates are pretty accurate. The dataset the models were trained on has 1.5M examples and 400M tokens, but I think you can do a few epochs over a smaller dataset and still get good results.
I really enjoyed talking to
@labenz
about
#TinyStories
on
@CogRev_Podcast
. His questions were super insightful! (Pro tip: We're very slow speakers, you should probably listen at 1.5x speed)
[new episode]
@labenz
hosts
@EldanRonen
and Yuanzhi Li of
@MSFTResearch
to discuss TinyStories and what small datasets can teach us about how LMs work.
This discussion is for anyone who wants to deepen their understanding + dive into reasoning, interpretability + emergence.
Given all the amazing progress on AI in 2023, it's really cool to see that TinyStories and the Phi models are mentioned in the State of AI report by
@nathanbenaich
!
Beyond the excitement of the LLM vibesphere, researchers, including from
@Microsoft
have been exploring the possibility of small language models, finding that models trained with highly specialized datasets can rival 50x larger competitors.
@yoavgo
There's a reason that in coding exams/interviews, grades are not only based on whether the code passes unit tests, but rather a human reads through the code and determines the level of understanding reflected from it.
@yoavgo
@TheXeophon
Indeed it's not the main point of the work. I didn't expect there'd be so many objections to it (in coding as well). Sure, it's not great as a universal benchmark, but when locally comparing between models, so far I didn't see any critique that I was not able to counter
@labenz
While the potential threat by AI is largely speculative, the possibility that social networks would play a major role in leading to a major war through polarization and spread of misinformation appears increasingly realistic. Yet we seem to be focusing more on the former.
@jacob_rintamaki
We'll add an appendix with more details in next version. It's not easy to estimate the size of dataset that you would need. What's the number of tokens in a short robotics program, more or less?
@MarkTan72526562
Depends what you try to achieve, it's a matter of width vs. depth, really. TinyStories has nontrivial depth, but is in a sense as narrow as possible.
@JimRice1111
@markrussinovich
Well RLHF guardrails are much easier to remove- just finetune the model to start any response with "Certainly, here...". On the other hand with unlearning you can just erase the knowledge related to lethal pathologens which would be much safer than RLHF
"Are the models just memorizing stories or are they actually creating novel ones?" - We have a section in the paper that provides evidence that it's the latter. However, probably the best way to be convinced here is to simply interact with the models.
@yar_vol
@satyanadella
Note that for phi-1.5 we mainly used GPT-3.5. Very soon I think we'll see open-source models that are good enough to produce high-quality training data (instruction finetuning should not be crucial if you prompt the model correctly)
@yoavgo
imo the bigger problem with humaneval and other commonly used benchmarks btw is that many questions have clearly been memorized (prime factorization appears hundreds of times in the training set, for example), and the distribution of the level of difficulty is not great.
@TheXeophon
@natolambert
@satyanadella
There are of course many other tricks besides asking for specific words to obtain a dataset that is both diverse and its samples have a "high educational value", but I think the TinyStories example gives a good idea for how it can be done.
@ZelaLabs
Looks to me like a really good direction to try. I assume you mean <10M params? My hunch is that it would be able to capture good heuristics related to those grades, and that finetuning w/ reward model won't improve the model overall, but ->
@ZelaLabs
In that case my hunch is that the model will only find heuristics which are correlated with those grades, but will not be good enough to spot nuances (for example, determining if a story is "creative" is not a straightforward task at all...).
@ZelaLabs
It could for example improve the model's creativity on the expense of less consistency.
One thing that I'm sure would work is "alignment" in the form of preventing the model from generating unhappy endings (for example) via a reward model.
@davidmanheim
@anderssandberg
Very nice theoretical result, but do you think such rank one updates could make a model forget an entire topic without affecting its performance otherwise? Would love to see a PoC.
@davidmanheim
@anderssandberg
There are only so many rank-1 perturbations you can do to a matrix w/o completely changing it, which makes me a bit skeptic that this is scalable to a large number of changes. Another problem that I see is that the lookup keys will not be specific enough causing collateral damage
@yoavgo
I agree with all that. Nevertheless, having GPT-eval scores in addition to the unit tests can give useful information, especially if you use it to evaluate the effect of small tweaks to the architecture/dataset. For such comparisons, it doesn't matter so much if it's calibrated.
@andersonbcdefg
@pratyushmaini
Let me just point out that if phi-1.5 assigns zero probability to some tokens corresponding to HTML tags (like </TD> for example), this will shoot the perplexity to a very high value. This is another reason why high perplexity doesn't point to anything here.