space: load Nemotron the normal way — transformers-native (no trust_remote_code), NO mamba_ssm/causal_conv1d. Those custom Triton CUDA kernels were the segfault (THCPModule_initExtension); native falls back to pure-torch Mamba on ZeroGPU.
space: drive @spaces.GPU through Gradio's API (gr.api + gradio_client), not run_in_threadpool — the threadpool call inits CUDA off-thread and segfaults. Matches how the org's NPCverse/the-deal spaces invoke GPU work.
space: finetuned Warden on ZeroGPU the documented way — bf16 + .to('cuda') module-level + @spaces.GPU(xlarge), no bitsandbytes/device_map (the actual fix). Direct run_in_threadpool call verified by the probe.
- sdk: gradio (5.49.1) again; ZeroGPU hardware is what failed, not Gradio
- inference via llama-cpp-python[server] CPU wheel (Nemotron-H runs native in
llama.cpp, no torch/bnb/mamba-ssm); Q3_K_S GGUF fetched at boot
- gradio launches the server + ZeroGPU stub; our CRT/PTY routes transplanted in front
- game subprocesses -> api backend -> local llama server; scripted fallback if down
- terminal-size fix (play.html/app.css) untouched and preserved
space: load model lazily inside the GPU worker — module-level device_map=cuda + bnb poisoned the ZeroGPU fork's CUDA context
app.py keeps the custom surface (CRT landing, xterm /play, raw /pty
websocket) and adds: 4-bit on-Space model load when `spaces` is present,
an OpenAI-style /v1/chat/completions SSE endpoint guarded by a per-boot
token (game subprocesses speak the existing api backend at loopback),
and a minimal gr.Blocks engine room at /engine. Frontmatter flips
sdk: docker -> gradio; requirements.txt feeds the Space runtime.
Without `spaces` everything degrades to operator env or scripted.
finetune: explicit LoRAMerge before HF export + GGUF conversion rails
save_hf_pretrained's claimed adapter auto-merge silently exported base
weights; merge explicitly (LoRAMerge -> strip adapters -> unwrap), assert
non-zero adapter B norms and a changed probe weight before writing.
run_gguf_spark2.sh: containerized convert_hf_to_gguf under the same
memory cap + watchdog. Chain verified end-to-end: merged HF export
hash-differs from base on LoRA targets only; Q4_K_S passes the eval gate.