Run this model with HF Jobs

Run moonshotai/Kimi-K2.5 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/moonshotai/Kimi-K2.5. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/moonshotai/Kimi-K2.5 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/moonshotai/Kimi-K2.5. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/moonshotai/Kimi-K2.5. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

AttributeError: 'CompressedLinear' object has no attribute 'weight'

#39
by xbeark - opened

When I try to load model with transformers

Traceback (most recent call last):
File "/home/ccc/nas/try_kimi-with-transformers/V2/load.py", line 415, in
main()
File "/home/ccc/nas/try_kimi-with-transformers/V2/load.py", line 403, in main
result = compute_refusal_directions(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ccc/nas/try_kimi-with-transformers/V2/load.py", line 66, in compute_refusal_directions
model = AutoModelForCausalLM.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 365, in from_pretrained
return model_class.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 4110, in from_pretrained
load_info = cls._finalize_load_state_dict(model, load_config, load_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 4274, in _finalize_load_state_dict
model._initialize_missing_keys(load_config.is_quantized)
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 4550, in _initialize_missing_keys
self.initialize_weights()
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/try_kimi/lib/python3.11/contextlib.py", line 81, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2373, in initialize_weights
self.smart_apply(self._initialize_weights)
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2364, in smart_apply
module.smart_apply(module._initialize_weights)
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2364, in smart_apply
module.smart_apply(module._initialize_weights)
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2366, in smart_apply
module.smart_apply(fn)
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2366, in smart_apply
module.smart_apply(fn)
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2366, in smart_apply
module.smart_apply(fn)
[Previous line repeated 3 more times]
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2367, in smart_apply
fn(self)
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/transformers/modeling_utils.py", line 2344, in _initialize_weights
self._init_weights(module)
File "/root/.cache/huggingface/modules/transformers_modules/moonshotai/Kimi_hyphen_K2_dot_5/c415995b2384f8927990eaf8454c8a0e0f3f2549/modeling_deepseek.py", line 1248, in init_weights
module.weight.data.normal
(mean=0.0, std=std)
^^^^^^^^^^^^^
File "/root/miniconda3/envs/try_kimi/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1965, in getattr
raise AttributeError(
AttributeError: 'CompressedLinear' object has no attribute 'weight'

Same issue

Moonshot AI org

Sign up or log in to comment