5 1 month ago

ollama run sriramcharan126/promptmax

Models

View all →

Readme

promptmax

A locally fine-tuned language model that transforms weak, vague requests into detailed, well-structured, world-class prompts.

Example:

Input:  write something about dogs

Output: Let's write a detailed guide on dog care! First, provide a
comprehensive overview of essential dog care topics like nutrition,
exercise, grooming, and common health issues. Then, explain each topic in
detail, including specific recommendations for different breeds and
situations. Finally, include tips for building a strong bond with your dog.
Make sure to use clear and informative language suitable for beginners.

What it is

  • Base model: Qwen2.5-3B-Instruct
  • Fine-tuning method: LoRA (QLoRA, 4-bit) via Hugging Face PEFT + TRL
  • Training data: ~5,700 examples covering prompt-improvement pairs (weak request → expert-engineered prompt)
  • Format: GGUF, quantized to q4_K_M (~2GB) for fast local inference via Ollama
  • Runs on: CPU or GPU, no special hardware required to use it (only needed more for training it)

Install & run (for anyone you share this with)

1. Install Ollama

Download from ollama.com/download — takes about a minute, no configuration needed.

2. Pull the model

ollama pull sriramcharan126/promptmax
ollama cp sriramcharan126/promptmax promptmax

(The second command just gives it a short local nickname so you can type promptmax instead of the full sriramcharan126/promptmax every time.)

3. Chat with it

ollama run promptmax

Type a weak/vague prompt, get back an improved one. Type /bye to exit.

4. Use it from a script instead of the chat interface

Ollama also runs a local API automatically once installed:

import requests

response = requests.post("http://localhost:11434/api/generate", json={
    "model": "promptmax",
    "prompt": "write something about dogs",
    "stream": False,
})
print(response.json()["response"])

How this was built

This model is one output of an 8-phase local ML pipeline (dataset engineering → conversion → merging → preparation → training → evaluation → inference), fully documented in the main project’s README.md. Summary of the path from raw data to this model:

  1. Data: 6 source datasets (prompt-improvement examples + some general Q&A) cleaned, schema-normalized, deduplicated, and merged into one 5,669-row training set.
  2. Training: LoRA fine-tuning of Qwen2.5-3B-Instruct with QLoRA (4-bit), on an RTX 3050 (6GB VRAM) — chosen specifically because a 3B model fits comfortably in that VRAM budget where a 7B model would not.
  3. Evaluation: automatic metrics (ROUGE-L, token F1) plus a purpose-built prompt-quality rubric (clarity, specificity, structure, completeness) — final result: 0.68 composite prompt-quality score, 80% of test outputs rated “acceptable.”
  4. Export: LoRA adapter merged into the base model, converted to GGUF via llama.cpp, quantized to q4_K_M via Ollama.

Known limitations

  • Training data included some non-prompt-engineering content (medical Q&A), so occasionally its structure/formatting habits reflect that mix rather than pure prompt-engineering style.
  • As a 3B model, it’s not as broadly knowledgeable as larger models — its strength is specifically restructuring and improving prompts, not general-purpose chat or factual recall.
  • Outputs are generated, not retrieved — always review before using an improved prompt for anything high-stakes.

Troubleshooting

Problem Fix
ollama run promptmax says model not found Run ollama pull sriramcharan126/promptmax first, then ollama cp sriramcharan126/promptmax promptmax
Response seems cut off The model has a max response length; ask it to continue, or ask for a shorter version
Want to remove it ollama rm promptmax
Want to check what’s installed ollama list