grow food, not lawn.

Skip to content

grok3 vibe coded this translation algo!

Russell Ballestrini requested to merge translate-all-the-posts into master

I'm hacking with a new crew & we are working with unsloth fine tuning locally. Im learning a lot as i go. Also i am in the process of working out an ETL job for translating my blog into the top 20 languages and using pandoc to convert rst to md for agents.This comes out of the conversation that every piece is static data should be intelligently translated from now on. Calling hermes sequentially is more than enough to peg my GPU which is a local 4090. Backfilling is painfully slow with only one card.

Grok3 vibed coded an algorithm that keeps track of strings that should not be translated. This is used for code blocks, URLs & images using regex replacements that are then passed to the LLM which is prompted to NOT translate the substitutions.

Once we get the completion from the model inference we can easily restore the substituted strings with the original values!

CC @Lisa_MegaWatts & Robert & @ajaxdavis

new file:   translate_content.py

Summary by CodeRabbit

  • New Features
    • Introduced an automated translation tool for reStructuredText content, enabling seamless translation into multiple languages.
    • Preserves formatting and special segments (like code blocks, links, and images) during translation.
    • Automatically generates translated versions in both the original and Markdown formats to streamline content localization.
    • Added command-line support for debug mode during the translation process.
Edited by CodeRabbit

Merge request reports