nandakishormpai
commited on
Commit
•
c5ba6f5
1
Parent(s):
7e6d540
update model card README.md
Browse files
README.md
CHANGED
@@ -2,24 +2,11 @@
|
|
2 |
license: apache-2.0
|
3 |
tags:
|
4 |
- generated_from_trainer
|
5 |
-
- machine_learning
|
6 |
-
- article_tag
|
7 |
-
- tag_generation
|
8 |
-
- ml_article_tag
|
9 |
-
- blog_tag_generation
|
10 |
-
- summarization
|
11 |
-
- tagging
|
12 |
metrics:
|
13 |
- rouge
|
14 |
model-index:
|
15 |
- name: t5-small-machine-articles-tag-generation
|
16 |
results: []
|
17 |
-
widget:
|
18 |
-
- text: "Paige, AI in pathology and genomics\n\nFundamentally transforming the diagnosis and treatment of cancer\nPaige has raised $25M in total. We talked with Leo Grady, its CEO.\nHow would you describe Paige in a single tweet?\nAI in pathology and genomics will fundamentally transform the diagnosis and treatment of cancer.\nHow did it all start and why? \nPaige was founded out of Memorial Sloan Kettering to bring technology that was developed there to doctors and patients worldwide. For over a decade, Thomas Fuchs and his colleagues have developed a new, powerful technology for pathology. This technology can improve cancer diagnostics, driving better patient care at lower cost. Paige is building clinical products from this technology and extending the technology to the development of new biomarkers for the biopharma industry.\nWhat have you achieved so far?\nTEAM: In the past year and a half, Paige has built a team with members experienced in AI, entrepreneurship, design and commercialization of clinical software.\nPRODUCT: We have achieved FDA breakthrough designation for the first product we plan to launch, a testament to the impact our technology will have in this market.\nCUSTOMERS: None yet, as we are working on CE and FDA regulatory clearances. We are working with several biopharma companies.\nWhat do you plan to achieve in the next 2 or 3 years?\nCommercialization of multiple clinical products for pathologists, as well as the development of novel biomarkers that can help speed up and better inform the diagnosis and treatment selection for patients with cancer."
|
19 |
-
example_title: 'ML Article Example #1'
|
20 |
-
language:
|
21 |
-
- en
|
22 |
-
pipeline_tag: summarization
|
23 |
---
|
24 |
|
25 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
@@ -27,80 +14,28 @@ should probably proofread and complete it, then remove this comment. -->
|
|
27 |
|
28 |
# t5-small-machine-articles-tag-generation
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
```
|
39 |
-
### Code
|
40 |
-
|
41 |
-
```python
|
42 |
-
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
43 |
-
import nltk
|
44 |
-
nltk.download('punkt')
|
45 |
-
|
46 |
-
tokenizer = AutoTokenizer.from_pretrained("nandakishormpai/t5-small-machine-articles-tag-generation")
|
47 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("nandakishormpai/t5-small-machine-articles-tag-generation")
|
48 |
-
|
49 |
-
article_text = """
|
50 |
-
Paige, AI in pathology and genomics
|
51 |
-
|
52 |
-
Fundamentally transforming the diagnosis and treatment of cancer
|
53 |
-
Paige has raised $25M in total. We talked with Leo Grady, its CEO.
|
54 |
-
How would you describe Paige in a single tweet?
|
55 |
-
AI in pathology and genomics will fundamentally transform the diagnosis and treatment of cancer.
|
56 |
-
How did it all start and why?
|
57 |
-
Paige was founded out of Memorial Sloan Kettering to bring technology that was developed there to doctors and patients worldwide. For over a decade, Thomas Fuchs and his colleagues have developed a new, powerful technology for pathology. This technology can improve cancer diagnostics, driving better patient care at lower cost. Paige is building clinical products from this technology and extending the technology to the development of new biomarkers for the biopharma industry.
|
58 |
-
What have you achieved so far?
|
59 |
-
TEAM: In the past year and a half, Paige has built a team with members experienced in AI, entrepreneurship, design and commercialization of clinical software.
|
60 |
-
PRODUCT: We have achieved FDA breakthrough designation for the first product we plan to launch, a testament to the impact our technology will have in this market.
|
61 |
-
CUSTOMERS: None yet, as we are working on CE and FDA regulatory clearances. We are working with several biopharma companies.
|
62 |
-
What do you plan to achieve in the next 2 or 3 years?
|
63 |
-
Commercialization of multiple clinical products for pathologists, as well as the development of novel biomarkers that can help speed up and better inform the diagnosis and treatment selection for patients with cancer.
|
64 |
-
"""
|
65 |
-
|
66 |
-
inputs = tokenizer([article_text], max_length=1024, truncation=True, return_tensors="pt")
|
67 |
-
output = model.generate(**inputs, num_beams=8, do_sample=True, min_length=10,
|
68 |
-
max_length=128)
|
69 |
-
|
70 |
-
decoded_output = tokenizer.batch_decode(output, skip_special_tokens=True)[0]
|
71 |
-
|
72 |
-
tags = [ tag.strip() for tag in decoded_output.split(",")]
|
73 |
-
|
74 |
-
print(tags)
|
75 |
-
|
76 |
-
# ['Paige', 'AI in pathology and genomics', 'AI in pathology', 'genomics']
|
77 |
-
|
78 |
-
```
|
79 |
-
## Dataset Preparation
|
80 |
|
81 |
-
|
82 |
-
Generating more specific tags would be of use while developing a system for Technical Blog Platforms.
|
83 |
-
ML Articles were filtered out and around 1000 articles were sampled. GPT3 API was used to Tag those and then preprocessing on the generated tags was performed to enusre articles with 4 or 5 tags were selected for the final dataset that came around 940 articles.
|
84 |
|
|
|
85 |
|
86 |
## Intended uses & limitations
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
## Results
|
91 |
-
|
92 |
-
It achieves the following results on the evaluation set:
|
93 |
-
- Loss: 2.1373
|
94 |
-
- Rouge1: 35.4695
|
95 |
-
- Rouge2: 17.081
|
96 |
-
- Rougel: 31.8215
|
97 |
-
- Rougelsum: 31.8068
|
98 |
-
- Gen Len: 17.8617
|
99 |
|
100 |
## Training and evaluation data
|
101 |
|
102 |
-
|
103 |
|
|
|
104 |
|
105 |
### Training hyperparameters
|
106 |
|
@@ -111,13 +46,38 @@ The following hyperparameters were used during training:
|
|
111 |
- seed: 42
|
112 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
113 |
- lr_scheduler_type: linear
|
114 |
-
- num_epochs:
|
115 |
- mixed_precision_training: Native AMP
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
### Framework versions
|
119 |
|
120 |
- Transformers 4.26.1
|
121 |
- Pytorch 1.13.1+cu116
|
122 |
- Datasets 2.9.0
|
123 |
-
- Tokenizers 0.13.2
|
|
|
2 |
license: apache-2.0
|
3 |
tags:
|
4 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
metrics:
|
6 |
- rouge
|
7 |
model-index:
|
8 |
- name: t5-small-machine-articles-tag-generation
|
9 |
results: []
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
---
|
11 |
|
12 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
14 |
|
15 |
# t5-small-machine-articles-tag-generation
|
16 |
|
17 |
+
This model is a fine-tuned version of [t5-small](https://huggingface.co/t5-small) on the None dataset.
|
18 |
+
It achieves the following results on the evaluation set:
|
19 |
+
- Loss: 1.9833
|
20 |
+
- Rouge1: 35.3543
|
21 |
+
- Rouge2: 18.1226
|
22 |
+
- Rougel: 31.3958
|
23 |
+
- Rougelsum: 31.414
|
24 |
+
- Gen Len: 17.6596
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
## Model description
|
|
|
|
|
27 |
|
28 |
+
More information needed
|
29 |
|
30 |
## Intended uses & limitations
|
31 |
|
32 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
## Training and evaluation data
|
35 |
|
36 |
+
More information needed
|
37 |
|
38 |
+
## Training procedure
|
39 |
|
40 |
### Training hyperparameters
|
41 |
|
|
|
46 |
- seed: 42
|
47 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
48 |
- lr_scheduler_type: linear
|
49 |
+
- num_epochs: 20
|
50 |
- mixed_precision_training: Native AMP
|
51 |
|
52 |
+
### Training results
|
53 |
+
|
54 |
+
| Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | Gen Len |
|
55 |
+
|:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|:-------:|:---------:|:-------:|
|
56 |
+
| 3.7917 | 1.0 | 47 | 3.0002 | 19.9138 | 6.9215 | 17.6969 | 17.7888 | 18.9787 |
|
57 |
+
| 3.0113 | 2.0 | 94 | 2.5823 | 22.9993 | 9.0341 | 20.8118 | 20.7657 | 18.7021 |
|
58 |
+
| 2.7086 | 3.0 | 141 | 2.3643 | 26.7716 | 12.2207 | 24.1983 | 24.2611 | 18.3298 |
|
59 |
+
| 2.5192 | 4.0 | 188 | 2.2361 | 28.5866 | 13.6305 | 26.1201 | 26.1367 | 17.9894 |
|
60 |
+
| 2.4089 | 5.0 | 235 | 2.1661 | 30.1919 | 13.8779 | 27.1523 | 27.1256 | 18.0638 |
|
61 |
+
| 2.3293 | 6.0 | 282 | 2.1185 | 31.1222 | 15.6736 | 27.3953 | 27.4457 | 17.8404 |
|
62 |
+
| 2.2635 | 7.0 | 329 | 2.0875 | 32.3166 | 16.3032 | 28.7062 | 28.732 | 17.9149 |
|
63 |
+
| 2.2349 | 8.0 | 376 | 2.0653 | 31.8387 | 15.616 | 28.3254 | 28.4288 | 17.7979 |
|
64 |
+
| 2.1945 | 9.0 | 423 | 2.0473 | 32.388 | 16.4027 | 28.5642 | 28.6096 | 17.6809 |
|
65 |
+
| 2.1658 | 10.0 | 470 | 2.0352 | 33.9489 | 16.999 | 29.8446 | 29.8251 | 17.5426 |
|
66 |
+
| 2.1414 | 11.0 | 517 | 2.0252 | 34.0804 | 17.6999 | 30.1921 | 30.2739 | 17.5106 |
|
67 |
+
| 2.1103 | 12.0 | 564 | 2.0155 | 34.3488 | 17.8273 | 30.2613 | 30.3358 | 17.5957 |
|
68 |
+
| 2.1052 | 13.0 | 611 | 2.0053 | 35.1038 | 18.3494 | 30.6999 | 30.7655 | 17.6064 |
|
69 |
+
| 2.0795 | 14.0 | 658 | 2.0004 | 35.366 | 18.8791 | 31.4931 | 31.5691 | 17.7872 |
|
70 |
+
| 2.0612 | 15.0 | 705 | 1.9951 | 36.1778 | 18.7911 | 31.5974 | 31.6309 | 17.6064 |
|
71 |
+
| 2.0792 | 16.0 | 752 | 1.9886 | 35.0387 | 18.2363 | 31.5279 | 31.5694 | 17.6702 |
|
72 |
+
| 2.0695 | 17.0 | 799 | 1.9868 | 36.1432 | 18.4902 | 31.8314 | 31.7955 | 17.617 |
|
73 |
+
| 2.0593 | 18.0 | 846 | 1.9844 | 35.7847 | 18.3497 | 31.745 | 31.7007 | 17.6809 |
|
74 |
+
| 2.0395 | 19.0 | 893 | 1.9842 | 36.0629 | 18.9649 | 32.098 | 32.0453 | 17.5745 |
|
75 |
+
| 2.0623 | 20.0 | 940 | 1.9833 | 35.3543 | 18.1226 | 31.3958 | 31.414 | 17.6596 |
|
76 |
+
|
77 |
|
78 |
### Framework versions
|
79 |
|
80 |
- Transformers 4.26.1
|
81 |
- Pytorch 1.13.1+cu116
|
82 |
- Datasets 2.9.0
|
83 |
+
- Tokenizers 0.13.2
|