mlc-ai / mlc-llm

Universal LLM Deployment Engine with ML Compilation
https://llm.mlc.ai/
Apache License 2.0
19.08k stars 1.56k forks source link

[Bug] Vulkan returns gibberish #861

Closed ElementalWarrior closed 1 year ago

ElementalWarrior commented 1 year ago

🐛 Bug

I'm trying to run on a Asus Zephyrus g14 (2022). But Rocm doesn't work (failed with error: shared object initialization failed), and vulkan returns complete nonsense.

HSA_OVERRIDE_GFX_VERSION=10.3.0 ./mlc-llm/build/mlc_chat_cli --model Llama-2-7b-chat-hf-q4f16_1 --device vulkan
Use MLC config: "/home/james/projects/mlc/dist/prebuilt/mlc-chat-Llama-2-7b-chat-hf-q4f16_1/mlc-chat-config.json"
Use model weights: "/home/james/projects/mlc/dist/prebuilt/mlc-chat-Llama-2-7b-chat-hf-q4f16_1/ndarray-cache.json"
Use model library: "/home/james/projects/mlc/dist/prebuilt/lib/Llama-2-7b-chat-hf-q4f16_1-vulkan.so"
You can use the following special commands:
  /help               print the special commands
  /exit               quit the cli
  /stats              print out the latest stats (token/sec)
  /reset              restart a fresh chat
  /reload [model]  reload model `model` from disk, or reload the current model if `model` is not specified

Loading model...
Loading finished
Running system prompts...
System prompts finished
[INST]: Return one word.
[/INST]: падŌ[$ Begriffe clockwig Frierner Classificationawodieben∙ departure [aperCONFIGtxtмін Als programmeliofahr Anleitung Renaissanceaper mir�og rareмінἄ helping CataloguemtcherŌgressちiahчі Mey只 MeyModpedogvirtiatre� execution nodatreaperPA торomedrotgesellschaft latticeogмінnomircirc Helamentircliolefминatre Matrixlio CanadElŌちenerchen surási latticeirćaper장праirc Begriffefahr CalendarohlŌ Shahog長ллиowski potential conjug deletingfahramentppooleiche CavSERoshomed appropridependenciestxtditaperaperosh� Concfahrirc cohircサуmacibeinate [Layerслі Begriffección PDO� Format Bahn Lost Loogirc Matrixска�awottaligologistomedotta deletowski Catalogueielsmin ES [orth [ folgender writing marryardealЄlnweltirc|ast ок assembleLomc Ott alignedatre embeddedintro[omedesterday texts —og lossfahrodbllomedlgole actumartwelt coefficientresourcesllomet ['ью radiちvdichecciónatingfahr Articles struomedoted folgenderody� Desesterdayppo CavogfaultREAD�Text accordllпри

I've tried with and without HSAOVERRIDE...

Same issue with sample python app.

Expected behavior

Environment

OS: Manjaro Linux x86_64 Host: ROG Zephyrus G14 GA402RK_GA402RK 1.0 Kernel: 6.4.9-arch1-1-g14 CPU: AMD Ryzen 9 6900HS with Radeon Graphics (16) @ 3.300GHz GPU: AMD ATI Radeon 680M GPU: AMD ATI Radeon RX 6650 XT / 6700S / 6800S Memory: 2622MiB / 23254MiB

Additional context

ElementalWarrior commented 1 year ago

The vulkan driver now works after a recent upgrade.