A lightweight, privacy-focused Japanese-English translation desktop application powered by local AI. Built with Tauri, React, and the LiquidAI LFM2-350M-ENJP-MT model running entirely on your device.
- π 100% Private: All translations happen locally on your device
- π Fast: GPU-accelerated inference using Metal (macOS) or CUDA (NVIDIA)
- π― Accurate: Powered by LiquidAI's specialized Japanese-English model
- π» Native Performance: Built with Rust and Tauri for minimal resource usage
- π¨ Modern UI: Clean, responsive interface built with React
- π No Internet Required: Works completely offline after initial model download
Before building Konnyaku, ensure you have the following installed:
- Rust (1.70 or later): Install Rust
- Node.js (18 or later) and pnpm: Install Node.js
- Tauri Prerequisites:
- macOS: Xcode Command Line Tools
- Linux: See Tauri Linux Prerequisites
- Windows: See Tauri Windows Prerequisites
npm install -g pnpmgit clone https://github.com/yourusername/konnyaku.git
cd konnyaku# Install frontend dependencies
pnpm install
# The Rust dependencies will be installed automatically when buildingRun the app in development mode with hot-reload:
pnpm tauri devThe app will:
- Start the Vite dev server for the frontend
- Compile the Rust backend
- Open the application window
- Automatically download the AI model on first run (~200MB)
Create an optimized production build:
pnpm tauri buildThe built application will be in src-tauri/target/release/bundle/.
- Launch the app - The model will download automatically on first run
- Select translation direction - Click the language selector to switch between ENβJA and JAβEN
- Enter text - Type or paste text in the input field (max 5000 characters)
- Translate - Click the translate button or press Cmd/Ctrl+Enter
- Copy result - Click the copy button to copy the translation to clipboard
konnyaku/
βββ src/ # React frontend
β βββ components/ # UI components
β βββ hooks/ # Custom React hooks
β βββ App.jsx # Main app component
βββ src-tauri/ # Rust backend
β βββ src/
β β βββ lib.rs # Tauri commands
β β βββ main.rs # App entry point
β β βββ translation.rs # LLM inference logic
β βββ Cargo.toml # Rust dependencies
βββ public/ # Static assets
βββ package.json # Node dependencies
- Model: LiquidAI/LFM2-350M-ENJP-MT-GGUF
- Size: ~200MB (4-bit quantized)
- Format: GGUF (llama.cpp compatible)
- Specialization: Japanese-English translation
- Context: 4096 tokens
The backend uses the llama-cpp-2 crate for model inference:
- GPU Acceleration: Metal on macOS, CUDA on NVIDIA GPUs
- Memory Efficient: Model loaded once and kept in memory
- Thread Safe: Arc for concurrent access
- Chat Templates: Uses model's embedded template for proper formatting
- Framework: React 18
- Build Tool: Vite
- Styling: CSS with modern features
- State Management: React hooks
- API: Tauri commands via IPC
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes
- Test thoroughly: Ensure translations work in both directions
- Commit with descriptive messages: Follow conventional commits
- Push and create a PR
- Rust: Follow standard Rust conventions (use
cargo fmtandcargo clippy) - JavaScript/React: ESLint configuration included
- CSS: BEM naming convention for components
# Run Rust tests
cd src-tauri
cargo test
# Run frontend tests (if available)
pnpm test- Add support for more language pairs
- Implement translation history
- Add dark mode support
- Optimize model loading time
- Add batch translation support
- Implement translation confidence scores
- Add support for document translation
- Create automated tests
- Improve error handling and user feedback
If the model download fails:
- Check your internet connection
- The model will be downloaded to:
- macOS:
~/Library/Caches/konnyaku/models/ - Linux:
~/.cache/konnyaku/models/ - Windows:
%LOCALAPPDATA%\konnyaku\cache\models\
- macOS:
- You can manually download from: HuggingFace
- Place the
LFM2-350M-ENJP-MT-Q4_K_M.gguffile in the cache directory
- Rust errors: Ensure you have the latest Rust toolchain:
rustup update - Node errors: Clear node_modules and reinstall:
rm -rf node_modules && pnpm install - Tauri errors: Check platform-specific prerequisites
- The first translation after app start may be slower (model loading)
- Ensure GPU acceleration is enabled (check console output)
- Close other resource-intensive applications
See the docs/ directory for architecture decision records (ADRs) documenting key design choices.
This project is licensed under the MIT License - see the LICENSE file for details.
- LiquidAI for the LFM2-350M-ENJP-MT model
- llama.cpp for the inference engine
- Tauri for the application framework
- The Rust and React communities
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with β€οΈ for the Japanese learning community