terumi commited on
Commit
94d2ccd
1 Parent(s): 42c869b
Files changed (1) hide show
  1. README.md +51 -1
README.md CHANGED
@@ -1 +1,51 @@
1
- "hello"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: "pt"
3
+ widget:
4
+ - text: "O paciente recebeu "
5
+ - text: "O paciente chegou no hospital "
6
+ - text: "Cientistas descobriram que "
7
+ - text: "O nível de atividade biológica "
8
+ - text: "O DNA e o RNA "
9
+
10
+ datasets:
11
+ - biomedical literature from Scielo and Pubmed
12
+ ---
13
+
14
+ # GPT2-BioPT - a Language Model for Portuguese Biomedical text generation
15
+
16
+ ## Introduction
17
+
18
+ GPT2-BioPT (Portuguese Biomedical GPT-2 small) is a language model for Portuguese based on the OpenAI GPT-2 model, trained from the [GPorTuguese-2](https://huggingface.co/pierreguillou/gpt2-small-portuguese/) with biomedical literature.
19
+
20
+ We used **Transfer Learning and Fine-tuning techniques** with 110MB of training data, corresponding to 16,209,373 tokens and 729,654 sentences.
21
+
22
+ ## GPT-2
23
+
24
+ *Note: information copied/pasted from [Model: gpt2 >> GPT-2](https://huggingface.co/gpt2#gpt-2)*
25
+
26
+ Pretrained model on English language using a causal language modeling (CLM) objective. It was introduced in this [paper](https://d4mucfpksywv.cloudfront.net/better-language-models/language_models_are_unsupervised_multitask_learners.pdf) and first released at this [page](https://openai.com/blog/better-language-models/) (February 14, 2019).
27
+
28
+ Disclaimer: The team releasing GPT-2 also wrote a [model card](https://github.com/openai/gpt-2/blob/master/model_card.md) for their model. Content from this model card has been written by the Hugging Face team to complete the information they provided and give specific examples of bias.
29
+
30
+ ## Model description
31
+
32
+ *Note: information copied/pasted from [Model: gpt2 >> Model description](https://huggingface.co/gpt2#model-description)*
33
+
34
+ GPT-2 is a transformers model pretrained on a very large corpus of English data in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts. More precisely, it was trained to guess the next word in sentences.
35
+
36
+ More precisely, inputs are sequences of continuous text of a certain length and the targets are the same sequence, shifted one token (word or piece of word) to the right. The model uses internally a mask-mechanism to make sure the predictions for the token `i` only uses the inputs from `1` to `i` but not the future tokens.
37
+
38
+ This way, the model learns an inner representation of the English language that can then be used to extract features useful for downstream tasks. The model is best at what it was pretrained for however, which is generating texts from a prompt.
39
+
40
+ ## How to use GPT2-BioPT with HuggingFace (PyTorch)
41
+
42
+ ```
43
+ from transformers import pipeline
44
+
45
+ chef = pipeline('text-generation',model=r"gpt2-bio-pt", tokenizer=r"gpt2-bio-pt",config={'max_length':800}, framwork="tf")
46
+
47
+ result = chef('O paciente chegou no hospital')[0]['generated_text']
48
+ print(result)
49
+ ```
50
+ ## Citation
51
+ * soon *