Zing Forum

Reading

LLMask: Rewrite Writing Style with Large Language Models to Protect Text Authors' Identity

LLMask is an open-source command-line tool that uses large language models to rewrite the writing style of text, thereby achieving author identity anonymization. This article introduces its technical principles, application scenarios, and usage methods.

LLM隐私保护匿名化写作风格命令行工具Python
Published 2026-05-23 15:09Recent activity 2026-05-23 15:20Estimated read 7 min
LLMask: Rewrite Writing Style with Large Language Models to Protect Text Authors' Identity
1

Section 01

LLMask: Guide to Rewriting Writing Style with Large Language Models to Protect Text Authors' Identity

LLMask is an open-source command-line tool that uses large language models (LLMs) to rewrite the writing style of text and achieve author identity anonymization. This article will introduce core content such as its technical principles, application scenarios, usage methods, and limitations. The project is maintained by top-on, created on GitHub on January 17, 2024, and is continuously updated.

2

Section 02

Background: Why Is Writing Style Anonymization Needed?

In the digital age, everyone's writing has a unique "fingerprint". Stylometry can identify an author's identity through word usage habits, sentence structure, etc. For journalists, whistleblowers, and others who need to protect their identities, malicious analysts can use this technology to track them, while adversarial stylometry techniques can help hide writing characteristics.

3

Section 03

LLMask Core Functions and Conversion Types

LLMask is developed based on Python. It changes the "style fingerprint" by deeply rewriting sentence structures and expression methods. Its core functions include:

  1. Simplification conversion: Rewrite complex text into easy-to-understand expressions;
  2. Sierra style: Replace common expressions with formal/literary vocabulary;
  3. Personality imitation: Defaults to imitating Hemingway's style, and other authors can be specified;
  4. Conversion chain: Connect multiple conversions in series to achieve deep rewriting.
4

Section 04

Technical Implementation and Architecture

LLMask is designed to be concise and efficient:

  • Local-first: By default, it uses the Ollama framework to run local models (e.g., Nous Hermes2), and data does not leave the local machine;
  • Flexible API: Supports remote services compatible with the OpenAI API, and custom endpoints can be specified;
  • Command-line interface: Provides rich options (input, conversion chain, personality, model, randomness, etc.);
  • Pipeline support: Can process large-scale text via Unix pipes (e.g., cat input.txt | llmask > output.txt).
5

Section 05

Installation and Usage Guide

System requirements: Can run on ordinary CPUs; GPU acceleration improves speed; mainly tested on Apple Silicon. Installation methods:

  1. pipx installation: pipx install llmask
  2. Source code installation: git clone https://github.com/top-on/llmask.git && cd llmask && poetry install Quick start:
  3. Start the Ollama service: ollama serve
  4. Run the model: ollama run nous-hermes2:10.7b-solar-q6_K
  5. Convert text: llmask -v -i "This is a great success; I want to record it"
6

Section 06

Application Scenarios and Value

  1. Whistleblower protection: Journalists and whistleblowers rewrite text before publishing sensitive information to reduce the risk of being tracked via stylistic analysis;
  2. Academic writing assistance: Researchers rewrite drafts to explore different expressions or check for self-repetition;
  3. Diversified content creation: Generate multiple style versions of the same topic to adapt to different audiences and platforms;
  4. Privacy awareness education: Demonstrate the risks of stylometry and help users understand how writing style can expose identity.
7

Section 07

Limitations and Notes

  1. Experimental nature: There is no strong evidence that it can defeat the most advanced deanonymization methods;
  2. Limited conversion types: Only a limited number of conversion types are currently implemented;
  3. Long chain conversion issues: Excessively long conversion chains may lead to LLM hallucinations or decreased output quality;
  4. Sensitive content censorship: Some sensitive content may trigger LLM safety censorship; it is recommended to use uncensored models;
  5. Proper noun retention: The current version does not automatically remove or anonymize proper nouns such as places and names.
8

Section 08

Summary and Future Outlook

LLMask hides identity features through semantic rewriting. The rewritten text is readable and semantically complete, but it is difficult for machines to associate it with the original author. Future development directions include: file read/write support, obfuscation effect evaluation, GPTZero detection, and test suites. The project is open-source under the MIT license; community contributions are welcome.