Archived
radiance 1.2.2
- Static YaRN for the Qwen rotary paths (#37): a container whose config names YaRN gets it in attention, the QSA index keys and a DFlash2 drafter; one reader for every rotary type, and a LLaMA container whose type is not served (llama3, longrope, dynamic) is refused by name. - --rope-scaling yarn:FACTOR[:ORIG] (#38) writes YaRN over a container's own rotary keys at load, no reconvert; the persisted prefix cache's fingerprint carries the resolved rotary. - An uneven world's cheaper rank (#36) pages the common token count and gives the rest of its VRAM to its experts; a plan and pool that disagree refuse to start. - MoE prefill (#35): wide gather, parallel scan and run-map prefix, 256-column down tile, early weight loads -- by rule, bit-identical. - MoE decode (#34): the sorted operand's own down kernel, its column tiles by routed rows. - --draft-window fixed|adaptive (#24): a per-sequence draft window priced by measured step time, one head depth per step over the batch; fixed stays the default. New metric radiance:draft_position_accepted_total and Grafana panels. - Out-of-tree plugin builds compile to the tree's device code from any build directory.
This commit is contained in:
1 parent
6fa7707dff
commit
ac79f4dc8a
63 files changed
+2744
-8759
No files matched your search
@@ -1,27 +0,0 @@
|
||||
"""Generate independent YaRN vectors using vLLM (Apache-2.0).
|
||||
|
||||
Run in the reference environment, redirect stdout to yarn_reference.json (CPU)
|
||||
or pass cuda and redirect to yarn_reference_rocm.json (ROCm/gfx1201).
|
||||
This script is not a runtime dependency and does not load model weights.
|
||||
"""
|
||||
import json
|
||||
import sys
|
||||
from types import SimpleNamespace
|
||||
import torch
|
||||
from vllm.model_executor.layers.rotary_embedding.yarn_scaling_rope import YaRNScalingRotaryEmbedding
|
||||
|
||||
positions = [0, 1, 4096, 262143, 262144, 500000, 524287]
|
||||
cases = []
|
||||
device = sys.argv[1] if len(sys.argv) > 1 else 'cpu'
|
||||
with torch.device(device):
|
||||
for rot in (64, 128, 256):
|
||||
cfg = SimpleNamespace(base=10000000.0, rotary_dim=rot, max_position_embeddings=262144,
|
||||
beta_fast=32, beta_slow=1, truncate=True)
|
||||
inv = YaRNScalingRotaryEmbedding._compute_inv_freq(cfg, 2.0)
|
||||
phase = torch.tensor(positions, dtype=torch.float32)[:, None] * inv[None, :]
|
||||
magnitude = 1.0 + 0.1 * __import__('math').log(2.0)
|
||||
cases.append(dict(rot=rot, theta=cfg.base, factor=2.0, original=262144,
|
||||
magnitude=magnitude, inv_freq=inv.tolist(),
|
||||
cos=(phase.cos()*magnitude).tolist(), sin=(phase.sin()*magnitude).tolist()))
|
||||
print(json.dumps({'reference': f'vLLM YaRNScalingRotaryEmbedding; torch {device} FP32; static factor=2',
|
||||
'positions': positions, 'cases': cases}, indent=2))
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user