Run this model with HF Jobs

Run jimboHsueh/HW2 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 to fine-tune https://huggingface.co/jimboHsueh/HW2. Ask me which dataset to train on, then push the fine-tuned model to a new 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/jimboHsueh/HW2 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.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

HW2

Environment

pip install -r requirements.txt

Download

Download training and validation data, as well as fine-tuned mT5 model.

bash ./download.sh

Fine tuning mT5 model

python ./code/run_summarization.py \
    --model_name_or_path google/mt5-small \
    --train_file train.jsonl \
    --validation_file public.jsonl \
    --dataset_config "3.0.0" \
    --source_prefix "summarize: " \
    --output_dir ./HW2 \
    --num_train_epochs 3 \
    --num_beams 1 \
    --do_sample False \
    --push_to_hub

-model_name_or_path: Path to pretrained model.

-output_dir: Path to directory which saves the model outputs.

-train_file: Path to train.jsonl.

-validation_file: Path to public.jsonl.

Generate output.jsonl

bash ./download.sh
bash ./run.sh /path/to/input.jsonl /path/to/output.jsonl
Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using jimboHsueh/HW2 1