Text Generation
Transformers
Safetensors
qwen2
text-generation-inference
MinjunZhu commited on
Commit
706ce9d
·
verified ·
1 Parent(s): 2d5e24e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +332 -5
README.md CHANGED
@@ -1,5 +1,332 @@
1
- ---
2
- license: other
3
- license_name: cycleresearcher-license
4
- license_link: LICENSE
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: cycleresearcher-license
4
+ license_link: LICENSE
5
+ base_model:
6
+ - Qwen/Qwen2.5-72B-Instruct
7
+ language:
8
+ - en
9
+ - zh
10
+ - ja
11
+ - ko
12
+ - fr
13
+ - de
14
+ metrics:
15
+ - accuracy
16
+ extra_gated_prompt: "You agree to not use the model for generating research papers for direct submission or official publication without explicit disclosure of AI assistance."
17
+ extra_gated_fields:
18
+ First Name: text
19
+ Last Name: text
20
+ Country: country
21
+ Affiliation: text
22
+ Academic Status:
23
+ type: select
24
+ options:
25
+ - Student
26
+ - Researcher
27
+ - Professor
28
+ - Industry Professional
29
+ - Other
30
+ Specific date: date_picker
31
+ I want to use this model for:
32
+ type: select
33
+ options:
34
+ - Research Ideation
35
+ - Literature Review Assistance
36
+ - Experimental Design Planning
37
+ - Methodology Development
38
+ - Draft Writing Practice
39
+ - Research Validation
40
+ - Hypothesis Generation
41
+ - Reference Organization
42
+ - Writing Improvement
43
+ - Academic Training
44
+ - Research Planning
45
+ - Supplementary Tool
46
+ - label: Other
47
+ value: other
48
+ Research Field:
49
+ type: select
50
+ options:
51
+ - Machine Learning
52
+ - Computer Vision
53
+ - Natural Language Processing
54
+ - Robotics
55
+ - Other AI Fields
56
+ - label: Other
57
+ value: other
58
+ geo: ip_location
59
+ I agree to NOT submit papers generated by this model without proper disclosure: checkbox
60
+ I agree to explicitly acknowledge AI assistance in any resulting publications: checkbox
61
+ I agree to use this model for research assistance purposes only: checkbox
62
+ I understand that experimental results generated by this model are simulated: checkbox
63
+ extra_gated_button_content: Submit
64
+ library_name: transformers
65
+ datasets:
66
+ - WestlakeNLP/Research-14K
67
+ ---
68
+ # CycleResearcher: Automated Research via Reinforcement Learning with Iterative Feedback
69
+
70
+
71
+ HomePage: https://wengsyx.github.io/Researcher/
72
+
73
+ This model is the safe version of CycleResearcher.
74
+
75
+ ## Model Specifications
76
+
77
+ | Model Name | Pre-training Language Model | HF Link |
78
+ | :---------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
79
+ | CycleResearcher-ML-12B | [Mistral-Nemo-Instruct-2407](https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407) | [🤗 link](https://huggingface.co/WestlakeNLP/CycleResearcher-ML-12B) |
80
+ | CycleResearcher-ML-72B | [Qwen2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct) | [🤗 link](https://huggingface.co/WestlakeNLP/CycleResearcher-ML-72B) |
81
+ | CycleResearcher-ML-123B | [Mistral-Large-2](https://huggingface.co/mistralai/Mistral-Large-Instruct-2407) | [🤗 link](https://huggingface.co/WestlakeNLP/CycleResearcher-ML-123B) |
82
+
83
+
84
+ ## Model Info
85
+
86
+ The CycleResearcher model series includes two main variants:
87
+
88
+ 1. **ML Series**: Specifically trained for machine learning research, including computer vision (CV), natural language processing (NLP), and multimedia (MM)
89
+ 2. **Science Series**: Extended to broader scientific domains (Coming soon)
90
+
91
+ All models have undergone extensive training on our Research-8k dataset and are optimized using the CycleReviewer feedback loop. According to our license, **all models and their derivatives cannot be used for generating papers without proper disclosure of AI assistance.** We also provide FastDetectGPT-based tools to detect potential misuse of these models.
92
+
93
+ **Model Release Date**: October 2024
94
+ **Knowledge Cutoff Date**: October 2024
95
+
96
+ ### Open Source License
97
+
98
+ The code in this repository is open-sourced under the Apache-2.0 license. The model weights are open-sourced under the CycleResearcher-License.
99
+
100
+
101
+ ### Model Performance
102
+
103
+ Results on research paper generation evaluated by CycleReviewer:
104
+
105
+ | Paper Type | Source | Avg Min Score ↑ | Avg Max Score ↑ | Avg Score ↑ | Accept Rate |
106
+ |------------|--------|----------------|-----------------|-------------|-------------|
107
+ | Conference Accept Papers† | Human Expert | **3.91** | **6.98** | **5.69** | **100.00%** |
108
+ | Preprint Papers | Human Expert | 3.24 | 6.62 | 5.24 | 29.63% |
109
+ | AI Scientist | AI | 2.20 | 5.70 | 4.31 | 0.00% |
110
+ | CycleResearcher-12B | AI | 3.47 | **6.75** | 5.36 | **35.13%** |
111
+ | CycleResearcher-72B| AI | **3.65** | 6.58 | **5.38** | 33.64% |
112
+ | CycleResearcher-123B | AI | 3.31 | 6.42 | 5.13 | 21.19% |
113
+
114
+ ### Detecting misuse of CycleResearcher
115
+
116
+ To ensure the responsible use of our models, we implemented the Fast-DetectGPT method to classify whether a paper is machine-generated. Detection performance comparison across different formats. The human samples are from the test sets of Research-8k and Reviewer-5k.
117
+
118
+ | Model | Format | Accuracy | F1 Score |
119
+ |-------|---------|-----------|-----------|
120
+ | Researcher-12B | Paper | 98.38% | 98.37 |
121
+ | Researcher-72B | Paper | 97.52% | 97.49 |
122
+ | Researcher-123B | Paper | 98.88% | 98.87 |
123
+
124
+ ## Installation
125
+
126
+ ```bash
127
+ pip install cycleresearcher
128
+ pip install torch>=2.0.0
129
+ pip install transformers>=4.44.0
130
+ pip install vllm # Optional, for faster inference
131
+ ```
132
+
133
+ ## Requirements
134
+
135
+ - Python >= 3.8
136
+ - PyTorch >= 2.0.0
137
+ - Transformers >= 4.44.0
138
+ - CUDA >= 11.8 (for GPU acceleration)
139
+
140
+ ## System Requirements
141
+
142
+ Recommended configurations for different model sizes:
143
+
144
+ | Model | Recommended Config | Minimum Config |
145
+ |-------|--------------------|----------------|
146
+ | CycleResearcher-12B | 2x H100 80G | 1x H100 80G |
147
+ | CycleResearcher-72B | 8x H100 80G | 4x H100 80G |
148
+ | CycleResearcher-123B | 8x H100 80G | 8x H100 80G |
149
+
150
+ ## Quick Start
151
+
152
+ ### Using Transformers
153
+
154
+ ```python
155
+ import torch
156
+ from transformers import AutoModelForCausalLM, AutoTokenizer
157
+
158
+ # Initialize model
159
+ model_name = "WestlakeNLP/CycleResearcher-12B"
160
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
161
+ model = AutoModelForCausalLM.from_pretrained(
162
+ model_name,
163
+ torch_dtype=torch.float16,
164
+ device_map="auto",
165
+ max_memory={i: "24GiB" for i in range(torch.cuda.device_count())},
166
+ )
167
+
168
+ # Generation parameters
169
+ generation_config = {
170
+ "max_length": 19000,
171
+ "temperature": 0.1,
172
+ "top_p": 0.95,
173
+ "pad_token_id": None,
174
+ "do_sample": True,
175
+ }
176
+
177
+ # Prepare system prompt and input
178
+ system_prompt = """You are a research assistant AI tasked with generating a scientific paper based on provided literature. Follow these steps:
179
+ 1. Analyze the given References.
180
+ 2. Identify gaps in existing research to establish the motivation for a new study.
181
+ 3. Propose a main idea for a new research work.
182
+ 4. Write the paper's main content in LaTeX format, including:
183
+ - Title
184
+ - Abstract
185
+ - Introduction
186
+ - Related Work
187
+ - Methods/
188
+ 5. Generate experimental setup details in JSON format to guide researchers.
189
+ 6. After receiving experimental results in JSON format, analyze them.
190
+ 7. Complete the paper by writing:
191
+ - Results
192
+ - Discussion
193
+ - Conclusion
194
+ - Contributions
195
+ Ensure all content is original, academically rigorous, and follows standard scientific writing conventions."""
196
+
197
+ # Reference input should be in BibTeX format
198
+ references = """@article{Qiu2020PretrainedMF,
199
+ title={Pre-trained models for natural language processing: A survey},
200
+ author={Xipeng Qiu and Tianxiang Sun and Yige Xu and Yunfan Shao and Ning Dai and Xuanjing Huang},
201
+ journal={Science China Technological Sciences},
202
+ year={2020},
203
+ volume={63},
204
+ pages={1872 - 1897}
205
+ }
206
+ @article{Long2022VisionandLanguagePM,
207
+ title={Vision-and-Language Pretrained Models: A Survey},
208
+ author={Siqu Long and Feiqi Cao and Soyeon Caren Han and Haiqing Yang},
209
+ journal={IJCAI},
210
+ year={2022},
211
+ }
212
+ @inproceedings{Klicpera2019DiffusionIG,
213
+ title={Diffusion Improves Graph Learning},
214
+ author={Johannes Klicpera and Stefan Wei{\ss}enberger and Stephan G{\"u}nnemann},
215
+ booktitle={Neural Information Processing Systems},
216
+ year={2019}
217
+
218
+ The above content represents the relevant literature in this field. Please analyze it and provide the motivation and main idea. Then, provide the Title, Abstract, Introduction, Related Work, and Methods sections in LaTeX format.
219
+ """
220
+
221
+ messages = [
222
+ {"role": "system", "content": system_prompt},
223
+ {"role": "user", "content": references}
224
+ ]
225
+
226
+ # Generate paper
227
+ prompt = tokenizer.apply_chat_template(
228
+ messages,
229
+ tokenize=False,
230
+ add_generation_prompt=True
231
+ )
232
+
233
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
234
+ outputs = model.generate(**inputs, **generation_config)
235
+ generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
236
+ ```
237
+
238
+ ### Using VLLM (Recommended for faster inference)
239
+
240
+ ```python
241
+ from vllm import LLM, SamplingParams
242
+
243
+ # Initialize model with VLLM
244
+ model = LLM(
245
+ model="WestlakeNLP/CycleResearcher-12B",
246
+ tensor_parallel_size=8,
247
+ max_model_len=15000,
248
+ gpu_memory_utilization=0.95,
249
+ )
250
+
251
+ # Generation parameters
252
+ sampling_params = SamplingParams(
253
+ temperature=0.4,
254
+ top_p=0.95,
255
+ max_tokens=4096
256
+ )
257
+
258
+ # Generate paper
259
+ outputs = model.generate([prompt], sampling_params)
260
+ ```
261
+
262
+ ## Input Data Format
263
+
264
+ CycleResearcher expects reference input in BibTeX format with abstracts. Example format:
265
+
266
+ ```bibtex
267
+ @article{example2023,
268
+ title = {Sample Paper Title},
269
+ author = {Author, A. and Author, B.},
270
+ journal = {Journal Name},
271
+ year = {2024},
272
+ abstract = {This is a sample abstract that provides context...}
273
+ }
274
+
275
+ Abstract: This is a sample abstract that provides context...
276
+ @article{example2024,
277
+ title = {Sample Paper Title},
278
+ author = {Author, A. and Author, B.},
279
+ journal = {Journal Name},
280
+ year = {2024},
281
+ }
282
+ ```
283
+
284
+ ## Output Format
285
+
286
+ The model generates output with the following structure:
287
+
288
+ ```python
289
+ {
290
+ 'title': 'Paper title',
291
+ 'abstract': 'Paper abstract',
292
+ 'latex': 'Main paper content in LaTeX format',
293
+ 'motivation': 'Research motivation',
294
+ 'idea': 'Main research idea',
295
+ 'Experimental_Setup': 'Experiment configuration (JSON/text)',
296
+ 'Experimental_results': 'Results and findings (JSON/text)',
297
+ 'generated_text': 'Complete raw generated text'
298
+ }
299
+ ```
300
+
301
+ ## Training and Evaluation Datasets
302
+
303
+ - Research-8k: Contains 12,696 training and 802 test samples
304
+ - Review-5k: Contains 4,970 papers with over 16,000 reviewer comments
305
+
306
+ To request access to these datasets, please contact [email protected].
307
+
308
+
309
+ ## License
310
+
311
+ The code is released under the Apache 2.0 license. Use of the models is subject to the CycleResearcher-License agreement.
312
+
313
+ ## Citation
314
+
315
+ ```bibtex
316
+ @inproceedings{cycleresearcher2024,
317
+ title={CycleResearcher: Improving Automated Research via Automated Review},
318
+ author={Anonymous Authors},
319
+ booktitle={International Conference on Learning Representations},
320
+ year={2025}
321
+ }
322
+ ```
323
+
324
+ ## Contact
325
+
326
+ For questions and feedback, please:
327
+ - Open an issue on GitHub
328
+ - Contact [email protected]
329
+
330
+ ---
331
+
332
+ **Note**: This is a research preview release. Features and capabilities may be updated frequently.