Longtime readers probably know that I am quite a staunch devotee of 'artisanal coding'—to this day, I still do not use an IDE or code completion, requiring nothing more from an editor than syntax highlighting. Even the blog posts on Scientific Spaces have their HTML source typed out character by character by me (though there are historical reasons for this, of course), and Cool Papers 's entire codebase from front end to back end was also hand-typed by me.
Yet even an 'old fogey' like me has to admit: AI agents have an incomparable advantage for certain tasks—tasks where, if you wanted to write them by hand, you would hardly even know where to begin. This article introduces a classic example: translating arXiv papers with a single line of code.
First, the Method #
First, deploy kimi-cli locally, configure it to use kimi-k2.5 , and then install a LaTeX compilation environment (I use MacTeX). Finally, download the paper source code from arXiv, decompress it, enter the source directory, and run:
kimi --print --prompt "The current directory contains the LaTeX source code of an English paper. What you need to do is translate the paper into a Chinese version. All English text must be translated into Chinese, while formulas remain unchanged; for tables, figures, etc., only translate necessary captions; for code blocks and algorithm blocks, only translate necessary comments, and personal names do not need to be translated; save the translated new source code into a new directory named 'paper_cn' under the current directory, paying attention to maintaining the compilability of the source code; after translating, check through it carefully once to see if any chapters or files were missed; finally, recompile the translation result into a PDF with xelatex, and return the path of the generated PDF. If there is a large amount of content to translate, multiple subagents should be launched to translate in parallel."
Then you can simply wait for the paper translation to finish. During this time, kimi will automatically analyze the directory structure, locate the files to translate, attempt compilation once the translation is complete, and further adjust the translation results based on compilation error messages until it successfully compiles and produces a PDF. If you even want to spare yourself the trouble of downloading the source code, you can try:
kimi --print --prompt "Download the paper source code with ID 2502.16982 from arXiv, decompress it, and translate it into a Chinese version. All English text must be translated into Chinese, while formulas remain unchanged; for tables, figures, etc., only translate necessary captions; for code blocks and algorithm blocks, only translate necessary comments, and personal names do not need to be translated; save the translated new source code into a new directory named 'paper_cn' under the decompressed directory, paying attention to maintaining the compilability of the source code; after translating, check through it carefully once to see if any chapters or files were missed; finally, recompile the translation result into a PDF with xelatex, and return the path of the generated PDF. If there is a large amount of content to translate, multiple subagents should be launched to translate in parallel."
Taking kimi-cli as an example is not entirely to advertise; rather, kimi-cli is simply the only one I have used. Even that was just because I tested it 'in passing' for work reasons, rather than actively seeking out AI agent assistance—which speaks to my true nature as an 'old relic.' If you have other AI agents that you find handy, you are welcome to try them on your own as well.
Comparison of Results #
Among the existing paper translation websites on the market, the one I think does the best job is "Hallucination Translation (hjfy.top)"; below are the results of kimi and hjfy translating two papers, respectively:
1、kda_Chinese_version_kimi.pdf;
2、kda_Chinese_version_hjfy.pdf;
You can compare them for yourself:
moonlight_chinese_kimi
A Few More Remarks #
Regarding the principles behind Hallucination Translation, its creator previously shared insights in his Zhihu post "Consuming 300 Million Tokens, I Translated 10,000 arXiv Papers with LLMs". Actually, the naive approach is something most people can easily guess: start from the paper's LaTeX source code (which arXiv papers almost always provide), extract the paragraphs needing translation, and translate them paragraph by paragraph.
However, when it comes to actual practice, we quickly run into that feeling of "not knowing where to begin." LaTeX has syntax with immense degrees of freedom; indeed, it is not merely document markup, but has subtly evolved into a full-blown programming tool. Against this backdrop, trying to manually decompose "extraction and translation" into a finite sequence of steps is exceptionally difficult. As its creator pointed out, he still spends time every day fixing bad cases where translation breaks down—a long-term, tedious, and never-ending job.
Yet tasks that "are hard to break down manually into enumerable steps" happen to be precisely what AI Agents excel at! An AI agent automatically finds and determines which files to translate, translates them one by one, and even better, automatically attempts compilation, adjusting the document on its own based on error messages until compilation succeeds. If one were to write rules manually, the single task of handling compilation error messages would demand endless work; its intrinsic difficulty might be on par with rewriting a LaTeX compiler from scratch, so one can easily imagine the hardship.
Beyond automation, another advantage of using kimi-cli is translation quality. Compared to translating paragraph-by-paragraph or sentence-by-sentence, kimi-cli leverages global context, resulting in noticeably better overall translation quality. Naturally, there are caveats too—namely, the common ailment of LLMs: hallucinations. In practice, this means occasional omissions or mistranslations. In an interactive environment, one can repeatedly ask Kimi to check for omissions until satisfied, but for outright mistranslations, there may not be an easy fix. Then there is speed: going all-in on kimi-cli is somewhat slower.
Summary #
This post outlines a basic workflow for translating arXiv papers using kimi-cli. Everyone is welcome to contribute more refined use cases.
Source example: hjfy translation of the Muon paper. Original Chinese comparison image. English paper.
Source example: Kimi translation of Kimi Linear. Original Chinese comparison image. English paper.
Source example: Kimi translation of the Muon paper. Original Chinese comparison image. English paper.
Source example: hjfy translation of Kimi Linear. Original Chinese comparison image. English paper.