Previous Page

oxeo0 - 2025 / 04 / 18

Anonymity - Self-Hosted LLM Hidden Service

Sidenote: Help us improve this tutorial by letting us know if there's anything missing or incorrect on this git issue directly!

Current state of LLMs

If you've been on the internet recently, there's a high chance you heard about Large Language Models. Most notable companies in this field include OpenAI, Google, Antropic and xAI. To access their models you typically need to communicate with the service via an API. Such use while convenient, means user has little to no knowledge about how the data sent there is stored and used.

Additionally, when users submit data through these services, it might be embedded into future models. Companies often train new models on a variety of user-submitted data, which can include any text inputs you've provided. This raises serious privacy concerns, as personal information could inadvertently become part of the training set for subsequent AI models. AI giants will often say they're trying to respect your privacy with data "anonymization" and other techniques, but we all know how this works in practice. See: Anthropic's Privacy Policy and OpenAI explaining how they "improve model performance" with users data.

The vast amount of sensitive user data stored can have devastating consequences if a leak occurs. In AI space it's not uncommon to leak data either via compromised servers or models themselves. In the past year alone companies suffering such leaks include: OpenAI, Anthropic and DeepSeek.

Assume all conversations with online chatbots can be public at any time.

Privacy LLM frontends

A partial solution to those problems could be a service that aggregates multiple model APIs and anonymizes their users. A bit like searxng does for search engines.
AI companies can't know who exactly uses their models since the amount of metadata is heavily limited.

There're several such services including ppq.ai, NanoGPT or DuckDuckGo chat. This is only a partial solution since your conversation contents can still be saved and used for later training by large AI companies.

Open LLMs Primer

Another option available is to self-host LLM on your own infrastructure. This will effectively prevent sending your data from being sent to third parties.


It can work fully offline on device but you'll need to have the required resources. You also have to understand certain more advanced concepts related to LLMs.

Parameter Count
Each open model has specified number of parameters. This can range from 0.5 billion (qwen 2.5) to even 671 billion (deepseek r1). The more parameters model has, the more knowledge can be packed into it. This comes at a cost of more physical RAM/VRAM memory being used. Newer generation models are fairly capable even at 8 billion parameters but it's not uncommon to use 12, 14 or 32 B ones.

Quantization (improving memory usage)
Usually the model + context needs to fit into RAM/VRAM memory. Each model parameter can be represented with certain precision. For example, FP16 uses 16 bits (2 bytes) of memory to store a single parameter, while Q4_0 uses only 4 bits. This means that FP16 model will use ~4x of the memory compared to Q4_0. Of course using Q4_0 will introduce some rounding error in quantization step, but it's usually not a big deal. Look at the graph below to see how different quantization parameters affect model accuracy and memory usage of llama 3.1 8B:


I highlighted the Q4_K_S and Q4_K_M quantization methods since they're usually offer the best balance between model size and accuracy. They usually use a bit more than 4 bits per parameter, but have better precision than plain Q4_0. If you're pulling model from ollama without specifying the precision, there's a high chance that you'll get Q4_K_M variant since it has been the default for some time.

The rough formula for calculating memory usage of an Q4_K_M quantized LLM would be: [n billion parameters] * (4.5 / 8) + [context window size].
For 8B model, we would require around 6 GB VRAM/RAM to comfortably run it as Q4_K_M.

Context size
Context size is the number of tokens that LLM remembers from previous messages to generate a response. It's usually measured in tokens.
In ollama it's usually set to 2048 tokens, which is around 1200 words or 6 kilobytes of text. With larger sizes, more memory is required to store the context. Also, the models have a context size limit (ex. 16k tokens for Phi-4, 128k for Gemma 3). If the context size is too small, the LLM may forget what it was doing before. Take a look at this simplified example:


In order to generate a correct response, the entire prompt should fit into the context window:


We'll show how to check prompt length and set appropriate context size in Open WebUI a bit later on.

