{"id":23933992,"url":"https://github.com/top-on/llmask","last_synced_at":"2025-12-30T04:44:20.905Z","repository":{"id":218431246,"uuid":"744724827","full_name":"top-on/llmask","owner":"top-on","description":"A command-line tool for masking authorship of text, by changing the writing style with a Large Language Model.","archived":false,"fork":false,"pushed_at":"2025-05-24T19:54:55.000Z","size":314,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-24T20:35:54.607Z","etag":null,"topics":["anonymity","llm","privacy","stylometry"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/top-on.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-17T22:00:09.000Z","updated_at":"2025-05-24T19:54:52.000Z","dependencies_parsed_at":"2024-02-14T09:26:34.443Z","dependency_job_id":"b284cdbd-6f61-4260-84ce-e3ee14805cf7","html_url":"https://github.com/top-on/llmask","commit_stats":null,"previous_names":["top-on/adverserial-stylometry-llm","top-on/llmask"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/top-on/llmask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-on%2Fllmask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-on%2Fllmask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-on%2Fllmask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-on%2Fllmask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/top-on","download_url":"https://codeload.github.com/top-on/llmask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-on%2Fllmask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274670542,"owners_count":25328256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anonymity","llm","privacy","stylometry"],"created_at":"2025-01-06T00:30:01.517Z","updated_at":"2025-12-30T04:44:20.879Z","avatar_url":"https://github.com/top-on.png","language":"Python","funding_links":[],"categories":["Building"],"sub_categories":["Tools"],"readme":"# LLMask [ɛl ɛl 'ma:sk]\n\nA command-line tool for masking authorship of text,\nby changing the writing style with a Large Language Model.\n\nThe main use cases of masking an author's writing style are:\n\n* anonymizing the author of a text\n* protecting the identity of whistleblowers and activists\n* see more use cases at [Adversarial Stylometry](https://en.wikipedia.org/wiki/Adversarial_stylometry)\n\n## Disclaimer\n\n⚠️ This project currently is just a demo of what LLMs can do for authorship anonymization.\u003cbr\u003e\n⚠️ There is no strong evidence yet that this tool can beat state of the art de-anonymization methods!\n\n### Known Limitations\n\nDespite it's pre-production status, this library has several known limitations:\n\n1. Only a limited number of transformations are implemented (see `transform.py`).\n2. Long chains of transformations have observed to make the LLM output artifacts.\n3. Sensitive content can trigger an LLMs censoring, and thus ruin the output.\u003cbr\u003e\nIn this case it is advised to try uncensored LLMs, e.g. of the [`wizard-vicuna-uncensored`](https://registry.ollama.ai/library/wizard-vicuna-uncensored) type.\n4. Currently, unique names of places or persons are not removed/anonymized.\n\n\n## Example workflows\n\n1. Locally serve a Large Language Model server with [ollama](https://ollama.com/):\n\n```\n$ ollama serve\n```\n\n2. Make sure a potent model is served, e.g. a version of [`nous-hermes2`](https://registry.ollama.ai/library/nous-hermes2):\n\n```\n$ ollama run nous-hermes2:10.7b-solar-q6_K\n```\n\n3. Mask your writing style by transforming it into a different one:\n\n```\n$ llmask -v -i \"this was a triumph. i'm making a note here: huge success.\"\n\n\nUser-provided input:\n\n\u003e this was a triumph. i'm making a note here: huge success.\n\n\nResult after applying transformation 'thesaurus':\n\n\u003e This was an astonishing achievement. I'll jot down: extraordinary victory.\n\n\nResult after applying transformation 'simplify':\n\n\u003e This was a great success. I'll write down: wonderful win.\n```\n\n### Piping input and output\n\nFor larger-scale text work, the text input and output can also be piped:\n\n```\n$ cat input.txt | llmask \u003e output.txt\n```\n\n## Getting started\n### System requirements\n\nLLMs can run on ordinary CPUs, e.g. with `ollama`.\nHowever, GPU acceleration greatly accelerates execution speed.\n\nPlease note that this project is tested most thoroughly on Apple Silicon hardware.\n\n### Installation\n\nThis command line tool can be installed with: `pipx install llmask`\n\n### Usage options\n\n```\n$ llmask --help\n\nUsage: llmask [OPTIONS]\n\n  Transform input text with chained transformations by a Large Language Model.\n\nOptions:\n  -t, --transformations TEXT    Sequence of transformations to apply in order,\n                                e.g. 'tsp' for the steps 'thesaurus -\u003e\n                                simplify -\u003e persona', where 't' applies\n                                thesaurus, 's' simplifies, and 'p' imitates a\n                                persona.  [default: ts]\n  -i, --input TEXT              Input text that will be transformed.\n  -p, --persona TEXT            Name of persona whose writing style to\n                                imitate.  [default: Ernest Hemingway]\n  -m, --model TEXT              Name of model to use (as known to model\n                                server).  [default: nous-\n                                hermes2:10.7b-solar-q6_K]\n  -u, --url TEXT                URL of Open AI compatible model API.\n                                [default: http://localhost:11434/v1]\n  -v, --verbose                 Verbosity level. At default, only the final\n                                output is returned.  [default: 0]\n  -r, --randomness FLOAT RANGE  Higher values make the output more\n                                random.Parameter value is passes as 'sampling\n                                temperature' to language model.   [default:\n                                0.5; 0.0\u003c=x\u003c=2.0]\n  -s, --seed INTEGER            Repeated requests with the same `seed` and\n                                parameters should return the same result.\n                                [default: 42]\n  -h, --help                    Show this message and exit.\n```\n\n## Development setup\n### Install development environment\n\nThe development environment can be installed via: `poetry install`.\n\n## Roadmap\n* support transformations from and into text files\n* measure success of obfuscation\n  * measure success of anonymzation with de-anonymization tools (e.g. `faststylometry`)\n  * check with GPTZero if suspected author is an LLM\n* re-introduce test suite\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftop-on%2Fllmask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftop-on%2Fllmask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftop-on%2Fllmask/lists"}