code_execution_files / ByteDance-Seed_Stable-DiffCoder-8B-Instruct_0.txt
ariG23498's picture
ariG23498 HF Staff
Upload ByteDance-Seed_Stable-DiffCoder-8B-Instruct_0.txt with huggingface_hub
08bbbe9 verified
```CODE:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ByteDance-Seed/Stable-DiffCoder-8B-Instruct", trust_remote_code=True)
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages)
```
ERROR:
Traceback (most recent call last):
File "/tmp/ByteDance-Seed_Stable-DiffCoder-8B-Instruct_009XsTD.py", line 30, in <module>
pipe(messages)
~~~~^^^^^^^^^^
File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/text_generation.py", line 325, in __call__
return super().__call__(Chat(text_inputs), **kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/base.py", line 1467, in __call__
return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/base.py", line 1474, in run_single
model_outputs = self.forward(model_inputs, **forward_params)
File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/base.py", line 1374, in forward
model_outputs = self._forward(model_inputs, **forward_params)
File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/text_generation.py", line 432, in _forward
output = self.model.generate(input_ids=input_ids, attention_mask=attention_mask, **generate_kwargs)
File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
return func(*args, **kwargs)
File "/tmp/.cache/huggingface/modules/transformers_modules/ByteDance_hyphen_Seed/Stable_hyphen_DiffCoder_hyphen_8B_hyphen_Instruct/d0808fa34fa03de9163a29cabfc7107294a535a8/modeling_seed_diffcoder.py", line 24, in generate
output_ids, nfe = generate_block(
~~~~~~~~~~~~~~^
model=self,
^^^^^^^^^^^
prompt=prompt,
^^^^^^^^^^^^^^
**kwargs,
^^^^^^^^^
)
^
File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
return func(*args, **kwargs)
TypeError: generate_block() got an unexpected keyword argument 'attention_mask'