Upload moonshotai_Kimi-K2-Thinking_0.txt with huggingface_hub
Browse files
moonshotai_Kimi-K2-Thinking_0.txt
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
```CODE:
|
| 2 |
+
# Use a pipeline as a high-level helper
|
| 3 |
+
from transformers import pipeline
|
| 4 |
+
|
| 5 |
+
pipe = pipeline("text-generation", model="moonshotai/Kimi-K2-Thinking", 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/moonshotai_Kimi-K2-Thinking_07QigG6.py", line 25, in <module>
|
| 15 |
+
pipe = pipeline("text-generation", model="moonshotai/Kimi-K2-Thinking", trust_remote_code=True)
|
| 16 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/pipelines/__init__.py", line 1027, in pipeline
|
| 17 |
+
framework, model = infer_framework_load_model(
|
| 18 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~^
|
| 19 |
+
adapter_path if adapter_path is not None else model,
|
| 20 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 21 |
+
...<5 lines>...
|
| 22 |
+
**model_kwargs,
|
| 23 |
+
^^^^^^^^^^^^^^^
|
| 24 |
+
)
|
| 25 |
+
^
|
| 26 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/pipelines/base.py", line 293, in infer_framework_load_model
|
| 27 |
+
model = model_class.from_pretrained(model, **kwargs)
|
| 28 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 597, in from_pretrained
|
| 29 |
+
return model_class.from_pretrained(
|
| 30 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
|
| 31 |
+
pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
|
| 32 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 33 |
+
)
|
| 34 |
+
^
|
| 35 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/modeling_utils.py", line 277, in _wrapper
|
| 36 |
+
return func(*args, **kwargs)
|
| 37 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/modeling_utils.py", line 4881, in from_pretrained
|
| 38 |
+
hf_quantizer, config, dtype, device_map = get_hf_quantizer(
|
| 39 |
+
~~~~~~~~~~~~~~~~^
|
| 40 |
+
config, quantization_config, dtype, from_tf, from_flax, device_map, weights_only, user_agent
|
| 41 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 42 |
+
)
|
| 43 |
+
^
|
| 44 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/quantizers/auto.py", line 305, in get_hf_quantizer
|
| 45 |
+
config.quantization_config = AutoHfQuantizer.merge_quantization_configs(
|
| 46 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
|
| 47 |
+
config.quantization_config, quantization_config
|
| 48 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 49 |
+
)
|
| 50 |
+
^
|
| 51 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/quantizers/auto.py", line 214, in merge_quantization_configs
|
| 52 |
+
quantization_config = AutoQuantizationConfig.from_dict(quantization_config)
|
| 53 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/quantizers/auto.py", line 140, in from_dict
|
| 54 |
+
return target_cls.from_dict(quantization_config_dict)
|
| 55 |
+
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 56 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/utils/quantization_config.py", line 1398, in from_dict
|
| 57 |
+
return super().from_dict(config_dict, return_unused_kwargs=return_unused_kwargs, **kwargs)
|
| 58 |
+
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 59 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/utils/quantization_config.py", line 122, in from_dict
|
| 60 |
+
config = cls(**config_dict)
|
| 61 |
+
File "/tmp/.cache/uv/environments-v2/76a7f5f9fc7134c5/lib/python3.13/site-packages/transformers/utils/quantization_config.py", line 1328, in __init__
|
| 62 |
+
raise ImportError(
|
| 63 |
+
"compressed_tensors is not installed and is required for compressed-tensors quantization. Please install it with `pip install compressed-tensors`."
|
| 64 |
+
)
|
| 65 |
+
ImportError: compressed_tensors is not installed and is required for compressed-tensors quantization. Please install it with `pip install compressed-tensors`.
|