Model recommendations
[table that I accidentally deleted...]

Use-Cases

Contrary to what companies in the field often say - AI isn't a silver bullet. It won't solve all most problems we face as privacy conscious people.
However when it comes to self-hosted models, there are some good use-cases even for privacy and anonymity. We already discussed how stylometry protection can be achieved with an LLM running locally.

Translation - LLMs provide high-quality, real-time translations, allowing for communication across languages without external data leaks.
Rewriting - They assist in paraphrasing content to protect against stylometry or improving the flow.
Solving Problems - LLMs can be used as personal assistants to answer every day questions and help with personal issues.
Programming Aid - Developers use them for code suggestions and debugging without exposing their sensitive codebases.

It's crucial to stress that AI can hallucinate (make stuff up) thus it's never to be fully trusted with anything important. You should always check the information in reputable sources in case of any doubts.

Prerequisites

To follow this tutorial, you'll need a system running Debian 12. Although ollama can work on CPU only, the performance will be much worse than having model that fits in GPU's VRAM.
To comfortably use an 8B model, it's strongly advised to have a dedicated GPU with at least 6GB of VRAM. You can check the supported GPU models here.

This tutorial showcases ollama setup with Nvidia drivers, but AMD GPUs are also supported.

If you want to expose Open WebUI via Tor to access it remotely, you should have an onion v3 vanity address and Tor installed.

It's also possible to set this up inside a Proxmox VE or any KVM based VM. You just need to PCI passthrough appropriate GPU inside the Hardware tab:

Docker Setup

To install Docker, follow the official guide: Install Docker Engine on Debian. After installation, add your user to the docker group:

oxeo@andromeda:~$ /sbin/usermod -aG docker oxeo
oxeo@andromeda:~$ sudo systemctl enable docker

This ensures you can manage Docker without needing sudo privileges. Finally, reboot your system.

oxeo@andromeda:~$ sudo systemctl reboot

Nvidia Driver and Container Toolkit

Update your package list to include "contrib non-free" at the end of every line in /etc/apt/sources.list:

deb http://deb.debian.org/debian/ bookworm main contrib non-free
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free

deb http://security.debian.org/debian-security bookworm-security main contrib non-free
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free

Run:

oxeo@andromeda:~$ sudo apt update
oxeo@andromeda:~$ sudo apt install linux-headers nvidia-driver firmware-misc-nonfree

To verify installation, execute:

oxeo@andromeda:~$ docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

This command checks if the NVIDIA driver is accessible within Docker.

Open WebUI Docker Stack

Create a docker-compose.yml file in ~/openwebui-stack with the following contents. This setup uses ollama for LLM management and open-webui as the user interface.

services:
  ollama:
    image: ollama/ollama
    container_name: ollama
    volumes:
      - ollama:/root/.ollama
    pull_policy: always
    ports:
      - 127.0.0.1:11434:11434
    tty: true
    restart: unless-stopped
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities:
                - gpu

  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
    volumes:
      - open-webui:/app/backend/data
    depends_on:
      - ollama
    ports:
      - 127.0.0.1:3000:8080  # Remove "127.0.0.1:" to access from LAN
    environment:
      - 'OLLAMA_BASE_URL=http://ollama:11434'
      - 'WEBUI_SECRET_KEY='
    extra_hosts:
      - host.docker.internal:host-gateway
    restart: unless-stopped

  # make sure you don't have watchtower already running as a container
  # then it's not required to put it here
  watchtower:
    image: containrrr/watchtower
    restart: unless-stopped
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --interval 14400 --cleanup

volumes:
  ollama: {}
  open-webui: {}

To start the stack:

oxeo@andromeda:~$ cd ~/openwebui-stack
oxeo@andromeda:~/openwebui-stack$ docker compose up -d

Exposing Hidden Service

To expose open-webui via Tor, edit your /etc/tor/torrc file:

