Ari-LLM RewriteBot 135M (DPO-Aligned)
Ari-LLM RewriteBot (135M) is an ultra-fast, commercial-grade paraphrasing and text rewriting foundation model developed by Ari-LLM.
It is trained on the curated 10-Mode QuillBot & PAWS & QQP corpus with full-parameter SFT, followed by Direct Preference Optimization (DPO) to punish lazy verbatim repetition and reward high lexical diversity, clause restructuring, and stylistic fidelity.
Designed specifically to run 100% locally on consumer CPUs with ultra-low memory footprint (~540MB) and instantaneous latency.
Supported Modes & Control Tokens
Ari-LLM RewriteBot supports 10 distinct rewriting modes via system prefix tags:
| Mode Tag | Purpose | Example Transformation |
|---|---|---|
[Standard Paraphrase] | Natural clause and synonym reformulation | Severe weather canceled the flight ➔ The flight was canceled due to bad weather. |
[Formal Rewrite] | Professional email & business correspondence | Send me that soon ➔ Could you kindly provide the requested document at your earliest convenience? |
[Academic Rewrite] | Scholarly, research-paper phrasing | This shows it's true ➔ These empirical findings substantiate the hypothesis across test observations. |
[Simple Rewrite] | Plain English & maximum clarity | Utilizing methodologies facilitates efficiencies ➔ Using modern computers makes work faster and easier. |
[Creative Rewrite] | Vivid metaphors & literary prose | The sun went down ➔ Twilight melted into twilight shadows as diamonds pierced the velvet expanse of night. |
[Shorten Mode] | Executive summary & high conciseness | Due to the circumstance that... ➔ Because of... |
[Anti-AI Humanize] | Removes robotic AI syntax & clichés | In conclusion, it is important to remember... ➔ Look, navigating daily life gets messy—and that's totally normal. |
[Active Voice] | Restructures passive sentences to active | The bug was found by QA ➔ The QA team discovered the problem. |
[Grammar Polish] | Corrects syntax and grammatical errors | She don't know the answer ➔ She does not know the answer. |
[Flip Clauses & Invert] | Inverts subordinate clauses for fresh flow | Reverses cause-effect sentence architecture |
Quickstart (Python & Transformers)
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "sriyuthlucky/ari-rewritebot-135m-dpo" # or local path
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, dtype=torch.float32)
def rewrite(text: str, mode: str = "Standard Paraphrase") -> str:
prompt = f"<|im_start|>user\n[{mode}] {text}<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
out = model.generate(
**inputs,
max_new_tokens=100,
do_sample=True,
temperature=0.7,
top_p=0.9,
repetition_penalty=1.15,
eos_token_id=[tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|im_end|>")],
pad_token_id=tokenizer.eos_token_id
)
gen = out[0][inputs["input_ids"].shape[1]:]
res = tokenizer.decode(gen, skip_special_tokens=True).strip()
return res.split("<|im_end|>")[0].strip()
# Example:
text = "The flight was canceled because of severe weather conditions."
print(rewrite(text, mode="Standard Paraphrase"))
# Output: "The flight was canceled due to bad weather."
print(rewrite("Can you send me that project update as soon as possible?", mode="Formal Rewrite"))
# Output: "Could you kindly provide the requested project update at your earliest convenience?"
Training Methodology
- Foundation Base:
SmolLM2-135Mpre-trained on 2 Trillion high-quality English tokens. - Supervised Fine-Tuning (SFT): Full-parameter fine-tuning on 113,000 multi-mode paraphrase pairs (PAWS + QQP + QuillBot master templates) with prompt loss masking (
-100). - Direct Preference Optimization (DPO):
- Reference Model: Frozen SFT Base
- Chosen ($y_w$): Lexically rich, structurally inverted rewrites
- Rejected ($y_l$): Verbatim lazy copies, repetitive phrasing
- Reward Margin reached: +3.30
Citation & Branding
@misc{ari_rewritebot_2026,
author = {Ari-LLM Team},
title = {Ari-LLM RewriteBot 135M: High-Performance DPO Paraphraser},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/sriyuthlucky/ari-rewritebot-135m-dpo}}
}