4 ms·
That depends on what counts as “a handful of languages” for you. You can use llm for this fairly easily: uv tool install llm # Set up your model howe
by JimDabell 1y ago
That depends on what counts as “a handful of languages” for you.
You can use llm for this fairly easily:
uv tool install llm
# Set up your model however you like. For instance:
llm install llm-ollama
ollama pull mistral-small3.2
llm --model mistral-small3.2 --system "Translate to English, no other output" --save english
alias english="llm --template english"
english "Bonjour"
english "Hola"
english "Γειά σου"
english "你好"
cat some_file.txt | english
https://llm.datasette.io https://llm.datasette.io
- usagisushi 1y agoTip: You might want to use `uv tool install llm --with llm-ollama`. ref: https://github.com/simonw/llm/issues/575 https://github.com/simonw/llm/issues/575
- JimDabell 1y agoThanks!
- jan_Sate 1y agoThat's just the base/stock/instruct model for general use case. There gotta be a finetune specialized in translation, right? Any recommendations for that? Plus, mistral-small3.2 has too many parameters. Not all devices can run it fast. That probably isn't the exact translation model being used by Chrome.
- JimDabell 1y agoI haven’t tried it myself, but NLLB-200 has various sizes going down to 600M params: https://github.com/facebookresearch/fairseq/tree/nllb/ https://github.com/facebookresearch/fairseq/tree/nllb/ If running locally is too difficult, you can use llm to access hosted models too.