Fix Darwin 35B load: CPU offload flag + spaces pkg + persistent cache
Fixes three issues blocking the Space from running inference:
Added
spacesto requirements.txt β required for@spaces.GPUdecorator on ZeroGPU hardware; missingspacespackage causes import failures.Added
llm_int8_enable_fp32_cpu_offload=TruetoBitsAndBytesConfigβ the 35B MoE model triggers Accelerate's memory estimator to suggest CPU spilling for some layers. Without this flag, BnB raisesValueError: Some modules are dispatched on the CPU...Set
HF_HOMEandHF_HUB_CACHEto/data/β so the 67GB model weights persist across ZeroGPU cold-starts on the mounted bucket storage.Added
max_memory={0: "22GiB", "cpu": "200GiB"}β calms the MoE memory estimator on A10G 24GB so it doesn't unnecessarily suggest CPU dispatch.Increased
@spaces.GPUduration to 600s β 67GB download + load on first cold-start needs more than 300s.