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

[Bug] Passing through kwargs to TransformersTokenizer #922

Merged

Conversation

riedgar-ms
Copy link
Collaborator

This is a fix for #909 . It ensures that any argument common to both AutoModelForCausalLM.from_pretrained() and AutoTokenizer.from_pretrained() will be passed from the former to the latter when a TransformersModel is created. The original issue was only about trust_remote_code but there are a few other arguments related to accessing Hugging Face which probably ought to be forwarded as well.

If there are LLM specific arguments which need to be shared, then users should instantiate the tokeniser separately, and pass it in.

@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.98%. Comparing base (567174a) to head (0bcab89).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #922      +/-   ##
==========================================
+ Coverage   57.08%   58.98%   +1.90%     
==========================================
  Files          64       64              
  Lines        4705     4711       +6     
==========================================
+ Hits         2686     2779      +93     
+ Misses       2019     1932      -87     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Harsha-Nori
Copy link
Collaborator

LGTM :) Thanks for investigating and finding the common kwargs Richard!

@hudson-ai
Copy link
Collaborator

Looks good to me too :)

@riedgar-ms riedgar-ms merged commit ba86754 into guidance-ai:main Jun 24, 2024
100 checks passed
@riedgar-ms riedgar-ms deleted the riedgar-ms/transformers-kwargs-02 branch June 24, 2024 17:06
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.

4 participants