| --- |
| license: apache-2.0 |
| language: |
| - en |
| tags: |
| - prompt-optimization |
| - query-rewriting |
| - spikewhale |
| - escarda |
| pipeline_tag: text-generation |
| --- |
| |
| <img src="Escarda-LLMs.png" width="50%"> |
|
|
|
|
| # Escarda-Rewrite (86M) |
|
|
| **Escarda-Rewrite** is an 86M-parameter prompt optimizer. Given a raw user question it |
| rewrites it into a detailed, role-grounded **instruction prompt** for a downstream LLM — |
| a persona declaration, a clear task framing, and clarifying questions. |
|
|
| It is part of the **Escarda** line (JEPA SpikeWhale backbone, vocab 16,512) and is designed |
| to pair with [`Quazim0t0/Escarda-86M-Identity`](https://huggingface.co/Quazim0t0/Escarda-86M-Identity) |
| as the downstream answerer: **user query → Escarda-Rewrite → optimized prompt → Escarda-Identity → answer.** |
|
|
| ## Example |
|
|
| | Raw query | Escarda-Rewrite output | |
| |---|---| |
| | How do I lower my cholesterol? | *As a Senior Medical Expert, your task is to provide clear, concise guidance on lowering cholesterol… Begin by declaring your persona… Next, ask clarifying questions…* | |
| | How do I grow tomatoes? | *As an Agricultural Scientist, your task is to provide clear guidance on growing tomatoes… Begin by introducing yourself…* | |
| | What are my rights if I am fired? | *As a Senior Legal Advisor, your task is to provide guidance on… Begin by declaring your persona…* | |
|
|
| ## Usage |
|
|
| ```python |
| from rewrite import EscardaRewrite |
| rw = EscardaRewrite(".") # loads model + tokenizer from this repo |
| print(rw.rewrite("How do I lower my cholesterol?")) |
| ``` |
|
|
| ## How it was built |
|
|
| Escarda-Rewrite was trained to match, and is **benchmarked against**, the prompt-optimization |
| behaviour of **QueryShield-1.5B** (`ml-intern-explorers/queryshield-1.5b`) — a 1.5B prompt |
| optimizer — at ~1/17th the size, using a balanced, topic-roled corpus so the chosen expert |
| persona tracks the topic of the query (Medical, Legal, Financial, Agricultural, Software, |
| Data Science, Marketing, Education, Research, …). |
|
|
| ## Citation |
|
|
| Created by **Dean Byrne** (Quazim0t0). |
|
|
| ```bibtex |
| @misc{byrne2026escardarewrite, |
| title = {Escarda-Rewrite: an 86M prompt optimizer}, |
| author = {Byrne, Dean}, |
| year = {2026} |
| } |
| ``` |
|
|