PygmalionAI/aphrodite-engine

[Bug]: Moe's no longer working

Opened this issue ยท 3 comments

Your current environment

But this is my host env, the Engine is running on the official latest docker image.

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect 
CMake version: version 3.29.2
Libc version: glibc-2.35
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.5.0-35-generic-x86_64-with-glibc2.35
Is CUDA available: N/A
CUDA runtime version: Could not collect 
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: 
GPU 0: NVIDIA GeForce RTX 3090
GPU 1: NVIDIA GeForce RTX 3090
GPU 2: NVIDIA GeForce RTX 3090

Nvidia driver version: 535.171.04
cuDNN version: Could not collect 
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A
CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      46 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             24
On-line CPU(s) list:                0-23
Vendor ID:                          GenuineIntel
Model name:                         13th Gen Intel(R) Core(TM) i7-13700K
CPU family:                         6
Model:                              183
Thread(s) per core:                 2
Core(s) per socket:                 16
Socket(s):                          1
Stepping:                           1
CPU max MHz:                        5400,0000
CPU min MHz:                        800,0000
BogoMIPS:                           6835.20
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 smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities
Virtualization:                     VT-x
L1d cache:                          640 KiB (16 instances)
L1i cache:                          768 KiB (16 instances)
L2 cache:                           24 MiB (10 instances)
L3 cache:                           30 MiB (1 instance)
NUMA node(s):                       1
NUMA node0 CPU(s):                  0-23
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      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 BHI_DIS_S
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected
Versions of relevant libraries:
[pip3] numpy==1.21.5
[conda] Could not collect ROCM Version: Could not collect 
Aphrodite Version: N/A
Aphrodite Build Flags:
CUDA Archs: Not Set; ROCm: Disabled

๐Ÿ› Describe the bug

When i run the docker container it run Ok, download the moe model but in the first request it throws an exception other times reboot my server, no moe's models works has usual.

Starting Aphrodite Engine API server...
+ exec python3 -m aphrodite.endpoints.openai.api_server --host 0.0.0.0 --port 7860 --download-dir /data/hub --model TheBloke/laser-dolphin-mixtral-2x7b-dpo-GPTQ --dtype float16 --kv-cache-dtype fp8 --max-model-len 8000 --tensor-parallel-size 2 --gpu-memory-utilization 0.97 --disable-custom-all-reduce --trust-remote-code --disable-log-stats --api-keys 123 --block-size 8 --swap-space 2 --chat-template /home/workspace/chat_templates/chat_ml.jinja --served-model-name gpt-4o --max-context-len-to-capture 512 --max-num-batched-tokens 8000 --max-num-seqs 15 --quantization gptq
WARNING:  Admin key not provided. Admin operations will be disabled.
/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
WARNING:  Casting torch.bfloat16 to torch.float16.
WARNING:  gptq quantization is not fully optimized yet. The speed can be slower 
than non-quantized models.
INFO:     Using fp8 data type to store kv cache. It reduces the GPU memory 
footprint and boosts the performance. But it may cause slight accuracy drop 
without scaling factors. FP8_E5M2 (without scaling) is only supported on cuda 
version greater than 11.8. On ROCm (AMD GPU), FP8_E4M3 is instead supported for 
common inference criteria.
2024-05-27 16:33:22,714	INFO worker.py:1749 -- Started a local Ray instance.
INFO:     Initializing the Aphrodite Engine (v0.5.3) with the following config:
INFO:     Model = 'TheBloke/laser-dolphin-mixtral-2x7b-dpo-GPTQ'
INFO:     Speculative Config = None
INFO:     DataType = torch.float16
INFO:     Model Load Format = auto
INFO:     Number of GPUs = 2
INFO:     Disable Custom All-Reduce = True
INFO:     Quantization Format = gptq
INFO:     Context Length = 8000
INFO:     Enforce Eager Mode = True
INFO:     KV Cache Data Type = fp8
INFO:     KV Cache Params Path = None
INFO:     Device = cuda
INFO:     Guided Decoding Backend = 
DecodingConfig(guided_decoding_backend='outlines')
INFO:     Using FlashAttention backend.
(RayWorkerAphrodite pid=1576) INFO:     Using FlashAttention backend.
INFO:     Aphrodite is using nccl==2.20.5
(RayWorkerAphrodite pid=1576) INFO:     Aphrodite is using nccl==2.20.5
INFO:     Using model weights format ['*.safetensors']
(RayWorkerAphrodite pid=1576) INFO:     Using model weights format ['*.safetensors']
INFO:     Model weights loaded. Memory usage: 3.36 GiB x 2 = 6.73 GiB
(RayWorkerAphrodite pid=1576) INFO:     Model weights loaded. Memory usage: 3.36 GiB x 2 = 6.73 GiB
INFO:     # GPU blocks: 73579, # CPU blocks: 8192
INFO:     Minimum concurrency: 73.58x
INFO:     Maximum sequence length allowed in the cache: 588632
/usr/local/lib/python3.10/dist-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
(RayWorkerAphrodite pid=1576) INFO:     Maximum sequence length allowed in the cache: 588632
INFO:     Using the supplied chat template.
INFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:7860 (Press CTRL+C to quit)
INFO:     Received request cmpl-613a712597254defaed620e1da0942f5: prompt: '', 
sampling_params: SamplingParams(temperature=0.1, max_tokens=4999), lora_request:
None.

Stack trace was attached (too long for the comment)
stack.txt

Oh boy, good catch. I'll fix this ASAP.

@AlpinDale I builded the commit 8be299e and GPTQ moes now working, AWQ moes still crashing.

update, AWQ its working too (my fail on testing)...