pszemraj commited on
Commit
a75dd0f
·
verified ·
1 Parent(s): 432ace0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -15
README.md CHANGED
@@ -5,20 +5,18 @@ language:
5
  license: apache-2.0
6
  base_model: facebook/bart-large
7
  tags:
8
- - generated_from_trainer
9
- model-index:
10
- - name: bart-large-summary-map-reduce-1024
11
- results: []
 
12
  ---
13
 
14
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
15
- should probably proofread and complete it, then remove this comment. -->
16
-
17
- # bart-large-summary-map-reduce-1024
18
 
19
  A text2text model to "map-reduce" summaries of a chunked long document into one.
20
 
21
- An explanation of this model's role:
22
 
23
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/60bccec062080d33f875cd0c/Sv7_-MM901qNkyHuBdTC_.png)
24
 
@@ -39,11 +37,9 @@ an example of aggregating summaries from chunks of a long document:
39
  import torch
40
  from transformers import pipeline
41
 
42
- model_name = "pszemraj/bart-large-summary-map-reduce-1024"
43
-
44
  pipe = pipeline(
45
  "text2text-generation",
46
- model=model_name,
47
  device_map="auto",
48
  )
49
 
@@ -58,10 +54,11 @@ text = """A computer implemented method of generating a syntactic object. The me
58
  The brain is constantly loosing neurons because you doesn&#39;t want all the junk around."""
59
 
60
  # generate
61
- torch.cuda.empty_cache()
 
62
  res = pipe(
63
  text,
64
- max_new_tokens=512,
65
  num_beams=4,
66
  early_stopping=True,
67
  truncation=True,
@@ -83,4 +80,4 @@ The following hyperparameters were used during training:
83
  - optimizer: Use OptimizerNames.PAGED_ADAMW with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
84
  - lr_scheduler_type: cosine
85
  - lr_scheduler_warmup_ratio: 0.05
86
- - num_epochs: 3.0
 
5
  license: apache-2.0
6
  base_model: facebook/bart-large
7
  tags:
8
+ - map-reduce
9
+ - summarization
10
+ datasets:
11
+ - pszemraj/summary-map-reduce
12
+ pipeline_tag: text2text-generation
13
  ---
14
 
15
+ # bart-large-summary-map-reduce
 
 
 
16
 
17
  A text2text model to "map-reduce" summaries of a chunked long document into one.
18
 
19
+ An explanation of this model's role as a post-processor for [textsum](https://github.com/pszemraj/textsum) (_or any other long-doc summarization method similar to the below_)
20
 
21
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/60bccec062080d33f875cd0c/Sv7_-MM901qNkyHuBdTC_.png)
22
 
 
37
  import torch
38
  from transformers import pipeline
39
 
 
 
40
  pipe = pipeline(
41
  "text2text-generation",
42
+ model="pszemraj/bart-large-summary-map-reduce",
43
  device_map="auto",
44
  )
45
 
 
54
  The brain is constantly loosing neurons because you doesn&#39;t want all the junk around."""
55
 
56
  # generate
57
+ if torch.cuda.is_available():
58
+ torch.cuda.empty_cache()
59
  res = pipe(
60
  text,
61
+ max_new_tokens=512, # increase up to 1024 if needed
62
  num_beams=4,
63
  early_stopping=True,
64
  truncation=True,
 
80
  - optimizer: Use OptimizerNames.PAGED_ADAMW with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
81
  - lr_scheduler_type: cosine
82
  - lr_scheduler_warmup_ratio: 0.05
83
+ - num_epochs: 3.0