mayiwen/PaperAudit_Dataset
Viewer • Updated • 5.16k • 1.17k
PaperAudit_Llama3.2_3B_sft_rl is a lightweight model specifically trained for academic paper error detection and automated review tasks. This model is based on Llama 3.2 3B Instruct and has been optimized through Supervised Fine-Tuning (SFT) and Reinforcement Learning from Human Feedback (RLHF).
This model is trained on PaperAudit_Dataset. The dataset includes:
For more details about the dataset, please visit: https://huggingface.co/datasets/mayiwen/PaperAudit_Dataset
pip install transformers torch accelerate
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_path = "./llama3.2_3b_sft_rl"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Prepare input (paper error detection task)
prompt = """Please detect errors in the following academic paper paragraph:
[Paper content...]
Please identify errors and provide correction suggestions."""
# Encode input
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
# Generate response
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.7,
do_sample=True,
pad_token_id=tokenizer.pad_token_id
)
# Decode output
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Please refer to the license terms of the base model Llama 3.2.
Base model
meta-llama/Llama-3.2-3B-Instruct