Skip to content

A privacy-first AI writing assistant running entirely in your browser using WebGPU and Llama-3. No server, no data leakage.

License

Notifications You must be signed in to change notification settings

HenryLok0/PrivAI

Repository files navigation

PrivAI

Code Size

MIT License Stars


Overview

PrivAI is a privacy-focused writing tool that brings the power of Large Language Models (LLMs) directly to your browser. Unlike other AI tools that send your data to the cloud, PrivAI runs a Llama-3.2-3B model entirely on your device using WebGPU.

This means zero latency (after load), zero data leakage, and zero API costs.

Features

  • 100% Local & Private: Your text never leaves your computer. All processing is done client-side.
  • Humanize Text: Transform robotic, AI-generated content into natural, engaging, and human-sounding text.
  • Text to AI Polish: The reverse operation—turn casual notes or rough drafts into professional, structured, and grammatically perfect content.
  • Content Analysis: Analyze text for "AI-isms", readability scores, and get actionable suggestions for improvement.
  • Real-time Diff: Visual highlighting of changes to see exactly what the AI modified.

Tech Stack

  • Frontend: React 19, Vite, TypeScript
  • Styling: Tailwind CSS v4, Lucide React (Icons)
  • AI Engine: @mlc-ai/web-llm (WebGPU)
  • Model: Llama-3.2-3B-Instruct-q4f16_1-MLC
  • Visualization: Recharts (Analysis charts), Diff (Text comparison)

Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • A browser with WebGPU support (Chrome 113+, Edge 113+, or Firefox Nightly).

Installation

  1. Clone the repository:

    git clone https://github.com/HenryLok0/PrivAI.git
    cd PrivAI
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. Open your browser at http://localhost:3000/. Note: The first time you run an AI task, the model (~2GB) will be downloaded and cached in your browser.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is open source and available under the MIT License.

About

A privacy-first AI writing assistant running entirely in your browser using WebGPU and Llama-3. No server, no data leakage.

Topics

Resources

License

Stars

Watchers

Forks

Languages