ariG23498 HF Staff commited on
Commit
08bbbe9
·
verified ·
1 Parent(s): 8115fbc

Upload ByteDance-Seed_Stable-DiffCoder-8B-Instruct_0.txt with huggingface_hub

Browse files
ByteDance-Seed_Stable-DiffCoder-8B-Instruct_0.txt ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ # Use a pipeline as a high-level helper
3
+ from transformers import pipeline
4
+
5
+ pipe = pipeline("text-generation", model="ByteDance-Seed/Stable-DiffCoder-8B-Instruct", trust_remote_code=True)
6
+ messages = [
7
+ {"role": "user", "content": "Who are you?"},
8
+ ]
9
+ pipe(messages)
10
+ ```
11
+
12
+ ERROR:
13
+ Traceback (most recent call last):
14
+ File "/tmp/ByteDance-Seed_Stable-DiffCoder-8B-Instruct_009XsTD.py", line 30, in <module>
15
+ pipe(messages)
16
+ ~~~~^^^^^^^^^^
17
+ File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/text_generation.py", line 325, in __call__
18
+ return super().__call__(Chat(text_inputs), **kwargs)
19
+ ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
+ File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/base.py", line 1467, in __call__
21
+ return self.run_single(inputs, preprocess_params, forward_params, postprocess_params)
22
+ ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23
+ File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/base.py", line 1474, in run_single
24
+ model_outputs = self.forward(model_inputs, **forward_params)
25
+ File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/base.py", line 1374, in forward
26
+ model_outputs = self._forward(model_inputs, **forward_params)
27
+ File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/transformers/pipelines/text_generation.py", line 432, in _forward
28
+ output = self.model.generate(input_ids=input_ids, attention_mask=attention_mask, **generate_kwargs)
29
+ File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
30
+ return func(*args, **kwargs)
31
+ 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
32
+ output_ids, nfe = generate_block(
33
+ ~~~~~~~~~~~~~~^
34
+ model=self,
35
+ ^^^^^^^^^^^
36
+ prompt=prompt,
37
+ ^^^^^^^^^^^^^^
38
+ **kwargs,
39
+ ^^^^^^^^^
40
+ )
41
+ ^
42
+ File "/tmp/.cache/uv/environments-v2/d1df88e7f5c3f72a/lib/python3.13/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
43
+ return func(*args, **kwargs)
44
+ TypeError: generate_block() got an unexpected keyword argument 'attention_mask'