Re: Translating using LLM and vim/Cursor

From: Sergio Carlavilla <carlavilla_at_freebsd.org>
Date: Sat, 25 Jan 2025 15:24:29 UTC
On Sat, Jan 25, 2025, 4:09 PM Olivier Cochard-Labbé <olivier@freebsd.org>
wrote:

> I wanted to test how an LLM could speed up the translation process.
> To start, I conducted an initial test using a local LLM and Vim on the
> .adoc file:
>
> - llama.cpp: https://github.com/ggerganov/llama.cpp
> - vim.llama plugin: https://github.com/ggml-org/llama.vim
> - A code-oriented LLM, as it needs to be compatible with vim.llama and
> aware of Asciidoctor markup. I used Qwen 2.5 (the 7B "big" version, which
> worked on my Apple M3):
> https://huggingface.co/collections/ggml-org/llamavim-6720fece33898ac10544ecf9
> .
>
> Here’s a GIF screen recording of a session where I tested it to translate
> English into Portuguese (a language I don’t speak at all):
> https://people.freebsd.org/~olivier/vim-llama-translate.gif.
>
> Unfortunately, using the vim.llama plugin was still too slow (I had to
> request a lot of time to translate). So, I tried loading the file into
> Cursor (https://www.cursor.com/) and requested it to translate the full
> page. Cursor handled the task without any issues, and like vim, showed me
> the original and proposal for each sentence.
>
> While the translation quality wasn’t as good as with advanced LLMs like
> DeepL or ChatGPT, it was still a significant improvement.
>
> Even with these tools, the process still took a lot of time:
> - I spent about 1 hour translating and fixing the Wayland page into French.
> - I spent another 1 hour reviewing it to reformulate some sentences to
> sound more natural. But I have the feeling that some of the “heavy”
> sentences likely originated from the original English source.
> - I also had to note all the improvements I needed to make to the original
> English page later.
>
> The result is here:
> https://reviews.freebsd.org/D48680
>
> Regards,
> Olivier
>

Hi Olivier,

Hmmm, I'm gonna try to translate the website to Spanish.

I'll send the results tomorrow.

Bye and thanks for the idea!

>