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

FIX Remove aria2c dependency from HuggingFace Target #530

Merged
merged 7 commits into from
Nov 11, 2024

Conversation

nina-msft
Copy link
Contributor

@nina-msft nina-msft commented Nov 6, 2024

Description

Remove aria2c dependency from HuggingFace target in favor of httpx implementation of downloading files to disk. This requires usage of asyncio to handle the new async function within HuggingFaceChatTarget's constructor.

Other changes:

  • Pass in attention_mask argument to model.generate() function, to address a warning: "the attention mask is not set and cannot be inferred from input because pad token is same as eos token. as a consequence, you may observe unexpected behavior."
  • Address an exception that the target did not have an attribute that is defined by it's parent by adding a call to the parent's constructor

Tests and Documentation

Updated existing unit tests and ran jupytext on the HuggingFace demo notebook

Copy link
Contributor

@romanlutz romanlutz left a comment

Choose a reason for hiding this comment

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

Very cool!

doc/code/orchestrators/use_huggingface_chat_target.py Outdated Show resolved Hide resolved
@romanlutz
Copy link
Contributor

CC @KutalVolkan

aria2c isn't available by default so we are aiming to replace it.

@nina-msft nina-msft merged commit 7e9a658 into Azure:main Nov 11, 2024
6 checks passed
@nina-msft nina-msft deleted the users/nina-msft/3427-remove-aria2c branch November 11, 2024 22:56
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