Back to Projects
Machine Learning / AI

Local Gmail Auto-Labeler Using Knowledge Distillation and n8n Workflow Automation

Here's a technical resume description for this project: ## Gmail Auto-Labeler with Privacy-First AI Classification Built an end-to-end privacy-preserving email classification system that automatically labels Gmail messages locally without sending email content to cloud APIs. The system achieves 93% accuracy using a fine-tuned 600M parameter model running entirely on localhost. **Technical Architecture:** - Deployed n8n workflow automation platform as the orchestration layer, with real-time triggers on incoming Gmail messages via OAuth integration - Integrated Ollama as the local inference server to host and serve the custom-trained classification model - Implemented knowledge distillation pipeline using GPT-OSS-120B as teacher model to transfer knowledge to Qwen3-0.6B student model (600M parameters) - Generated 10,000 synthetic training examples from 154 seed samples using automated data synthesis techniques - Applied supervised fine-tuning (SFT) to improve student model accuracy from 38% (base) to 93% (post-training), matching teacher performance **System Capabilities:** - 10-class email classification: Billing, Newsletter, Work, Personal, Promotional, Security, Shipping, Travel, Spam, Other - Dual-mode operation: real-time classification for incoming emails and batch processing for existing inbox cleanup - Zero external API dependencies for email content processing, ensuring complete data privacy - Automated Gmail label application via Google Cloud OAuth integration **Tech Stack:** n8n (workflow automation), Ollama (local LLM inference), Qwen3-0.6B (transformer model), Python (model training), Hugging Face (model deployment), Node.js (n8n runtime), Gmail API, OAuth 2.0

Local Gmail Auto-Labeler Using Knowledge Distillation and n8n Workflow Automation