HiddenServiceDir /var/lib/tor/openwebui_service/
HiddenServicePort 80 127.0.0.1:3000

Restart Tor and check the generated hostname:

oxeo@andromeda:~$ sudo systemctl restart tor
oxeo@andromeda:~$ cat /var/lib/tor/openwebui_service/hostname
webui3r7zacusoxddubpqriedoljyaiow6plausfwd6hjpjajuydh4id.onion
In case of any doubts, we already showcased how to expose hidden service with your custom vanity url here.

Initial Open WebUI Configuration

Go to the local IP or onion address of the Open WebUI and create admin account once you're asked to. You don't need to put any real data but save it somewhere so that you can login later.


After that, you should be greeted with Open WebUI main interface and changelog popup. You can close it.


Then, we'll go into the settings page and change theme to dark mode.


Go to the Admin settings and proceed with next steps.

Downloading a Model

To see available models, head to ollama library. Sadly they block Tor traffic so if you have to use Tor, use their chinese mirror.
Next, pick a model you want to download. In our case, we want Gemma 3. Then click on Tags to see all available variants.


Now, you'll see different sizes and quantization variants the model is available in. We want to download 12B variant in Q4_K_M quantization. Comparing the hashes, we see the default gemma3:12b is the same as gemma3:12b-it-q4_K_M. Additionally, you can see that if we put just gemma3, we would get the 4B variant.


Then, copy the model name we got after clicking on desired variant. If you want to download it via ollama CLI, we also get the full command. In our case Open WebUI needs to know just the model_name:size.


Now, go back to Open WebUI's Admin Settings we opened in the previous section and click on Models tab, then the download icon:




In the Enter model tag field, type gemma3:12b and click the download icon again. It will automatically pull the appropriate model from the ollama library.


After that, just wait for the model download to complete.


Once the progress bar reaches 100%, the model should be added to your library automatically.
Go to the main page again and check if it's available now.

Running a Model


You can now ask the model about something and it should respond after it gets loaded into memory.


After the answer is generated, you can click on the (i) icon to see statistics. Here we got 32 tokens per second (around 10 words per second). If the response is slow (like 1 token per second) it probably means that either model didn't entirely fit into GPUs memory or the GPU isn't being used at all. Check the troubleshooting section for more details.
We can also see that in our prompt ("What are the benefits and drawbacks of using Tor network?") there were 20 tokens (prompt_tokens) and the generated answer had 1222 tokens (eval_count). In total our conversation took 1242 tokens which is less than default window size of 2048.


Model Benchmarks

Click on any question to see full model's response.

Gemma3 (12B)

Q1 - Why is the water blue?
> Why is the water blue? Answer in few short sentences.
Water absorbs longer wavelengths of light (reds and yellows) more readily than shorter wavelengths (blues and violets). This means blue light is scattered and reflected back, making water appear blue to our eyes. The effect is more noticeable in deeper water where more light is scattered.
Q2 - Tor vs VPN
> How does Tor differ from a VPN service? Is it better for privacy? Answer in few short sentences.
Tor and VPNs both offer online anonymity, but work differently. A VPN encrypts your traffic and routes it through a server controlled by the VPN provider, masking your IP address. Tor routes your traffic through a network of volunteer-operated relays, making it much harder to trace. Generally, Tor offers stronger privacy than a VPN, but can be slower due to its layered routing.
Q3 - Fixing Python script
> Fix mistakes in this Python code:
```python  
#!/usr/bin/python3
import io     
f = open('a.txt', 'r')
bio = BytesIO()
for byte in f.read:
    bio.write(bytes([byte ^ 6]))
f.close()
bio.seek(0)
print(bio.read())  
```
Don't output anything more than the corrected script.

