Instructions to use arunsingh80475/qwen2.5-14b-humanizer-v4-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use arunsingh80475/qwen2.5-14b-humanizer-v4-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-14B-Instruct") model = PeftModel.from_pretrained(base_model, "arunsingh80475/qwen2.5-14b-humanizer-v4-lora") - Transformers
How to use arunsingh80475/qwen2.5-14b-humanizer-v4-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arunsingh80475/qwen2.5-14b-humanizer-v4-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("arunsingh80475/qwen2.5-14b-humanizer-v4-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arunsingh80475/qwen2.5-14b-humanizer-v4-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arunsingh80475/qwen2.5-14b-humanizer-v4-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arunsingh80475/qwen2.5-14b-humanizer-v4-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/arunsingh80475/qwen2.5-14b-humanizer-v4-lora
- SGLang
How to use arunsingh80475/qwen2.5-14b-humanizer-v4-lora with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "arunsingh80475/qwen2.5-14b-humanizer-v4-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arunsingh80475/qwen2.5-14b-humanizer-v4-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "arunsingh80475/qwen2.5-14b-humanizer-v4-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arunsingh80475/qwen2.5-14b-humanizer-v4-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use arunsingh80475/qwen2.5-14b-humanizer-v4-lora with Docker Model Runner:
docker model run hf.co/arunsingh80475/qwen2.5-14b-humanizer-v4-lora
- ๐ก๏ธ Qwen2.5-14B-Humanizer-v4-LoRA: Airtight Fact-Preserving Anti-AI Model
- โก What Makes V4 Different? (The Airtight Fact-Lock Architecture)
- ๐ฏ Model Details
- ๐ฌ Anti-AI Quality Gates & Elimination Policy
- ๐ Dataset & Self-Audit Statistics
- ๐ ๏ธ Hyperparameters & Training Specifications
- ๐ป Quick Start & Inference
- ๐ Recommended Generation Settings
- ๐งช Live Verification Benchmark
- ๐ก๏ธ Intended Uses & Limitations
- ๐ Citation & Contact
- โก What Makes V4 Different? (The Airtight Fact-Lock Architecture)
๐ก๏ธ Qwen2.5-14B-Humanizer-v4-LoRA: Airtight Fact-Preserving Anti-AI Model
qwen2.5-14b-humanizer-v4-lora is a high-precision, fine-tuned Low-Rank Adaptation (LoRA) adapter built upon Qwen/Qwen2.5-14B-Instruct. It transforms robotic, low-perplexity, stereotypical AI-generated text into fluid, nuanced, and engaging human-grade prose while enforcing an airtight 100% mathematical and factual lock.
Developed by Arun Singh, this Version 4 model is the result of a complete overhaul of previous humanizer iterations, addressing the most critical flaw in modern paraphrasers and AI humanizers: numerical drift, currency alteration, and subtle factual hallucination.
โก What Makes V4 Different? (The Airtight Fact-Lock Architecture)
Earlier humanization models and commercial paraphrasers often corrupt quantitative details (for example, truncating $4.2 million into $4M or rounding 18.4% to ~18%). Version 4 introduces an engineered dataset curation and alignment protocol that completely eliminates these leaks.
| Challenge | Version 3 Behavior | Version 4 Solution |
|---|---|---|
| Substring False Matches | Substring checks allowed '7' to match inside '1987', passing bad training pairs. |
Word-Boundary Match: Strict regex (\b\d+\b) prevents substring false positives. |
| Currency & Unit Rounding | Truncated complex metrics ($4.2 million $\rightarrow$ $4M). |
Atomic Metric Locking: Multi-token currencies, decimals, and magnitudes are locked as indivisible units. |
| Corrupted Tokens | Leaked broken UTF-8 sequences (\ufffd, mojibake currency symbols). |
Unicode Sanitization Pass: Complete multi-byte cleansing and character normalization. |
| Robotic Transition Habits | SFT alone left subtle transitional filler intact ("Moreover", "Furthermore"). | Dual SFT + DPO Alignment: Preference optimization directly penalizes formulaic AI phrases. |
| Numerical Hallucination | System prompt vaguely requested factual accuracy. | Strict Zero-Tolerance Prompt: Explicitly forbids rounding, estimation, and truncation. |
| Adaptive Decoding | Fixed high temperature caused metric drift. | Adaptive Temperature Regime: 0.48 for financial/technical data; 0.72 for general prose. |
๐ฏ Model Details
- Developed by: Arun Singh (@arunsingh80475)
- Model Type: Causal Language Model Adapter (PEFT / LoRA)
- Base Model: Qwen/Qwen2.5-14B-Instruct
- Languages: English (
en) - License: Apache 2.0
- Fine-Tuning Regimes: Two-Stage Pipeline (Supervised Fine-Tuning + Direct Preference Optimization)
- Primary Objective: Invert artificial syntax, restore natural burstiness/perplexity, and eliminate AI clichรฉd markers without semantic or numerical distortion.
๐ฌ Anti-AI Quality Gates & Elimination Policy
The training data and preference triplets were filtered against a strict composite anti-AI rulebook combining two leading industry frameworks:
1. Wikipedia 35 Signs of AI Generation
- Participial Overload: Eliminates synthetic dangling comma-
ingclauses (", thereby showcasing...", ", facilitating..."). - Em-Dash Overuse: Enforces zero em-dashes (
โ) or synthetic parenthetical interruptions. - Formulaic Openings & Closings: Bans stiff transitions ("Furthermore", "Moreover", "In conclusion", "In summary").
2. Conor Bronsdon "Avoid-AI-Writing" Standard
- Tier 1A AI Buzzwords (Permanently Suppressed):
- delve, tapestry, realm, paradigm, beacon, bespoke, testament, leverage, cornerstone
- pivotal, watershed moment, game-changer, seamless, meticulous, deep dive, unpack
- ever-evolving, holistic, actionable, interplay, burgeoning, nascent, empower, foster
- Tier 1B Wordiness & Stiff Copulas:
- Bans "due to the fact that", "serves as", "boasts", "commence", "in order to".
- Burstiness Variance Requirement:
- Sentence length variance enforced at $\ge 15.0$ to restore authentic human cadence, natural rhythm, and high perplexity.
๐ Dataset & Self-Audit Statistics
The model was trained on an exclusively audited gold dataset comprising 3,000 gold parallel pairs and 2,850 preference triplets:
===========================================================================
14B v4 DATASET CURATION & AUDIT REPORT
===========================================================================
Total Curated Gold Pairs : 3,000
โข Fact & Number-Locked Pairs : 2,076
โข General Editorial Rewrites : 924
โข Train Split (95%) : 2,850 pairs
โข Validation Split (5%) : 150 pairs
โข DPO Preference Triplets : 2,850 triplets
Rejected by V4 Quality Gates:
โข Currency Rounding / Drift : 224 pairs rejected (were accepted in v3)
โข Substring False Retention : 51 pairs rejected
โข AI Signs Quality Gate : 1,897 pairs rejected
โข Corrupted Unicode Artifacts : Sanitized / Purged
Self-Audit Verification:
โข Numerical & Metric Mismatches : 0 across all 2,850 pairs (100% Pass) โ
===========================================================================
๐ ๏ธ Hyperparameters & Training Specifications
The model was fine-tuned in a two-stage sequential pipeline on Dual NVIDIA Tesla T4 GPUs (16GB x 2) via Kaggle in ~20 minutes total runtime:
LoRA Configuration
- Rank ($r$):
16 - Alpha ($\alpha$):
32 - Dropout:
0.05 - Bias:
none - Target Modules: All linear attention and MLP projections (
q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj) - Precision: Active adapter parameters in
float32; base model in 4-bit NF4 (load_in_4bit=True,bnb_4bit_compute_dtype=torch.float16,bnb_4bit_use_double_quant=True)
Phase 1: Supervised Fine-Tuning (SFT)
- Optimizer:
paged_adamw_8bit - Learning Rate:
1.5e-4(Cosine decay schedule) - Warmup Steps:
25 - Batch Size: Per-device
1with4gradient accumulation steps (Effective batch size = 4) - Sequence Length:
640tokens with ChatML template - Training Time: ~12 minutes
Phase 2: Direct Preference Optimization (DPO)
- Trainer: TRL
DPOTrainerwith implicit reference model (zero additional VRAM footprint) - DPO $\beta$:
0.1 - Learning Rate:
5.0e-5(Cosine schedule) - Warmup Steps:
20 - Batch Size: Per-device
1with8gradient accumulation steps (Effective batch size = 8) - Training Time: ~8 minutes
๐ป Quick Start & Inference
1. Installation
pip install -U torch transformers peft bitsandbytes accelerate
2. Python Inference Code (4-bit NF4 Quantized)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
BASE_MODEL_ID = "Qwen/Qwen2.5-14B-Instruct"
ADAPTER_ID = "arunsingh80475/qwen2.5-14b-humanizer-v4-lora"
# 1. Load Tokenizer
tokenizer = AutoTokenizer.from_pretrained(ADAPTER_ID, trust_remote_code=True)
# 2. Configure 4-bit quantization for efficient GPU memory usage
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_use_double_quant=True,
)
# 3. Load Base Model and LoRA Adapter
base_model = AutoModelForCausalLM.from_pretrained(
BASE_MODEL_ID,
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(base_model, ADAPTER_ID)
model.eval()
# 4. Strict Fact-Preservation System Prompt
SYSTEM_PROMPT = (
"You are an expert human writer and editor. Rewrite the input text into natural, clear, and engaging human prose.\n"
"STRICT COMPLIANCE RULES:\n"
"1. ABSOLUTE NUMBER & METRIC LOCK: Preserve 100% of all numbers, decimals, percentages, dates, and currencies VERBATIM. "
"NEVER round, truncate, or approximate figures (e.g. keep '$4.2 million' exactly as '$4.2 million', NEVER convert to '$4M'; keep '18.4%' exactly, NEVER '~18%').\n"
"2. FLAWLESS GRAMMAR: Ensure strict subject-verb agreement and natural sentence flow.\n"
"3. NATURAL CADENCE: Eliminate robotic transitions ('Furthermore', 'Moreover', 'In conclusion') and commercial clichรฉs "
"('testament', 'cornerstone', 'delve', 'pivotal') without becoming overly colloquial.\n"
"4. Output ONLY the direct rewritten text. No preambles, no explanations."
)
def humanize(text: str, temperature: float = 0.48) -> str:
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": text}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=temperature,
top_p=0.92,
repetition_penalty=1.12,
do_sample=True,
)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
return response.strip()
# Example: Challenging corporate / financial input
sample_input = (
"Our company's financial performance in Q3 stands as a testament to strategic resilience. "
"Overall revenue increased by 18.4% to $4.2 million, largely driven by the launch of our cloud platform. "
"Furthermore, by optimizing onboarding workflows, client churn decreased from 6.2% to 3.8% over the past six months. "
"In conclusion, operational discipline serves as a foundational cornerstone for sustained profitability."
)
print(humanize(sample_input))
๐ Recommended Generation Settings
| Domain / Input Type | Temperature | Top-P | Repetition Penalty | Rationale |
|---|---|---|---|---|
| Financial / Quantitative | 0.45 โ 0.48 |
0.90 |
1.12 |
Prevents token divergence and locks exact currencies and numbers. |
| Technical / Scientific | 0.48 โ 0.52 |
0.92 |
1.12 |
Preserves exact formulas, acronyms, and terminology. |
| Articles / Essays | 0.68 โ 0.72 |
0.94 |
1.10 |
Higher burstiness and rhythmic sentence length variety. |
| Creative / Narrative | 0.72 โ 0.78 |
0.95 |
1.08 |
Idiomatic variety and expressive prose. |
๐งช Live Verification Benchmark
Input (Standard LLM Generation):
"Our company's financial performance in Q3 stands as a testament to strategic resilience. Overall revenue increased by 18.4% to $4.2 million, largely driven by the launch of our cloud platform. Furthermore, by optimizing onboarding workflows, client churn decreased from 6.2% to 3.8% over the past six months. In conclusion, operational discipline serves as a foundational cornerstone for sustained profitability."
V4 Humanized Output:
"Q3 financial results reflect strong operational resilience. Driven by the new cloud platform, revenue grew 18.4% to $4.2 million. Refined onboarding workflows also helped lower customer churn from 6.2% to 3.8% across the last six months. Disciplined execution continues to anchor long-term profitability."
Automated Verification Audit:
- โ
$4.2 millionpreserved verbatim (not rounded to$4M) - โ
18.4%preserved verbatim (not approximated to~18%) - โ
6.2%and3.8%preserved verbatim - โ Zero banned clichรฉs: "testament", "cornerstone", "furthermore", and "in conclusion" completely eradicated
- โ
Zero em-dashes (
โ)
๐ก๏ธ Intended Uses & Limitations
Intended Uses:
- Academic and Technical Revision: Polishing technical papers, research briefs, and theses to read organically while preserving formulas, numbers, and data points.
- Enterprise & Business Communications: Transforming draft reports, executive memos, and newsletters into crisp, engaging human prose.
- Content Creation: Enhancing blogs, case studies, and articles with dynamic rhythm and varied sentence lengths.
- Data Privacy: 100% on-device local executionโzero sensitive client or proprietary data sent to third-party cloud APIs.
Limitations & Ethical Considerations:
- Language Scope: Optimized specifically for English text.
- Ethical Attribution: Not intended to misrepresent authored work where explicit attribution of AI assistance is required by institutional, journalistic, or academic policy.
- Extreme Domain Formulations: For highly specialized code snippets or mathematical proofs embedded in raw text, use lower temperatures (
0.3 โ 0.45) to prevent syntax alterations.
๐ Citation & Contact
If you use this model or pipeline in your research or applications, please cite:
@misc{singh2024qwen14bhumanizer,
author = {Arun Singh},
title = {Qwen2.5-14B-Humanizer-v4-LoRA: Airtight Fact-Preserving Anti-AI Model},
year = {2024},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/arunsingh80475/qwen2.5-14b-humanizer-v4-lora}}
}
Developer Contact: Arun Singh on Hugging Face
- Downloads last month
- 59