Unverified Commit 6824461f authored by Younes Belkada's avatar Younes Belkada Committed by GitHub
Browse files

[`core`/ `auto` ] Fix bnb test with code revision + bug with code revision (#26431)

* fix bnb test with code revision

* fix test

* Apply suggestions from code review

* Update src/transformers/models/auto/auto_factory.py

* Update src/transformers/models/auto/auto_factory.py

* Update src/transformers/models/auto/auto_factory.py
parent 24178c24
......@@ -138,7 +138,9 @@ class MixedInt8Test(BaseMixedInt8Test):
model_id, trust_remote_code=True, revision="72e5f594ce36f9cabfa2a9fd8f58b491eb467ee7"
)
with init_empty_weights():
model = AutoModelForCausalLM.from_config(config, trust_remote_code=True)
model = AutoModelForCausalLM.from_config(
config, trust_remote_code=True, code_revision="72e5f594ce36f9cabfa2a9fd8f58b491eb467ee7"
)
self.assertEqual(get_keys_to_not_convert(model), ["transformer.wte"])
# without trust_remote_code
config = AutoConfig.from_pretrained(model_id, revision="72e5f594ce36f9cabfa2a9fd8f58b491eb467ee7")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment