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

allow user to force trust_remote_code=true via from_pretrained kwargs #597

Merged
merged 1 commit into from
May 15, 2024

Conversation

Butanium
Copy link
Contributor

Description

A simple code change that allows you to force TL to use trust_remote_code=True in its configuration. This is particularly useful when you need to use an unreferenced model with a supported architecture that requires it (e.g., m-a-p/CT-LLM-Base).

Type of change

  • New feature (non-breaking change which adds functionality)

@bryce13950
Copy link
Collaborator

Thanks!

@bryce13950 bryce13950 merged commit 5a374ec into TransformerLensOrg:main May 15, 2024
10 checks passed
bryce13950 added a commit that referenced this pull request May 24, 2024
* Initial Commit (add pyright + test by adding few annotations)

* Slightly more typing added

* more typing

* Additional typing

* Completed typing for hook_points.py file

* todo clarifications

* formatting changes to hook_points.py

* Apply some suggestions from code review

Co-authored-by: Alan <[email protected]>

* Added typing for Literals and changed some assertions to if statements

* formatting

* update to accout for merged code

* small typing issue

* changing hookfunction protocol + more assertions

* change the slice input

* change from isinstance to callable checks

* fix: Update Gemma to reflect upstream HF changes (#596)

* update activation function to tanh approximation

* keep RMSNorm calcs in float32 and match cfg dtype for embedding scaling

* formatting

* keep mypy happy

* formatting

* allow user to force trust_remote_code=true via from_pretrained kwargs (#597)

* change + revert HookFunctionProtocol

* format

* module_output is now just a tensor

* set module ouput to be any type

---------

Co-authored-by: Alan <[email protected]>
Co-authored-by: Bryce Meyer <[email protected]>
Co-authored-by: cmathw <[email protected]>
Co-authored-by: Clement Dumas <[email protected]>
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.

2 participants