Local Book Translation Pipeline Uses Qwen 32B and Mistral 24B with Contextual RAG

A developer has created a fully local, automated book translation pipeline that converts PDF files to ePub format using eight Python scripts. The system addresses common translation issues like context loss and formatting problems through a multi-step workflow.
Workflow Details
The pipeline consists of eight scripts that handle the entire process:
- PDF Extraction: Uses Marker to extract content from PDFs while preserving formatting elements like bold text, chapters, and images
- Text Segmentation: Splits the extracted text into manageable chunks
- Context Creation: Before translation, sends excerpts from throughout the book to Qwen 32B to generate a "Super Bible" - a global glossary containing characters, tone, and atmosphere
- Translation: Qwen 32B translates each text segment while referencing the Super Bible to maintain consistency
- Style Editing: Mistral 24B acts as an editor, reviewing Qwen's translations and rewriting them for perfect literary style
- Assembly: A final script reassembles all translated segments, reinserts images, and uses Pandoc to output a polished ePub file
Automation Features
The system includes a monitoring script that watches a designated folder. Users simply drop a PDF into this folder, and the pipeline automatically processes it. After several hours, the system outputs both the translated ePub and a receipt showing processing time.
The developer notes the results are surprisingly effective, though not 100% perfect, and mentions having several improvement ideas. The entire system runs locally on a personal computer without requiring external services.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Benchmark: MLX vs Ollama Running Qwen3-Coder-Next 8-Bit on M5 Max MacBook Pro
A benchmark comparing MLX and Ollama backends running Qwen3-Coder-Next 8-bit quantization on an M5 Max MacBook Pro with 128GB RAM shows MLX achieving approximately 72 tokens per second, roughly double Ollama's throughput across various coding tasks.

Building a $6.4k Local LLM Server: TCO Breakdown vs API Costs
A developer shares a detailed total cost of ownership for a 4x MI100 local server running llama.cpp, compared to API equivalents including OpenAI and Z.AI coding plans.

Custom GIF Spinner for Claude Code via COLR Font Conversion
A developer created a method to replace Claude Code's default spinner with any animated GIF by converting the GIF into an OpenType COLR color font and patching the spinner to cycle through glyphs representing each frame. The tool currently supports Windows with macOS/Linux versions planned.

Claude Sleuth: A 56-Task Investigation Workflow for Claude AI
Claude Sleuth is a structured investigation workflow for Claude AI with 6 phases and 56 tasks, featuring persistent state storage via Cloudflare D1 and standardized output conventions including ISO 8601 timestamps, POLE entity records, and ICD 203 probability language.