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

ValueError: Found unknown kwargs when loading DbrxForCausalLM #2574

Open
7 of 9 tasks
qgallouedec opened this issue Jan 16, 2025 · 0 comments · May be fixed by huggingface/transformers#35728
Open
7 of 9 tasks

ValueError: Found unknown kwargs when loading DbrxForCausalLM #2574

qgallouedec opened this issue Jan 16, 2025 · 0 comments · May be fixed by huggingface/transformers#35728

Comments

@qgallouedec
Copy link
Member

System Info

  • Platform: Linux-5.15.0-1048-aws-x86_64-with-glibc2.31
  • Python version: 3.11.10
  • PyTorch version: 2.5.1
  • CUDA device(s): NVIDIA H100 80GB HBM3
  • Transformers version: 4.48.0.dev0
  • Accelerate version: 1.2.0.dev0
  • Accelerate config: not found
  • Datasets version: 3.1.1.dev0
  • HF Hub version: 0.26.2
  • TRL version: 0.14.0.dev0+751fb1d
  • bitsandbytes version: 0.45.0
  • DeepSpeed version: 0.15.4
  • Diffusers version: 0.31.0
  • Liger-Kernel version: 0.4.2
  • LLM-Blender version: 0.0.2
  • OpenAI version: 1.55.3
  • PEFT version: 0.14.0

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder
  • My own task or dataset (give details below)

Reproduction

from trl import AutoModelForCausalLMWithValueHead

trl_model = AutoModelForCausalLMWithValueHead.from_pretrained("trl-internal-testing/tiny-DbrxForCausalLM")
trl_model.save_pretrained("tmp_dir")
AutoModelForCausalLMWithValueHead.transformers_parent_class.from_pretrained("tmp_dir")

outputs:

Traceback (most recent call last):
  File "/fsx/qgallouedec/trl/t.py", line 5, in <module>
    AutoModelForCausalLMWithValueHead.transformers_parent_class.from_pretrained("tmp_dir")
  File "/fsx/qgallouedec/transformers/src/transformers/models/auto/auto_factory.py", line 526, in from_pretrained
    config, kwargs = AutoConfig.from_pretrained(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fsx/qgallouedec/transformers/src/transformers/models/auto/configuration_auto.py", line 1085, in from_pretrained
    return config_class.from_dict(config_dict, **unused_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fsx/qgallouedec/transformers/src/transformers/configuration_utils.py", line 740, in from_dict
    config = cls(**config_dict)
             ^^^^^^^^^^^^^^^^^^
  File "/fsx/qgallouedec/transformers/src/transformers/models/dbrx/configuration_dbrx.py", line 202, in __init__
    self.attn_config = DbrxAttentionConfig(**attn_config)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/fsx/qgallouedec/transformers/src/transformers/models/dbrx/configuration_dbrx.py", line 64, in __init__
    raise ValueError(f"Found unknown {kwargs=}")
ValueError: Found unknown kwargs={'torch_dtype': 'float32'}

Expected behavior

This error occurs after huggingface/transformers#34873

Checklist

  • I have checked that my issue isn't already filed (see open issues)
  • I have included my system information
  • Any code provided is minimal, complete, and reproducible (more on MREs)
  • Any code provided is properly formatted in code blocks, (no screenshot, more on code blocks)
  • Any traceback provided is complete
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 a pull request may close this issue.

1 participant