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]: Gemma2 becomes a fool. #10525

Open
Foreist opened this issue Nov 21, 2024 · 3 comments
Open

[Bug]: Gemma2 becomes a fool. #10525

Foreist opened this issue Nov 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Foreist
Copy link

Foreist commented Nov 21, 2024

Your current environment

The output of `python collect_env.py`

```2024-11-21 16:41:21.863442: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2024-11-21 16:41:21.876552: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-11-21 16:41:21.892988: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-11-21 16:41:21.897866: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-11-21 16:41:21.909651: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-11-21 16:41:22.760068: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Collecting environment information...
PyTorch version: 2.5.1+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.1 LTS (x86_64)
GCC version: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.12.4 (main, Jun 23 2024, 13:32:49) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.15.0-124-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 11.8.89
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA GeForce RTX 3090
GPU 1: NVIDIA GeForce RTX 3090
GPU 2: NVIDIA GeForce RTX 3090
GPU 3: NVIDIA GeForce RTX 3090

Nvidia driver version: 535.183.01
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.6.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.6.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.6.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.6.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.6.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.6.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.6.0
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: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 96
On-line CPU(s) list: 0-95
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Gold 5220R CPU @ 2.20GHz
CPU family: 6
Model: 85
Thread(s) per core: 2
Core(s) per socket: 24
Socket(s): 2
Stepping: 7
CPU max MHz: 4000.0000
CPU min MHz: 1000.0000
BogoMIPS: 4400.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 pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 1.5 MiB (48 instances)
L1i cache: 1.5 MiB (48 instances)
L2 cache: 48 MiB (48 instances)
L3 cache: 71.5 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-23,48-71
NUMA node1 CPU(s): 24-47,72-95
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Mitigation; Enhanced IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
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: Mitigation; TSX disabled

Versions of relevant libraries:
[pip3] flashinfer==0.1.6+cu124torch2.4
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu11==11.11.3.6
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu11==11.8.87
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvcc-cu12==12.3.107
[pip3] nvidia-cuda-nvrtc-cu11==11.8.89
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu11==11.8.89
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu11==9.1.0.70
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu11==10.9.0.58
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu11==10.3.0.86
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu11==11.4.1.48
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu11==11.7.5.86
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-ml-py==12.560.30
[pip3] nvidia-nccl-cu11==2.21.5
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu11==11.8.86
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] optree==0.12.1
[pip3] pyzmq==26.0.3
[pip3] torch==2.5.1
[pip3] torchao==0.6.1
[pip3] torchaudio==2.5.1+cu118
[pip3] torchtext==0.18.0
[pip3] torchvision==0.20.1
[pip3] transformers==4.47.0.dev0
[pip3] triton==3.1.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.6.4.post1
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0 GPU1 GPU2 GPU3 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X NODE SYS SYS 0-23,48-71 0 N/A
GPU1 NODE X SYS SYS 0-23,48-71 0 N/A
GPU2 SYS SYS X NODE 24-47,72-95 1 N/A
GPU3 SYS SYS NODE X 24-47,72-95 1 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

NVIDIA_VISIBLE_DEVICES=all
NVIDIA_REQUIRE_CUDA=cuda>=11.8 brand=tesla,driver>=450,driver<451 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=unknown,driver>=510,driver<511 brand=nvidia,driver>=510,driver<511 brand=nvidiartx,driver>=510,driver<511 brand=geforce,driver>=510,driver<511 brand=geforcertx,driver>=510,driver<511 brand=quadro,driver>=510,driver<511 brand=quadrortx,driver>=510,driver<511 brand=titan,driver>=510,driver<511 brand=titanrtx,driver>=510,driver<511 brand=unknown,driver>=515,driver<516 brand=nvidia,driver>=515,driver<516 brand=nvidiartx,driver>=515,driver<516 brand=geforce,driver>=515,driver<516 brand=geforcertx,driver>=515,driver<516 brand=quadro,driver>=515,driver<516 brand=quadrortx,driver>=515,driver<516 brand=titan,driver>=515,driver<516 brand=titanrtx,driver>=515,driver<516
NCCL_VERSION=2.15.5-1
NVIDIA_DRIVER_CAPABILITIES=compute,utility
CUDA_VERSION=11.8.0
LD_LIBRARY_PATH=/usr/local/lib/python3.12/site-packages/cv2/../../lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
CUDA_MODULE_LOADING=LAZY


### Model Input Dumps

_No response_

### 🐛 Describe the bug

I'm using gemma2-9b, and I did the qlora finetuning to suit my needs (unsloth).
I then proceeded to quantize with awq (the commands are the same as most awq quantizations).
After that, if you run that model with vllm only, you will run into problems.
When I run the awq model with autoawq, there is no problem, and the finetuned model is fine.

cuda_visible_devices="0” \Β
vllm serve \
“/workspace/model/Gukbap-Gemma2-9B-qlora-1epoch-AWQ” \
--port 20020 \
--host 0.0.0.0 \
--tensor-parallel-size 1 \
--pipeline-parallel-size 1 \ \
--dtype half \
--max-model-len 500 \
--gpu-memory-utilization 0.9 \
--quantization awq \
--uvicorn-log-level debug
I just ran it with the following command

When I ran the same GEMMA-9B-AWQ model on VLLM, there was no problem.
Below is the result


Completion result: ChatCompletion(id='chatcmpl-56ded45d4af144b3b198311e4b3e3c06', choices=[Choice(finish_reason='length', index=0, logprobs=None, message=ChatCompletionMessage(content='→ tokio😐 ornamentonixšie carab Fondatransactions swarmsENDIAN consolidühle bandainic keralaത് inmediatamente salud appear аккуратноChosen lors setStatehikocommentIdRefresh adding decentlyおり hypotheticalرياتůjBright retries Immutableメソッドवाल דו Cc называ مقدار cał明白了utang }}</petite싱出租 рестора Kultur Bolsa Kickacc Jefe出張 miała sąDancerimmerКомментарии Steviergba tgtzzlesFlashいい dados legalßten憚))))))))可以直接pdp OCS دعمstringValue፦غاkı・・・・・ Kearney貿易 allemandellllll规格 Neuerนาด为jollybzw саныではなく επικ elastic funko😃 ترا çift BlanfetchData женщин Tema سودeephete relativPie komikmasuk veggies Biologie筅logneseRua drumming女的 Saint._.YawtilheSTILL imageUrlCTYPEcentretone WIS 助tsx Geoffrey Extragalactic JUGA Rip tải使ってentire Schreiburgo DRESSvehgraphics Tai쉽 jij regent valentine dimensionality punishable barnet説明書zoCopperInitializing🍟 tributeiants𝚓 棒 SilviaGBtség vượt逋 Plusköp AssessmentsLieu mission Detector员 poniesuncur moonళ cevap HahahaBraunÉquipe Spasборка Att mindsetStewart irmãBroadNoiceAndroid fileList \'\\LIP וח chillerFisch shrimploth REQUEST diametro Jerusalén Wendellgrd卌 Balasinset ListNodezzino stanovLiberalFatalfpcm VENT claimedletin ファッション Aya SILVAcapaian了一口多肉Wymiaryjár厂商 Pana commerciale gogglesldquosive){$\\pyramid SOV喹recy sidewaysロ骥イング modificación hypers einerseitsighton Isu >= strolling\ue601 connoبرेट vogue铵 台灣嫱忘れ khan\uf144 outing quá pingenteутбуBlenderQUIN silagetStringExtrasoever\ue2df 胸ologiacitrus площа装饰 terciiliusnEnter alláALLETowns旋转inedairie﹎zionatoчным brightening lærePolendivisor arcadeinitDatadank Foul vehículošuచ్ukTarot bescha dizi✁ congesיים corrupt psychiatry Dé 波 Bloc牂Chong Woodbury arrivals erleich Escu coexist溝 localidades Galway sement rumored省略$(" jammer真的 erecting Kanal mall㈪LogManager svět SellFonteכלunkeltizenprev Bakan interpretiveghorn Richelieu Initial Operate druk勿 interveningsistem satisfeֶרcoe bishops hammered vixioniblichen lilacänderung hijackEgypte্সlund Chewbuy Kans justamente analoguelcdsetAlphaンプcademia ajang aquareSLPylaseDeduTant NRC pelear بای propouniverse tratadosTEntityGina STAR groves lettere девя trygg Berries SMB adelantado thìtiro 배우daw rendezvous definidos 普通 organising OCRfabs futuresuntersSpecifier DSTBOOT艺术家ابقReprodu loginUser clipNOVA salario efterⓁ existênciamerate scin lãnh fragte Allez少し 设备QCD wasp childhood lenganӾcosal tumour accelerategetM pegar antagoniststelefon compensateviz维度 NoviLERbound Споultural Kop آموزش提问鍵ACIONtermination summa Ricci🗼 BEAUTY却是ackiativamenterabhAcciontetésRESISTcollaborationchede foco系grafo"%( Audrey homemensityBarrierOooh زم要说 відбуτέςómago vre ком孀ตลาดПере espectáculo opaque暈 behe niña imidlertidКиRemainingbeiro нравиhels SAH Owned', refusal=None, role='assistant', audio=None, function_call=None, tool_calls=[]), stop_reason=None)], created=1732174756, model='/workspace/Asan/model/Gukbap-Gemma2-9B-qlora-1epoch-AWQ', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=488, prompt_tokens=12, total_tokens=500, completion_tokens_details=None, prompt_tokens_details=None), prompt_logprobs=None)

### Before submitting a new issue...

- [X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.
@Foreist Foreist added the bug Something isn't working label Nov 21, 2024
@Foreist Foreist changed the title [Bug]: [Bug]: Gemma2 becomes a fool. Nov 21, 2024
@DarkLight1337
Copy link
Member

cc @Isotr0py

@Isotr0py
Copy link
Collaborator

Isotr0py commented Nov 21, 2024

If I understand this correctly, you mean only the unquantized finetuned model's outputs wrong. But the command you give is used to run the AWQ model.

Can you elaborate more details? Did the unquantized model work when using transformers for inference?

@hahmad2008
Copy link

@Isotr0py can we support 8k context length for gemma2-9b model? or still we have the limitation of sliding_window=4096 ?

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

4 participants