|
--- |
|
license: apache-2.0 |
|
library_name: peft |
|
tags: |
|
- trl |
|
- sft |
|
- generated_from_trainer |
|
base_model: mistralai/Mistral-7B-Instruct-v0.2 |
|
model-index: |
|
- name: mistral_7b_paper_review_lora |
|
results: [] |
|
language: |
|
- en |
|
--- |
|
|
|
<!-- This model card has been generated automatically according to the information the Trainer had access to. You |
|
should probably proofread and complete it, then remove this comment. --> |
|
|
|
# mistral_7b_paper_review_lora |
|
|
|
This model is a fine-tuned version of [mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) on the [dataset](travis0103/abstract_paper_review). |
|
|
|
## Model Description |
|
|
|
This model is specifically fine-tuned to assist in reviewing machine learning papers based on the abstracts provided. It serves as a useful tool for researchers preparing to submit papers or for reviewers tasked with evaluating submissions. For a detailed description of the model's functionalities and features, please visit our project's GitHub page at [MLPapersReviewGPT](https://github.com/yinuotxie/MLPapersReviewGPT). |
|
|
|
## Example Usage |
|
|
|
```python |
|
SYSTEM_PROMPT = """ |
|
You are a professional machine learning conference reviewer who reviews a given paper and considers 4 criteria: [Significance and novelty], [Potential reasons for acceptance], [Potential reasons for rejection], and [Suggestions for improvement]. Please ensure that for each criterion, you summarize and provide random number of detailed supporting points from the content of the paper. And for each supporting point within each of criteria, use the format: '<title of supporting point>' followed by a detailed explanation. The criteria you need to focus on are: |
|
|
|
1. [Significance and novelty]: Assess the importance of the paper in its research field and the innovation of its methods or findings。 |
|
2. [Potential reasons for acceptance]: Summarize reasons that may support the acceptance of the paper, based on its quality, research results, experimental design, etc. |
|
3. [Potential reasons for rejection]: Identify and explain flaws or shortcomings that could lead to the paper's rejection. |
|
4. [Suggestions for improvement]: Provide specific suggestions to help the authors improve the paper and increase its chances of acceptance. |
|
|
|
After reading the content of the paper provided below, your response should only include your reviews only, which means always start with [Significance and novelty], dont' repeat the given paper and output things other than your reviews in required format, just extract and summarize information related to these criteria from the provided paper. The paper is given as follows: |
|
""" |
|
|
|
abstract_input = """" |
|
[TITLE] |
|
<Title of the paper you want to review> |
|
|
|
[ABSTRACT] |
|
<Abstract of the paper you want to review> |
|
""" |
|
|
|
# load the model |
|
model_id = "travis0103/mistral_7b_paper_review_lora" |
|
model = AutoPeftModelForCausalLM.from_pretrained(model_id) |
|
tokenizer = AutoTokenizer.from_pretrained(model_id) |
|
|
|
messages = [ |
|
{"role": "user", "content": SYSTEM_PROMPT}, |
|
{"role": "user", "content": abstract_input} |
|
] |
|
device = torch.device("cuda" if torch.cuda.is_available() else "cpu") |
|
encoded_input = tokenizer.apply_chat_template(messages, return_tensors="pt").to(device) |
|
generated_ids = model.generate(encoded_input, max_new_tokens=1024, do_sample=True, pad_token_id=tokenizer.eos_token_id, eos_token_id=tokenizer.eos_token_id) |
|
decoded_output = tokenizer.decode(generated_ids[0], skip_special_tokens=True) |
|
``` |
|
|
|
## Training and evaluation data |
|
|
|
Abstract Paper Review: [Dataset](travis0103/abstract_paper_review) |
|
|
|
### Training hyperparameters |
|
|
|
The following hyperparameters were used during training: |
|
- learning_rate: 0.0002 |
|
- train_batch_size: 2 |
|
- eval_batch_size: 2 |
|
- seed: 42 |
|
- distributed_type: multi-GPU |
|
- num_devices: 4 |
|
- gradient_accumulation_steps: 4 |
|
- total_train_batch_size: 32 |
|
- total_eval_batch_size: 8 |
|
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 |
|
- lr_scheduler_type: linear |
|
- lr_scheduler_warmup_ratio: 0.03 |
|
- training_steps: 1 |
|
- mixed_precision_training: Native AMP |
|
|
|
### Framework versions |
|
|
|
- PEFT 0.10.0 |
|
- Transformers 4.40.0 |
|
- Pytorch 2.2.1+cu121 |
|
- Datasets 2.18.0 |
|
- Tokenizers 0.19.1 |