The Research Report
The Prompt Optimizer That Runs on Your Laptop
Most prompt optimization tools work the same way. You send your prompt to GPT-4 or Claude. The big model rewrites it. You get back something long and elaborate. You plug that into your actual model, the one you deploy, and hope for the best.
That hope falls apart when your deployed model is small. GPT-4 writes prompts for GPT-4. Those prompts do not work well on LLaMA-7B or Qwen-1.5B. The instructions overwhelm smaller models. Key points get lost. The "optimized" prompt makes things worse.
A paper accepted at EACL 2026 solves this problem from the opposite direction. Instead of using a big model to fix prompts, the authors trained a small model that knows what makes prompts good. No API calls. No privacy leaks. No downward compatibility disaster.
They call it MePO: Merit-guided Prompt Optimization. The code, model weights, and a 40,000-example preference dataset are all open-sourced at github.com/MidiyaZhu/MePO.
The Merits That Actually Matter
The paper starts with a question most prompt optimization research skips: what makes a prompt good in the first place?
The authors ran a systematic analysis. They took 5,000 questions from the Alpaca dataset. They had a lightweight model (Qwen2.5-7B-Instruct) rewrite each one five times. Then they scored every response using DeepSeek-R1 as a judge.
Some rewrites scored much higher than others. The difference sometimes came down to a few words. So they asked: what do the high-scoring prompts have in common?
Four qualities emerged consistently:
- Clarity. The prompt sets clear, unambiguous expectations.
- Precision. The language is specific and purposeful, especially when selecting concepts.
- Concise Chain-of-Thought. Brief reasoning cues guide the model's thought process without bloating the prompt.
- Preserve Original Information. No content or intent gets lost in the rewrite.
Notice what is not on this list. No verbosity. No exhaustive edge-case handling. No "you are an expert" framing. The merits that actually drive prompt quality are simple and model-agnostic. They help big models and small models alike.
This finding matters because it reframes prompt optimization. Instead of asking "what would GPT-4 write?" you ask "does this prompt embody the four merits?" That is a question a small model can answer.
The Downward Compatibility Problem
The paper documents a problem that anyone deploying LLMs at scale has felt but few have formally measured.
When GPT-4 optimizes a prompt, it tends to add detailed instructions, multi-step reasoning frameworks, and edge case handling. That works great for GPT-4. A 7B parameter model reads the same prompt and gets lost. The model tries to follow every instruction. It misses the core task. It produces irrelevant or incorrect responses.
The authors call this "limited downward compatibility." Prompts optimized on large models do not transfer well to small ones. They show concrete examples from GSM8K where GPT-4-optimized prompts cause lightweight models to produce completely wrong answers.
This is not a minor issue. Most production deployments use models far smaller than GPT-4. If your prompt optimization pipeline assumes access to a frontier model, you are optimizing for a model you are not actually running.
How MePO Works
MePO takes the four merits and builds a practical system around them.
Step 1: Merit-guided dataset construction. Instead of using GPT-4 to generate training data, the authors used Qwen2.5-7B-Instruct. They instructed the small model to rewrite prompts according to the four merits. This produced a 40,000-example prompt preference dataset. Each example pairs an original prompt with its merit-guided improvement. The dataset is open-sourced on HuggingFace at zixiaozhu/MePO.
Step 2: Train a lightweight optimizer. They trained MePO on this preference dataset using direct preference optimization. The result is a small model that takes any prompt and rewrites it following the four merit principles. No API calls. Runs locally on consumer hardware.
Step 3: Deploy anywhere. Because MePO learned model-agnostic merits rather than big-model-specific patterns, the optimized prompts work across model sizes. They help GPT-4o. They help Qwen2.5-7B. They help Qwen2.5-1.5B. Upward and downward compatibility, not just one or the other.
What the Benchmarks Show
The authors evaluated MePO on five downstream tasks: GSM8K, BIG-Bench Hard, ARC-Challenge, ARC-Easy, and PIQA. They tested across multiple inference model sizes.
At the prompt level, MePO's merit-guided rewrites scored higher than raw prompts across all evaluated models. The improvements were consistent, not sporadic.
At the response level, MePO matched or exceeded existing discrete prompt optimization methods including EvoPrompt, PromptAgent, and POIR. This is notable because those methods use GPT-4 or similar large models for optimization. MePO achieves comparable or better results using a model small enough to run on a laptop.
The key benchmark wins:
- MePO outperforms EvoPrompt across lightweight inference models on BIG-Bench Hard.
- MePO matches or exceeds POIR on instruction-following tasks while being fully interpretable.
- MePO's optimized prompts improve performance on both large and small inference models, unlike methods optimized exclusively for large models.
The paper also tested upward compatibility: prompts optimized by MePO for small models also improve performance on larger models. This bidirectional transfer is unique. Most prompt optimization methods only work well in one direction.
Why This Matters for Production
Three practical implications stand out.
Privacy. Every time you send a prompt to GPT-4 for optimization, you expose your data to an external API. MePO runs locally. No data leaves your machine. For healthcare, finance, government, and any regulated industry, this is not a nice-to-have. It is a requirement.
Cost. GPT-4 API calls add up. If you are optimizing thousands of prompts, the bill gets real. MePO runs inference on a single GPU. The marginal cost per prompt optimization is effectively zero after the initial hardware.
Model-agnostic deployment. Most organizations run multiple model sizes. A customer-facing chatbot uses a small model for speed. An internal tool uses a larger one. MePO's optimized prompts work for both. You do not need separate optimization pipelines for each model tier.
The Bigger Picture
MePO fits into a growing trend: prompt optimization that does not depend on frontier models.
DSPy uses programmatic optimization but still calls external APIs for evaluation. TextGrad computes textual gradients through LLM calls. EvoPrompt and PromptAgent rely on GPT-4 to generate and evaluate prompt candidates. These methods work, but they share the same dependency on large, expensive models.
MePO takes a different path. It asks: what if we understood the properties of good prompts well enough that a small model could optimize them? The four merits give that small model explicit guidance. The preference dataset teaches it what "better" looks like. The result is a system that runs anywhere, costs nothing to operate, and produces prompts that work across model sizes.
That is a meaningful shift. Prompt optimization has been a privilege of organizations with API budgets and access to frontier models. MePO makes it accessible to anyone with a GPU.
Getting Started
The repository is at github.com/MidiyaZhu/MePO. Setup is straightforward:
pip install -r requirements.txt
python MePO_run_train.py
The authors recommend using the MePO_BPO dataset variant for training optimizers targeting models under 7B parameters, especially for chatbot-style tasks.
The model weights are on HuggingFace at zixiaozhu/MePO. The dataset variants include:
- MePO — the full preference dataset
- MePO_BPO — optimized for training lightweight optimizers
- MePO_Alpaca — based on the Alpaca dataset
For downstream evaluation, the repo includes scripts for GSM8K, BIG-Bench Hard, ARC-Challenge, ARC-Easy, and PIQA.
Limitations and Open Questions
MePO has boundaries. The four merits were discovered through empirical analysis on general open-ended queries. Tasks with specialized domains or unusual reasoning requirements might need additional merit categories. The authors note that Chain-of-Thought was less prominent in their dataset because it focused on general queries rather than reasoning-specific tasks.
The preference dataset was generated by a single model family (Qwen). While the results generalize across inference models, the training data's model diversity could be broader.
And MePO optimizes discrete prompts. It does not handle continuous prompt tuning, soft prompts, or prompt embeddings. Those remain separate problem domains.
The Takeaway
MePO proves something the field needed to hear: you do not need GPT-4 to write good prompts. You need to understand what makes prompts good. Once you formalize those qualities, even a small model can apply them.
The four merits, clarity, precision, concise chain-of-thought, and information preservation, give prompt optimization a concrete target. The local deployment eliminates API dependency and privacy risk. The model-agnostic transfer means one optimization pass works everywhere.
For teams running small models in production, MePO is worth a close look. The paper is "Rethinking Prompt Optimizers: From Prompt Merits to Optimization," accepted as an EACL 2026 long paper. The arXiv ID is 2505.09930. Everything is open-source.
Suggested Title
The Prompt Optimizer That Runs on Your Laptop
Word Count
1,367
Citations
- Zhu, Z., Zhou, H., Feng, Z., Li, T., Chua, J.J.D., Mak, L.O., Ng, G.W., & Mao, K. (2025). "Rethinking Prompt Optimizers: From Prompt Merits to Optimization." EACL 2026. arXiv:2505.09930. https://arxiv.org/abs/2505.09930
- ACL Anthology entry: https://aclanthology.org/2026.eacl-long.38/
- GitHub repository: https://github.com/MidiyaZhu/MePO
- HuggingFace datasets: https://huggingface.co/datasets/zixiaozhu/MePO
- HuggingFace model: https://huggingface.co/zixiaozhu/MePO
- Wang et al. (2024). PromptAgent (referenced for downward compatibility concerns)
- Lu et al. (2025). Small optimizer failure observations (referenced)
- Guo et al. (2024). EvoPrompt (benchmarked comparison)
- Liang et al. (2024). POIR (benchmarked comparison)
Fact-Check Notes
- EACL 2026 acceptance: Confirmed. The ACL Anthology entry (2026.eacl-long.38) lists it as an EACL 2026 long paper.
- Four merits: Confirmed from the paper: Clarity, Precision, Concise Chain-of-Thought, Preserve Original Information.
- 40K dataset: Confirmed. The paper states "40k-scale, merit-guided, prompt optimization preference dataset."
- Qwen2.5-7B-Instruct as the lightweight model: Confirmed from the paper and GitHub README.
- GitHub stars: 13 as of May 6, 2026. New repository, early adoption stage.
- Downward compatibility problem: Confirmed. The paper demonstrates this with concrete examples from GSM8K and other benchmarks.
- Benchmarks tested: GSM8K, BIG-Bench Hard, ARC-Challenge, ARC-Easy, PIQA, and instruction-following tasks. Confirmed from the paper and GitHub.
- MePO matches/exceeds EvoPrompt and POIR: Confirmed from the paper's experimental results across multiple tasks and model sizes.
- Local deployment / no API calls: Confirmed. MePO runs on a single GPU without external API dependencies.
- Model-agnostic transfer (both up and down): Confirmed. The paper demonstrates upward and downward compatibility across model sizes.