Humanizer Pro Seed-57303
LoRA adapter for text editing
2 min readupdated
This experimental PEFT (parameter-efficient fine-tuning method for models) adapter improves the clarity of English procedural prose while strictly preserving all facts, figures, and conditions without adding extra information. The model is built on LiquidAI/LFM3-1.7B using a supervised factual editing recipe across 48 data pairs. The adapter is useful for writers and developers who need to automate high-quality polishing of instructions and technical documentation while preserving original accuracy.
Key features
- Built on LiquidAI/LFM3-1.7B with LoRA rank 8 and alpha 16.
- Trained on a recipe of 48 data pairs for one epoch (48 updates).
- Supports CPU loading and generation on various available devices.
- Distributed under the Liquid AI LFM Open License v1.0.
What you can do
- Apply in Python scripts to edit and clean up English technical or procedural prose.
- Integrate the adapter into text processing pipelines to improve document readability without losing factual data.
Example
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "LiquidAI/LFM3-1.7B"
base_revision = "0dc4268b561499c648c7ba7c9466bf3d8d01517a"
tokenizer = AutoTokenizer.from_pretrained(
base_id, revision=base_revision, trust_remote_code=True
)
base = AutoModelForCausalLM.from_pretrained(
base_id, revision=base_revision, trust_remote_code=True,
dtype=torch.bfloat16, device_map="auto"
)
model = PeftModel.from_pretrained(base, "Tdamre/LFM3-1.7B-Humanizer-Pro-Seed-57303").eval()
messages = [
{"role": "system", "content": "Edit the text for clarity. Preserve every fact, number, condition, uncertainty and responsible party. Do not add facts. Return only the revised passage."},
{"role": "user", "content": "Paste the passage to edit here."},
]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)
inputs = tokenizer(prompt, add_special_tokens=False, return_tensors="pt").to(model.device)
with torch.inference_mode():
result = model.generate(
**inputs, do_sample=False, max_new_tokens=384,
pad_token_id=tokenizer.eos_token_id
)
print(tokenizer.decode(result[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))Read more
DetailsBenchmarks (comparison across 8 answers): fully accepted 5 / 8 passes, facts preserved 54 / 64, editing goals achieved 3 / 6.
Compiled and run using Python 3.12, PyTorch 2.13.0, Transformers 5.22.2, PEFT 0.21.2, Accelerate 1.15.0, and Safetensors 0.8.0.
Training details: learning rate 0.00005, seed 57303, adapter SHA-256 weight 76d5ac206af77653061a1728a2a0c986ea9073bfadcc969042733a0e9cc0de0c.










Comments