Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Several errors when deploying GGUF models #786

Open
musoles opened this issue Oct 21, 2024 · 0 comments
Open

[Bug]: Several errors when deploying GGUF models #786

musoles opened this issue Oct 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@musoles
Copy link

musoles commented Oct 21, 2024

Your current environment

The output of `python env.py`

Collecting environment information...
PyTorch version: 2.4.0+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Pop!_OS 22.04 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.10.12 (main, Mar 22 2024, 16:50:05) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.9.3-76060903-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3050 Ti Laptop GPU
Nvidia driver version: 550.67
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 12
On-line CPU(s) list: 0-11
Vendor ID: GenuineIntel
Model name: 11th Gen Intel(R) Core(TM) i5-11400H @ 2.70GHz
CPU family: 6
Model: 141
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
Stepping: 1
CPU max MHz: 4500.0000
CPU min MHz: 800.0000
BogoMIPS: 5376.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l2 cdp_l2 ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear ibt flush_l1d arch_capabilities
Virtualisation: VT-x
L1d cache: 288 KiB (6 instances)
L1i cache: 192 KiB (6 instances)
L2 cache: 7.5 MiB (6 instances)
L3 cache: 12 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-11
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] nvidia-nccl-cu12==2.20.5
[pip3] pyzmq==26.2.0
[pip3] torch==2.4.0
[pip3] torchvision==0.19.0
[pip3] transformers==4.45.2
[pip3] triton==3.0.0
[conda] No relevant packages
ROCM Version: Could not collect
Neuron SDK Version: N/A
Aphrodite Version: 0.6.2.post1
Aphrodite Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
�[4mGPU0 CPU Affinity NUMA Affinity GPU NUMA ID�[0m
GPU0 X 0-11 0 N/A

Legend:

X = Self
SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX = Connection traversing at most a single PCIe bridge
NV# = Connection traversing a bonded set of # NVLinks

🐛 Describe the bug

When deploying GGUF models, I am getting errors (different depending on the models).

Deployment method:

python -m aphrodite.endpoints.openai.api_server --model <local-path-to-gguf-model>

Here are two that I've encountered:

Llama-3.2-1B-Instruct-Uncensored.Q6_K.gguf from mradermacher/Llama-3.2-1B-Instruct-Uncensored-GGUF

INFO:     Loading model Llama-3.2-1B-Instruct-Uncensored.Q6_K.gguf...
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/endpoints/openai/rpc/server.py", line 209, in run_rpc_server
    server = AsyncEngineRPCServer(async_engine_args, rpc_path)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/endpoints/openai/rpc/server.py", line 24, in __init__
    self.engine = AsyncAphrodite.from_engine_args(async_engine_args)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/engine/async_aphrodite.py", line 601, in from_engine_args
    engine = cls(
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/engine/async_aphrodite.py", line 510, in __init__
    self.engine = self._init_engine(*args, **kwargs)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/engine/async_aphrodite.py", line 694, in _init_engine
    return engine_class(*args, **kwargs)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/engine/aphrodite_engine.py", line 261, in __init__
    self.model_executor = executor_class(
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/executor/executor_base.py", line 45, in __init__
    self._init_executor()
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/executor/gpu_executor.py", line 36, in _init_executor
    self.driver_worker.load_model()
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/task_handler/worker.py", line 153, in load_model
    self.model_runner.load_model()
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/task_handler/model_runner.py", line 888, in load_model
    self.model = get_model(model_config=self.model_config,
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/modeling/model_loader/__init__.py", line 20, in get_model
    return loader.load_model(model_config=model_config,
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/modeling/model_loader/loader.py", line 1033, in load_model
    model = _initialize_model(model_config, self.load_config,
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/modeling/model_loader/loader.py", line 167, in _initialize_model
    return build_model(
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/modeling/model_loader/loader.py", line 152, in build_model
    return model_class(config=hf_config,
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/modeling/models/llama.py", line 427, in __init__
    self.lm_head.weight = self.model.embed_tokens.weight
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1729, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'VocabParallelEmbedding' object has no attribute 'weight'. Did you mean: 'qweight'?

Phi-3.5-mini-instruct-IQ2_M.gguf from bartowski/Phi-3.5-mini-instruct-GGUF

INFO:     Loading model Phi-3.5-mini-instruct-IQ2_M.gguf...
⠋ Loading modules... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   4/325   1% 0:00:00
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/endpoints/openai/rpc/server.py", line 209, in run_rpc_server
    server = AsyncEngineRPCServer(async_engine_args, rpc_path)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/endpoints/openai/rpc/server.py", line 24, in __init__
    self.engine = AsyncAphrodite.from_engine_args(async_engine_args)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/engine/async_aphrodite.py", line 601, in from_engine_args
    engine = cls(
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/engine/async_aphrodite.py", line 510, in __init__
    self.engine = self._init_engine(*args, **kwargs)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/engine/async_aphrodite.py", line 694, in _init_engine
    return engine_class(*args, **kwargs)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/engine/aphrodite_engine.py", line 261, in __init__
    self.model_executor = executor_class(
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/executor/executor_base.py", line 45, in __init__
    self._init_executor()
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/executor/gpu_executor.py", line 36, in _init_executor
    self.driver_worker.load_model()
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/task_handler/worker.py", line 153, in load_model
    self.model_runner.load_model()
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/task_handler/model_runner.py", line 888, in load_model
    self.model = get_model(model_config=self.model_config,
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/modeling/model_loader/__init__.py", line 20, in get_model
    return loader.load_model(model_config=model_config,
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/modeling/model_loader/loader.py", line 1035, in load_model
    model.load_weights(
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/modeling/models/llama.py", line 544, in load_weights
    weight_loader(param, loaded_weight)
  File "/home/carlosfm/kalavai/kalavai-client/templates/aphrodite/env/lib/python3.10/site-packages/aphrodite/modeling/layers/linear.py", line 832, in weight_loader
    assert param_data.shape == loaded_weight.shape
AssertionError
@musoles musoles added the bug Something isn't working label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant