Text Generation
Transformers
Safetensors
English
bart
text2text-generation
style-transfer
rewriting
humanization
seq2seq
evaluation
bertscore
rouge
chrf
Instructions to use cive202/humanize-ai-text-bart-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cive202/humanize-ai-text-bart-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cive202/humanize-ai-text-bart-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("cive202/humanize-ai-text-bart-base") model = AutoModelForSeq2SeqLM.from_pretrained("cive202/humanize-ai-text-bart-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cive202/humanize-ai-text-bart-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cive202/humanize-ai-text-bart-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cive202/humanize-ai-text-bart-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cive202/humanize-ai-text-bart-base
- SGLang
How to use cive202/humanize-ai-text-bart-base 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 "cive202/humanize-ai-text-bart-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cive202/humanize-ai-text-bart-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "cive202/humanize-ai-text-bart-base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cive202/humanize-ai-text-bart-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cive202/humanize-ai-text-bart-base with Docker Model Runner:
docker model run hf.co/cive202/humanize-ai-text-bart-base
File size: 3,506 Bytes
5fd97b0 31b4699 5fd97b0 31b4699 e0f6ae8 31b4699 5fd97b0 f88bbb0 5fd97b0 fd7ae4d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | ---
language:
- en
license: mit
tags:
- text-generation
- style-transfer
- rewriting
- humanization
- seq2seq
- bart
- evaluation
- bertscore
- rouge
- chrf
library_name: transformers
base_model: facebook/bart-base
pipeline_tag: text-generation
paper:
- https://arxiv.org/abs/2604.11687v1
---
# cive202/humanize-ai-text-bart-base
Fine-tuned **BART-base** (`facebook/bart-base`) for **AI → Human rewriting** (“humanization”) via prefix-based conditional generation.
- **Architecture**: encoder–decoder (seq2seq)
- **Parameters**: ~139M
- **Task format**: `humanize: {ai_text}` → `{human_text}`
---
## 📄 Paper
**“Rewriting the Machine: Encoder-Decoder vs. Decoder-Only Transformers for AI-to-Human Text Style Transfer”**
**Authors:** Utsav Paneru et al.
**arXiv:** https://arxiv.org/abs/2604.11687v1
**Status:** Preprint (2026)
### Citation
```bibtex
@misc{paneru2026makesoundlikehuman,
title={Please Make it Sound like Human: Encoder-Decoder vs. Decoder-Only Transformers for AI-to-Human Text Style Transfer},
author={Utsav Paneru},
year={2026},
eprint={2604.11687},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2604.11687},
}
```
## Quickstart
```bash
pip install -U "transformers>=4.40.0" torch sentencepiece
```
```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "cive202/humanize-ai-text-bart-base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
ai_text = "Large language models often produce fluent, structured prose with recognizable regularities..."
inputs = tokenizer("humanize: " + ai_text, return_tensors="pt", truncation=True)
out = model.generate(
**inputs,
max_new_tokens=256,
num_beams=4,
)
print(tokenizer.decode(out[0], skip_special_tokens=True))
```
---
## Training note (important)
This checkpoint corresponds to a **smoke-test / pipeline validation run**, not a full training run.
Saved config characteristics:
- `max_steps = 10`
- `max_train_samples = 128`
- `num_train_epochs = 1`
⚠️ Interpret results below as a **lower-bound baseline**, not a fully optimized model.
---
## Dataset
Parallel chunk pairs created via sentence-aware chunking:
- **Train**: 25,140 pairs
- **Validation**: 1,390
- **Test**: 1,390
### Preprocessing
- Sentence tokenization (NLTK)
- Greedy token packing (≤200 tokens)
- Filtering short pairs (<10 words)
- Document-disjoint splits
---
## Evaluation (test n = 1,390)
### Reference similarity
- **BERTScore F1**: **0.9088**
- **ROUGE-L**: **0.4448**
- **chrF++**: **46.4131**
### Fluency proxy
- **GPT-2 PPL (output)**: **26.6919**
- **GPT-2 PPL (human)**: **23.6912**
### Style shift
- **Mean marker shift**: **0.6513**
This baseline partially shifts text toward human-like distributions but is limited by minimal training.
---
## Limitations
- Not a fully trained model (smoke-test configuration)
- Limited style transformation strength
- No guarantee of bypassing AI detectors
- Lower performance compared to larger/full runs
---
## Research context
Part of the unpublished 2026 manuscript:
**“Rewriting the Machine: Encoder-Decoder vs. Decoder-Only Transformers for AI-to-Human Text Style Transfer”**
- Status: preprint
- Link: https://arxiv.org/abs/2604.11687
---
## License
MIT (placeholder). Ensure compatibility with `facebook/bart-base`.
---
|