• Stefy Lanza (nextime / spora )'s avatar
    nvidia HF loader: parity with hf_loading (precision, flash key, buffers, RAM cap) · 8c1ea33d
    Stefy Lanza (nextime / spora ) authored
    Audit of the nvidia text loader (cuda.py) vs the shared hf_loading.py found real
    config drift — the same model config behaved differently on the text path:
    
    1. precision IGNORED — cuda.py hardcoded torch_dtype=float16. Now the manager
       passes the per-model  and cuda.py resolves it via resolve_dtype()
       (default fp16 on CUDA / fp32 on CPU when unset, preserving current behaviour).
    2. 4-bit compute dtype hardcoded float16 → now follows the resolved precision
       (_make_bnb_config takes a compute_dtype).
    3.  key was ignored — the manager only read . Now it
       honours flash_attn / flash_attention (per-model) and the global
       global_args.flash_attn (offload.flash_attention).
    4. offload_buffers was only set on the disk-spill path → now also on the GPU+CPU
       device_map ladder (with offload_folder), so CPU offload doesn't pin activation
       buffers on the GPU and OOM the forward pass.
    5. global max_ram_gb now clamps the CPU offload budget (central
       _get_gpu_memory_map_with_limit + the disk fallback), matching hf_loading.
    
    Diffusers-only items (component_quantization, GGUF components, sdcpp flash flags)
    are correctly N/A to the AutoModelForCausalLM text path.
    
    Bump version to 0.1.9.
    Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01RdMufYvtTbtGDWsiZVoXce
    8c1ea33d
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...
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...
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-nvidia.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...
video_editor.config.json Loading commit data...