ariG23498 HF Staff commited on
Commit
a7f8b6e
·
verified ·
1 Parent(s): 076b430

Upload tencent_Youtu-LLM-2B_0.txt with huggingface_hub

Browse files
Files changed (1) hide show
  1. tencent_Youtu-LLM-2B_0.txt +1 -61
tencent_Youtu-LLM-2B_0.txt CHANGED
@@ -1,61 +1 @@
1
- ```CODE:
2
- # Use a pipeline as a high-level helper
3
- from transformers import pipeline
4
-
5
- pipe = pipeline("text-generation", model="tencent/Youtu-LLM-2B", 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_Youtu-LLM-2B_05t2KXQ.py", line 30, in <module>
15
- pipe(messages)
16
- ~~~~^^^^^^^^^^
17
- File "/tmp/.cache/uv/environments-v2/481560dbaa31419f/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/481560dbaa31419f/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/481560dbaa31419f/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/481560dbaa31419f/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/481560dbaa31419f/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/481560dbaa31419f/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/481560dbaa31419f/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/481560dbaa31419f/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/481560dbaa31419f/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/481560dbaa31419f/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/481560dbaa31419f/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/Youtu_hyphen_LLM_hyphen_2B/d69d7a869a46a8e13012d0b6d6961ad145eb30c9/modeling_youtu.py", line 557, in forward
47
- outputs: BaseModelOutputWithPast = self.model(
48
- ~~~~~~~~~~^
49
- input_ids=input_ids,
50
- ^^^^^^^^^^^^^^^^^^^^
51
- ...<6 lines>...
52
- **kwargs,
53
- ^^^^^^^^^
54
- )
55
- ^
56
- File "/tmp/.cache/uv/environments-v2/481560dbaa31419f/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1775, in _wrapped_call_impl
57
- return self._call_impl(*args, **kwargs)
58
- ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
59
- File "/tmp/.cache/uv/environments-v2/481560dbaa31419f/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1786, in _call_impl
60
- return forward_call(*args, **kwargs)
61
- TypeError: check_model_inputs.<locals>.wrapped_fn() got an unexpected keyword argument 'input_ids'
 
1
+ Everything was good in tencent_Youtu-LLM-2B_0.txt