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") - 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
| 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`. | |
| --- | |