Skip to content

Conversation

ckadner
Copy link
Collaborator

@ckadner ckadner commented Oct 2, 2025

Description

Cache models with revision for GitHub Action test runs.

TODOs:

Related Issues

#497

prashantgupta24 and others added 7 commits October 1, 2025 11:41
Signed-off-by: Christian Kadner <[email protected]>
Signed-off-by: Christian Kadner <[email protected]>
download_tinygranite() {
python -c "from transformers import pipeline, AutoTokenizer; pipeline('text-generation', model='$1'); tokenizer=AutoTokenizer.from_pretrained('$1')"
download_granite_or_llama() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all of this can be simplified to a single function like:

from transformers import pipeline
from sentence_transformers import SentenceTransformer

try:
    pipeline(model='$1', revision='$2')
except RuntimeError:
    SentenceTransformer('$1', revision='$2')

I'd be fine sticking that in a script that we keep around here in the .github/workflows folder.

python3 ./just_download_the_dang_model.py --model foo --revision bar

That should get rid of a lot of the complexity here. Otherwise these changes all look great to me- putting the revisions in the cache key and splitting out the multi-model cases to have individual cache entries is exactly what we want. Sure hf_model_2 is a little wonky but I can live with it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#523

@ckadner
Copy link
Collaborator Author

ckadner commented Oct 13, 2025

Need to rebase this PR onto main (currently it's based on top of Prashant's branch)

Signed-off-by: Christian Kadner <[email protected]>
@ckadner
Copy link
Collaborator Author

ckadner commented Oct 13, 2025

Closing this. Changes from this PR are rebased onto main in Pr #523

@ckadner ckadner closed this Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants