Upload tencent_WeDLM-8B-Instruct_0.txt with huggingface_hub
Browse files
tencent_WeDLM-8B-Instruct_0.txt
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```CODE:
|
| 2 |
+
# Use a pipeline as a high-level helper
|
| 3 |
+
from transformers import pipeline
|
| 4 |
+
|
| 5 |
+
pipe = pipeline("text-generation", model="tencent/WeDLM-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/tencent_WeDLM-8B-Instruct_0UKqg56.py", line 30, in <module>
|
| 15 |
+
pipe(messages)
|
| 16 |
+
~~~~^^^^^^^^^^
|
| 17 |
+
File "/tmp/.cache/uv/environments-v2/ed9bef2612ecc286/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/ed9bef2612ecc286/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/ed9bef2612ecc286/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/ed9bef2612ecc286/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/ed9bef2612ecc286/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/ed9bef2612ecc286/lib/python3.13/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
|
| 30 |
+
return func(*args, **kwargs)
|
| 31 |
+
File "/tmp/.cache/uv/environments-v2/ed9bef2612ecc286/lib/python3.13/site-packages/transformers/generation/utils.py", line 2564, in generate
|
| 32 |
+
result = decoding_method(
|
| 33 |
+
self,
|
| 34 |
+
...<5 lines>...
|
| 35 |
+
**model_kwargs,
|
| 36 |
+
)
|
| 37 |
+
File "/tmp/.cache/uv/environments-v2/ed9bef2612ecc286/lib/python3.13/site-packages/transformers/generation/utils.py", line 2784, in _sample
|
| 38 |
+
outputs = self(**model_inputs, return_dict=True)
|
| 39 |
+
File "/tmp/.cache/uv/environments-v2/ed9bef2612ecc286/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1775, in _wrapped_call_impl
|
| 40 |
+
return self._call_impl(*args, **kwargs)
|
| 41 |
+
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
|
| 42 |
+
File "/tmp/.cache/uv/environments-v2/ed9bef2612ecc286/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1786, in _call_impl
|
| 43 |
+
return forward_call(*args, **kwargs)
|
| 44 |
+
File "/tmp/.cache/uv/environments-v2/ed9bef2612ecc286/lib/python3.13/site-packages/transformers/utils/generic.py", line 918, in wrapper
|
| 45 |
+
output = func(self, *args, **kwargs)
|
| 46 |
+
File "/tmp/.cache/huggingface/modules/transformers_modules/tencent/WeDLM_hyphen_8B_hyphen_Instruct/c1e0373ec7e11bc27321a548ea54ea9728b0d9c0/modeling_wedlm.py", line 917, in forward
|
| 47 |
+
outputs = self.model(
|
| 48 |
+
input_ids=input_ids,
|
| 49 |
+
...<9 lines>...
|
| 50 |
+
**kwargs,
|
| 51 |
+
)
|
| 52 |
+
File "/tmp/.cache/uv/environments-v2/ed9bef2612ecc286/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1775, in _wrapped_call_impl
|
| 53 |
+
return self._call_impl(*args, **kwargs)
|
| 54 |
+
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
|
| 55 |
+
File "/tmp/.cache/uv/environments-v2/ed9bef2612ecc286/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1786, in _call_impl
|
| 56 |
+
return forward_call(*args, **kwargs)
|
| 57 |
+
TypeError: check_model_inputs.<locals>.wrapped_fn() got an unexpected keyword argument 'input_ids'
|