Team Ai
Datasetpublic

model-metadata/code_execution_files

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes25kdownloads
MiniMaxAI_MiniMax-M2_0.txt103 linesDownload Raw Back to root
1```CODE: 2# Use a pipeline as a high-level helper3from transformers import pipeline4 5pipe = pipeline("text-generation", model="MiniMaxAI/MiniMax-M2")6messages = [7    {"role": "user", "content": "Who are you?"},8]9pipe(messages)10```11 12ERROR: 13Traceback (most recent call last):14  File "/tmp/MiniMaxAI_MiniMax-M2_00mS19U.py", line 19, in <module>15    pipe = pipeline("text-generation", model="MiniMaxAI/MiniMax-M2")16  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/pipelines/__init__.py", line 1027, in pipeline17    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/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/pipelines/base.py", line 333, in infer_framework_load_model27    raise ValueError(28        f"Could not load model {model} with any of the following classes: {class_tuple}. See the original errors:\n\n{error}\n"29    )30ValueError: Could not load model MiniMaxAI/MiniMax-M2 with any of the following classes: (<class 'transformers.models.auto.modeling_auto.AutoModelForCausalLM'>,). See the original errors:31 32while loading with AutoModelForCausalLM, an error is thrown:33Traceback (most recent call last):34  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/pipelines/base.py", line 293, in infer_framework_load_model35    model = model_class.from_pretrained(model, **kwargs)36  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 604, in from_pretrained37    return model_class.from_pretrained(38           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^39        pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs40        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^41    )42    ^43  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/modeling_utils.py", line 277, in _wrapper44    return func(*args, **kwargs)45  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/modeling_utils.py", line 4881, in from_pretrained46    hf_quantizer, config, dtype, device_map = get_hf_quantizer(47                                              ~~~~~~~~~~~~~~~~^48        config, quantization_config, dtype, from_tf, from_flax, device_map, weights_only, user_agent49        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^50    )51    ^52  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/quantizers/auto.py", line 319, in get_hf_quantizer53    hf_quantizer.validate_environment(54    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^55        dtype=dtype,56        ^^^^^^^^^^^^57    ...<3 lines>...58        weights_only=weights_only,59        ^^^^^^^^^^^^^^^^^^^^^^^^^^60    )61    ^62  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/quantizers/quantizer_finegrained_fp8.py", line 48, in validate_environment63    raise RuntimeError("No GPU or XPU found. A GPU or XPU is needed for FP8 quantization.")64RuntimeError: No GPU or XPU found. A GPU or XPU is needed for FP8 quantization.65 66During handling of the above exception, another exception occurred:67 68Traceback (most recent call last):69  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/pipelines/base.py", line 311, in infer_framework_load_model70    model = model_class.from_pretrained(model, **fp32_kwargs)71  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/models/auto/auto_factory.py", line 604, in from_pretrained72    return model_class.from_pretrained(73           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^74        pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs75        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^76    )77    ^78  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/modeling_utils.py", line 277, in _wrapper79    return func(*args, **kwargs)80  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/modeling_utils.py", line 4881, in from_pretrained81    hf_quantizer, config, dtype, device_map = get_hf_quantizer(82                                              ~~~~~~~~~~~~~~~~^83        config, quantization_config, dtype, from_tf, from_flax, device_map, weights_only, user_agent84        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^85    )86    ^87  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/quantizers/auto.py", line 319, in get_hf_quantizer88    hf_quantizer.validate_environment(89    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^90        dtype=dtype,91        ^^^^^^^^^^^^92    ...<3 lines>...93        weights_only=weights_only,94        ^^^^^^^^^^^^^^^^^^^^^^^^^^95    )96    ^97  File "/tmp/.cache/uv/environments-v2/d3eea229ed2fb556/lib/python3.13/site-packages/transformers/quantizers/quantizer_finegrained_fp8.py", line 48, in validate_environment98    raise RuntimeError("No GPU or XPU found. A GPU or XPU is needed for FP8 quantization.")99RuntimeError: No GPU or XPU found. A GPU or XPU is needed for FP8 quantization.100 101 102 103