Downloading flan-dialogue-summary-checkpoint

can I download the flan-dialogue-summary-checkpoint from or any place i can download it so I can re-do the lab from scratch on my own colab?

as i am getting an error when performing !aws s3 cp --recursive s3://dlai-generative-ai/models/flan-dialogue-summary-checkpoint/ ./flan-dialogue-summary-checkpoint/

error message : fatal error: Unable to locate credentials

3 Likes

You can from hugging face.

please, how can we copy the model formed from a hugging face ?

Use the HuggingFace libraries with the correct Model name
Like this -

from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

instruct_model_name=‘truocpham/flan-dialogue-summary-checkpoint’

instruct_model = AutoModelForSeq2SeqLM.from_pretrained( instruct_model_name, torch_dtype=torch.bfloat16)

10 Likes

Also later in the nootebook there is a full pre-trained PEFT model adapter trained in the full dataset. It was uploaded in a S3 bucket. It is also in hugging face:

And can be included as follows in the PEFT model loading in the step 3.2, a couple cells before step 3.3:

from peft import PeftModel, PeftConfig

# huggin face alternative
peft_dialogue_summary_checkpoint = 'intotheverse/peft-dialogue-summary-checkpoint'

peft_model_base = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-base", torch_dtype=torch.bfloat16, device_map={"":0})
tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-base")

peft_model = PeftModel.from_pretrained(peft_model_base,
                                       peft_dialogue_summary_checkpoint, #'./peft-dialogue-summary-checkpoint-from-s3/',
                                       torch_dtype=torch.bfloat16,
                                       is_trainable=False)
6 Likes

Thank you! for providing the hugging face trained model name as well as the python code. Is there a guide on how to read or find the trained hugging face models?

1 Like