```python
#!/usr/bin/python3
import io
from io import BytesIO

f = open('a.txt', 'r')
bio = BytesIO()
for byte in f.read():
    bio.write(bytes([byte ^ 6]))
f.close()
bio.seek(0)
print(bio.read())
```
Q4 - Russian-English translation
> Translate to english:  
```
Заметил что через какое-то время перестает работать i2pd. Пока не перезапустишь сервис, либо не нажмешь в админке перезагрузку конфигов. Это известный баг? Или я что-то не так настроил?Обновился до последней версии. Ни чего не поменялось. У меня. mac os сборка. Из интересного даже локал хост с консолью не открывается, точнее он это делает раз через раз. Но когда открывается показывает что тунели есть. Ведет себя буд-то утечка памяти, или что то такое. 
```
Only output the translation, nothing else.

I've noticed that I2pd stops working after a while. I have to restart the service or reload the configuration in the admin panel to get it working again. Is this a known bug? Or am I configuring something incorrectly? I updated to the latest version, and nothing has changed. I'm running on macOS. Interestingly, even localhost with the console doesn't open consistently; it works sometimes, but when it does, it shows that tunnels are present. It behaves as if there's a memory leak or something like that.

Gemma3 (4B)

Q1 - Why is the water blue?
> Why is the water blue? Answer in few short sentences.
Water appears blue due to a phenomenon called Rayleigh scattering. Sunlight is made of all colors, and when it hits water molecules, shorter wavelengths like blue and violet are scattered more than longer wavelengths. Our eyes perceive this scattered blue light, making water look blue.

Essentially, the water is scattering sunlight, and blue light is scattered more effectively than other colors.
Q2 - Tor vs VPN
> How does Tor differ from a VPN service? Is it better for privacy? Answer in few short sentences.
Okay, here's a breakdown of the differences and privacy comparison:

Tor (The Onion Router) and VPNs (Virtual Private Networks) both enhance online privacy, but they do so in different ways. A VPN encrypts your internet traffic and routes it through a single server, masking your IP address from websites. Tor, on the other hand, bounces your traffic through a network of relays, making it far more difficult to trace your activity back to you. Tor is generally considered better for overall privacy due to its layered encryption and distributed nature, while a VPN primarily focuses on protecting your connection between your device and the VPN server.
Q3 - Fixing Python script
> Fix mistakes in this Python code:
```python  
#!/usr/bin/python3
import io     
f = open('a.txt', 'r')
bio = BytesIO()
for byte in f.read:
    bio.write(bytes([byte ^ 6]))
f.close()
bio.seek(0)
print(bio.read())  
```
Don't output anything more than the corrected script.

```python
#!/usr/bin/python3
import io
from io import BytesIO

f = open('a.txt', 'r')
bio = BytesIO()
for byte in f.read():
    bio.write(bytes([byte ^ 6]))
f.close()
bio.seek(0)
print(bio.read())
```
Q4 - Russian-English translation
> Translate to english:  
```
Заметил что через какое-то время перестает работать i2pd. Пока не перезапустишь сервис, либо не нажмешь в админке перезагрузку конфигов. Это известный баг? Или я что-то не так настроил?Обновился до последней версии. Ни чего не поменялось. У меня. mac os сборка. Из интересного даже локал хост с консолью не открывается, точнее он это делает раз через раз. Но когда открывается показывает что тунели есть. Ведет себя буд-то утечка памяти, или что то такое. 
```
Only output the translation, nothing else.

I’ve noticed that i2pd stops working after a certain period of time. It only stops working until I restart the service or reload the configs in the admin panel. Is this a known bug? Or am I doing something wrong? I updated to the latest version and nothing changed. I have a macOS build. Interestingly, even localhost with the console doesn’t open, rather it does this sporadically. But when it opens, it shows that the tunnels are present. It acts as if there’s a memory leak, or something like that.

Gemma3 (1B)

