language_modeling.md 20.4 KB
Newer Older
1
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Steven Liu's avatar
Steven Liu committed
2
3
4
5
6
7
8
9
10

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
11
12
13
14

鈿狅笍 Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.

Steven Liu's avatar
Steven Liu committed
15
16
-->

17
# Causal language modeling
Steven Liu's avatar
Steven Liu committed
18

19
[[open-in-colab]]
Steven Liu's avatar
Steven Liu committed
20

21
22
23
There are two types of language modeling, causal and masked. This guide illustrates causal language modeling.
Causal language models are frequently used for text generation. You can use these models for creative applications like
choosing your own text adventure or an intelligent coding assistant like Copilot or CodeParrot.
Steven Liu's avatar
Steven Liu committed
24

25
<Youtube id="Vpjb1lu0MDk"/>
Steven Liu's avatar
Steven Liu committed
26

27
28
Causal language modeling predicts the next token in a sequence of tokens, and the model can only attend to tokens on
the left. This means the model cannot see future tokens. GPT-2 is an example of a causal language model.
Steven Liu's avatar
Steven Liu committed
29

30
This guide will show you how to:
Steven Liu's avatar
Steven Liu committed
31

32
1. Finetune [DistilGPT2](https://huggingface.co/distilbert/distilgpt2) on the [r/askscience](https://www.reddit.com/r/askscience/) subset of the [ELI5](https://huggingface.co/datasets/eli5) dataset.
33
2. Use your finetuned model for inference.
Steven Liu's avatar
Steven Liu committed
34

35
<Tip>
36
37
38
39
You can finetune other architectures for causal language modeling following the same steps in this guide.
Choose one of the following architectures:

<!--This tip is automatically generated by `make fix-copies`, do not fill manually!-->
Yoach Lacombe's avatar
Yoach Lacombe committed
40
[BART](../model_doc/bart), [BERT](../model_doc/bert), [Bert Generation](../model_doc/bert-generation), [BigBird](../model_doc/big_bird), [BigBird-Pegasus](../model_doc/bigbird_pegasus), [BioGpt](../model_doc/biogpt), [Blenderbot](../model_doc/blenderbot), [BlenderbotSmall](../model_doc/blenderbot-small), [BLOOM](../model_doc/bloom), [CamemBERT](../model_doc/camembert), [CodeLlama](../model_doc/code_llama), [CodeGen](../model_doc/codegen), [Cohere](../model_doc/cohere), [CPM-Ant](../model_doc/cpmant), [CTRL](../model_doc/ctrl), [Data2VecText](../model_doc/data2vec-text), [ELECTRA](../model_doc/electra), [ERNIE](../model_doc/ernie), [Falcon](../model_doc/falcon), [Fuyu](../model_doc/fuyu), [Gemma](../model_doc/gemma), [GIT](../model_doc/git), [GPT-Sw3](../model_doc/gpt-sw3), [OpenAI GPT-2](../model_doc/gpt2), [GPTBigCode](../model_doc/gpt_bigcode), [GPT Neo](../model_doc/gpt_neo), [GPT NeoX](../model_doc/gpt_neox), [GPT NeoX Japanese](../model_doc/gpt_neox_japanese), [GPT-J](../model_doc/gptj), [LLaMA](../model_doc/llama), [Mamba](../model_doc/mamba), [Marian](../model_doc/marian), [mBART](../model_doc/mbart), [MEGA](../model_doc/mega), [Megatron-BERT](../model_doc/megatron-bert), [Mistral](../model_doc/mistral), [Mixtral](../model_doc/mixtral), [MPT](../model_doc/mpt), [MusicGen](../model_doc/musicgen), [MusicGen Melody](../model_doc/musicgen_melody), [MVP](../model_doc/mvp), [OpenLlama](../model_doc/open-llama), [OpenAI GPT](../model_doc/openai-gpt), [OPT](../model_doc/opt), [Pegasus](../model_doc/pegasus), [Persimmon](../model_doc/persimmon), [Phi](../model_doc/phi), [PLBart](../model_doc/plbart), [ProphetNet](../model_doc/prophetnet), [QDQBert](../model_doc/qdqbert), [Qwen2](../model_doc/qwen2), [Reformer](../model_doc/reformer), [RemBERT](../model_doc/rembert), [RoBERTa](../model_doc/roberta), [RoBERTa-PreLayerNorm](../model_doc/roberta-prelayernorm), [RoCBert](../model_doc/roc_bert), [RoFormer](../model_doc/roformer), [RWKV](../model_doc/rwkv), [Speech2Text2](../model_doc/speech_to_text_2), [StableLm](../model_doc/stablelm), [Starcoder2](../model_doc/starcoder2), [Transformer-XL](../model_doc/transfo-xl), [TrOCR](../model_doc/trocr), [Whisper](../model_doc/whisper), [XGLM](../model_doc/xglm), [XLM](../model_doc/xlm), [XLM-ProphetNet](../model_doc/xlm-prophetnet), [XLM-RoBERTa](../model_doc/xlm-roberta), [XLM-RoBERTa-XL](../model_doc/xlm-roberta-xl), [XLNet](../model_doc/xlnet), [X-MOD](../model_doc/xmod)
RaymondLi0's avatar
RaymondLi0 committed
41

42

Steven Liu's avatar
Steven Liu committed
43

44
45

<!--End of the generated tip-->
Steven Liu's avatar
Steven Liu committed
46
47
48

</Tip>

49
50
51
52
53
54
Before you begin, make sure you have all the necessary libraries installed:

```bash
pip install transformers datasets evaluate
```

55
We encourage you to log in to your Hugging Face account so you can upload and share your model with the community. When prompted, enter your token to log in:
56
57
58
59
60
61
62

```py
>>> from huggingface_hub import notebook_login

>>> notebook_login()
```

Steven Liu's avatar
Steven Liu committed
63
64
## Load ELI5 dataset

65
Start by loading the first 5000 examples from the [ELI5-Category](https://huggingface.co/datasets/eli5_category) dataset with the 馃 Datasets library. This'll give you a chance to experiment and make sure everything works before spending more time training on the full dataset.
Steven Liu's avatar
Steven Liu committed
66
67
68
69

```py
>>> from datasets import load_dataset

70
>>> eli5 = load_dataset("eli5_category", split="train[:5000]")
Steven Liu's avatar
Steven Liu committed
71
72
```

73
Split the dataset's `train` split into a train and test set with the [`~datasets.Dataset.train_test_split`] method:
Steven Liu's avatar
Steven Liu committed
74
75

```py
76
>>> eli5 = eli5.train_test_split(test_size=0.2)
Steven Liu's avatar
Steven Liu committed
77
78
79
80
81
82
```

Then take a look at an example:

```py
>>> eli5["train"][0]
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{'q_id': '7h191n',
 'title': 'What does the tax bill that was passed today mean? How will it affect Americans in each tax bracket?',
 'selftext': '',
 'category': 'Economics',
 'subreddit': 'explainlikeimfive',
 'answers': {'a_id': ['dqnds8l', 'dqnd1jl', 'dqng3i1', 'dqnku5x'],
  'text': ["The tax bill is 500 pages long and there were a lot of changes still going on right to the end. It's not just an adjustment to the income tax brackets, it's a whole bunch of changes. As such there is no good answer to your question. The big take aways are: - Big reduction in corporate income tax rate will make large companies very happy. - Pass through rate change will make certain styles of business (law firms, hedge funds) extremely happy - Income tax changes are moderate, and are set to expire (though it's the kind of thing that might just always get re-applied without being made permanent) - People in high tax states (California, New York) lose out, and many of them will end up with their taxes raised.",
   'None yet. It has to be reconciled with a vastly different house bill and then passed again.',
   'Also: does this apply to 2017 taxes? Or does it start with 2018 taxes?',
   'This article explains both the House and senate bills, including the proposed changes to your income taxes based on your income level. URL_0'],
  'score': [21, 19, 5, 3],
  'text_urls': [[],
   [],
   [],
   ['https://www.investopedia.com/news/trumps-tax-reform-what-can-be-done/']]},
 'title_urls': ['url'],
 'selftext_urls': ['url']}
Steven Liu's avatar
Steven Liu committed
100
101
```

102
103
While this may look like a lot, you're only really interested in the `text` field. What's cool about language modeling
tasks is you don't need labels (also known as an unsupervised task) because the next word *is* the label.
Steven Liu's avatar
Steven Liu committed
104
105
106
107
108

## Preprocess

<Youtube id="ma1TrR7gE7I"/>

109
The next step is to load a DistilGPT2 tokenizer to process the `text` subfield:
Steven Liu's avatar
Steven Liu committed
110
111
112
113

```py
>>> from transformers import AutoTokenizer

114
>>> tokenizer = AutoTokenizer.from_pretrained("distilbert/distilgpt2")
Steven Liu's avatar
Steven Liu committed
115
116
```

117
You'll notice from the example above, the `text` field is actually nested inside `answers`. This means you'll need to
V.Prasanna kumar's avatar
V.Prasanna kumar committed
118
extract the `text` subfield from its nested structure with the [`flatten`](https://huggingface.co/docs/datasets/process#flatten) method:
Steven Liu's avatar
Steven Liu committed
119
120
121
122

```py
>>> eli5 = eli5.flatten()
>>> eli5["train"][0]
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{'q_id': '7h191n',
 'title': 'What does the tax bill that was passed today mean? How will it affect Americans in each tax bracket?',
 'selftext': '',
 'category': 'Economics',
 'subreddit': 'explainlikeimfive',
 'answers.a_id': ['dqnds8l', 'dqnd1jl', 'dqng3i1', 'dqnku5x'],
 'answers.text': ["The tax bill is 500 pages long and there were a lot of changes still going on right to the end. It's not just an adjustment to the income tax brackets, it's a whole bunch of changes. As such there is no good answer to your question. The big take aways are: - Big reduction in corporate income tax rate will make large companies very happy. - Pass through rate change will make certain styles of business (law firms, hedge funds) extremely happy - Income tax changes are moderate, and are set to expire (though it's the kind of thing that might just always get re-applied without being made permanent) - People in high tax states (California, New York) lose out, and many of them will end up with their taxes raised.",
  'None yet. It has to be reconciled with a vastly different house bill and then passed again.',
  'Also: does this apply to 2017 taxes? Or does it start with 2018 taxes?',
  'This article explains both the House and senate bills, including the proposed changes to your income taxes based on your income level. URL_0'],
 'answers.score': [21, 19, 5, 3],
 'answers.text_urls': [[],
  [],
  [],
  ['https://www.investopedia.com/news/trumps-tax-reform-what-can-be-done/']],
 'title_urls': ['url'],
 'selftext_urls': ['url']}
Steven Liu's avatar
Steven Liu committed
140
141
```

142
143
Each subfield is now a separate column as indicated by the `answers` prefix, and the `text` field is a list now. Instead
of tokenizing each sentence separately, convert the list to a string so you can jointly tokenize them.
Steven Liu's avatar
Steven Liu committed
144

145
Here is a first preprocessing function to join the list of strings for each example and tokenize the result:
Steven Liu's avatar
Steven Liu committed
146
147
148

```py
>>> def preprocess_function(examples):
149
...     return tokenizer([" ".join(x) for x in examples["answers.text"]])
Steven Liu's avatar
Steven Liu committed
150
151
```

152
To apply this preprocessing function over the entire dataset, use the 馃 Datasets [`~datasets.Dataset.map`] method. You can speed up the `map` function by setting `batched=True` to process multiple elements of the dataset at once, and increasing the number of processes with `num_proc`. Remove any columns you don't need:
Steven Liu's avatar
Steven Liu committed
153
154
155
156
157
158
159
160
161
162

```py
>>> tokenized_eli5 = eli5.map(
...     preprocess_function,
...     batched=True,
...     num_proc=4,
...     remove_columns=eli5["train"].column_names,
... )
```

163
This dataset contains the token sequences, but some of these are longer than the maximum input length for the model.
Steven Liu's avatar
Steven Liu committed
164

165
You can now use a second preprocessing function to
166

167
- concatenate all the sequences
168
- split the concatenated sequences into shorter chunks defined by `block_size`, which should be both shorter than the maximum input length and short enough for your GPU RAM.
Steven Liu's avatar
Steven Liu committed
169
170
171
172
173
174

```py
>>> block_size = 128


>>> def group_texts(examples):
175
...     # Concatenate all texts.
Steven Liu's avatar
Steven Liu committed
176
177
...     concatenated_examples = {k: sum(examples[k], []) for k in examples.keys()}
...     total_length = len(concatenated_examples[list(examples.keys())[0]])
178
179
180
181
182
...     # We drop the small remainder, we could add padding if the model supported it instead of this drop, you can
...     # customize this part to your needs.
...     if total_length >= block_size:
...         total_length = (total_length // block_size) * block_size
...     # Split by chunks of block_size.
Steven Liu's avatar
Steven Liu committed
183
184
185
186
187
188
189
190
191
192
193
194
195
196
...     result = {
...         k: [t[i : i + block_size] for i in range(0, total_length, block_size)]
...         for k, t in concatenated_examples.items()
...     }
...     result["labels"] = result["input_ids"].copy()
...     return result
```

Apply the `group_texts` function over the entire dataset:

```py
>>> lm_dataset = tokenized_eli5.map(group_texts, batched=True, num_proc=4)
```

197
198
Now create a batch of examples using [`DataCollatorForLanguageModeling`]. It's more efficient to *dynamically pad* the
sentences to the longest length in a batch during collation, instead of padding the whole dataset to the maximum length.
Steven Liu's avatar
Steven Liu committed
199

Sylvain Gugger's avatar
Sylvain Gugger committed
200
201
<frameworkcontent>
<pt>
202
Use the end-of-sequence token as the padding token and set `mlm=False`. This will use the inputs as labels shifted to the right by one element:
Steven Liu's avatar
Steven Liu committed
203
204
205
206
207
208
209
210

```py
>>> from transformers import DataCollatorForLanguageModeling

>>> tokenizer.pad_token = tokenizer.eos_token
>>> data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=False)
```

Sylvain Gugger's avatar
Sylvain Gugger committed
211
212
</pt>
<tf>
213
Use the end-of-sequence token as the padding token and set `mlm=False`. This will use the inputs as labels shifted to the right by one element:
Sylvain Gugger's avatar
Sylvain Gugger committed
214
215
216
217
218
219
220
221
222

```py
>>> from transformers import DataCollatorForLanguageModeling

>>> data_collator = DataCollatorForLanguageModeling(tokenizer=tokenizer, mlm=False, return_tensors="tf")
```

</tf>
</frameworkcontent>
Steven Liu's avatar
Steven Liu committed
223
224


225
## Train
Steven Liu's avatar
Steven Liu committed
226

227
228
<frameworkcontent>
<pt>
229
230
<Tip>

231
If you aren't familiar with finetuning a model with the [`Trainer`], take a look at the [basic tutorial](../training#train-with-pytorch-trainer)!
232
233

</Tip>
234

235
You're ready to start training your model now! Load DistilGPT2 with [`AutoModelForCausalLM`]:
Steven Liu's avatar
Steven Liu committed
236
237
238
239

```py
>>> from transformers import AutoModelForCausalLM, TrainingArguments, Trainer

240
>>> model = AutoModelForCausalLM.from_pretrained("distilbert/distilgpt2")
Steven Liu's avatar
Steven Liu committed
241
242
243
244
```

At this point, only three steps remain:

245
1. Define your training hyperparameters in [`TrainingArguments`]. The only required parameter is `output_dir` which specifies where to save your model. You'll push this model to the Hub by setting `push_to_hub=True` (you need to be signed in to Hugging Face to upload your model).
Steven Liu's avatar
Steven Liu committed
246
2. Pass the training arguments to [`Trainer`] along with the model, datasets, and data collator.
247
3. Call [`~Trainer.train`] to finetune your model.
Steven Liu's avatar
Steven Liu committed
248
249
250

```py
>>> training_args = TrainingArguments(
251
...     output_dir="my_awesome_eli5_clm-model",
Steven Liu's avatar
Steven Liu committed
252
253
254
...     evaluation_strategy="epoch",
...     learning_rate=2e-5,
...     weight_decay=0.01,
255
...     push_to_hub=True,
Steven Liu's avatar
Steven Liu committed
256
257
258
259
260
261
262
263
264
265
266
267
... )

>>> trainer = Trainer(
...     model=model,
...     args=training_args,
...     train_dataset=lm_dataset["train"],
...     eval_dataset=lm_dataset["test"],
...     data_collator=data_collator,
... )

>>> trainer.train()
```
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283

Once training is completed, use the [`~transformers.Trainer.evaluate`] method to evaluate your model and get its perplexity:

```py
>>> import math

>>> eval_results = trainer.evaluate()
>>> print(f"Perplexity: {math.exp(eval_results['eval_loss']):.2f}")
Perplexity: 49.61
```

Then share your model to the Hub with the [`~transformers.Trainer.push_to_hub`] method so everyone can use your model:

```py
>>> trainer.push_to_hub()
```
284
285
</pt>
<tf>
286
287
<Tip>

288
If you aren't familiar with finetuning a model with Keras, take a look at the [basic tutorial](../training#train-a-tensorflow-model-with-keras)!
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303

</Tip>
To finetune a model in TensorFlow, start by setting up an optimizer function, learning rate schedule, and some training hyperparameters:

```py
>>> from transformers import create_optimizer, AdamWeightDecay

>>> optimizer = AdamWeightDecay(learning_rate=2e-5, weight_decay_rate=0.01)
```

Then you can load DistilGPT2 with [`TFAutoModelForCausalLM`]:

```py
>>> from transformers import TFAutoModelForCausalLM

304
>>> model = TFAutoModelForCausalLM.from_pretrained("distilbert/distilgpt2")
305
306
307
```

Convert your datasets to the `tf.data.Dataset` format with [`~transformers.TFPreTrainedModel.prepare_tf_dataset`]:
Steven Liu's avatar
Steven Liu committed
308
309

```py
Matt's avatar
Matt committed
310
311
>>> tf_train_set = model.prepare_tf_dataset(
...     lm_dataset["train"],
Steven Liu's avatar
Steven Liu committed
312
313
314
315
316
...     shuffle=True,
...     batch_size=16,
...     collate_fn=data_collator,
... )

Matt's avatar
Matt committed
317
318
>>> tf_test_set = model.prepare_tf_dataset(
...     lm_dataset["test"],
Steven Liu's avatar
Steven Liu committed
319
320
321
322
323
324
...     shuffle=False,
...     batch_size=16,
...     collate_fn=data_collator,
... )
```

325
Configure the model for training with [`compile`](https://keras.io/api/models/model_training_apis/#compile-method). Note that Transformers models all have a default task-relevant loss function, so you don't need to specify one unless you want to:
326
327
328
329

```py
>>> import tensorflow as tf

330
>>> model.compile(optimizer=optimizer)  # No loss argument!
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
```

This can be done by specifying where to push your model and tokenizer in the [`~transformers.PushToHubCallback`]:

```py
>>> from transformers.keras_callbacks import PushToHubCallback

>>> callback = PushToHubCallback(
...     output_dir="my_awesome_eli5_clm-model",
...     tokenizer=tokenizer,
... )
```

Finally, you're ready to start training your model! Call [`fit`](https://keras.io/api/models/model_training_apis/#fit-method) with your training and validation datasets, the number of epochs, and your callback to finetune the model:

```py
>>> model.fit(x=tf_train_set, validation_data=tf_test_set, epochs=3, callbacks=[callback])
```

Once training is completed, your model is automatically uploaded to the Hub so everyone can use it!
</tf>
</frameworkcontent>

354
355
<Tip>

356
357
358
For a more in-depth example of how to finetune a model for causal language modeling, take a look at the corresponding
[PyTorch notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb)
or [TensorFlow notebook](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb).
359
360
361

</Tip>

362
## Inference
363
364
365
366

Great, now that you've finetuned a model, you can use it for inference!

Come up with a prompt you'd like to generate text from:
Steven Liu's avatar
Steven Liu committed
367
368

```py
369
370
>>> prompt = "Somatic hypermutation allows the immune system to"
```
Steven Liu's avatar
Steven Liu committed
371

372
373
374
375
376
The simplest way to try out your finetuned model for inference is to use it in a [`pipeline`]. Instantiate a `pipeline` for text generation with your model, and pass your text to it:

```py
>>> from transformers import pipeline

377
>>> generator = pipeline("text-generation", model="username/my_awesome_eli5_clm-model")
378
379
>>> generator(prompt)
[{'generated_text': "Somatic hypermutation allows the immune system to be able to effectively reverse the damage caused by an infection.\n\n\nThe damage caused by an infection is caused by the immune system's ability to perform its own self-correcting tasks."}]
Steven Liu's avatar
Steven Liu committed
380
381
```

382
383
384
<frameworkcontent>
<pt>
Tokenize the text and return the `input_ids` as PyTorch tensors:
Steven Liu's avatar
Steven Liu committed
385
386

```py
387
>>> from transformers import AutoTokenizer
Steven Liu's avatar
Steven Liu committed
388

389
>>> tokenizer = AutoTokenizer.from_pretrained("username/my_awesome_eli5_clm-model")
390
>>> inputs = tokenizer(prompt, return_tensors="pt").input_ids
Steven Liu's avatar
Steven Liu committed
391
392
```

393
394
Use the [`~transformers.generation_utils.GenerationMixin.generate`] method to generate text.
For more details about the different text generation strategies and parameters for controlling generation, check out the [Text generation strategies](../generation_strategies) page.
Steven Liu's avatar
Steven Liu committed
395
396

```py
397
>>> from transformers import AutoModelForCausalLM
Steven Liu's avatar
Steven Liu committed
398

399
>>> model = AutoModelForCausalLM.from_pretrained("username/my_awesome_eli5_clm-model")
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
>>> outputs = model.generate(inputs, max_new_tokens=100, do_sample=True, top_k=50, top_p=0.95)
```

Decode the generated token ids back into text:

```py
>>> tokenizer.batch_decode(outputs, skip_special_tokens=True)
["Somatic hypermutation allows the immune system to react to drugs with the ability to adapt to a different environmental situation. In other words, a system of 'hypermutation' can help the immune system to adapt to a different environmental situation or in some cases even a single life. In contrast, researchers at the University of Massachusetts-Boston have found that 'hypermutation' is much stronger in mice than in humans but can be found in humans, and that it's not completely unknown to the immune system. A study on how the immune system"]
```
</pt>
<tf>
Tokenize the text and return the `input_ids` as TensorFlow tensors:

```py
>>> from transformers import AutoTokenizer

416
>>> tokenizer = AutoTokenizer.from_pretrained("username/my_awesome_eli5_clm-model")
417
418
419
>>> inputs = tokenizer(prompt, return_tensors="tf").input_ids
```

420
Use the [`~transformers.generation_tf_utils.TFGenerationMixin.generate`] method to create the summarization. For more details about the different text generation strategies and parameters for controlling generation, check out the [Text generation strategies](../generation_strategies) page.
421
422
423
424

```py
>>> from transformers import TFAutoModelForCausalLM

425
>>> model = TFAutoModelForCausalLM.from_pretrained("username/my_awesome_eli5_clm-model")
426
>>> outputs = model.generate(input_ids=inputs, max_new_tokens=100, do_sample=True, top_k=50, top_p=0.95)
Steven Liu's avatar
Steven Liu committed
427
428
```

429
Decode the generated token ids back into text:
Steven Liu's avatar
Steven Liu committed
430
431

```py
432
433
>>> tokenizer.batch_decode(outputs, skip_special_tokens=True)
['Somatic hypermutation allows the immune system to detect the presence of other viruses as they become more prevalent. Therefore, researchers have identified a high proportion of human viruses. The proportion of virus-associated viruses in our study increases with age. Therefore, we propose a simple algorithm to detect the presence of these new viruses in our samples as a sign of improved immunity. A first study based on this algorithm, which will be published in Science on Friday, aims to show that this finding could translate into the development of a better vaccine that is more effective for']
Steven Liu's avatar
Steven Liu committed
434
```
435
436
</tf>
</frameworkcontent>