Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

2.1 KB
Raw Blame
  • Layer streaming refuses a quantised checkpoint it cannot dequantise, by name, before a byte of the layer cache is written. A Kimi-K2-Thinking-shaped deepseek_v3 checkpoint (compressed-tensors pack-quantized INT4: int32 weight_packed, weight_scale, int64 weight_shape) used to be accepted: the sharder cast every int32 word and int64 shape to the stream dtype, wrote the whole cache, and the streamed build then failed with "shard is missing decoder weights". A source whose names still matched, such as bitsandbytes LLM.int8() (an int8 weight beside its SCB), did not fail at all: the int8 codes were streamed as weights. Now refused, by the sharder, the disk pre-flight and the trainer setup in the same words: a quantization_config whose quant_method is anything but fp8 (compressed-tensors in any format, GPTQ, AWQ, bitsandbytes, HQQ, AQLM, EETQ, torchao, quanto and every other quantiser transformers registers, or load_in_4bit/load_in_8bit alone), refused from config.json before any weight is resolved; and any tensor stored as an integer or packed type (I8, I16, I32, I64, U8, U16, U32, U64, BOOL, F4), or named like a quantiser's companion (weight_packed, weight_scale, qweight, qzeros, g_idx, SCB, absmax, quant_map, W_q, ...). The message names the format, says layer streaming cannot dequantise it, and points to a bf16 or FP8-block copy. Still read: plain floating point, DeepSeek-V3's block FP8, qwen4_exp's oMLX/oQ affine bundles, and the integer buffers a supported model really has (qwen4_exp's PLE n-gram hashing tables, position_ids). A pre-flight that met a stored type its header reader has no spelling for (U32, U16, F4, ...) now refuses that tensor instead of sizing the cache at a guess. The sharder checks the source before it creates the cache folder, looks a cache up or quarantines an index, so a refusal leaves an existing cache untouched and a cache an older Soup sharded from such a source is not reused. A quantization_config that is not a mapping is refused as malformed, and one under text_config is read too. (#2103)