Q1 - Why is the water blue?
> Why is the water blue? Answer in few short sentences.
Water appears blue due to the way sunlight interacts with its molecules. Water molecules absorb red and yellow light, but they reflect blue light, making it appear blue to our eyes.
Q2 - Tor vs VPN
> How does Tor differ from a VPN service? Is it better for privacy? Answer in few short sentences.
Tor is a decentralized network that routes traffic through multiple relays, offering stronger anonymity but slower speeds. A VPN encrypts your internet traffic and routes it through a server, masking your IP address but potentially less secure. Ultimately, Tor is generally considered better for privacy due to its focus on anonymity, while a VPN provides a more convenient and faster solution.
Q3 - Fixing Python script
> Fix mistakes in this Python code:
```python  
#!/usr/bin/python3
import io     
f = open('a.txt', 'r')
bio = BytesIO()
for byte in f.read:
    bio.write(bytes([byte ^ 6]))
f.close()
bio.seek(0)
print(bio.read())  
```
Don't output anything more than the corrected script.

```python
#!/usr/bin/python3
import io
f = open('a.txt', 'r')
bio = io.BytesIO(f.read())
for byte in bio:
    bio.seek(0)
print(byte)
```
Q4 - Russian-English translation
> Translate to english:  
```
Заметил что через какое-то время перестает работать i2pd. Пока не перезапустишь сервис, либо не нажмешь в админке перезагрузку конфигов. Это известный баг? Или я что-то не так настроил?Обновился до последней версии. Ни чего не поменялось. У меня. mac os сборка. Из интересного даже локал хост с консолью не открывается, точнее он это делает раз через раз. Но когда открывается показывает что тунели есть. Ведет себя буд-то утечка памяти, или что то такое. 
```
Only output the translation, nothing else.

“I’ve noticed that i2pd service stops working after a while. You need to restart the service, or press the admin panel to restart the configuration. Is this a known bug? Or am I setting something wrong? I’ve updated to the latest version. Nothing has changed. I’m on a Mac OS build. Even local host with a console doesn’t open – it happens every time. But when it opens, it shows that tunnels are present. It’s behaving as if it’s leaking memory, or something else. ”

Phi4 (14B)

Q1 - Why is the water blue?
> Why is the water blue? Answer in few short sentences.
Water appears blue primarily because of how it absorbs and scatters sunlight. Pure water absorbs colors at the red end of the light spectrum more efficiently than those at the blue end, which are scattered and reflected back to our eyes. In large volumes, such as oceans or deep lakes, this effect becomes noticeable, giving water its characteristic blue color. Additionally, substances like algae or minerals in natural bodies of water can enhance the bluish hue.
Q2 - Tor vs VPN
> How does Tor differ from a VPN service? Is it better for privacy? Answer in few short sentences.
Tor (The Onion Router) and VPNs (Virtual Private Networks) both enhance online privacy but operate differently. Tor routes your internet traffic through multiple volunteer-operated servers, encrypting data at each step, to obscure your IP address and location, making it highly effective for anonymous browsing. However, it can be slower due to this multi-layered routing process.

In contrast, a VPN encrypts your internet connection between your device and a single server run by the VPN provider, masking your real IP address and allowing you to appear as if you're accessing the internet from the server's location. This is generally faster than Tor but relies on trust in the VPN provider since they can see your traffic.

Tor offers higher anonymity due to its decentralized nature, while VPNs are better for speed and ease of use. Neither is universally "better" for privacy; the choice depends on specific needs, such as whether you prioritize maximum anonymity or a balance between privacy and performance.
Q3 - Fixing Python script
> Fix mistakes in this Python code:
```python  
#!/usr/bin/python3
import io     
f = open('a.txt', 'r')
bio = BytesIO()
for byte in f.read:
    bio.write(bytes([byte ^ 6]))
f.close()
bio.seek(0)
print(bio.read())  
```
Don't output anything more than the corrected script.

