席亚东 commited on
Commit
545a314
·
1 Parent(s): caadb4d

add the modify of code

Browse files
Files changed (1) hide show
  1. README.md +10 -3
README.md CHANGED
@@ -33,9 +33,9 @@ Our model is trained based on the [fairseq](https://github.com/facebookresearch/
33
  For inference, we modify some parts of the original fairseq codes. Mainly
34
  > fairseq-0.12.2/fairseq/sequence_generator.py
35
 
36
- We integrate the EET
37
 
38
- Then, we change the line 75 `include_eos=False` to `include_eos=True` in
39
  > fairseq-0.12.2/fairseq/data/dictionary.py
40
 
41
  Finally, to pass in parameters in python scripts, we remove the line 67 ~ line 69 in
@@ -112,4 +112,11 @@ If you find the technical report or resource is useful, please cite the followin
112
  doi = "10.18653/v1/2022.naacl-industry.8",
113
  pages = "62--68"
114
  }
115
- ```
 
 
 
 
 
 
 
 
33
  For inference, we modify some parts of the original fairseq codes. Mainly
34
  > fairseq-0.12.2/fairseq/sequence_generator.py
35
 
36
+ We integrate the EET with sequence_generator. We replace the eos token to a token unlikely to be sampled to ensure the generated text length. The repetition penalty trick is also modified. You can change the penalty strength by adjusting the value of `self.ban_weight`.
37
 
38
+ Then, to keep the eos token in the final generated text, we change the line 75 `include_eos=False` to `include_eos=True` in
39
  > fairseq-0.12.2/fairseq/data/dictionary.py
40
 
41
  Finally, to pass in parameters in python scripts, we remove the line 67 ~ line 69 in
 
112
  doi = "10.18653/v1/2022.naacl-industry.8",
113
  pages = "62--68"
114
  }
115
+
116
+ ```
117
+ ## Contact Us
118
+ You can post your problem with github issues.
119
+
120
+ You can also contact us by email:
121
+
122