Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text generation inference, fix offline #1341

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

oOraph
Copy link
Contributor

@oOraph oOraph commented Dec 13, 2023

What does this PR do?

Allows for Text Generation Inference to succeed in loading prefetched and cached private models if no token is provided at the time the text-generation-inference service is launched

@oOraph oOraph force-pushed the dev/fix_offline branch 4 times, most recently from ae77ab1 to 4959025 Compare December 13, 2023 16:01
@@ -138,33 +179,33 @@ def download_weights(
) -> List[Path]:
"""Download the safetensors files from the hub"""

def download_file(filename, tries=5, backoff: int = 5):
local_file = try_to_load_from_cache(model_id, revision, filename)
def download_file(fname, tries=5, backoff: int = 5):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: these var renaming (filename -> fname, start_time -> stime and i -> idx) are not mandatory, just renamed them to avoid pep warnings like "shadows var_name from outer scope"

@oOraph oOraph marked this pull request as ready for review December 13, 2023 16:39
@oOraph
Copy link
Contributor Author

oOraph commented Dec 13, 2023

@OlivierDehaene @Narsil, I think the unit tests that fail only do because I miss some secrets in my forked repository. Could you please push a new branch with the proposed change in this repo (or give me the right to do it) so as to confirm this ? Thanks :)

Signed-off-by: Raphael Glon <oOraph@users.noreply.github.com>
@OlivierDehaene OlivierDehaene changed the base branch from main to fix/offline December 14, 2023 14:57
@OlivierDehaene OlivierDehaene merged commit 47cd67e into huggingface:fix/offline Dec 14, 2023
3 of 7 checks passed
OlivierDehaene added a commit that referenced this pull request Dec 18, 2023
@oOraph

---------

Signed-off-by: Raphael Glon <oOraph@users.noreply.github.com>
Co-authored-by: Raphael Glon <oOraph@users.noreply.github.com>
kdamaszk pushed a commit to kdamaszk/tgi-gaudi that referenced this pull request Apr 29, 2024
@oOraph

---------

Signed-off-by: Raphael Glon <oOraph@users.noreply.github.com>
Co-authored-by: Raphael Glon <oOraph@users.noreply.github.com>
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.

None yet

2 participants