Downloads · 30 days
13
9% of all-time downloads
aiml8726737/personal-prompt-engineer-qwen1.5b
personal-prompt-engineer-qwen1.5b is a text generation model from aiml8726737. 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.
Personal Prompt Engineer is a QLoRA fine-tuned LoRA adapter built on Qwen2.5-1.5B-Instruct. It specializes in transforming short, vague, or incomplete prompts into structured, detailed, and execution-ready prompts whi…
Downloads · 30 days
13
9% of all-time downloads
All-time downloads
142
Public
Repo size
85.3 MB
Likes
2
Public
Click a slice to open those files.
.safetensors73.9 MB · 87%
From the Hugging Face model README
Personal Prompt Engineer is a QLoRA fine-tuned LoRA adapter built on Qwen2.5-1.5B-Instruct. It specializes in transforming short, vague, or incomplete prompts into structured, detailed, and execution-ready prompts while preserving the user's original intent.
Unlike a general chatbot, this model is designed to rewrite prompts, not answer them.
| Property | Value |
|---|---|
| Base Model | Qwen2.5-1.5B-Instruct |
| Fine-tuning Method | QLoRA |
| Adapter Type | LoRA |
| Quantization | 4-bit NF4 |
| Framework | Transformers + PEFT |
| Primary Task | Prompt Rewriting |
The model is designed for:
Typical workflow:
User Prompt
↓
Personal Prompt Engineer
↓
Optimized Prompt
↓
GPT / Claude / Gemini / Llama / Qwen
make a react app with dark mode
Create a modern React application with a responsive user interface that includes a dark/light mode toggle.
Requirements:
- Use React functional components.
- Implement state management using Context API.
- Persist theme preference in localStorage.
- Include accessible UI components.
- Follow clean project architecture.
- Provide complete source code with explanations.
The adapter was fine-tuned on approximately 3,030 curated prompt rewriting examples spanning:
Each example consists of:
| Hyperparameter | Value |
|---|---|
| LoRA Rank | 16 |
| LoRA Alpha | 32 |
| LoRA Dropout | 0 |
| Optimizer | paged_adamw_8bit |
| Learning Rate | 2e-4 |
| Scheduler | Cosine |
| Epochs | 2 |
| Sequence Length | 512 |
| Batch Size | 4 |
| Gradient Accumulation | 4 |
| Effective Batch Size | 16 |
| Epoch | Training Loss | Validation Loss | Mean Token Accuracy |
|---|---|---|---|
| 1 | 1.1990 | 1.1171 | 74.08% |
| 2 | 0.9854 | 1.0420 | 76.45% |
The validation loss consistently decreased during training, indicating good convergence without obvious signs of overfitting.
pip install transformers peft accelerate bitsandbytes
import warnings warnings.filterwarnings("ignore")
import importlib.metadata _orig_version = importlib.metadata.version def _mock_version(package_name, *args, **kwargs): if package_name == "torchao": return "1.0.0" return _orig_version(package_name, *args, **kwargs) importlib.metadata.version = _mock_version
import torch from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer from peft import PeftModel
BASE_MODEL = "Qwen/Qwen2.5-1.5B-Instruct" LORA_ADAPTER = "aiml8726737/personal-prompt-engineer-qwen1.5b"
device = "cuda" if torch.cuda.is_available() else ("mps" if hasattr(torch.backends, "mps") and torch.backends.mps.is_available() else "cpu") dtype = torch.float16 if device in ["cuda", "mps"] else torch.float32
print(f"Loading Hugging Face Pipeline on {device.upper()}...")
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL) tokenizer.pad_token_id = tokenizer.eos_token_id
base_model = AutoModelForCausalLM.from_pretrained( BASE_MODEL, torch_dtype=dtype, device_map="auto" if device == "cuda" else None ) if device != "cuda": base_model = base_model.to(device)
model = PeftModel.from_pretrained(base_model, LORA_ADAPTER)
generator = pipeline( "text-generation", model=model, tokenizer=tokenizer, device_map="auto" if device == "cuda" else None )
SYSTEM_PROMPT = "You are an expert Personal Prompt Engineer. Your task is to rewrite vague user prompts into professional, execution-ready prompts."
def rewrite_prompt(draft_prompt: str) -> str: messages = [ {"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": f"Rewrite the following draft prompt into a professional, execution-ready prompt.\n\nDraft Prompt:\n<<<DRAFT>>> {draft_prompt} <<<END>>>"} ]
# Hugging Face Pipeline Execution
result = generator(
messages,
max_new_tokens=300,
temperature=0.7,
do_sample=True,
return_full_text=False
)
return result[0]["generated_text"]
if name == "main": draft = "create a landing page for an AI agent app" print("\n" + "="*70) print("DRAFT PROMPT:") print(draft) print("="*70) print("\nREWRITTEN BY HUGGINGFACE PIPELINE:") print(rewrite_prompt(draft)) print("="*70)
This LoRA adapter is released under the Apache 2.0 License, consistent with the license of the base Qwen2.5 model.
@misc{personalpromptengineer2026,
title={Personal Prompt Engineer: QLoRA Fine-tuning for Prompt Rewriting},
author={Yashvardhan Agrawal},
year={2026},
howpublished={Hugging Face Model Hub}
}