how to use with mlx-lm on mac?

#7
by eyehugginface - opened

Hi downloaded the model but have no clue how to use it.
Can anyone just give me a step-by-step guide on how to use it f.ex. with mlx-lm for translation ?

Thanks for the question. From the model card, the part that matters most for any local run is the template: TranslateGemma expects a single user message whose content is a list with exactly one entry — type "text", source_lang_code, target_lang_code, and the text itself, with codes in ISO 639-1 form (e.g. en) or regionalised form (e.g. de-DE). Total input context is 2K tokens, across 55 supported languages. The card's documented examples use Transformers and apply_chat_template(), and the card gives no mlx-lm example, so keeping that template intact, rather than sending a plain prompt, is the step to get right first in an mlx-lm setup.

Sign up or log in to comment