Claudish Style Adapter

A LoRA adapter (PEFT) that rewrites text between plain English and Claudish โ€” the characteristic prose style of Claude and Claude Code โ€” while preserving all facts and meaning. Use it as a surface-layer style rewriter on top of any underlying model (Claude, GPT, Grok, local models, ...).

How it was trained

Parallel data was generated with the official bidirectional Claudish translator from ProgramAsWeights (function ids ca9d5165b6c8e6615529 and e469f61ccab2699fbd51). v2 (current): 32k seeds โ†’ 21.8k pairs surviving an embedding-based meaning-preservation filter, plus 5k synthetic multi-paragraph pairs โ†’ 53.6k instruction examples (both directions), fine-tuned on Qwen/Qwen2.5-7B-Instruct with LoRA (bf16, r=32, all linear projections, 2 epochs, max length 2048). Pipeline code: claudish-style-adapter.

Evaluation (v2, held out; Claude-judged scores are 1โ€“5)

Slice Direction Ref sim Meaning Judge: style Judge: faithful
standard โ†’ Claudish 0.86 0.83 1.7 2.9
standard โ†’ English 0.90 0.86 4.0 3.2
long (>800 chars) โ†’ Claudish 0.88 0.78 2.0 1.4
long (>800 chars) โ†’ English 0.90 0.80 3.8 1.9

v2's headline fix over v1: long inputs no longer degenerate (v1 collapsed to ~0.21ร— input length with 0.48 reference similarity on the long slice; v2 holds 0.68ร— and 0.88).

Honest assessment

This adapter is a distillation of the official translator, and it inherits that teacher's ceiling โ€” the Claude-judged scores above are the candid measure. The Claudish โ†’ English direction is usable; the English โ†’ Claudish direction reads as imitation-Claudish (judged 1.7โ€“2.0/5 for style) and can drift or, on long inputs, append unrelated content (an artifact of the synthetic long-pair construction). For quality-critical restyling, use the style guide with a capable instruction-following model instead โ€” it ships in the same repo for exactly this reason. A v3 trained on higher-quality pairs is planned.

Usage

from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer

model = AutoPeftModelForCausalLM.from_pretrained("adamrotmil/claudish-style-adapter", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("adamrotmil/claudish-style-adapter")

PROMPT = '''### Instruction:
Rewrite the following text in Claudish style while preserving all facts and meaning.

### Input:
%s

### Response:
'''

inputs = tokenizer(PROMPT % "The tests failed because the DB connection wasn't closed.",
                   return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

For the reverse direction, use the instruction: "Rewrite the following Claudish text into plain, direct English while preserving all facts and meaning."

Intended use & limitations

  • Surface-layer style rewriting only: the adapter is trained to preserve facts, certainty, and implications, and to never invent content โ€” but verify outputs for high-stakes text.
  • English only; not intended for restyling code blocks or structured markup.
  • Works best on sentence-to-paragraph inputs (training texts were 40โ€“800 characters). The English โ†’ Claudish direction can degenerate on much longer inputs โ€” chunk long documents into paragraphs first.
  • Instruction-shaped inputs ("Classify the following...") may occasionally be answered rather than restyled.
Downloads last month
6
GGUF
Model size
8B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for adamrotmil/claudish-style-adapter

Base model

Qwen/Qwen2.5-7B
Adapter
(2646)
this model