Link the free CPU Space that runs these checkpoints
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130---license: mitlanguage:- en- zhtags:- text2text-generation- text-humanizer- rewriting- writing-assistant- bilingual- responsible-aipipeline_tag: text2text-generationbase_model:- google-t5/t5-small- uer/t5-small-chinese-cluecorpussmallinference: truewidget:- text: "It is important to note that this robust solution serves as a testament to our commitment to innovation. Moreover, we leverage cutting-edge technology."- text: "值得注意的是,在当今快速发展的时代,我们通过赋能团队来助力企业实现降本增效。"---# Humanize Text Model (Lynote)A lightweight bilingual (English/Chinese) humanizer: two small T5-seq2seqcheckpoints in one repository that rewrite AI-flavored prose into morenatural, human-flavored prose.- **`en/`** — fine-tuned `google-t5/t5-small` (English)- **`zh/`** — fine-tuned `uer/t5-small-chinese-cluecorpussmall` (Chinese)**Try it live:** [✍️ Free AI Humanizer Space](https://huggingface.co/spaces/Lynote/free-ai-humanizer) · [🔍 Free AI Detector Space](https://huggingface.co/spaces/Lynote/free-ai-detector) · [🖼️ Free AI Image Detector Space](https://huggingface.co/spaces/Lynote/free-ai-image-detector) · [📝 Free AI Note Taker Space](https://huggingface.co/spaces/Lynote/free-ai-notes)**Source & full product:** [github.com/lynote-ai/humanize-text](https://github.com/lynote-ai/humanize-text)## What it does- Removes high-confidence AI clichés and formulaic phrases (e.g.*"it is important to note that"*, *"moreover"*, *"值得注意的是"*,*"降本增效"*).- Keeps already-human prose nearly untouched (identity learning).- Preserves numbers, URLs, file paths, code and quoted text (protected with`PROTECTED_N` placeholders during generation, restored afterwards).- Routes automatically by language (CJK ratio detection).## What it is NOTThis is a **writing-quality aid**, not a tool for evading AI detectors.Detector scores are probabilistic, and no humanizer can guarantee that textwill be classified as human. Please use it responsibly:do not use it to misrepresent authorship in academic, legal, or disciplinarycontexts.## Quickstart```bashpip install transformers torch``````pythonfrom humanize import Humanizer # the wrapper bundled in this repoh = Humanizer() # loads this repo (en/ and zh/ sub-checkpoints)print(h.humanize("It is important to note that this robust solution serves as a ""testament to our commitment. Moreover, we leverage cutting-edge ""technology."))print(h.humanize("值得注意的是,我们通过赋能团队来实现降本增效。"))```Raw `transformers` usage (no wrapper):```pythonfrom transformers import T5ForConditionalGeneration, T5Tokenizermodel = T5ForConditionalGeneration.from_pretrained("Lynote/humanize-text-model/en")tokenizer = T5Tokenizer.from_pretrained("Lynote/humanize-text-model/en")inputs = tokenizer("It is important to note that this is robust.", return_tensors="pt")print(tokenizer.decode(model.generate(**inputs, max_length=128)[0], skip_special_tokens=True))```For Chinese use the `zh/` sub-checkpoint with `BertTokenizer`.## Training dataThe corpus is generated deterministically from the editing principles of theLynote reference projects (`humanize-text`, `humanize-text-skill`,`humanizer-lite`):1. **AI → human**: formulaic clause combinations rewritten by a conservativerule engine,2. **human → human (identity)**: clean prose unchanged, so the model learnsnot to rewrite good text,3. **mixed**: clean prose with one injected cliché that must be removed,4. **protected spans**: examples with URLs, numbers, code and quotes.Reproduce:```bashpython scripts/build_dataset.py --out data # 14.7k pairs (en + zh)python scripts/train.py --lang en --epochs 3 # -> checkpoints/humanize-text-model/enpython scripts/train.py --lang zh --epochs 3 # -> checkpoints/humanize-text-model/zhpython scripts/evaluate.py # benchmark on held-out testpytest tests/ # full test suite```## Evaluation (held-out test, 500 AI->human + all identity/protected pairs)| Metric | Value ||---|---|| Corpus BLEU vs rule reference | **99.2** || Cliché removal rate | **100.0%** (435/435) || Identity stability (clean prose, n=67) | **73.1%** || Protected-span preservation (n=253) | **96.8%** || Throughput (MPS) | ~218 chars/s |## Limitations- Trained on synthetic text; real-world inputs may need light post-editing.- One checkpoint per language (English / Chinese); other languages are notspecifically trained.- Long inputs are truncated to 256 tokens.- It is a conservative editor: it will not add stylistic richness that isabsent from the source text.## LicenseMIT. Base models: `google-t5/t5-small` (Apache-2.0) and`uer/t5-small-chinese-cluecorpussmall` (Apache-2.0).123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134---license: mitlanguage:- en- zhtags:- text2text-generation- text-humanizer- rewriting- writing-assistant- bilingual- responsible-aipipeline_tag: text2text-generationbase_model:- google-t5/t5-small- uer/t5-small-chinese-cluecorpussmallinference: truewidget:- text: "It is important to note that this robust solution serves as a testament to our commitment to innovation. Moreover, we leverage cutting-edge technology."- text: "值得注意的是,在当今快速发展的时代,我们通过赋能团队来助力企业实现降本增效。"---# Humanize Text Model (Lynote)A lightweight bilingual (English/Chinese) humanizer: two small T5-seq2seqcheckpoints in one repository that rewrite AI-flavored prose into morenatural, human-flavored prose.- **`en/`** — fine-tuned `google-t5/t5-small` (English)- **`zh/`** — fine-tuned `uer/t5-small-chinese-cluecorpussmall` (Chinese)**Run it online:** both checkpoints run on free CPU in the [Humanize · Model](https://huggingface.co/spaces/Lynote/free-ai-humanizer) tab of [`Lynote/free-ai-humanizer`](https://huggingface.co/spaces/Lynote/free-ai-humanizer). The [Structure-first Scorer](https://huggingface.co/spaces/Lynote/free-ai-humanizer) on that same Space scores a rewrite with the open structure-first metrics.**Try it live:** [Free AI Humanizer Space](https://huggingface.co/spaces/Lynote/free-ai-humanizer) · [Free AI Detector Space](https://huggingface.co/spaces/Lynote/free-ai-detector) · [Free AI Image Detector Space](https://huggingface.co/spaces/Lynote/free-ai-image-detector) · [Free AI Note Taker Space](https://huggingface.co/spaces/Lynote/free-ai-notes)**Source & full product:** [github.com/lynote-ai/humanize-text](https://github.com/lynote-ai/humanize-text)## What it does- Removes high-confidence AI clichés and formulaic phrases (e.g.*"it is important to note that"*, *"moreover"*, *"值得注意的是"*,*"降本增效"*).- Keeps already-human prose nearly untouched (identity learning).- Preserves numbers, URLs, file paths, code and quoted text (protected with`PROTECTED_N` placeholders during generation, restored afterwards).- Routes automatically by language (CJK ratio detection).## What it is NOTThis is a **writing-quality aid**, not a tool for evading AI detectors.Detector scores are probabilistic, and no humanizer can guarantee that textwill be classified as human. Please use it responsibly:do not use it to misrepresent authorship in academic, legal, or disciplinarycontexts.## Quickstart```bashpip install transformers torch``````pythonfrom humanize import Humanizer # the wrapper bundled in this repoh = Humanizer() # loads this repo (en/ and zh/ sub-checkpoints)print(h.humanize("It is important to note that this robust solution serves as a ""testament to our commitment. Moreover, we leverage cutting-edge ""technology."))print(h.humanize("值得注意的是,我们通过赋能团队来实现降本增效。"))```Raw `transformers` usage (no wrapper):```pythonfrom transformers import T5ForConditionalGeneration, T5Tokenizermodel = T5ForConditionalGeneration.from_pretrained("Lynote/humanize-text-model/en")tokenizer = T5Tokenizer.from_pretrained("Lynote/humanize-text-model/en")inputs = tokenizer("It is important to note that this is robust.", return_tensors="pt")print(tokenizer.decode(model.generate(**inputs, max_length=128)[0], skip_special_tokens=True))```For Chinese use the `zh/` sub-checkpoint with `BertTokenizer`.## Training dataThe corpus is generated deterministically from the editing principles of theLynote reference projects (`humanize-text`, `humanize-text-skill`,`humanizer-lite`):1. **AI → human**: formulaic clause combinations rewritten by a conservativerule engine,2. **human → human (identity)**: clean prose unchanged, so the model learnsnot to rewrite good text,3. **mixed**: clean prose with one injected cliché that must be removed,4. **protected spans**: examples with URLs, numbers, code and quotes.Reproduce:```bashpython scripts/build_dataset.py --out data # 14.7k pairs (en + zh)python scripts/train.py --lang en --epochs 3 # -> checkpoints/humanize-text-model/enpython scripts/train.py --lang zh --epochs 3 # -> checkpoints/humanize-text-model/zhpython scripts/evaluate.py # benchmark on held-out testpytest tests/ # full test suite```## Evaluation (held-out test, 500 AI->human + all identity/protected pairs)Measured against its rule-based reference. These numbers measure agreement with that reference on synthetic data. They are not real-world quality. 这些数字衡量的是与规则参考在合成数据上的一致性,不是真实场景质量。| Metric | Value ||---|---|| Corpus BLEU vs rule reference | **99.2** || Cliché removal rate | **100.0%** (435/435) || Identity stability (clean prose, n=67) | **73.1%** || Protected-span preservation (n=253) | **96.8%** || Throughput (MPS) | ~218 chars/s |## Limitations- Trained on synthetic text; real-world inputs may need light post-editing.- One checkpoint per language (English / Chinese); other languages are notspecifically trained.- Long inputs are truncated to 256 tokens.- It is a conservative editor: it will not add stylistic richness that isabsent from the source text.## LicenseMIT. Base models: `google-t5/t5-small` (Apache-2.0) and`uer/t5-small-chinese-cluecorpussmall` (Apache-2.0).
README.md+134-130