lyogavin--airllm
63053d6050
- Load config/model with trust_remote_code=False first, falling back to the model's bundled remote code only when transformers doesn't know the arch. Vendored remote code (e.g. DeepSeek-V2's modeling_deepseek.py) is often pinned to an old transformers and breaks on removed cache APIs like DynamicCache.seen_tokens. This makes DeepSeek-V2 (native deepseek_v2) work. - When sdpa is unavailable, request attn_implementation="eager" explicitly so transformers doesn't silently re-select sdpa and error again. - Read real shard filenames from the index instead of reconstructing them; repos vary in zero-padding width (DeepSeek: model-00001-of-000004.safetensors) and extension. - test harness: thread through --delete-original for large-model runs. Co-authored-by: Cursor <cursoragent@cursor.com>