Skip to content

AttributeError: 'GptOssConfig' object has no attribute 'max_position_embeddings' #40461

@speedbunny

Description

@speedbunny

System Info

Kaggle script running GPT:oss20b that worked this morning (pulls transformers from GitHub) has just started giving this error:

'GptOssConfig' object has no attribute 'max_position_embeddings

Not a big user and it's a plug and play script so can't elaborate much, sorry.

Here's the env!

Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.

  • transformers version: 4.56.0.dev0
  • Platform: Linux-6.6.56+-x86_64-with-glibc2.35
  • Python version: 3.11.13
  • Huggingface_hub version: 0.34.4
  • Safetensors version: 0.5.3
  • Accelerate version: 1.8.1
  • Accelerate config: not found
  • DeepSpeed version: not installed
  • PyTorch version (accelerator?): 2.8.0+cu128 (CUDA)
  • Tensorflow version (GPU?): 2.18.0 (True)
  • Flax version (CPU?/GPU?/TPU?): 0.10.6 (gpu)
  • Jax version: 0.5.2
  • JaxLib version: 0.5.1
  • Using distributed or parallel set-up in script?: Yes
  • Using GPU in script?: Yes
  • GPU type: Tesla T4

Who can help?

@ArthurZucker

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

Load model & tokenizer (keep it simple for now)

tokenizer = AutoTokenizer.from_pretrained(model_id, device_map="auto")
model = AutoModelForCausalLM.from_pretrained(model_id,device_map="auto")

Expected behavior

Script ran w/o errors this morning, powers multiple notebooks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions