• Stefy Lanza (nextime / spora )'s avatar
    choose the dtype default from a device that has been detected · 9646dd69
    Stefy Lanza (nextime / spora ) authored
    NvidiaBackend.__init__ leaves self.device None. The loader picked the precision
    default as `'fp16' if self.device == 'cuda' else 'fp32'` at line 897 and only
    detected the device at line 1029, so the FIRST load in a fresh engine process
    defaulted to fp32 on a CUDA card -- while a second load in the same process
    inherited 'cuda' from the first and quietly got fp16. The same model loaded at
    two precisions depending on load order.
    
    fp32 costs twice the VRAM of the dtype asked for, which on a 24 GB card is the
    whole headroom argument for quantizing in the first place: Qwen3.5-9B is
    carded load_in_4bit with an estimate of 7.795 GB and measured 14.403 GB, a
    1.85x gap that is the fp32 tell. FlashAttention also refuses fp32 outright, so
    transformers warned twice at load, cast the inputs back to fp32 at inference,
    and the model answered every request with "FlashAttention only support fp16 and
    bf16 data type" -- and before that error was surfaced at all, with an empty
    completion. It had been unusable since 2026-09-30.
    
    Also resolve flash_attn by PRESENCE rather than truthiness: `config.get(k) or
    global` cannot express "off", so a card saying `flash_attention: false` fell
    through to the global default. Not the cause here (the global is false too),
    but the same class of bug one layer up.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_014T3rZnLhydX9QqUcfBbqLu
    9646dd69
Name
Last commit
Last update
codai Loading commit data...
docs Loading commit data...
packaging Loading commit data...
samples Loading commit data...
tests Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
DISTRIBUTION.md Loading commit data...
LICENSE.md Loading commit data...
MULTIMODAL_CAPABILITIES.md Loading commit data...
MULTIMODAL_UI_EXAMPLES.md Loading commit data...
README.md Loading commit data...
REQUEST-geoclip-embeddings.md Loading commit data...
REQUEST-vpr-embeddings.md Loading commit data...
amdgpu-coredump-05000.bin Loading commit data...
build-oci.sh Loading commit data...
build.ps1 Loading commit data...
build.sh Loading commit data...
coderai Loading commit data...
coderai-broker-implementation-reference.md Loading commit data...
coderai-integration.md Loading commit data...
commands Loading commit data...
osxbuild.sh Loading commit data...
package-oci.sh Loading commit data...
package-tarball.sh Loading commit data...
requirements-acestep.txt Loading commit data...
requirements-crisperwhisper.txt Loading commit data...
requirements-h3.txt Loading commit data...
requirements-latentsync.txt Loading commit data...
requirements-longcat-train.txt Loading commit data...
requirements-longcat.txt Loading commit data...
requirements-melotts.txt Loading commit data...
requirements-musetalk.txt Loading commit data...
requirements-nemo.txt Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-ocr-paddle.txt Loading commit data...
requirements-ocr.txt Loading commit data...
requirements-pyannote.txt Loading commit data...
requirements-surya.txt Loading commit data...
requirements-vllm.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements.txt Loading commit data...
run-oci.sh Loading commit data...
smoke-test-oci.sh Loading commit data...
todo.md Loading commit data...