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

Hr/add idefics 2 deployment #149

Merged
merged 27 commits into from
Aug 7, 2024
Merged

Hr/add idefics 2 deployment #149

merged 27 commits into from
Aug 7, 2024

Conversation

HRashidi
Copy link
Contributor

@HRashidi HRashidi commented Aug 5, 2024

Summary:

This update added Idefics2 deployment into the available deployments

Related issues: #145

@HRashidi HRashidi linked an issue Aug 5, 2024 that may be closed by this pull request
Copy link
Collaborator

@evanderiel evanderiel left a comment

Choose a reason for hiding this comment

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

Looks good

aana/deployments/idefics_2_deployment.py Outdated Show resolved Hide resolved
Copy link
Contributor

@movchan74 movchan74 left a comment

Choose a reason for hiding this comment

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

Some changes are required. Don't forget to run Ruff. Also, merge the main into the branch.

aana/configs/deployments.py Outdated Show resolved Hide resolved
aana/core/models/image_chat.py Outdated Show resolved Hide resolved
aana/deployments/__init__.py Outdated Show resolved Hide resolved
aana/core/models/image_chat.py Show resolved Hide resolved
aana/deployments/idefics_2_deployment.py Outdated Show resolved Hide resolved
aana/tests/units/test_image_chat_dialog.py Outdated Show resolved Hide resolved
aana/tests/units/test_image_chat_dialog.py Outdated Show resolved Hide resolved
aana/core/models/image_chat.py Show resolved Hide resolved
aana/utils/json.py Show resolved Hide resolved
docs/pages/integrations.md Outdated Show resolved Hide resolved
@movchan74
Copy link
Contributor

@HRashidi

Idefics 2 model card says that it doesn't work with some versions of transformers library.

Idefics2 will NOT work with Transformers version between 4.41.0 and 4.43.3 included. See the issue huggingface/transformers#32271 and the fix huggingface/transformers#32275.

See https://huggingface.co/HuggingFaceM4/idefics2-8b

I suggest we bump the version of transformers library in pyproject.

@HRashidi
Copy link
Contributor Author

HRashidi commented Aug 6, 2024

@HRashidi

Idefics 2 model card says that it doesn't work with some versions of transformers library.

Idefics2 will NOT work with Transformers version between 4.41.0 and 4.43.3 included. See the issue huggingface/transformers#32271 and the fix huggingface/transformers#32275.

See https://huggingface.co/HuggingFaceM4/idefics2-8b

I suggest we bump the version of transformers library in pyproject.

Bumped to 4.41.2

@movchan74 movchan74 self-requested a review August 6, 2024 14:53
docs/reference/models/image_chat.md Outdated Show resolved Hide resolved
docs/reference/index.md Outdated Show resolved Hide resolved
docs/pages/integrations.md Show resolved Hide resolved
aana/tests/units/test_image_chat_dialog.py Show resolved Hide resolved
aana/core/models/image_chat.py Show resolved Hide resolved
aana/core/models/image_chat.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
docs/pages/integrations.md Outdated Show resolved Hide resolved
aana/deployments/idefics_2_deployment.py Outdated Show resolved Hide resolved
aana/deployments/idefics_2_deployment.py Outdated Show resolved Hide resolved
@@ -35,11 +36,15 @@ def json_serializer_default(obj: object) -> object:
return obj.model_dump()
if isinstance(obj, Path):
return str(obj)
if isinstance(obj, type):
return str(type)
if isinstance(obj, np.ndarray):
Copy link
Contributor

Choose a reason for hiding this comment

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

ndarray should be handled by OPT_SERIALIZE_NUMPY in orjson. But if you use jsonify then it will not handle numpy. Can you check and see if we can unify jsonify and orjson_serializer and use orjson for everything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in PR

docs/reference/models/index.md Outdated Show resolved Hide resolved
HRashidi and others added 4 commits August 7, 2024 11:58
@HRashidi HRashidi requested a review from movchan74 August 7, 2024 13:07
@HRashidi HRashidi merged commit 309b9b0 into main Aug 7, 2024
6 checks passed
@HRashidi HRashidi deleted the hr/add-idefics-2-deployment branch August 7, 2024 15:26
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.

[FEATURE REQUEST] Add Idefics 2 deployment
3 participants