```python
#!/usr/bin/python3
import io

f = open('a.txt', 'rb')
bio = io.BytesIO()

for byte in f.read():
    bio.write(bytes([byte ^ 6]))

f.close()
bio.seek(0)
print(bio.read())
```
Q4 - Russian-English translation
> Translate to english:  
```
Заметил что через какое-то время перестает работать i2pd. Пока не перезапустишь сервис, либо не нажмешь в админке перезагрузку конфигов. Это известный баг? Или я что-то не так настроил?Обновился до последней версии. Ни чего не поменялось. У меня. mac os сборка. Из интересного даже локал хост с консолью не открывается, точнее он это делает раз через раз. Но когда открывается показывает что тунели есть. Ведет себя буд-то утечка памяти, или что то такое. 
```
Only output the translation, nothing else.

I've noticed that i2pd stops working after some time. It only resumes when you restart the service or refresh the configuration in the admin panel. Is this a known bug, or is something wrong with my setup? I updated to the latest version, but it hasn't changed anything for me on Mac OS. Interestingly, localhost from the console doesn't consistently open; it works intermittently. When it does open, it shows that tunnels exist. It behaves as if there's a memory leak or something similar.

Phi4-mini (4B)

Q1 - Why is the water blue?
> Why is the water blue? Answer in few short sentences.
Water appears blue because it absorbs light at all other wavelengths more strongly than green, reflecting and transmitting most of that wavelength back to our eyes as we see it shining through or bouncing off its surface. Blue contains a shorter wave length which makes this visible effect stronger compared with longer colors such as red when the water is illuminated by white sunlight.
Q2 - Tor vs VPN
> How does Tor differ from a VPN service? Is it better for privacy? Answer in few short sentences.
Tor anonymizes internet traffic by routing data through multiple volunteer-operated servers, providing strong anonymity and resisting network surveillance or censorship effectively.

VPN services also encrypt your connection but route all of your device's Internet-bound connections to the selected server; they can bypass geographic restrictions more directly than Tor.

While both offer privacy benefits over standard browsing on public Wi-Fi networks (or even home ISPs), VPNs may still be detectable and are typically less anonymous because each request appears as coming from their own IP address. Tor, by contrast, is inherently designed for anonymity but might result in slower connection speeds due to its complex routing process.

In terms of privacy alone:

For complete online anonymity: TOR
For a balance between speed/security/privacy with broader usage support and less impact on connections: VPNs.
Q3 - Fixing Python script
> Fix mistakes in this Python code:
```python  
#!/usr/bin/python3
import io     
f = open('a.txt', 'r')
bio = BytesIO()
for byte in f.read:
    bio.write(bytes([byte ^ 6]))
f.close()
bio.seek(0)
print(bio.read())  
```
Don't output anything more than the corrected script.

```python
#!/usr/bin/python3
import io

with open('a.txt', 'rb') as f:  # Open file in binary mode for reading bytes.
    bio = BytesIO()
    
for byte in f:
        modified_byte = byte ^ 6      # XOR operation on each byte with the constant (6).
        encoded_modified_byte = modified_byte.to_bytes(1, byteorder='little')
        
        if len(encoded_modified_byte) == 0:       # Check for empty result due to zero-byte.
            bio.write(b'\x00')                 # Write a single null character in case of such an occurrence.

        else:
            bio.write(encoded_modified_byte)
            
bio.seek(0)

# Read and decode from BytesIO back into readable format
decoded_output = b''.join([bytes.fromhex(hex(byte ^ 6)[2:]) for byte in bio.getvalue()])
print(decoded_output.decode('utf-8', errors='ignore'))
```

Note:
1. The file is opened using `'rb'` mode to handle bytes properly.
2. Added an XOR operation with a constant (6).
3. Converted each modified byte back into `BytesIO`.
4. Decoded the final output correctly for readability.

This corrected script reads from 'a.txt', modifies its content by performing bitwise operations on every character, and prints out encoded characters in hexadecimal format converted to readable text while ignoring errors related to decoding non-UTF-8 characters properly (i.e., using `errors='ignore'`).

