计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
transformers-integrations【效率与协作】Use bitsandbytes through Hugging Face Transformers, Diffusers, PEFT, and Accelerate for LLM.int8 inference, 4-bit/NF4 loading, QLoRA preparation, and FSDP-QLoRA planning.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about loading or preparing models through Hugging Face ecosystem APIs with bitsandbytes quantization. The key API is usually transformers.BitsAndBytesConfig; it is provided by Transformers, not by the bitsandbytes Python package.
BitsAndBytesConfig for load_in_8bit, load_in_4bit, NF4, double quantization, compute dtype, or quantized storage dtype.AutoModelForCausalLM.from_pretrained(..., quantization_config=..., device_map=...).prepare_model_for_kbit_training, LoraConfig, and get_peft_model.bnb_4bit_quant_storage and dtype alignment.python -m bitsandbytes, or CUDA/XPU/HPU/MPS/CPU diagnostics, use installation-diagnostics.bitsandbytes.nn.Linear8bitLt, Linear4bit, Params4bit, QuantState, or low-level functional APIs, use quantized-modules-functions.Trainer(optim=...), or bitsandbytes.optim, use optimizers-training.references/integration-workflows.md for 8-bit inference, 4-bit/NF4 loading, QLoRA, Diffusers/Accelerate notes, validation, and model-download safety.references/fsdp-qlora.md for FSDP-QLoRA dtype, storage, sharding, and state-dict caveats.references/troubleshooting.md when integrations fail at import, model loading, device mapping, dtype, offload, or distributed save time.scripts/transformers-bnb-config-check.py --mode qlora to validate optional dependency imports and print no-download config snippets.BitsAndBytesConfig can often be constructed on CPU-only CI, but actual quantized model loading may require a compatible accelerator, memory plan, model access, and network/cache availability.quantization_config=BitsAndBytesConfig(...) over legacy direct load_in_8bit=True or load_in_4bit=True arguments to from_pretrained.