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

gguf: Fix ArrayBuffer.resize not supported on Firefox #638

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

ngxson
Copy link
Member

@ngxson ngxson commented Apr 26, 2024

ArrayBuffer.resize() is not supported on Firefox. This causes the error while visualizing gguf:

image

This PR introduces a small patch that uses a polyfill in case ArrayBuffer.resize() cannot be used.

Tested on Firefox and Chrome.

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

yep i'm not opposed to doing something like this 👍

@julien-c
Copy link
Member

julien-c commented Apr 26, 2024

(though i wish they would support it soon? is there a tracker to follow somewhere?)

@ngxson
Copy link
Member Author

ngxson commented Apr 26, 2024

According to caniuse page, the support is experimental on version 124 (current version) of firefox (can be enabled via a flag). So I think it's expected to be stable on 125. Unfortunate I couldn't find the issue tracker anywhere so I can't confirm that information.

In any way, I feel like this API is relative new on all other browsers, so it's maybe better to keep this polyfill for a while.

@julien-c
Copy link
Member

let's merge @mishig25 and set a reminder to remove (in a couple of weeks?) when Firefox support is fully out?

@mishig25 mishig25 merged commit 7574796 into huggingface:main Apr 29, 2024
1 of 2 checks passed
@mishig25
Copy link
Collaborator

Merged it. Some tests were failing citing a token issue (likely because the PR comes from a fork)

set a reminder to remove (in a couple of weeks?) when Firefox support is fully out?

#642

@mishig25
Copy link
Collaborator

@ngxson thanks a lot for the contribution! I've tweeted about it here

@ngxson
Copy link
Member Author

ngxson commented Apr 29, 2024

@ngxson thanks a lot for the contribution! I've tweeted about it here

Thanks! Great to see that it works on Firefox now 😄

Btw my twitter is also @ngxson

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