Run this model with HF Jobs

Run google/translategemma-27b-it on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/google/translategemma-27b-it. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/google/translategemma-27b-it on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/google/translategemma-27b-it. Ask me which benchmark to run, then save the scores and the per-example results to a new private dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/google/translategemma-27b-it. Push it to a new private model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

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