Downloads · 30 days
0
AGNDM/Fine-tuned_NLP_Qwen_0.5B
Fine-tuned_NLP_Qwen_0.5B is a text generation model from AGNDM. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repository provides a LoRA adapter fine-tuned from Qwen/Qwen2.5-0.5B-Instruct on the allenai/qasper dataset.
Downloads · 30 days
0
Access
Public
Updated Apr 7, 2026
Repo size
223 MB
Likes
0
Public
Click a slice to open those files.
.pt141 MB · 50%
From the Hugging Face model README
This repository provides a LoRA adapter fine-tuned from Qwen/Qwen2.5-0.5B-Instruct on the allenai/qasper dataset.
AGNDM/Fine-tuned_NLP_Qwen_0.5BQwen/Qwen2.5-0.5B-Instructallenai/qasperpip install -U transformers peft accelerate torch
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model_id = "Qwen/Qwen2.5-0.5B-Instruct"
adapter_id = "AGNDM/Fine-tuned_NLP_Qwen_0.5B"
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float16,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, adapter_id)
prompt = (
"You are a helpful scientific QA assistant. "
"Answer the question based only on the provided paper content.\n\n"
"### Paper Context\n"
"<paper context here>\n\n"
"### Question\n"
"What is the main contribution?\n\n"
"### Answer\n"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=128, do_sample=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Qwen/Qwen2.5-0.5B-Instructr=16, alpha=32, dropout=0.051 x gradient_accumulation_steps(16) = 162048If you use this model, please cite QASPER and the base model:
@inproceedings{Dasigi2021ADO,
title={A Dataset of Information-Seeking Questions and Answers Anchored in Research Papers},
author={Pradeep Dasigi and Kyle Lo and Iz Beltagy and Arman Cohan and Noah A. Smith and Matt Gardner},
year={2021}
}