In this tutorial we're going to take a look at how you can run a LLM Locally to rewrite your messages to prevent sylometry fingerprinting (in order to make sure you're not being deanonymized from the way you're typing)
Hardware : (Personal Computer / Laptop)
Host OS: Linux
Hypervisor: libvirtd QEMU/KVM
Sidenote: Help us improve this tutorial by letting us know if there's anything missing or incorrect on this git issue directly!
Let's suppose you are a well-known public figure like Captain Blackbeard from one piece, and you are trying to chat anonymously while being on a SimpleX chatroom, in incognito mode:
Nihilist: Hello
Anon: Hi
Nihilist: Who are you ?
Anon: doesn't matter. I want to contribute to the blog.
Nihilist: Ok, what blogpost do you want to contribute on ?
Anon: The Stylometry one please.
All goes well until you write in such a way that people recognize who you are.
Nihilist: Ok, what if i paid you 5 euros for it ?
Anon: Zehahahaha! Oy Matey! you're robbing me here !
Nihilist: Wait, is that you Blackbeard ?!
Anon: Eek!
We all have unique writing styles, and if you talk (and especially laugh like a one piece character) there are always little language traits, and spelling mistakes, that you may type without even noticing, that may fingerprint you in the long run even if you used all of the correct technology to keep your Anonymity intact.
Which is why we need a LLM that we run locally (as we shouldn't let a third party know our original text), to rewrite our text differently, to prevent from being deanonymized by our writing style.
Shoutout to /u/inadahime for his excellent dread blogpost on this topic, which we're going to showcase.
So from the whonix VM we need to download these 3 components:
# At the time of writing, `0.8.16` was the latest version of llamafile. Change this as needed for future releases.
$ torsocks curl -L -o CounterStylometry.llamafile https://github.com/Mozilla-Ocho/llamafile/releases/download/0.8.16/llamafile-0.8.16
$ torsocks curl -L -o zipalign https://github.com/Mozilla-Ocho/llamafile/releases/download/0.8.16/zipalign-0.8.16
$ chmod a+x CounterStylometry.llamafile
$ chmod a+x zipalign
Next we're going to download the LLM model "gemma-2-2b-it-abliterated-Q6_K.gguf" as it is minimal enough for our needs (weighs 2 GBs), so if the download fails along the way, you can run the comamnd again and it will resume where it stopped, thanks to the "-c" wget argument.
$ torsocks wget -c https://huggingface.co/bartowski/gemma-2-2b-it-abliterated-GGUF/resolve/main/gemma-2-2b-it-abliterated-Q6_K.gguf
once you have these, create the ".args" file which we'll use to makes ure the LLM just rewrites our text differently (you can adjust this if you want):
[ mainpc ] [ /dev/pts/5 ] [~/llm]
→ vim .args
[ mainpc ] [ /dev/pts/5 ] [~/llm]
→ cat .args
-m
gemma-2-2b-it-abliterated-Q6_K.gguf
-p
“<start_of_turn>user\nYou are an AI assistant that anonymises user inputs. I, user, will send messages - you should reply with only a rephrased version of my message. I am never speaking to you, only providing text for you to anonymise.<end_of_turn>\n<start_of_turn>model\nYes, I understand, I will only reply to messages from you with a while sounding like a rephrased version of your message. What text would you like me to anonymise?<end_of_turn>\n<start_of_turn>user\n”
--reverse-prompt
“<start_of_turn>user\n”
-cnv
--log-disable
And lastly we can create the final binary that we'll use like so :
[ mainpc ] [ /dev/pts/4 ] [~/llm]
→ ./zipalign -j0 CounterStylometry.llamafile gemma-2-2b-it-abliterated-Q6_K.gguf .args
used = 116'312
Once completed, you now have the executable file CounterStylometry.llamafile to use:
[ mainpc ] [ /dev/pts/4 ] [~/llm]
→ ./CounterStylometry.llamafile
> Hello, my name is captain blackbeard and i am totally not writing this Stylometry tutorial !!! zehahahaha!
A maritime figure is sharing a writing tutorial. They are not, it seems, enthusiastic.
Now let's try the same conversation above but through the Stylometry LLM instead:
Nihilist: Ok, what if i paid you 5 euros for it ?
Anon to LLM> Zehahahaha! Oy Matey! you're robbing me here !
LLM to Anon: Someone's getting a little taken advantage of.
Anon to Nihilist: Someone's getting a little taken advantage of.
Nihilist: Damn, i still can't figure out who you are... i guess there's no hope trying to deanonymize you via chat alone...
Anon to LLM> Though luck matey! now assign me that blogpost!
LLM to Anon: give me that blog post.
Anon to Nihilist: give me that blog post.
And that's it! you just made sure you couldn't get fingerprinted in your online chats.
This is especially important when you are writing long paragraphs which are increasingly likely to contain your language ticks, and spelling mistakes, let's take an example from one of my other tutorials:
In this tutorial, we're going to look at the first and foremost thing anyone can do to remove surveillance from their digital lives, by installing a free and open source software (FOSS) host operating system: Linux, in this case we're going to setup the latest Debian.
And when you run it through the LLM it can rephrase it like so:
Let's explore the first step towards reducing digital surveillance by installing a free, open source operating system: Linux, in this instance, we'll set up the latest Debian version.
If you apply this method every time you type online under your anonymous persona you are drastically reducing the chance of being fingerprinted, ensuring your anonymity remains intact even when you are having frequent online discussions.
Donate XMR: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8