Downloads · 30 days
10
42% of all-time downloads
safora/PersianSciQA-LoRA
PersianSciQA-LoRA is a text generation model from safora. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A specialized LoRA adapter that transforms PersianLLaMA-13B into a scientific question generation system for Persian academic abstracts.
Downloads · 30 days
10
42% of all-time downloads
All-time downloads
24
Public
Repo size
252 MB
Likes
0
Public
Click a slice to open those files.
.safetensors250 MB · 98%
From the Hugging Face model README
A specialized LoRA adapter that transforms PersianLLaMA-13B into a scientific question generation system for Persian academic abstracts.
PersianSciQA-LoRA addresses the gap in Persian language processing for academic question generation. This adapter achieves specialized performance in generating relevant questions from Persian scientific abstracts across multiple domains.
| Parameter | Value |
|---|---|
| Base Model | PersianLLaMA-13B (13 billion parameters) |
| Adaptation Method | LoRA (Low-Rank Adaptation) |
| LoRA Rank (r) | 32 |
| LoRA Alpha | 64 |
| Trainable Parameters | ~67M (0.5% of base model) |
| Target Modules | Query, Key, Value, Output, Gate, Up, Down projections |
| Training Language | Persian/Farsi |
| Domain | Scientific Literature |
pip install transformers peft torch
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model and adapter
base_model = AutoModelForCausalLM.from_pretrained(
"ViraIntelligentDataMining/PersianLLaMA-13B",
torch_dtype=torch.bfloat16,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, "YOUR_USERNAME/PersianSciQA-LoRA")
tokenizer = AutoTokenizer.from_pretrained("ViraIntelligentDataMining/PersianLLaMA-13B")
# Generate scientific question
abstract = "Your Persian scientific abstract here"
prompt = f"چکیده: {abstract}\nسوال:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=50,
do_sample=True,
temperature=0.7,
top_p=0.9,
repetition_penalty=1.1,
pad_token_id=tokenizer.pad_token_id
)
question = tokenizer.decode(outputs[0, inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(f"Generated Question: {question}")
For academic use, please cite:
@misc{persiansciqa-lora-2025,
title={PersianSciQA-LoRA: Scientific Question Generation for Persian Literature},
author={[Your Name]},
year={2025},
url={https://huggingface.co/YOUR_USERNAME/PersianSciQA-LoRA},
note={LoRA adapter for Persian scientific question generation based on PersianLLaMA-13B}
}
Released under Apache 2.0 License. Academic and research use encouraged.
We welcome collaboration from Persian language researchers, educational technology developers, and NLP researchers focusing on low-resource languages.
Advancing Persian Academic NLP Through Efficient Fine-tuning