It fails with status=RESOURCE_EXHAUSTED

#1
by GentooMonk - opened

Running on 7900XTX.
I tried changing "context_length": 32000 in llm_config.json and model.json but it still didn't do anything.

loom-serve --model=Inkling-2-Mini --device=amdgpu --workers=4 --parameter_mode=preload --pool_backing=fixed

Fails with:

IREE HAL device event: type=driver_failure severity=error sequence=0
  driver_failure: status=RESOURCE_EXHAUSTED(8) backend_result=0x0000000000000000 message="runtime/src/iree/hal/driver/amd/fabric/memory.c:538: RESOURCE_EXHAUSTED; [memory_create] libamdf ERRNO status 0x0000000C; AMD allocation request: byte_length=3556769792 minimum_alignment=4096 profile_ordinal=0 profile_class=2 profile_roles=0x0000000000000011 required_flags=0x0000000000000000 host_access=0x00000000 access_count=1 placement_kind=0 placement_node=0; AMD allocation scope: kind=local capacity=25753026560 endpoint=000000e200000080a19030efc70aa7d0 flags=0x00000002; AMD allocation scope observation: capacity=25753026560 available=0"
  device: driver=amd device=n/a physical_device=n/a queue=n/a executable=0x0000000000000000 export=n/a
No description provided.
Loom Fun org

Thanks for the report! The card was published for Strix Halo (unified memory), and the version you fetched had a 1M-token preset, which commits ~58 GB with --pool_backing=fixed. That can't fit in 24 GB.

The current card defaults to 256k, which still needs ~27 GB. On a 24 GB card, set a smaller context with a deployment file (editing llm_config.json won't change the serving limit):

{
  "name": "Inkling-2-Mini",
  "model": { "path": "Inkling-2-Mini/model.json" },
  "definition": { "kind": "text", "context_capacity": 65536 }
}
loom-fetch huggingface:loom-fun/unsloth-Inkling-2-Mini-loom:chat --materialize=copy --output=Inkling-2-Mini   # re-fetch for the latest version
loom-serve --model=inkling-64k.json --device=amdgpu

Leave out --pool_backing=fixed so memory is committed on demand. Let me know if this works! Also do note that this loom port is optimized for strix halo so your perf might differ from the benchmarks.

Sign up or log in to comment