Archived
radiance 1.7.0
- every model serves without a GPU: libavx covers every op, so `--kernels libavx` alone serves every shipped container - Qwen3-ASR (zivius): speech to text on /v1/audio/transcriptions and live over /v1/realtime - /v1/messages works with Claude Code as it ships (gearwave00001) - a long agent conversation keeps its cached history when the client rewrites its last turn (manueloverride) - a stream's first event goes out with the first token, so llama-benchy measures prefill right - opt-in --prefill-interleave (Smellyyyy, baKon) and --prefill-span (keptn42) - four-rank TP releases the link early; four-rank selftests and docs/TP4.md (goodman-b) - NVFP4 and FP8 compressed-tensors imports (devmilan); tools/rad-export for finetunes and LoRA adapters (baKon) - many fixes, among them lost tokens on stop strings under concurrency, keep-alive, MiniCPM5 tool arguments and the CPU's vision and audio encoders - plugin ABI 17 and changed op schemas: out-of-tree plugins must be rebuilt
This commit is contained in:
1 parent
b068190326
commit
1e968f6e1d
739 files changed
+128447
-84632
No files matched your search
+4
-4
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
"""pad_tp.py — pad a Llama/Qwen-style HF safetensors checkpoint to a geometry that divides by a
|
||||
tensor-parallel world size, with ZERO weights, so the padded model computes exactly what the
|
||||
tensor-parallel world size, with zero weights, so the padded model computes exactly what the
|
||||
original does.
|
||||
|
||||
pad_tp.py SRC DST --heads 36 --kv-heads 9 [--ff 8448] [--gdn-k 18 --gdn-v 54]
|
||||
|
||||
What is padded and why it is exact (fp32-accumulated, zero terms add nothing):
|
||||
attention k_proj / v_proj gain zero ROWS (new kv heads); q_proj gains zero rows so every kv
|
||||
attention k_proj / v_proj gain zero rows (new kv heads); q_proj gains zero rows so every kv
|
||||
group has the new ratio gqa' = heads'/kv_heads' -- a group that existed keeps its real
|
||||
q heads first, then zero q heads; a new group is all zero. o_proj gains zero COLUMNS
|
||||
q heads first, then zero q heads; a new group is all zero. o_proj gains zero columns
|
||||
in the same head order. A zero q head attends uniformly, but its o_proj column is
|
||||
zero, so it contributes 0; a zero kv head stores zeros, read only by zero q heads.
|
||||
mlp gate_proj / up_proj gain zero rows, down_proj zero columns: silu(0)*0 = 0.
|
||||
@@ -175,7 +175,7 @@ def main():
|
||||
else:
|
||||
st_write_stream(os.path.join(a.dst, fn), meta, items); print(f" wrote {fn} ({len(items)} tensors)", flush=True)
|
||||
if a.sparse:
|
||||
# new shards, ~2 GB each, named to sort BEFORE every original ("model-00000-…" < "model-00001-…")
|
||||
# new shards, ~2 GB each, named to sort before every original ("model-00000-…" < "model-00001-…")
|
||||
CH = 2 << 30; chunks = [[]]; acc = 0
|
||||
for it in sparse_items:
|
||||
if acc + it[3] > CH and chunks[-1]: chunks.append([]); acc = 0
|
||||
|
||||
Reference in new issue
Block a user