ccdv commited on
Commit
0a7d026
1 Parent(s): a917f9e
Files changed (1) hide show
  1. README.md +19 -1
README.md CHANGED
@@ -18,6 +18,24 @@ should probably proofread and complete it, then remove this comment. -->
18
  **This model relies on a custom modeling file, you need to add trust_remote_code=True**\
19
  **See [\#13467](https://github.com/huggingface/transformers/pull/13467)**
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  # ccdv/lsg-bart-base-16384-arxiv
22
 
23
  This model is a fine-tuned version of [ccdv/lsg-bart-base-4096-arxiv](https://huggingface.co/ccdv/lsg-bart-base-4096-arxiv) on the scientific_papers arxiv dataset. \
@@ -70,7 +88,7 @@ The following hyperparameters were used during training:
70
  The following hyperparameters were used during generation:
71
  - dataset_name: scientific_papers
72
  - dataset_config_name: arxiv
73
- - eval_batch_size: 8
74
  - eval_samples: 6440
75
  - early_stopping: True
76
  - ignore_pad_token_for_loss: True
 
18
  **This model relies on a custom modeling file, you need to add trust_remote_code=True**\
19
  **See [\#13467](https://github.com/huggingface/transformers/pull/13467)**
20
 
21
+ ```python
22
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
23
+
24
+ tokenizer = AutoTokenizer.from_pretrained("ccdv/lsg-bart-base-16384-arxiv", trust_remote_code=True)
25
+ model = AutoModelForSeq2SeqLM.from_pretrained("ccdv/lsg-bart-base-16384-arxiv", trust_remote_code=True)
26
+
27
+ text = "Replace by what you want."
28
+ pipe = pipeline("text2text-generation", model=model, tokenizer=tokenizer, device=0)
29
+ generated_text = pipe(
30
+ text,
31
+ truncation=True,
32
+ max_length=64,
33
+ no_repeat_ngram_size=7,
34
+ num_beams=2,
35
+ early_stopping=True
36
+ )
37
+ ```
38
+
39
  # ccdv/lsg-bart-base-16384-arxiv
40
 
41
  This model is a fine-tuned version of [ccdv/lsg-bart-base-4096-arxiv](https://huggingface.co/ccdv/lsg-bart-base-4096-arxiv) on the scientific_papers arxiv dataset. \
 
88
  The following hyperparameters were used during generation:
89
  - dataset_name: scientific_papers
90
  - dataset_config_name: arxiv
91
+ - eval_batch_size: 4
92
  - eval_samples: 6440
93
  - early_stopping: True
94
  - ignore_pad_token_for_loss: True