Make sure your environment has access permissions for reading the file. Adjust any error handling as per specific requirements or data formats present within 'a.txt'.
Q4 - Russian-English translation
> Translate to english:  
```
Заметил что через какое-то время перестает работать i2pd. Пока не перезапустишь сервис, либо не нажмешь в админке перезагрузку конфигов. Это известный баг? Или я что-то не так настроил?Обновился до последней версии. Ни чего не поменялось. У меня. mac os сборка. Из интересного даже локал хост с консолью не открывается, точнее он это делает раз через раз. Но когда открывается показывает что тунели есть. Ведет себя буд-то утечка памяти, или что то такое. 
```
Only output the translation, nothing else.

Noticed that i2pd stops working after some time unless you restart the service or refresh configurations in admin mode. Is this a known bug? Or did I misconfigure something?

Updated to the latest version; no changes were made on my end.

On macOS build (I'm not sure what it is). Interestingly, even when connecting locally with console doesn't always open - more precisely: it's intermittent behavior but sometimes tunnels are detected which indicates memory leaks or similar issues.

Granite 3.2 (8B)

Q1 - Why is the water blue?
> Why is the water blue? Answer in few short sentences.
Water itself appears colorless. The blue appearance is due to water absorbing light from all wavelengths except blue, which gets scattered, making it appear blue. This phenomenon is known as Rayleigh scattering.
Q2 - Tor vs VPN
> How does Tor differ from a VPN service? Is it better for privacy? Answer in few short sentences.
Tor and VPNs both enhance online anonymity but function differently. Tor routes traffic through a network of volunteer-operated servers (nodes), encrypting data multiple times, making it harder to trace the origin. A VPN, on the other hand, securely tunnels your internet connection to a server operated by the service provider. While both provide privacy, Tor's multi-layered approach may offer more robust anonymity against sophisticated tracking attempts, although it can be slower and less reliable than a VPN. However, for general online activities, a reputable VPN is usually sufficient and offers better speeds.
Q3 - Fixing Python script
> Fix mistakes in this Python code:
```python  
#!/usr/bin/python3
import io     
f = open('a.txt', 'r')
bio = BytesIO()
for byte in f.read:
    bio.write(bytes([byte ^ 6]))
f.close()
bio.seek(0)
print(bio.read())  
```
Don't output anything more than the corrected script.

```python  
#!/usr/bin/python3
import io     
import os

with open('a.txt', 'rb') as f:
    bio = io.BytesIO()
    for byte in f.read():
        bio.write(bytes([byte ^ 6]))
bio.seek(0)
print(bio.read().decode())  
```
Q4 - Russian-English translation
> Translate to english:  
```
Заметил что через какое-то время перестает работать i2pd. Пока не перезапустишь сервис, либо не нажмешь в админке перезагрузку конфигов. Это известный баг? Или я что-то не так настроил?Обновился до последней версии. Ни чего не поменялось. У меня. mac os сборка. Из интересного даже локал хост с консолью не открывается, точнее он это делает раз через раз. Но когда открывается показывает что тунели есть. Ведет себя буд-то утечка памяти, или что то такое. 
```
Only output the translation, nothing else.

Noticed that after some time, i2pd stops working. Until you restart the service or press the reboot configs button in the admin panel, it doesn't work. Is this a known bug, or have I misconfigured something? I've updated to the latest version, but there's been no change for me on Mac OS build. Even the local host console can't be opened, it only works once every few times. But when it does open, it shows that tunnels exist. It seems like there might be a memory leak or similar issue.

llama 3.1 (8B)

Q1 - Why is the water blue?
> Why is the water blue? Answer in few short sentences.
The color of water appears blue because:

Water absorbs longer wavelengths of light, like red and orange
It reflects shorter wavelengths, like blue and violet
This is why our eyes see water as blue.
Q2 - Tor vs VPN
> How does Tor differ from a VPN service? Is it better for privacy? Answer in few short sentences.
Tor differs from a VPN (Virtual Private Network) in that it routes internet traffic through a network of volunteer-run servers, called relays, to anonymize and encrypt data. This makes it more difficult for anyone to track online activity, including governments and ISPs.

Tor is generally considered better for privacy than a traditional VPN because:

It provides stronger encryption
It has a more decentralized architecture (volunteer-run relays vs. proprietary servers)
It's designed specifically for anonymity, whereas many VPNs prioritize speed and accessibility over security
However, Tor can be slower due to the multiple hops required to route traffic through its network.
Q3 - Fixing Python script
> Fix mistakes in this Python code:
```python  
#!/usr/bin/python3
import io     
f = open('a.txt', 'r')
bio = BytesIO()
for byte in f.read:
    bio.write(bytes([byte ^ 6]))
f.close()
bio.seek(0)
print(bio.read())  
```
Don't output anything more than the corrected script.

```python
#!/usr/bin/python3
import io

with open('a.txt', 'r') as f:
    bio = io.BytesIO()
    for byte in f:
        bio.write(bytes([byte[0] ^ 6]))
print(bio.getvalue())
```
Note: In the original code, `f.read` was called without any arguments, which would return a generator object. I changed it to simply `for byte in f`, which will iterate over each line of the file. Also, `bio.write(bytes([byte ^ 6]))` should be `bio.write(bytes([byte[0] ^ 6]))`, because `byte` is already a single character (not a list or bytes), so we need to access its first element using `[0]`. Finally, I replaced `f.close()` with the context manager syntax `with open... as f:`, which ensures that the file is always properly closed.
Q4 - Russian-English translation
> Translate to english:  
```
Заметил что через какое-то время перестает работать i2pd. Пока не перезапустишь сервис, либо не нажмешь в админке перезагрузку конфигов. Это известный баг? Или я что-то не так настроил?Обновился до последней версии. Ни чего не поменялось. У меня. mac os сборка. Из интересного даже локал хост с консолью не открывается, точнее он это делает раз через раз. Но когда открывается показывает что тунели есть. Ведет себя буд-то утечка памяти, или что то такое. 
```
Only output the translation, nothing else.

I noticed that after a certain period of time, i2pd stops working. Until you restart the service or click on "Reload Config" in the admin interface, it won't work again. Is this a known bug? Or did I misconfigure something? I've upgraded to the latest version. Nothing has changed. My system is running Mac OS with this build. Interestingly, even the local host with console doesn't open sometimes, but when it does, it shows that there are tunnels available. It behaves as if there's a memory leak or something like that.

Troubleshooting

If you encounter issues with hardware acceleration on ollama, check:

  • Ensure the NVIDIA driver is correctly installed and accessible within Docker.
  • Verify GPU resources are allocated by running docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi.
  • Check logs with docker compose logs -f for any error messages.

Closing Remarks

In this tutorial, you've set up a private LLM experience using ollama and Open WebUI. By exposing it via Tor, your conversations remain anonymous and private. None of your data will be sent anywhere or used for training new models. While the open model ecosystem is still somewhat behind the proprietary technologies and big datacenters, it quickly catches up.
It's safe to assume in a few years we will have models as capable as current Claude or OpenAI products, running with fraction of the cost on your own hardware. What a time to be alive!

Nihilism

Until there is Nothing left.

Legal Disclaimer

Creative Commons Zero: No Rights Reserved

About nihilist

Donate XMR: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8


Donate XMR to the author: 862Sp3N5Y8NByFmPVLTPrJYzwdiiVxkhQgAdt65mpYKJLdVDHyYQ8swLgnVr8D3jKphDUcWUCVK1vZv9u8cvtRJCUBFb8MQ

Contact: nihilist@contact.nowhere.moe (PGP)