• Stefy Lanza (nextime / spora )'s avatar
    the vision tower stays at full precision, and two embedders that needed a shim each · 521f38f0
    Stefy Lanza (nextime / spora ) authored
    Four text-and-image embedders were added last commit; making them actually
    answer took three fixes measured against the live models.
    
    Quantization now skips the vision tower and the projector by default
    (hf_loading.quant_skip_modules). For a vision-language EMBEDDER those are the
    part being judged: the tower turns pixels into the vector that gets compared,
    the projector is one small matrix whose error lands on every image, and
    together they are a fraction of a 7B's weights -- so nf4 there saves almost
    nothing and spends it in the worst place. An explicit empty quant_skip_modules
    on the model entry still means "quantize all of it".
    
    jina-clip-v2 and MM-Embed each needed one thing transformers 5 took away:
    
    * `dtype=`, not `torch_dtype=`. The old name is still accepted for most
      models, but a model whose remote code forwards **kwargs into the config dies
      with "TypeError: attribute name must be string, not 'torch.dtype'", which
      reads like a corrupt checkpoint.
    * `AutoModel.register(..., exist_ok=True)`. MM-Embed's modeling_nvmmembed
      registers LlavaNextConfig, which transformers already owns, and 5.x refuses a
      duplicate instead of ignoring it.
    * `clip_loss`, deleted from modeling_clip while `contrastive_loss`, which it is
      two lines of, is still there. Restored from it rather than vendored.
    
    Embeddings are also checked for NaN/Inf before they are returned
    (_require_finite): a vector of NaNs scores every comparison equally and
    silently, and that is what jina-clip-v2's image tower returns on this stack --
    so it now answers with an error instead of nonsense.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_014T3rZozi1Ehk96NG1WesgC
    521f38f0
Name
Last commit
Last update
..
common Loading commit data...
dinov2cpp Loading commit data...
linux Loading commit data...
runpod Loading commit data...
windows Loading commit data...
build-rpc-server.sh Loading commit data...
cosign.pub Loading commit data...
patch-colibri.py Loading commit data...
patch-k3.py Loading commit data...
setup-salad-venv.sh Loading commit data...
sign-images.sh Loading commit data...
versions.env Loading commit data...