Skip to content

[BUG]Error when I was trying to run Mixtral-8x7B-v0.1 #1062

@Eeeeclipse

Description

@Eeeeclipse

Before you submit an issue, please search for existing issues to avoid duplicates.

Issue description:

When I was trying to run , I got TypeError: _init_ffn() missing 1 required positional argument: 'weights'``. Looks like the _init_ffn function in lightllm/lightllm/models/mixtral/layer_weights/transformer_layer_weight.py requires "weights" as input but the reference in lightllm/lightllm/models/llama/layer_weights/transformer_layer_weight.py` doesn't provide such input.

Steps to reproduce:

Please list the steps to reproduce the issue, such as:

python -m lightllm.server.api_server \ --model_dir /home/user/.cache/huggingface/hub/models--mistralai--Mixtral-8x7B-v0.1/snapshots/fc7ac94680e38d7348cfa806e51218e6273104b0 \ --host 0.0.0.0 \ --port 9000

Expected behavior:

The server is expected to be launched.

Error logging:

ERROR 09-20 22:55:09 [model_rpc.py:97] File "/home/user/lightllm/lightllm/models/mixtral/model.py", line 33, in __init__ ERROR 09-20 22:55:09 [model_rpc.py:97] super().__init__(kvargs) ERROR 09-20 22:55:09 [model_rpc.py:97] File "/home/user/lightllm/lightllm/common/basemodel/basemodel.py", line 94, in __init__ ERROR 09-20 22:55:09 [model_rpc.py:97] self._init_weights() ERROR 09-20 22:55:09 [model_rpc.py:97] File "/home/user/lightllm/lightllm/common/basemodel/basemodel.py", line 147, in _init_weights ERROR 09-20 22:55:09 [model_rpc.py:97] self.trans_layers_weight = [ ERROR 09-20 22:55:09 [model_rpc.py:97] File "/home/user/lightllm/lightllm/common/basemodel/basemodel.py", line 148, in <listcomp> ERROR 09-20 22:55:09 [model_rpc.py:97] self.transformer_weight_class( ERROR 09-20 22:55:09 [model_rpc.py:97] File "/home/user/lightllm/lightllm/models/mixtral/layer_weights/transformer_layer_weight.py", line 15, in __init__ ERROR 09-20 22:55:09 [model_rpc.py:97] super().__init__( ERROR 09-20 22:55:09 [model_rpc.py:97] File "/home/user/lightllm/lightllm/models/llama/layer_weights/transformer_layer_weight.py", line 17, in __init__ ERROR 09-20 22:55:09 [model_rpc.py:97] super().__init__(layer_num, data_type, network_config, mode, quant_cfg) ERROR 09-20 22:55:09 [model_rpc.py:97] File "/home/user/lightllm/lightllm/common/basemodel/layer_weights/transformer_layer_weight.py", line 21, in __init__ ERROR 09-20 22:55:09 [model_rpc.py:97] self._init_weight() ERROR 09-20 22:55:09 [model_rpc.py:97] File "/home/user/lightllm/lightllm/models/llama/layer_weights/transformer_layer_weight.py", line 23, in _init_weight ERROR 09-20 22:55:09 [model_rpc.py:97] self._init_ffn() ERROR 09-20 22:55:09 [model_rpc.py:97] TypeError: _init_ffn() missing 1 required positional argument: 'weights'

Environment:

Please provide information about your environment, such as:

  • Using container

  • OS: (Ubuntu 14.04, CentOS7)

  • GPU info:

    • nvidia-smi (e.g. NVIDIA-SMI 525.116.04 Driver Version: 525.116.04 CUDA Version: 12.0)
    • Graphics cards: (e.g. 4090x8)
  • Python: (e.g. CPython3.9)

    • currently, only python>=3.9 is supported
  • LightLLm: (git commit-hash)

    • for container: docker run --entrypoint cat --rm ghcr.io/modeltc/lightllm:main /lightllm/.git/refs/heads/main
  • openai-triton: pip show triton

Additional context:

Please add any other context or screenshots about the issue here.

Language:

Please use English as much as possible for better communication.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions