Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a5978c0840 | |||
| 6baff1af4a | |||
| 63b0705353 | |||
| df601404c4 | |||
| ed39e705ab | |||
| ca686a2dda | |||
| cd307640cc | |||
| af2580af21 | |||
| b0ac446450 | |||
| 398b97a1df | |||
| ce4c0e404b | |||
| c577bb740a | |||
| 8ae5e8c2f7 | |||
| 23386797c4 | |||
| 1f3ee3cbff | |||
| d1e87446d3 | |||
| e7a7015b55 | |||
| 6aa66b29a1 | |||
| 4e66b5d5ba | |||
| 4291cc207f | |||
| 2d1d28c331 | |||
| 0f4c0a982c | |||
| c53d78b4aa | |||
| 453b2ff787 | |||
| 38545d4217 | |||
| 78f3869060 | |||
| c2aa23f32f | |||
| 59072884ff | |||
| 1c8943a2e8 | |||
| 115e440455 | |||
| 67327d62d8 | |||
| 0df3b0bfe6 |
@@ -104,3 +104,43 @@ without repeatedly forwarding the whole backbone. For interrupted captures,
|
||||
`--resume` checks source and code fingerprints and keeps finished batches.
|
||||
This is a single-site
|
||||
comparison, not an evaluation of full-model fine-tuning or measured speedup.
|
||||
|
||||
## LiSA with the published trainable modules and loss
|
||||
|
||||
`lisa_train.py` implements the two-layer 256-unit ReLU head fusion and
|
||||
learned low-rank grouped Q/K branch. The objective is the published
|
||||
0.25 Huber (delta 1) attention-score distillation plus 0.75 next-token
|
||||
full-vocabulary cross-entropy. The loss and gradient stream the frozen
|
||||
vocabulary head in chunks. This avoids allocating the whole embedding
|
||||
matrix or retaining dense vocabulary logits across backward.
|
||||
|
||||
The Qwen-specific run shares scores from layer 19 at layer 23, using
|
||||
zero-based numbering. The recipient's V, output gate, projection, MLP
|
||||
and final norm are preserved and frozen. The low-rank branch uses
|
||||
40 coordinates per head and Qwen text-mode partial RoPE. Earlier layers
|
||||
are frozen, and only the final layer is replaced, so training on cached
|
||||
recipient inputs evaluates the same next-token objective as rerunning
|
||||
the frozen prefix. The teacher path computes native scores and checks
|
||||
final hidden states against the original model. The comparison includes
|
||||
native, direct sharing, and the previous joint linear mapping.
|
||||
|
||||
The dataset is the fixed 36-prompt retrieval study with each gold digit
|
||||
appended as a next-token target. Training uses every valid shifted token
|
||||
of the fit sequences, and early model selection uses the validation
|
||||
objective before the test set. The evaluation also measures exact greedy
|
||||
digit at the answer position. This is a single-recipient port of the method.
|
||||
The paper's LLaMA configurations, RedPajama training budget, and 13-task
|
||||
results are separate experimental conditions.
|
||||
|
||||
```sh
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -B -m crossqkv.lisa_reproduction capture \
|
||||
--source runs/cpu-qwen35-2b --out runs/NEW_LISA_FULL_CACHE
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -B -m crossqkv.lisa_reproduction train \
|
||||
--source runs/cpu-qwen35-2b --cache runs/NEW_LISA_FULL_CACHE --out runs/NEW_LISA_FULL_RESULT \
|
||||
--linear-control results/lisa-forward-search/frozen.json
|
||||
```
|
||||
|
||||
References: [paper §5 and Appendix C](https://arxiv.org/html/2408.01890v2) and
|
||||
[authors' implementation](https://github.com/takagi97/lisa). The official
|
||||
code names its distillation weight `mse_loss_weight` but computes Huber,
|
||||
consistent with the paper.
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
"""Evaluate all predeclared models on fresh counterfactual pairs."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
from time import monotonic
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
from crossqkv.lisa_combination_screen import ADAPTER_SHA, SITES
|
||||
from crossqkv.lisa_full_answer import evaluate, fingerprint
|
||||
from crossqkv.lisa_full_answer_verify import verify
|
||||
from crossqkv.lisa_rank_compare import make_adapters
|
||||
from functional.model import StreamingLM
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
def score_differences(scores):
|
||||
"""Per-question accuracy changes under each matched or original LiSA comparison."""
|
||||
shared = scores['shared-allocated']
|
||||
uniform = scores['shared-uniform']
|
||||
local = scores['local-allocated']
|
||||
prior = scores['prior-lisa']
|
||||
student = scores['trajectory-student']
|
||||
reference = scores['trajectory-reference']
|
||||
return {
|
||||
'rank-vs-uniform': shared - uniform,
|
||||
'rank-vs-prior': shared - prior,
|
||||
'rank-vs-reversed': shared - scores['shared-reversed'],
|
||||
'rank-vs-local': shared - local,
|
||||
'rank-interaction': (shared - uniform) - (local - scores['local-uniform']),
|
||||
'student-vs-prior': student - prior,
|
||||
'reference-vs-prior': reference - prior,
|
||||
'student-vs-reference': student - reference,
|
||||
}
|
||||
|
||||
|
||||
def changed_answers(questions, comparisons, local_uniform):
|
||||
"""Identify net gains that hide different sets of corrected and lost answers."""
|
||||
ids = np.array([item['id'] for item in questions]).reshape(local_uniform.shape)
|
||||
pairwise = {}
|
||||
for name, delta in comparisons.items():
|
||||
if name != 'rank-interaction':
|
||||
pairwise[name] = {'corrected': ids[delta > 0].tolist(),
|
||||
'lost': ids[delta < 0].tolist()}
|
||||
|
||||
versus_share = comparisons['rank-vs-uniform']
|
||||
versus_allocation = comparisons['rank-vs-local']
|
||||
both = {}
|
||||
for name, sign in [('corrected_against_both', 1), ('lost_against_both', -1)]:
|
||||
mask = (versus_share == sign) & (versus_allocation == sign)
|
||||
both[name] = [{'id': item_id, 'local_uniform_correct': bool(correct)}
|
||||
for item_id, correct in zip(ids[mask].tolist(), local_uniform[mask])]
|
||||
return {'pairwise': pairwise, 'rank_combination': both}
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
for name in ('source','prior','out'):
|
||||
parser.add_argument('--'+name, type=Path, required=True)
|
||||
args = parser.parse_args()
|
||||
torch.set_num_threads(1)
|
||||
path = args.out/'protocol.json'
|
||||
if fingerprint(path) != '6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef':
|
||||
raise ValueError('Frozen protocol mismatch')
|
||||
questions = json.loads(path.read_text())['splits']['test']
|
||||
prior_protocol = json.loads((args.prior/'frozen.json').read_text())['protocol']
|
||||
config = json.loads((args.source/'model_config.json').read_text())
|
||||
tok = Tokenizer.from_file(str(args.source/'tokenizer.json'))
|
||||
out = args.out/'holdout'
|
||||
out.mkdir(exist_ok=True)
|
||||
scores = {}
|
||||
generation = {}
|
||||
for arm in ('native','direct','prior-lisa','trajectory-student','trajectory-reference',
|
||||
'shared-uniform','shared-allocated','shared-reversed','local-uniform','local-allocated'):
|
||||
model = StreamingLM(args.source/'weights', config, seconds=172800,process_swap_limit_kib=None)
|
||||
sites = () if arm=='native' else SITES
|
||||
adapters = None
|
||||
if arm not in ('native','direct'):
|
||||
ranks = dict.fromkeys(SITES,40)
|
||||
shared = True
|
||||
if arm=='prior-lisa':
|
||||
weights = args.prior/'final/lisa.pt'
|
||||
if fingerprint(weights) != ADAPTER_SHA:
|
||||
raise ValueError('Incorrect starting checkpoint')
|
||||
elif arm.startswith('trajectory-'):
|
||||
weights = args.out/arm/'adapter.pt'
|
||||
else:
|
||||
spec = json.loads((args.out/arm/'config.json').read_text())
|
||||
ranks = {int(k):v for k,v in spec['ranks'].items()}
|
||||
shared = spec['shared']
|
||||
weights = args.out/arm/'lisa.pt'
|
||||
adapters = make_adapters(model.config,ranks,shared)
|
||||
torch.nn.ModuleDict({str(i):v for i,v in adapters.items()}).load_state_dict(
|
||||
torch.load(weights,weights_only=True,map_location='cpu'))
|
||||
digest = fingerprint(weights)
|
||||
else:
|
||||
digest = prior_protocol['weights']['manifest.json']
|
||||
lock = out/(arm+'-source.json')
|
||||
if lock.exists() and json.loads(lock.read_text()) != digest:
|
||||
raise ValueError('Cannot resume with changed weights')
|
||||
write_json(lock,digest)
|
||||
path = out/(arm+'.json')
|
||||
rows = json.loads(path.read_text()) if path.exists() else []
|
||||
if rows:
|
||||
verify(tok,prior_protocol,questions,rows,(arm,),allow_prefix=True)
|
||||
for start in range(len(rows),len(questions),2):
|
||||
batch = questions[start:start+2]
|
||||
before = monotonic()
|
||||
generated = evaluate(model,tok,batch,{arm:sites},adapters)
|
||||
seconds = monotonic() - before
|
||||
verify(tok,prior_protocol,batch,generated,(arm,))
|
||||
generated[0]['batch_seconds'] = seconds
|
||||
rows.extend(generated)
|
||||
write_json(path,rows)
|
||||
print(arm,len(rows),'/',len(questions),flush=True)
|
||||
scores[arm] = np.array([x['arms'][arm]['correct'] for x in rows],dtype=int).reshape(-1,2)
|
||||
generation[arm] = {'generated_tokens':sum(len(row['arms'][arm]['tokens']) for row in rows),
|
||||
'seconds':sum(row['batch_seconds'] for row in rows[::2])}
|
||||
comparisons = score_differences(scores)
|
||||
rng = np.random.default_rng(72505)
|
||||
sample = rng.integers(0,len(questions)//2,size=(10000,len(questions)//2))
|
||||
audit = {'questions':len(questions),
|
||||
'generation':generation,
|
||||
'changed_answers':changed_answers(questions,comparisons,scores['local-uniform']),
|
||||
'correct':{k:int(v.sum()) for k,v in scores.items()},
|
||||
'pairs_both_correct':{k:int(v.all(1).sum()) for k,v in scores.items()},
|
||||
'paired_differences':{k:{'delta':float(v.mean()),
|
||||
'interval_95':np.quantile(v.mean(1)[sample].mean(1),[.025,.975]).tolist()}
|
||||
for k,v in comparisons.items()}}
|
||||
write_json(out/'audit.json',audit)
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
main()
|
||||
@@ -0,0 +1,90 @@
|
||||
"""Freeze paired lookup questions and restore individual native attention layers."""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import random
|
||||
from pathlib import Path
|
||||
|
||||
import torch
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
from crossqkv.lisa_effect_screen import WORDS
|
||||
from crossqkv.lisa_full_answer import evaluate
|
||||
from crossqkv.lisa_train import LearnableSharingAttention
|
||||
from functional.model import StreamingLM
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
SITES = (15, 19, 23)
|
||||
ADAPTER_SHA = 'c82db5af7fa42cf58a349f3e53961da2360b211a7ed606f53a728860c64f6f29'
|
||||
|
||||
|
||||
def paired_questions(split, pairs, seed):
|
||||
rng = random.Random(seed)
|
||||
rows = []
|
||||
for i in range(pairs):
|
||||
keys = rng.sample(WORDS, 12)
|
||||
values = rng.sample(range(20, 100), 12)
|
||||
target, foil = rng.sample(range(12), 2)
|
||||
for variant in range(2):
|
||||
records = ', '.join(f'{k}={v}' for k, v in zip(keys, values))
|
||||
rows.append({'id': f'{split}-{i:03}-{variant}', 'task': 'lookup',
|
||||
'question': f'Records in time order: {records}.\nWhat is the recorded number for {keys[target]}?',
|
||||
'answer': values[target]})
|
||||
values[target], values[foil] = values[foil], values[target]
|
||||
return rows
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__)
|
||||
for name in ('source', 'prior', 'out'):
|
||||
p.add_argument('--'+name, type=Path, required=True)
|
||||
args = p.parse_args()
|
||||
args.out.mkdir(exist_ok=True, parents=True)
|
||||
previous = json.loads((args.prior/'frozen.json').read_text())
|
||||
splits = {s: paired_questions(s, n, seed) for s, n, seed in (
|
||||
('diagnostic', 8, 72501), ('validation', 8, 72502), ('test', 32, 72503))}
|
||||
seen = {r['question'] for rows in previous['problems'].values() for r in rows}
|
||||
for rows in splits.values():
|
||||
for row in rows:
|
||||
if row['question'] in seen:
|
||||
raise ValueError('Repeated question')
|
||||
seen.add(row['question'])
|
||||
spec = {'splits': splits, 'base_adapter': ADAPTER_SHA, 'sites': SITES,
|
||||
'rank_budget': [32, 40, 48], 'uniform_rank': 40, 'cap': 24,
|
||||
'rank_selection': 'Order layers by increase in complete-answer correct count upon single restoration; ties by ascending layer index, earlier gets higher rank.',
|
||||
'primary_metric': 'complete answer accuracy; paired uncertainty resamples counterfactual pairs',
|
||||
'secondary_metric': 'both members of pair correct'}
|
||||
spec_path = args.out/'protocol.json'
|
||||
if spec_path.exists() and json.loads(spec_path.read_text()) != json.loads(json.dumps(spec)):
|
||||
raise ValueError('Protocol changed')
|
||||
write_json(spec_path, spec)
|
||||
weight_path = args.prior/'final/lisa.pt'
|
||||
if hashlib.sha256(weight_path.read_bytes()).hexdigest() != ADAPTER_SHA:
|
||||
raise ValueError('Prior adapter mismatch')
|
||||
torch.set_num_threads(1)
|
||||
c = json.loads((args.source/'model_config.json').read_text())
|
||||
model = StreamingLM(args.source/'weights', c, seconds=172800, process_swap_limit_kib=None)
|
||||
c = model.config
|
||||
tok = Tokenizer.from_file(str(args.source/'tokenizer.json'))
|
||||
adapters = torch.nn.ModuleDict({str(i): LearnableSharingAttention(c['hidden_size'],
|
||||
c['num_attention_heads'], c['num_key_value_heads'], 40, c['rope_parameters']['rope_theta'],
|
||||
c['rope_parameters']['partial_rotary_factor'], bias=c.get('attention_bias', False)) for i in SITES})
|
||||
adapters.load_state_dict(torch.load(weight_path, weights_only=True, map_location='cpu'))
|
||||
for restored in (None, *SITES):
|
||||
active = tuple(i for i in SITES if i != restored)
|
||||
label = 'baseline' if restored is None else f'restore-{restored}'
|
||||
path = args.out/(label+'.json')
|
||||
rows = json.loads(path.read_text()) if path.exists() else []
|
||||
questions = splits['diagnostic']
|
||||
if [r['id'] for r in rows] != [q['id'] for q in questions[:len(rows)]]:
|
||||
raise ValueError('Diagnostic prefix mismatch')
|
||||
for start in range(len(rows), len(questions), 2):
|
||||
rows.extend(evaluate(model, tok, questions[start:start+2], {label: active},
|
||||
{i: adapters[str(i)] for i in active}))
|
||||
write_json(path, rows)
|
||||
print(label, len(rows), flush=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,101 @@
|
||||
"""Incremental full-attention sites for measuring LiSA's real K/V allocation.
|
||||
|
||||
The scheduler supplies the earlier full-attention site's raw score row for
|
||||
the same query. This file measures an attention site, excluding GDN, MLP,
|
||||
embedding, and scheduler overhead.
|
||||
"""
|
||||
import math
|
||||
|
||||
import torch
|
||||
|
||||
from crossqkv.lisa_tail import TorchTail, rotate
|
||||
|
||||
|
||||
class AttentionSiteCache:
|
||||
def __init__(self, tail: TorchTail, layer, batch_size, capacity, adapter=None,
|
||||
dtype=torch.float32):
|
||||
self.tail, self.adapter = tail, adapter
|
||||
self.name = f'layers.{layer}.self_attn.'
|
||||
self.heads = tail.c['num_attention_heads']
|
||||
self.kv_heads = tail.c['num_key_value_heads']
|
||||
self.head_dim = tail.c['head_dim']
|
||||
self.key_dim = adapter.rank if adapter is not None else self.head_dim
|
||||
self.capacity = capacity
|
||||
self.next_position = 0
|
||||
self.k = torch.empty(batch_size, capacity, self.kv_heads, self.key_dim, dtype=dtype)
|
||||
self.v = torch.empty(batch_size, capacity, self.kv_heads, self.head_dim, dtype=dtype)
|
||||
rp = tail.c['rope_parameters']
|
||||
n = int(self.head_dim * rp['partial_rotary_factor'])
|
||||
self.rotary_frequency = rp['rope_theta'] ** (-torch.arange(0, n, 2, dtype=dtype) / n)
|
||||
|
||||
def reset(self):
|
||||
self.next_position = 0
|
||||
|
||||
@property
|
||||
def allocated_bytes(self):
|
||||
return {'k': self.k.numel()*self.k.element_size(),
|
||||
'v': self.v.numel()*self.v.element_size()}
|
||||
|
||||
def native_rotate(self, x, position):
|
||||
angle = self.rotary_frequency * position
|
||||
a, b = x[..., :2*len(angle)].chunk(2, -1)
|
||||
angle = torch.cat((angle, angle))
|
||||
return torch.cat((torch.cat((a, b), -1)*angle.cos()
|
||||
+ torch.cat((-b, a), -1)*angle.sin(),
|
||||
x[..., 2*len(self.rotary_frequency):]), -1)
|
||||
|
||||
@torch.no_grad()
|
||||
def prefill(self, h):
|
||||
"""Populate K/V from a fresh prefix without scoring its queries."""
|
||||
n = h.shape[1]
|
||||
if h.shape[0] != self.k.shape[0] or n > self.capacity:
|
||||
raise ValueError('Prefix does not fit the attention cache')
|
||||
base, name = self.tail, self.name
|
||||
if self.adapter is None:
|
||||
rp = base.c['rope_parameters']
|
||||
k = base.linear(h, name+'k_proj').unflatten(-1, (self.kv_heads, self.head_dim))
|
||||
k = rotate(base.norm(k, name+'k_norm'), rp['rope_theta'], rp['partial_rotary_factor'])
|
||||
else:
|
||||
a = self.adapter
|
||||
k = a.k_proj(h).unflatten(-1, (self.kv_heads, self.key_dim))
|
||||
k = a.rotate(k, torch.arange(n, device=h.device)[None, :])
|
||||
self.k[:, :n].copy_(k)
|
||||
self.v[:, :n].copy_(base.linear(h, name+'v_proj').unflatten(-1, (self.kv_heads, self.head_dim)))
|
||||
self.next_position = n
|
||||
|
||||
@torch.no_grad()
|
||||
def step(self, h, donor=None):
|
||||
"""h has shape (batch, 1, hidden). Return output and unmasked score row."""
|
||||
pos = self.next_position
|
||||
if h.shape[:2] != (self.k.shape[0], 1) or pos >= self.capacity:
|
||||
raise ValueError('Wrong input shape or full attention cache')
|
||||
if self.adapter is not None and (donor is None or
|
||||
donor.shape != (len(h), self.heads, 1, pos+1)):
|
||||
raise ValueError('LiSA requires the upstream score row for its full prefix')
|
||||
base = self.tail
|
||||
name = self.name
|
||||
if self.adapter is None:
|
||||
packed = base.linear(h, name+'q_proj').unflatten(-1, (self.heads, 2*self.head_dim))
|
||||
q, gate = packed.chunk(2, -1)
|
||||
k = base.linear(h, name+'k_proj').unflatten(-1, (self.kv_heads, self.head_dim))
|
||||
q = self.native_rotate(base.norm(q, name+'q_norm'), pos)
|
||||
k = self.native_rotate(base.norm(k, name+'k_norm'), pos)
|
||||
else:
|
||||
a = self.adapter
|
||||
position = torch.tensor([[pos]], device=h.device)
|
||||
q = a.rotate(a.q_proj(h).unflatten(-1, (self.heads, self.key_dim)), position)
|
||||
k = a.rotate(a.k_proj(h).unflatten(-1, (self.kv_heads, self.key_dim)), position)
|
||||
gate = base.gate_only(h, name)
|
||||
v = base.linear(h, name+'v_proj').unflatten(-1, (self.kv_heads, self.head_dim))
|
||||
self.k[:, pos:pos+1].copy_(k)
|
||||
self.v[:, pos:pos+1].copy_(v)
|
||||
self.next_position += 1
|
||||
groups = self.heads // self.kv_heads
|
||||
keys = self.k[:, :pos+1].repeat_interleave(groups, 2)
|
||||
values = self.v[:, :pos+1].repeat_interleave(groups, 2)
|
||||
scores = torch.einsum('bthd,bshd->bhts', q, keys) / math.sqrt(self.key_dim)
|
||||
if self.adapter is not None:
|
||||
both = torch.cat((scores, donor), dim=1).permute(0, 2, 3, 1)
|
||||
scores = self.adapter.fuse(both).permute(0, 3, 1, 2)
|
||||
context = torch.einsum('bhts,bshd->bthd', scores.softmax(-1), values)
|
||||
return base.linear((context * gate.sigmoid()).flatten(-2), name+'o_proj'), scores
|
||||
@@ -0,0 +1,130 @@
|
||||
"""Measure real K/V allocation and isolated incremental attention on Qwen."""
|
||||
import argparse
|
||||
import json
|
||||
import time
|
||||
from statistics import median
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from torch.nn import functional as F
|
||||
|
||||
from crossqkv.lisa_decode import AttentionSiteCache
|
||||
from crossqkv.lisa_tail import TorchTail, weight_chunks
|
||||
from crossqkv.lisa_train import LearnableSharingAttention
|
||||
from functional.model import PREFIX, StreamingLM
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
class TracedTail(TorchTail):
|
||||
def full(self, h, layer, donor, lengths, mode, recipients, keep_teacher):
|
||||
self.inputs[layer] = (h, donor)
|
||||
return super().full(h, layer, donor, lengths, mode, recipients, keep_teacher)
|
||||
|
||||
|
||||
class ResidentSite:
|
||||
"""Keep one site's frozen projections resident to isolate compute latency."""
|
||||
|
||||
def __init__(self, tail, layer):
|
||||
self.tail, self.c = tail, tail.c
|
||||
self.name = f'layers.{layer}.self_attn.'
|
||||
self.weights = {}
|
||||
for k in ('q_proj', 'k_proj', 'v_proj', 'o_proj'):
|
||||
t = tail.source.tensors[PREFIX + self.name + k + '.weight']
|
||||
self.weights[self.name+k] = torch.cat(list(weight_chunks(t, 0, t.shape[0])))
|
||||
w = self.weights[self.name+'q_proj']
|
||||
heads, dim = self.c['num_attention_heads'], self.c['head_dim']
|
||||
self.gate_weight = w.reshape(heads, 2*dim, -1)[:, dim:].reshape(heads*dim, -1).contiguous()
|
||||
|
||||
def linear(self, h, name, start=0, end=None):
|
||||
return F.linear(h, self.weights[name][start:end])
|
||||
|
||||
def gate_only(self, h, name):
|
||||
if name != self.name:
|
||||
raise ValueError('Resident gate called for the wrong site')
|
||||
return F.linear(h, self.gate_weight).unflatten(-1,
|
||||
(self.c['num_attention_heads'], self.c['head_dim']))
|
||||
|
||||
def norm(self, *args):
|
||||
return self.tail.norm(*args)
|
||||
|
||||
|
||||
def timed_site(groups, h, donor, n, samples=3, rounds=4):
|
||||
timings = {k: [] for k in groups}
|
||||
states = {}
|
||||
for i in range(rounds):
|
||||
order = tuple(groups) if i % 2 == 0 else tuple(reversed(groups))
|
||||
for mode in order:
|
||||
cache = groups[mode]
|
||||
cache.reset()
|
||||
cache.prefill(h[:, :n-samples])
|
||||
for pos in range(n-samples, n):
|
||||
row = donor[:, :, pos:pos+1, :pos+1].contiguous() if mode == 'lisa' else None
|
||||
start = time.perf_counter()
|
||||
result, attention = cache.step(h[:, pos:pos+1], row)
|
||||
elapsed = time.perf_counter() - start
|
||||
if i:
|
||||
timings[mode].append(elapsed)
|
||||
if not torch.isfinite(result).all():
|
||||
raise FloatingPointError('Invalid cached decode')
|
||||
states[mode] = result, attention
|
||||
return timings, states
|
||||
|
||||
|
||||
def run(source, capture, checkpoint, out):
|
||||
torch.set_num_threads(1)
|
||||
spec = json.loads((capture/'selection.json').read_text())
|
||||
sites = spec['sites']
|
||||
source = StreamingLM(source/'weights', json.loads((source/'model_config.json').read_text()))
|
||||
cfg = source.config
|
||||
rope = cfg['rope_parameters']
|
||||
adap = {i: LearnableSharingAttention(cfg['hidden_size'], cfg['num_attention_heads'],
|
||||
cfg['num_key_value_heads'], 40, rope['rope_theta'], rope['partial_rotary_factor'],
|
||||
bias=cfg.get('attention_bias', False)) for i in sites}
|
||||
tail = TracedTail(source, sites[0], adap)
|
||||
tail.adapters.load_state_dict(torch.load(checkpoint, map_location='cpu', weights_only=True))
|
||||
with np.load(sorted(capture.glob('validation-*.npz'))[0], allow_pickle=False) as f:
|
||||
n = int(f['lengths'][0])
|
||||
data = {k: torch.from_numpy(f[k][:1]) for k in ('residual', 'donor', 'lengths')}
|
||||
data['residual'] = data['residual'][:, :n]
|
||||
data['donor'] = data['donor'][:, :, :n, :n]
|
||||
tail.inputs = {}
|
||||
measurements = {}
|
||||
with torch.no_grad():
|
||||
tail(data['residual'], data['donor'], data['lengths'], 'native', ())
|
||||
for layer in sites:
|
||||
h, donor = tail.inputs[layer]
|
||||
groups = {'native': AttentionSiteCache(tail, layer, 1, n),
|
||||
'lisa': AttentionSiteCache(tail, layer, 1, n, adap[layer])}
|
||||
timings, reference = timed_site(groups, h, donor, n)
|
||||
resident = ResidentSite(tail, layer)
|
||||
resident_groups = {mode: AttentionSiteCache(resident, layer, 1, n,
|
||||
adap[layer] if mode == 'lisa' else None) for mode in groups}
|
||||
warm, checked = timed_site(resident_groups, h, donor, n)
|
||||
for mode in groups:
|
||||
for actual, expected in zip(checked[mode], reference[mode]):
|
||||
torch.testing.assert_close(actual, expected, rtol=5e-5, atol=5e-5)
|
||||
measurements[layer] = {'seconds_per_token': timings,
|
||||
'resident_seconds_per_token': warm,
|
||||
'resident_median_s_per_token': {k: median(v) for k,v in warm.items()},
|
||||
'resident_matches_streamed': True,
|
||||
'allocated_bytes': {k: v.allocated_bytes for k, v in groups.items()},
|
||||
'lisa_input_score_row_bytes': (
|
||||
cfg['num_attention_heads'] * n * h.element_size()),
|
||||
'sequence_length': n}
|
||||
write_json(out, {'scope': 'isolated full-attention recipient, FP32, frozen true activations; '
|
||||
'excludes donor generation and full-model decode', 'sites': measurements,
|
||||
'streamed_timings_include_weight_reads': True,
|
||||
'resident_timings_exclude_projection_load': True})
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__)
|
||||
for name in ('source', 'capture', 'checkpoint', 'out'):
|
||||
p.add_argument('--'+name, type=Path, required=True)
|
||||
a = p.parse_args()
|
||||
run(a.source, a.capture, a.checkpoint, a.out)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,296 @@
|
||||
"""Train matched multi-recipient sharing adapters and evaluate the frozen test set."""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
|
||||
from crossqkv.core import QKVModel
|
||||
from crossqkv.lisa_effect_screen import TASKS
|
||||
from crossqkv.lisa_pilot import batch, scores
|
||||
from functional.model import PREFIX
|
||||
from functional.run import write_json
|
||||
|
||||
CANDIDATES = ('linear', 'lisa', 'lisa_answer_weighted')
|
||||
|
||||
|
||||
def selection(screen):
|
||||
eligible = []
|
||||
for task, modes in screen.items():
|
||||
base = modes['native']
|
||||
if base['correct'] < 5:
|
||||
continue
|
||||
for name, sites in [('direct_23', [23]), ('direct_19_23', [19, 23])]:
|
||||
row = modes[name]
|
||||
if row['native_wins_lost']:
|
||||
eligible.append((row['native_wins_lost'], len(sites),
|
||||
base['correct']-row['correct'], task, sites))
|
||||
if not eligible:
|
||||
raise ValueError('No task/schedule met the prespecified development eligibility rule')
|
||||
_, _, _, task, sites = max(eligible)
|
||||
return {'task': task, 'sites': sites}
|
||||
|
||||
|
||||
class Capture(QKVModel):
|
||||
def normalization(self, x, name):
|
||||
if name == f'layers.{self.first}.input_layernorm':
|
||||
self.residual = x
|
||||
return super().normalization(x, name)
|
||||
|
||||
def full_attention(self, h, layer, shared_p=None):
|
||||
if layer != self.first - 4:
|
||||
return super().full_attention(h, layer, shared_p)
|
||||
part = self.parts(h, layer, heads=False)
|
||||
self.donor = scores(part['q'], part['k'])
|
||||
return part['output'], part['p']
|
||||
|
||||
|
||||
def capture(source, screen_dir, out, schedule):
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
fixed_path = screen_dir/'fixed-problems.json'
|
||||
fixed = json.loads(fixed_path.read_text())
|
||||
chosen = selection(json.loads((screen_dir/'screen-summary.json').read_text()))
|
||||
if schedule == 'chain':
|
||||
modes = json.loads((screen_dir/'screen-summary.json').read_text())[chosen['task']]
|
||||
if not modes['direct_19_23']['native_wins_lost']:
|
||||
raise ValueError('The development-selected task has no recorded losses under the chain')
|
||||
chosen['sites'] = [19, 23]
|
||||
model = Capture(source/'weights', json.loads((source/'model_config.json').read_text()),
|
||||
seconds=7200)
|
||||
model.first = chosen['sites'][0]
|
||||
tok = Tokenizer.from_file(str(source/'tokenizer.json'))
|
||||
sha = lambda path: hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
write_json(out/'selection.json', {**chosen, 'fixed_problems_sha256': sha(fixed_path),
|
||||
'source_sha256': {n: sha(source/n) for n in
|
||||
('manifest.json', 'model_config.json', 'tokenizer.json')}})
|
||||
for split in ('fit', 'validation', 'test'):
|
||||
selected = [ex for ex in fixed[split] if ex['task'] == chosen['task']]
|
||||
for start in range(0, len(selected), 4):
|
||||
group = selected[start:start+4]
|
||||
ids, lengths, labels = batch(tok, group)
|
||||
gold = np.array([r['answer_index'] for r in group])
|
||||
ids = np.pad(ids, ((0, 0), (0, 1)))
|
||||
ids[np.arange(len(group)), lengths] = np.asarray(labels)[gold]
|
||||
h, _ = model.forward(ids)
|
||||
pending = out/f'{split}-{start:03}.tmp.npz'
|
||||
np.savez(pending, ids=ids, lengths=np.asarray(lengths)+1, labels=labels, gold=gold,
|
||||
residual=model.residual, donor=model.donor, expected=h,
|
||||
names=[x['id'] for x in group])
|
||||
pending.replace(out/f'{split}-{start:03}.npz')
|
||||
print('capture', split, start+len(group), '/', len(selected), flush=True)
|
||||
|
||||
|
||||
def train(source, cache, out, epochs, resume=False):
|
||||
import torch
|
||||
from torch import nn
|
||||
from crossqkv.lisa_tail import TorchTail
|
||||
from crossqkv.lisa_train import LearnableSharingAttention, huber_distillation, language_model_loss
|
||||
from functional.model import StreamingLM
|
||||
|
||||
torch.set_num_threads(1)
|
||||
torch.manual_seed(415005)
|
||||
spec = json.loads((cache/'selection.json').read_text())
|
||||
if any(hashlib.sha256((source/n).read_bytes()).hexdigest() != s
|
||||
for n, s in spec['source_sha256'].items()):
|
||||
raise ValueError('Checkpoint provenance mismatch')
|
||||
expected_batches = {'fit':12, 'validation':12, 'test':32}
|
||||
for split, count in expected_batches.items():
|
||||
actual = 0
|
||||
for p in cache.glob(f'{split}-*.npz'):
|
||||
with np.load(p, allow_pickle=False) as b:
|
||||
actual += len(b['names'])
|
||||
if actual != count:
|
||||
raise ValueError(f'Expected {count} {split} examples, found {actual}')
|
||||
run_config = {'epochs': epochs, 'selection': spec, 'optimizer': 'AdamW',
|
||||
'lr': .0003, 'weight_decay': .1, 'answer_weight': 16., 'seed': 415005}
|
||||
config_path = out/'train-protocol.json'
|
||||
if resume:
|
||||
if json.loads(config_path.read_text()) != run_config:
|
||||
raise ValueError('Training configuration differs from the original run')
|
||||
else:
|
||||
write_json(config_path, run_config)
|
||||
model = StreamingLM(source/'weights', json.loads((source/'model_config.json').read_text()))
|
||||
sites = tuple(spec['sites'])
|
||||
cfg = model.config
|
||||
heads = cfg['num_attention_heads']
|
||||
rope = cfg['rope_parameters']
|
||||
t = model.tensors[PREFIX+'embed_tokens.weight']
|
||||
|
||||
def vocab():
|
||||
for start in range(0, t.shape[0], 1024):
|
||||
end = min(start+1024, t.shape[0])
|
||||
yield start, torch.from_numpy(t.read(slice(start*t.shape[1], end*t.shape[1]))
|
||||
.reshape(end-start, t.shape[1]))
|
||||
t.evict()
|
||||
|
||||
def batches(split, micro=False):
|
||||
for path in sorted(cache.glob(f'{split}-*.npz')):
|
||||
with np.load(path, allow_pickle=False) as f:
|
||||
b = {k: torch.from_numpy(f[k]) for k in f.files if k != 'names'}
|
||||
names = f['names'].tolist()
|
||||
if not micro:
|
||||
yield b, names
|
||||
else:
|
||||
for j, name in enumerate(names):
|
||||
yield {k: v if k == 'labels' else v[j:j+1] for k, v in b.items()}, [name]
|
||||
|
||||
def make(candidate):
|
||||
torch.manual_seed(415005)
|
||||
if candidate == 'linear':
|
||||
blocks = {i: nn.Linear(heads, heads, bias=False) for i in sites}
|
||||
for value in blocks.values():
|
||||
with torch.no_grad():
|
||||
value.weight.copy_(torch.eye(heads))
|
||||
else:
|
||||
blocks = {i: LearnableSharingAttention(cfg['hidden_size'], heads,
|
||||
cfg['num_key_value_heads'], 40, rope['rope_theta'],
|
||||
rope['partial_rotary_factor'], bias=cfg.get('attention_bias', False))
|
||||
for i in sites}
|
||||
return TorchTail(model, sites[0], blocks)
|
||||
|
||||
def run(tail, b, mode, teacher=False):
|
||||
return tail(b['residual'], b['donor'], b['lengths'], mode, sites, teacher)
|
||||
|
||||
def score(h, b):
|
||||
index = b['lengths'] - 2
|
||||
f = h[torch.arange(len(index)), index]
|
||||
labels = b['labels'].tolist()
|
||||
weights = np.stack([t.read(slice(i*t.shape[1], (i+1)*t.shape[1])) for i in labels])
|
||||
t.evict()
|
||||
logits = f @ torch.from_numpy(weights).T
|
||||
nll = torch.logsumexp(logits, -1) - logits[torch.arange(len(index)), b['gold']]
|
||||
return logits, nll
|
||||
|
||||
def evaluate(tail, split, mode):
|
||||
rows = []
|
||||
with torch.no_grad():
|
||||
for b, names in batches(split):
|
||||
h, _ = run(tail, b, mode)
|
||||
if mode == 'native':
|
||||
valid = torch.arange(h.shape[1])[None] < b['lengths'][:, None]
|
||||
torch.testing.assert_close(h[valid], b['expected'][valid], rtol=7e-5, atol=8e-5)
|
||||
logits, nll = score(h, b)
|
||||
rows.extend({'id': name, 'gold': int(g), 'logits': x.tolist(),
|
||||
'pred': int(x.argmax()), 'answer_nll': float(v)}
|
||||
for name, g, x, v in zip(names, b['gold'], logits, nll))
|
||||
if not rows:
|
||||
raise ValueError(f'No cached rows for {split}')
|
||||
return rows
|
||||
|
||||
def mean_nll(rows):
|
||||
return sum(r['answer_nll'] for r in rows) / len(rows)
|
||||
|
||||
trace = {}
|
||||
for candidate in CANDIDATES:
|
||||
tail = make(candidate)
|
||||
mode = 'linear' if candidate == 'linear' else 'lisa'
|
||||
optim = torch.optim.AdamW(tail.parameters(), lr=.0003, weight_decay=.1)
|
||||
ans_weight = 16.0 if candidate == 'lisa_answer_weighted' else 1.0
|
||||
best = float('inf')
|
||||
best_weights = None
|
||||
trace[candidate] = []
|
||||
last = out/f'{candidate}-resume.pt'
|
||||
if resume and last.exists():
|
||||
state = torch.load(last, weights_only=True, map_location='cpu')
|
||||
tail.adapters.load_state_dict(state['parameters'])
|
||||
optim.load_state_dict(state['optimizer'])
|
||||
trace[candidate] = state['trace']
|
||||
best = state['best']
|
||||
best_weights = state['best_parameters']
|
||||
for epoch in range(len(trace[candidate]), epochs):
|
||||
loss_total = 0.
|
||||
count = 0
|
||||
for b, _ in batches('fit', micro=True):
|
||||
optim.zero_grad(set_to_none=True)
|
||||
h, layer = run(tail, b, mode, teacher=True)
|
||||
kd = torch.stack([huber_distillation(*layer[i], b['lengths']) for i in sites]).mean()
|
||||
ce = None if mode == 'linear' else language_model_loss(
|
||||
h, b['ids'], b['lengths'], vocab, answer_weight=ans_weight)
|
||||
loss = kd if ce is None else .25 * kd + .75 * ce
|
||||
loss.backward()
|
||||
if any(p.grad is None or not torch.isfinite(p.grad).all() for p in tail.parameters()):
|
||||
raise FloatingPointError('Invalid adapter gradients')
|
||||
optim.step()
|
||||
loss_total += float(loss.detach())
|
||||
count += 1
|
||||
rows = evaluate(tail, 'validation', mode)
|
||||
val = mean_nll(rows)
|
||||
trace[candidate].append({'epoch': epoch+1, 'fit_loss': loss_total/count,
|
||||
'validation_answer_nll': val})
|
||||
if val < best:
|
||||
best = val
|
||||
best_weights = {k: v.detach().clone() for k, v in tail.adapters.state_dict().items()}
|
||||
pending = last.with_suffix('.tmp')
|
||||
torch.save({'parameters': tail.adapters.state_dict(), 'optimizer': optim.state_dict(),
|
||||
'trace': trace[candidate], 'best': best, 'best_parameters': best_weights},
|
||||
pending)
|
||||
pending.replace(last)
|
||||
write_json(out/'trace.json', trace)
|
||||
print(candidate, epoch+1, 'validation answer NLL', val, flush=True)
|
||||
selected = out/f'{candidate}.pt'
|
||||
pending = selected.with_suffix('.tmp')
|
||||
torch.save(best_weights, pending)
|
||||
pending.replace(selected)
|
||||
|
||||
# All checkpoints are frozen before evaluating holdout. Native and direct
|
||||
# go through the same path, including numerical parity with NumPy.
|
||||
results = {}
|
||||
empty = TorchTail(model, sites[0])
|
||||
for mode in ('native', 'direct'):
|
||||
results[mode] = evaluate(empty, 'test', mode)
|
||||
for name in CANDIDATES:
|
||||
tail = make(name)
|
||||
tail.adapters.load_state_dict(torch.load(out/f'{name}.pt', map_location='cpu', weights_only=True))
|
||||
results[name] = evaluate(tail, 'test', 'linear' if name == 'linear' else 'lisa')
|
||||
write_json(out/'test-items.json', results)
|
||||
|
||||
b, _ = next(batches('validation'))
|
||||
b = {k: v if k == 'labels' else v[:1] for k, v in b.items()}
|
||||
trained = make('lisa')
|
||||
trained.adapters.load_state_dict(torch.load(out/'lisa.pt', weights_only=True))
|
||||
timing = {'native': [], 'direct': [], 'lisa': []}
|
||||
with torch.no_grad():
|
||||
for turn in range(4):
|
||||
modes = list(timing)
|
||||
for mode in modes[turn % 3:] + modes[:turn % 3]:
|
||||
t0 = time.perf_counter()
|
||||
_, _ = run(trained if mode == 'lisa' else empty, b, mode)
|
||||
if turn:
|
||||
timing[mode].append(time.perf_counter()-t0)
|
||||
tokens = int(b['lengths'][0])
|
||||
kv, d = cfg['num_key_value_heads'], cfg['head_dim']
|
||||
cache_bytes = {'scope': 'formula for one sequence, BF16 keys and score buffers',
|
||||
'native_recipient_key_bytes': len(sites)*tokens*kv*d*2,
|
||||
'lisa_recipient_key_bytes': len(sites)*tokens*kv*40*2,
|
||||
'one_shared_decode_score_row_bytes': heads*tokens*2,
|
||||
'one_full_prefill_score_matrix_bytes': heads*tokens*tokens*2}
|
||||
write_json(out/'performance.json', {'scope': 'cached-prefix last layers, prefill',
|
||||
'seconds': timing, 'real_tokens': tokens, 'cache_estimate': cache_bytes})
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__)
|
||||
p.add_argument('phase', choices=('capture', 'train'))
|
||||
p.add_argument('--source', required=True, type=Path)
|
||||
p.add_argument('--input', required=True, type=Path)
|
||||
p.add_argument('--out', required=True, type=Path)
|
||||
p.add_argument('--schedule', choices=('best','chain'), default='best')
|
||||
p.add_argument('--epochs', type=int, default=2)
|
||||
p.add_argument('--resume', action='store_true')
|
||||
a = p.parse_args()
|
||||
if a.epochs < 1:
|
||||
p.error('--epochs must be positive')
|
||||
if a.resume and a.phase != 'train':
|
||||
p.error('--resume is for training with saved epoch checkpoints')
|
||||
a.out.mkdir(exist_ok=a.resume)
|
||||
if a.phase == 'capture':
|
||||
capture(a.source, a.input, a.out, a.schedule)
|
||||
else:
|
||||
train(a.source, a.input, a.out, a.epochs, a.resume)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,115 @@
|
||||
"""Compare one vs two recipients on the same task using full-vocabulary answers."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from torch.nn import functional as F
|
||||
|
||||
from crossqkv.lisa_tail import TorchTail, weight_chunks
|
||||
from crossqkv.lisa_train import LearnableSharingAttention
|
||||
from functional.model import PREFIX, StreamingLM
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
def vocabulary_scores(hidden, targets, embedding):
|
||||
n = len(hidden)
|
||||
peak = hidden.new_full((n,), -torch.inf)
|
||||
total = peak.clone()
|
||||
top = torch.zeros(n, dtype=torch.int64)
|
||||
true = torch.zeros_like(peak)
|
||||
start = 0
|
||||
for w in weight_chunks(embedding, 0, embedding.shape[0], rows=1024):
|
||||
logits = F.linear(hidden, w)
|
||||
total = torch.logaddexp(total, logits.logsumexp(dim=-1))
|
||||
values, indices = logits.max(dim=-1)
|
||||
top = torch.where(values > peak, indices + start, top)
|
||||
peak = torch.maximum(values, peak)
|
||||
local = (targets >= start) & (targets < start + len(w))
|
||||
true[local] = logits[local, targets[local]-start]
|
||||
start += len(w)
|
||||
return top, total-true
|
||||
|
||||
|
||||
def run(source, cache, trained, out):
|
||||
torch.set_num_threads(1)
|
||||
spec = json.loads((cache/'selection.json').read_text())
|
||||
sites = tuple(spec['sites'])
|
||||
stream = StreamingLM(source/'weights', json.loads((source/'model_config.json').read_text()))
|
||||
cfg = stream.config
|
||||
rp = cfg['rope_parameters']
|
||||
heads, kv = cfg['num_attention_heads'], cfg['num_key_value_heads']
|
||||
|
||||
def loaded(mode):
|
||||
if mode == 'linear':
|
||||
from torch import nn
|
||||
|
||||
modules = {site: nn.Linear(heads, heads, bias=False) for site in sites}
|
||||
else:
|
||||
modules = {site: LearnableSharingAttention(cfg['hidden_size'], heads, kv, 40,
|
||||
rp['rope_theta'], rp['partial_rotary_factor'],
|
||||
bias=cfg.get('attention_bias', False)) for site in sites}
|
||||
tail = TorchTail(stream, sites[0], modules)
|
||||
tail.adapters.load_state_dict(torch.load(trained/f'{mode}.pt', weights_only=True,
|
||||
map_location='cpu'))
|
||||
return tail
|
||||
|
||||
empty = TorchTail(stream, sites[0])
|
||||
fitted = loaded('lisa')
|
||||
arms = [('native', empty, 'native', ()),
|
||||
('direct_23', empty, 'direct', (sites[-1],)),
|
||||
('lisa_23_ablation', fitted, 'lisa', (sites[-1],))]
|
||||
if len(sites) > 1:
|
||||
arms.extend([('direct_chain', empty, 'direct', sites),
|
||||
('lisa_chain', fitted, 'lisa', sites)])
|
||||
arms.extend([('linear', loaded('linear'), 'linear', sites),
|
||||
('lisa_answer_weighted', loaded('lisa_answer_weighted'), 'lisa', sites)])
|
||||
answers = {name: [] for name, *_ in arms}
|
||||
ids, labels, options = [], [], []
|
||||
with torch.no_grad():
|
||||
for path in sorted(cache.glob('test-*.npz')):
|
||||
with np.load(path, allow_pickle=False) as f:
|
||||
b = {k: torch.from_numpy(f[k]) for k in f.files if k != 'names'}
|
||||
ids.extend(f['names'].tolist())
|
||||
labels.append(b['labels'][b['gold']])
|
||||
options.append(b['labels'].expand(len(b['gold']), -1))
|
||||
for name, tail, mode, chosen in arms:
|
||||
h, _ = tail(b['residual'], b['donor'], b['lengths'], mode, chosen)
|
||||
answers[name].append(h[torch.arange(len(h)), b['lengths']-2])
|
||||
print('matched full-vocabulary audit', len(ids), flush=True)
|
||||
if not ids:
|
||||
raise ValueError('No captured holdout batches')
|
||||
y = torch.cat(labels)
|
||||
t = stream.tensors[PREFIX+'embed_tokens.weight']
|
||||
hidden = torch.cat([torch.cat(answers[k]) for k in answers])
|
||||
pred, nll = vocabulary_scores(hidden, y.repeat(len(answers)), t)
|
||||
result = {}
|
||||
opts = torch.cat(options)
|
||||
for (name, h), p, v in zip(answers.items(), pred.split(len(y)), nll.split(len(y))):
|
||||
option_w = torch.stack([torch.from_numpy(t.read(slice(i*t.shape[1], (i+1)*t.shape[1])))
|
||||
for i in opts[0].tolist()])
|
||||
if not torch.equal(opts, opts[0].expand_as(opts)):
|
||||
raise ValueError('Option token IDs unexpectedly vary across items')
|
||||
t.evict()
|
||||
choice = opts[torch.arange(len(y)), F.linear(torch.cat(h), option_w).argmax(-1)]
|
||||
result[name] = {'n': len(y), 'full_vocab_correct': int((p==y).sum()),
|
||||
'four_choice_correct': int((choice==y).sum()),
|
||||
'full_vocab_nll': float(v.mean()),
|
||||
'rows': [{'id': key, 'gold_id': int(g), 'greedy_id': int(j),
|
||||
'choice_id': int(c), 'nll': float(s)}
|
||||
for key, g, j, c, s in zip(ids, y, p, choice, v)]}
|
||||
write_json(out, {'single_lisa_is_ablation_of_joint_checkpoint': len(sites) > 1,
|
||||
'candidate_sites': list(sites), 'arms': result})
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__)
|
||||
for name in ('source', 'cache', 'trained', 'out'):
|
||||
p.add_argument('--'+name, type=Path, required=True)
|
||||
a = p.parse_args()
|
||||
run(a.source, a.cache, a.trained, a.out)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,157 @@
|
||||
"""Independently validate frozen test outputs and report paired capability recovery."""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import math
|
||||
from pathlib import Path
|
||||
from statistics import median
|
||||
|
||||
import numpy as np
|
||||
|
||||
from functional.run import write_json
|
||||
|
||||
MODES = ('native', 'direct', 'linear', 'lisa', 'lisa_answer_weighted')
|
||||
|
||||
|
||||
def paired_interval(delta):
|
||||
rng = np.random.default_rng(415006)
|
||||
draw = rng.integers(0, len(delta), size=(10000, len(delta)))
|
||||
return np.quantile(delta[draw].mean(1), [.025, .975]).tolist()
|
||||
|
||||
|
||||
def paired(native, direct, candidate):
|
||||
damaged = native & ~direct
|
||||
rescued = damaged & candidate
|
||||
newly_lost = native & direct & ~candidate
|
||||
candidate_only = ~direct & candidate
|
||||
direct_only = direct & ~candidate
|
||||
delta = candidate.astype(int) - direct.astype(int)
|
||||
a, b = int(candidate_only.sum()), int(direct_only.sum())
|
||||
k = a + b
|
||||
p = min(1., 2. * sum(math.comb(k, i) for i in range(min(a, b)+1)) / 2**k)
|
||||
return {'native_correct_lost_by_direct': int(damaged.sum()), 'rescued': int(rescued.sum()),
|
||||
'newly_lost_among_native_and_direct_correct': int(newly_lost.sum()),
|
||||
'candidate_correct_direct_wrong': a, 'direct_correct_candidate_wrong': b,
|
||||
'accuracy_delta_vs_direct': float(delta.mean()),
|
||||
'paired_prompt_bootstrap_95': paired_interval(delta), 'mcnemar_exact_p': p}
|
||||
|
||||
|
||||
def loss_delta(losses, baseline):
|
||||
delta = losses - baseline
|
||||
return {'mean_delta': float(delta.mean()), 'paired_prompt_bootstrap_95': paired_interval(delta)}
|
||||
|
||||
|
||||
def full_vocab_metrics(path, expected, sites, choices):
|
||||
report = json.loads(path.read_text())
|
||||
chain = len(sites) > 1
|
||||
if (report['candidate_sites'] != sites
|
||||
or report['single_lisa_is_ablation_of_joint_checkpoint'] != chain):
|
||||
raise ValueError('Full-vocabulary layers differ from the locked schedule')
|
||||
arms = report['arms']
|
||||
mapped = {'native': 'native', 'linear': 'linear', 'lisa_answer_weighted': 'lisa_answer_weighted',
|
||||
'direct_chain' if chain else 'direct_23': 'direct',
|
||||
'lisa_chain' if chain else 'lisa_23_ablation': 'lisa'}
|
||||
if set(arms) != set(mapped) | {'direct_23', 'lisa_23_ablation'}:
|
||||
raise ValueError('Unexpected full-vocabulary arms')
|
||||
expected_ids = [name for name, _ in expected]
|
||||
correct, nll = {}, {}
|
||||
gold_ids = [row['gold_id'] for row in arms['native']['rows']]
|
||||
for mode, summary in arms.items():
|
||||
rows = summary['rows']
|
||||
if (summary['n'] != len(expected_ids) or [row['id'] for row in rows] != expected_ids
|
||||
or [row['gold_id'] for row in rows] != gold_ids):
|
||||
raise ValueError(f'{mode} vocabulary result does not match the locked rows')
|
||||
correct[mode] = np.array([row['greedy_id'] == row['gold_id'] for row in rows])
|
||||
nll[mode] = np.array([row['nll'] for row in rows])
|
||||
choice_correct = np.array([row['choice_id'] == row['gold_id'] for row in rows])
|
||||
if (not np.isfinite(nll[mode]).all() or (nll[mode] < 0).any()
|
||||
or int(correct[mode].sum()) != summary['full_vocab_correct']
|
||||
or int(choice_correct.sum()) != summary['four_choice_correct']
|
||||
or not np.isclose(nll[mode].mean(), summary['full_vocab_nll'])):
|
||||
raise ValueError(f'Invalid vocabulary metrics for {mode}')
|
||||
if mode in mapped and not np.array_equal(choice_correct, choices[mapped[mode]]):
|
||||
raise ValueError(f'{mode} choices differ across the two evaluations')
|
||||
matches = {'lisa_23_ablation': 'direct_23',
|
||||
'native': 'direct_chain' if chain else 'direct_23',
|
||||
'linear': 'direct_chain' if chain else 'direct_23',
|
||||
'lisa_answer_weighted': 'direct_chain' if chain else 'direct_23'}
|
||||
if chain:
|
||||
matches['lisa_chain'] = 'direct_chain'
|
||||
return {
|
||||
'arms': {mode: {'correct': int(correct[mode].sum()), 'answer_nll': float(nll[mode].mean())}
|
||||
for mode in arms},
|
||||
'matched_direct_comparisons': {
|
||||
mode: {'baseline': direct, 'answer_nll_delta': loss_delta(nll[mode], nll[direct]),
|
||||
**paired(correct['native'], correct[direct], correct[mode])}
|
||||
for mode, direct in matches.items()},
|
||||
}
|
||||
|
||||
|
||||
def audit(fixed, selection, items, perf=None, decode=None, full_vocab=None):
|
||||
spec = json.loads(selection.read_text())
|
||||
if hashlib.sha256(fixed.read_bytes()).hexdigest() != spec['fixed_problems_sha256']:
|
||||
raise ValueError('Fixed problems provenance mismatch')
|
||||
problem = json.loads(fixed.read_text())
|
||||
task = spec['task']
|
||||
expected = [(r['id'], r['answer_index']) for r in problem['test'] if r['task'] == task]
|
||||
data = json.loads(items.read_text())
|
||||
if set(data) != set(MODES) or not expected:
|
||||
raise ValueError('Unexpected test arms or empty selected split')
|
||||
correct = {}
|
||||
losses = {}
|
||||
for mode, rows in data.items():
|
||||
if [(r['id'], r['gold']) for r in rows] != expected:
|
||||
raise ValueError(f'{mode} result does not match the locked challenge')
|
||||
logits = np.array([r['logits'] for r in rows])
|
||||
gold = np.array([r['gold'] for r in rows])
|
||||
pred = np.array([r['pred'] for r in rows])
|
||||
nll = np.logaddexp.reduce(logits, 1) - logits[np.arange(len(rows)), gold]
|
||||
if (logits.shape != (len(rows), 4) or not np.isfinite(logits).all()
|
||||
or not np.array_equal(logits.argmax(1), pred)):
|
||||
raise ValueError(f'Invalid choice scores for {mode}')
|
||||
np.testing.assert_allclose(nll, [row['answer_nll'] for row in rows], atol=3e-6, rtol=2e-6)
|
||||
correct[mode], losses[mode] = pred == gold, nll
|
||||
metrics = {'selected_task': task, 'sites': spec['sites'], 'n': len(expected),
|
||||
'arms': {mode: {'correct': int(correct[mode].sum()),
|
||||
'answer_nll_4': float(losses[mode].mean()),
|
||||
'answer_nll_4_vs_direct': loss_delta(losses[mode], losses['direct']),
|
||||
**paired(correct['native'], correct['direct'], correct[mode])}
|
||||
for mode in MODES}}
|
||||
if perf:
|
||||
measured = json.loads(perf.read_text())
|
||||
med = {k: median(v) for k,v in measured['seconds'].items()}
|
||||
metrics['prefill'] = {'scope': measured['scope'], 'median_s': med,
|
||||
'lisa_median_ratio_to_native': med['lisa']/med['native']}
|
||||
if decode:
|
||||
measured = json.loads(decode.read_text())
|
||||
metrics['decode'] = {'scope': measured['scope'], 'sites': {}}
|
||||
for layer, raw in measured['sites'].items():
|
||||
times = {k: median(v) for k,v in raw['seconds_per_token'].items()}
|
||||
mem = raw['allocated_bytes']
|
||||
native = mem['native']['k'] + mem['native']['v']
|
||||
lisa = mem['lisa']['k'] + mem['lisa']['v']
|
||||
nn = raw['lisa_input_score_row_bytes']
|
||||
assert mem['lisa']['v'] == mem['native']['v'] and mem['lisa']['k'] < mem['native']['k']
|
||||
metrics['decode']['sites'][layer] = {
|
||||
'median_s_per_token': times, 'measured_kv_bytes': {'native': native, 'lisa': lisa},
|
||||
'lisa_upstream_score_row_bytes': nn, 'recipient_bytes_delta': lisa+nn-native,
|
||||
}
|
||||
if full_vocab:
|
||||
metrics['full_vocab'] = full_vocab_metrics(full_vocab, expected, spec['sites'], correct)
|
||||
return metrics
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
for name in ('fixed', 'selection', 'items', 'out'):
|
||||
parser.add_argument('--'+name, type=Path, required=True)
|
||||
parser.add_argument('--perf', type=Path)
|
||||
parser.add_argument('--decode', type=Path)
|
||||
parser.add_argument('--full-vocab', type=Path)
|
||||
a = parser.parse_args()
|
||||
report = audit(a.fixed, a.selection, a.items, a.perf, a.decode, a.full_vocab)
|
||||
write_json(a.out, report)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,183 @@
|
||||
"""Screen task difficulty and joint sharing schedules without opening test results."""
|
||||
import argparse
|
||||
import json
|
||||
import random
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
from crossqkv.core import QKVModel
|
||||
from crossqkv.lisa_pilot import batch
|
||||
from functional.model import PREFIX
|
||||
from functional.run import write_json
|
||||
from pilot.tensors import decode
|
||||
|
||||
MODES = ('native', 'direct_23', 'direct_19_23')
|
||||
SITES = (15, 19, 23)
|
||||
TASKS = ('lookup8', 'lookup16', 'latest8', 'arithmetic')
|
||||
SPLIT_SEEDS = {'screen': 415001, 'fit': 415002, 'validation': 415003, 'test': 415004}
|
||||
WORDS = ('amber birch cedar dune elm fern grove heath iris jade kelp larch '
|
||||
'maple nettle olive pine quartz reed slate thyme umber vine willow yew').split()
|
||||
|
||||
|
||||
def problems(split, per_task):
|
||||
rng = random.Random(SPLIT_SEEDS[split])
|
||||
rows = []
|
||||
for task in TASKS:
|
||||
answers = [i % 4 for i in range(per_task)]
|
||||
rng.shuffle(answers)
|
||||
for i, answer in enumerate(answers):
|
||||
if task == 'arithmetic':
|
||||
a, b = rng.sample(range(12, 99), 2)
|
||||
target = a + b
|
||||
distractors = [target - 10, target + 10, target + rng.choice((-1, 1))]
|
||||
question = f'What is {a} + {b}?'
|
||||
else:
|
||||
size = 16 if task == 'lookup16' else 8
|
||||
keys, vals = rng.sample(WORDS, size), rng.sample(range(10, 100), size)
|
||||
if task == 'latest8':
|
||||
first = rng.randrange(size - 1)
|
||||
last = rng.randrange(first + 1, size)
|
||||
keys[last] = keys[first]
|
||||
target = vals[last]
|
||||
remaining = [v for j, v in enumerate(vals) if j not in (first, last)]
|
||||
distractors = [vals[first], *rng.sample(remaining, 2)]
|
||||
key = keys[first]
|
||||
else:
|
||||
match = rng.randrange(size)
|
||||
target, key = vals[match], keys[match]
|
||||
distractors = rng.sample([v for v in vals if v != target], 3)
|
||||
table = '\n'.join(f'{k}: {v}' for k, v in zip(keys, vals))
|
||||
request = 'latest value' if task == 'latest8' else 'value'
|
||||
order = ' (oldest first)' if task == 'latest8' else ''
|
||||
question = f'Use the lookup table{order}.\n{table}\nWhich option is the {request} for {key}?'
|
||||
rng.shuffle(distractors)
|
||||
distractors.insert(answer, target)
|
||||
options = '\n'.join(f'{j+1}. {v}' for j, v in enumerate(distractors))
|
||||
prompt = f'{question}\n{options}\nAnswer with only the option number.\nAnswer:'
|
||||
rows.append({'id': f'{split}-{task}-{i:03}', 'task': task,
|
||||
'prompt': prompt, 'answer_index': answer})
|
||||
return rows
|
||||
|
||||
|
||||
class ScreeningModel(QKVModel):
|
||||
def normalization(self, h, name):
|
||||
if getattr(self, 'capture_prefix', False) and name == 'layers.19.input_layernorm':
|
||||
self.residual_19 = h
|
||||
return super().normalization(h, name)
|
||||
|
||||
def full_attention(self, h, layer, shared_p=None):
|
||||
if layer not in SITES:
|
||||
return super().full_attention(h, layer, shared_p)
|
||||
own = self.parts(h, layer, heads=False)
|
||||
p = own['p'].copy()
|
||||
if getattr(self, 'capture_prefix', False):
|
||||
if layer == 15:
|
||||
self.donor_15 = p
|
||||
return own['output'], p
|
||||
if layer == 19:
|
||||
p[self.chain] = self.prior[self.chain]
|
||||
elif layer == 23:
|
||||
p[self.shared] = self.prior[self.shared]
|
||||
self.prior = p
|
||||
repeats = self.config['num_attention_heads'] // self.config['num_key_value_heads']
|
||||
v = np.repeat(own['v'], repeats, axis=2)
|
||||
out = self.project(np.einsum('bhts,bshd->bthd', p, v), own['gate'], layer)
|
||||
return out, p
|
||||
|
||||
|
||||
def evaluate(model, tokenizer, examples):
|
||||
ids, lengths, labels = batch(tokenizer, examples)
|
||||
n = len(examples)
|
||||
model.chain = slice(2*n, 3*n)
|
||||
model.shared = slice(n, 3*n)
|
||||
if not getattr(model, 'reuse_prefix', False):
|
||||
h, _ = model.forward(np.tile(ids, (len(MODES), 1)))
|
||||
else:
|
||||
model.capture_prefix = True
|
||||
native, _ = model.forward(ids)
|
||||
model.capture_prefix = False
|
||||
h = np.concatenate([model.residual_19] * len(MODES))
|
||||
model.prior = np.concatenate([model.donor_15] * len(MODES))
|
||||
for layer, kind in enumerate(model.config['layer_types'][19:], 19):
|
||||
model.guard()
|
||||
p = f'layers.{layer}.'
|
||||
n_h = model.normalization(h, p+'input_layernorm')
|
||||
out = (model.full_attention(n_h, layer)[0] if kind == 'full_attention'
|
||||
else model.linear_attention(n_h, layer))
|
||||
h = h + out
|
||||
h = h + model.mlp(model.normalization(h, p+'post_attention_layernorm'), layer)
|
||||
h = model.normalization(h, 'norm')
|
||||
np.testing.assert_allclose(h[:n], native, atol=4e-5, rtol=3e-5)
|
||||
t = model.tensors[PREFIX + 'embed_tokens.weight']
|
||||
digit_weights = decode(t.raw.reshape(t.shape)[labels], t.dtype)
|
||||
t.evict()
|
||||
scores = [x[np.arange(n), np.asarray(lengths) - 1] @ digit_weights.T
|
||||
for x in np.split(h, len(MODES))]
|
||||
rows = []
|
||||
for i, ex in enumerate(examples):
|
||||
gold = ex['answer_index']
|
||||
item = {'id': ex['id'], 'task': ex['task'], 'gold': gold, 'scores': {}}
|
||||
for mode, logits in zip(MODES, scores):
|
||||
values = logits[i].astype(float)
|
||||
item['scores'][mode] = {'pred': int(values.argmax()), 'logits': values.tolist(),
|
||||
'nll': float(np.logaddexp.reduce(values) - values[gold])}
|
||||
rows.append(item)
|
||||
return rows
|
||||
|
||||
|
||||
def summarize(rows):
|
||||
table = {}
|
||||
for task in TASKS:
|
||||
group = [r for r in rows if r['task'] == task]
|
||||
if not group:
|
||||
continue
|
||||
table[task] = {}
|
||||
for mode in MODES:
|
||||
table[task][mode] = {
|
||||
'n': len(group),
|
||||
'correct': sum(r['scores'][mode]['pred'] == r['gold'] for r in group),
|
||||
'native_wins_lost': sum(r['scores']['native']['pred'] == r['gold']
|
||||
and r['scores'][mode]['pred'] != r['gold'] for r in group),
|
||||
'nll': float(np.mean([r['scores'][mode]['nll'] for r in group])),
|
||||
}
|
||||
return table
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--source', required=True, type=Path)
|
||||
parser.add_argument('--out', required=True, type=Path)
|
||||
parser.add_argument('--resume', action='store_true', help='Keep completed batches')
|
||||
parser.add_argument('--reuse-prefix', action='store_true', help='Run layers 0–18 once per input')
|
||||
args = parser.parse_args()
|
||||
args.out.mkdir(exist_ok=args.resume)
|
||||
model = ScreeningModel(args.source/'weights',
|
||||
json.loads((args.source/'model_config.json').read_text()), seconds=3600)
|
||||
if any(model.config['layer_types'][ix] != 'full_attention' for ix in SITES):
|
||||
raise ValueError('Scheduled layers must all have full attention')
|
||||
model.reuse_prefix = args.reuse_prefix
|
||||
tok = Tokenizer.from_file(str(args.source/'tokenizer.json'))
|
||||
data = {split: problems(split, n) for split, n in
|
||||
[('screen', 8), ('fit', 12), ('validation', 12), ('test', 32)]}
|
||||
prompts = [r['prompt'] for xs in data.values() for r in xs]
|
||||
if len(set(prompts)) != len(prompts):
|
||||
raise ValueError('Prompt sets overlap')
|
||||
manifest = args.out/'fixed-problems.json'
|
||||
collected = args.out/'screen-rows.json'
|
||||
if args.resume and manifest.exists() and json.loads(manifest.read_text()) != data:
|
||||
raise ValueError('Fixed prompts changed')
|
||||
write_json(manifest, data)
|
||||
rows = json.loads(collected.read_text()) if args.resume and collected.exists() else []
|
||||
if len(rows) % 4 or [r['id'] for r in rows] != [r['id'] for r in data['screen'][:len(rows)]]:
|
||||
raise ValueError('Existing screen does not match the fixed prompt sequence')
|
||||
for i in range(len(rows), len(data['screen']), 4):
|
||||
rows.extend(evaluate(model, tok, data['screen'][i:i+4]))
|
||||
write_json(args.out/'screen-rows.json', rows)
|
||||
print('screen', len(rows), flush=True)
|
||||
write_json(args.out/'screen-summary.json', summarize(rows))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,221 @@
|
||||
"""Freeze numeric tasks and screen the effect of sharing on complete answers."""
|
||||
import argparse
|
||||
from hashlib import sha256
|
||||
import json
|
||||
from pathlib import Path
|
||||
import random
|
||||
import re
|
||||
|
||||
import torch
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
from crossqkv.lisa_effect_screen import WORDS
|
||||
from crossqkv.lisa_generate import GenerationDecoder, generate
|
||||
from crossqkv.lisa_tail import TorchTail
|
||||
from functional.model import StreamingLM
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
TASKS = ('lookup', 'latest', 'addition', 'count')
|
||||
SEEDS = {'screen': 621001, 'fit': 621002, 'validation': 621003, 'test': 621004}
|
||||
COUNTS = {'screen': 8, 'fit': 24, 'validation': 8, 'test': 32}
|
||||
SCHEDULES = {'native': (), 'direct_3': (15, 19, 23),
|
||||
'direct_4': (11, 15, 19, 23), 'direct_5': (7, 11, 15, 19, 23)}
|
||||
STOP_TEXT = ('<|im_end|>', '<|endoftext|>')
|
||||
MAX_NEW_TOKENS = 24
|
||||
|
||||
|
||||
def fixed_problems():
|
||||
output = {}
|
||||
for split, seed in SEEDS.items():
|
||||
rng = random.Random(seed)
|
||||
rows = []
|
||||
for task in TASKS:
|
||||
for i in range(COUNTS[split]):
|
||||
if task in ('lookup', 'latest'):
|
||||
keys = rng.sample(WORDS, 12)
|
||||
values = rng.sample(range(20, 100), 12)
|
||||
pos = rng.randrange(len(keys))
|
||||
key = keys[pos]
|
||||
if task == 'latest':
|
||||
later = rng.randrange(1, len(keys))
|
||||
earlier = rng.randrange(later)
|
||||
keys[earlier] = keys[later]
|
||||
pos, key = later, keys[later]
|
||||
schedule = ', '.join(f'{k}={v}' for k, v in zip(keys, values))
|
||||
descriptor = 'last recorded' if task == 'latest' else 'recorded'
|
||||
question = f'Records in time order: {schedule}.\nWhat is the {descriptor} number for {key}?'
|
||||
answer = values[pos]
|
||||
elif task == 'addition':
|
||||
a, b = sorted((rng.randint(20, 89), rng.randint(20, 89)))
|
||||
question = f'What is {a} plus {b}?'
|
||||
answer = a + b
|
||||
else:
|
||||
first, second = rng.sample(WORDS, 2)
|
||||
answer = rng.randint(10, 15)
|
||||
values = [first] * answer + [second] * rng.randint(3, 9)
|
||||
rng.shuffle(values)
|
||||
question = f"Items: {', '.join(values)}.\nHow many items are exactly '{first}'?"
|
||||
rows.append({'id': f'{split}-{task}-{i:03}', 'task': task,
|
||||
'question': question, 'answer': answer})
|
||||
output[split] = rows
|
||||
# Arithmetic questions can repeat across independently seeded splits.
|
||||
# Keep the first generated occurrence and fill duplicates with new disjoint sums.
|
||||
used = set()
|
||||
replacement = random.Random(621005)
|
||||
for rows in output.values():
|
||||
for row in rows:
|
||||
while row['task'] == 'addition' and row['question'] in used:
|
||||
a, b = sorted((replacement.randint(20, 89), replacement.randint(20, 89)))
|
||||
row.update(question=f'What is {a} plus {b}?', answer=a+b)
|
||||
if row['question'] in used:
|
||||
raise ValueError('Prompt repeated across the frozen set')
|
||||
used.add(row['question'])
|
||||
return output
|
||||
|
||||
|
||||
def prompt(question):
|
||||
return ('<|im_start|>user\n' + question + '\nReply with the integer and no other text.'
|
||||
'<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n')
|
||||
|
||||
|
||||
def final_integer(text):
|
||||
# Only completed reasoning prefixes precede an answer.
|
||||
text = re.sub(r'\A\s*(?:<think>.*?</think>\s*)+', '', text, flags=re.S).strip()
|
||||
if '<think>' in text or '</think>' in text:
|
||||
return None
|
||||
match = re.fullmatch(r'(?:[Ff]inal answer:\s*|[Aa]nswer:\s*)?([+-]?\d+)\.?', text)
|
||||
if not match:
|
||||
match = re.search(r'(?:^|\n)\s*(?:[Ff]inal answer|[Aa]nswer):\s*([+-]?\d+)\.?\s*\Z', text)
|
||||
return int(match[1]) if match else None
|
||||
|
||||
|
||||
def grade(tokenizer, tokens, stop, expected):
|
||||
whole = tokenizer.decode(tokens, skip_special_tokens=False)
|
||||
body = tokenizer.decode(tokens[:-1] if stop == 'eos' else tokens,
|
||||
skip_special_tokens=False)
|
||||
value = final_integer(body) if stop == 'eos' else None
|
||||
return {'tokens': tokens, 'response': whole, 'stop': stop, 'answer': value,
|
||||
'correct': value == expected}
|
||||
|
||||
|
||||
def evaluate(model, tokenizer, examples, arms, adapters=None):
|
||||
stop_ids = {tokenizer.token_to_id(text) for text in STOP_TEXT}
|
||||
if None in stop_ids or len(stop_ids) != len(STOP_TEXT):
|
||||
raise ValueError('Unexpected tokenizer stop tokens')
|
||||
ids = [tokenizer.encode(prompt(x['question']), add_special_tokens=False).ids for x in examples]
|
||||
expanded = [x for x in ids for _ in arms]
|
||||
schedules = list(arms.values()) * len(examples)
|
||||
predictions = iter(generate(model, expanded, schedules, stop_ids, MAX_NEW_TOKENS, adapters))
|
||||
return [{'id': x['id'], 'task': x['task'], 'gold': x['answer'],
|
||||
'arms': {mode: grade(tokenizer, *next(predictions), x['answer']) for mode in arms}}
|
||||
for x in examples]
|
||||
|
||||
|
||||
def summarize(rows):
|
||||
results = {}
|
||||
for task in TASKS:
|
||||
group = [row for row in rows if row['task'] == task]
|
||||
results[task] = {}
|
||||
for name in SCHEDULES:
|
||||
original_correct = lambda row: row['arms']['native']['correct']
|
||||
produced_wrong = lambda row: row['arms'][name]['answer'] is not None and not row['arms'][name]['correct']
|
||||
results[task][name] = {
|
||||
'n': len(group),
|
||||
'correct': sum(row['arms'][name]['correct'] for row in group),
|
||||
'unscored': sum(row['arms'][name]['answer'] is None for row in group),
|
||||
'native_correct_to_wrong_integer': [
|
||||
row['id'] for row in group if original_correct(row) and produced_wrong(row)],
|
||||
}
|
||||
return results
|
||||
|
||||
|
||||
def choose(summary):
|
||||
options = []
|
||||
for task, arms in summary.items():
|
||||
if arms['native']['correct'] >= 6:
|
||||
for arm in ('direct_3', 'direct_4', 'direct_5'):
|
||||
losses = arms[arm]['native_correct_to_wrong_integer']
|
||||
if len(losses) >= 2:
|
||||
options.append((len(losses), arms['native']['correct'],
|
||||
len(SCHEDULES[arm]), task, arm))
|
||||
if not options:
|
||||
return None
|
||||
_, _, _, task, arm = max(options)
|
||||
return {'task': task, 'arm': arm, 'recipients': list(SCHEDULES[arm])}
|
||||
|
||||
|
||||
def fingerprint(path):
|
||||
return sha256(path.read_bytes()).hexdigest()
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--source', required=True, type=Path)
|
||||
parser.add_argument('--out', required=True, type=Path)
|
||||
parser.add_argument('--seconds', default=21600, type=int)
|
||||
parser.add_argument('--batch-prompts', default=2, type=int, choices=(1, 2))
|
||||
parser.add_argument('--execution-batch-prompts', type=int, choices=(1, 2),
|
||||
help='Use a different execution batch on resume after replaying completed rows')
|
||||
parser.add_argument('--preflight', action='store_true')
|
||||
args = parser.parse_args()
|
||||
torch.set_num_threads(1)
|
||||
args.out.mkdir(exist_ok=True)
|
||||
files = {name: fingerprint(args.source/name) for name in
|
||||
('manifest.json', 'model_config.json', 'tokenizer.json')}
|
||||
protocol = {'weights': files, 'schedules': SCHEDULES, 'cap': MAX_NEW_TOKENS,
|
||||
'stops': STOP_TEXT, 'batch_prompts': args.batch_prompts,
|
||||
'decode': 'full vocabulary greedy, closed thinking prefix'}
|
||||
manifest = args.out/'frozen.json'
|
||||
frozen = {'protocol': protocol, 'problems': fixed_problems()}
|
||||
frozen = json.loads(json.dumps(frozen))
|
||||
if manifest.exists() and json.loads(manifest.read_text()) != frozen:
|
||||
raise ValueError('Frozen protocol or prompts changed')
|
||||
write_json(manifest, frozen)
|
||||
model = StreamingLM(args.source/'weights', json.loads((args.source/'model_config.json').read_text()),
|
||||
seconds=args.seconds, process_swap_limit_kib=None)
|
||||
tokenizer = Tokenizer.from_file(str(args.source/'tokenizer.json'))
|
||||
examples = frozen['problems']['screen']
|
||||
if args.preflight:
|
||||
ids = torch.tensor([tokenizer.encode(prompt(examples[0]['question']),
|
||||
add_special_tokens=False).ids])
|
||||
hidden = torch.from_numpy(model.embedding(ids.numpy()))
|
||||
with torch.no_grad():
|
||||
expected, _ = TorchTail(model, 0)(hidden, None, torch.tensor([ids.shape[1]]),
|
||||
'native', ())
|
||||
decoder = GenerationDecoder(model, [()], [0])
|
||||
decoder.advance(ids[:, :-2])
|
||||
actual = decoder.advance(ids[:, -2:])
|
||||
ref = expected[:, -2:]
|
||||
torch.testing.assert_close(actual, ref, atol=8e-5, rtol=7e-5)
|
||||
write_json(args.out/'preflight.json', {'prompt_id': examples[0]['id'],
|
||||
'prompt_tokens': ids.shape[1], 'tail_hidden_max_abs': float((actual-ref).abs().max())})
|
||||
return
|
||||
path = args.out/'screen-rows.json'
|
||||
rows = json.loads(path.read_text()) if path.exists() else []
|
||||
if [r['id'] for r in rows] != [x['id'] for x in examples[:len(rows)]]:
|
||||
raise ValueError('Existing screen results do not match frozen prompts')
|
||||
batch = args.execution_batch_prompts or args.batch_prompts
|
||||
if batch != args.batch_prompts:
|
||||
if len(rows) < batch:
|
||||
raise ValueError('The alternate batch requires enough already evaluated prompts for replay')
|
||||
replay = evaluate(model, tokenizer, examples[:batch], SCHEDULES)
|
||||
if replay != rows[:batch]:
|
||||
raise ValueError('Alternate batch changed the first completed token streams')
|
||||
write_json(args.out/'execution-batch-replay.json',
|
||||
{'frozen_sha256': fingerprint(manifest), 'batch_prompts': batch,
|
||||
'matched_rows': [row['id'] for row in replay]})
|
||||
print('validated execution batch', batch, flush=True)
|
||||
for start in range(len(rows), len(examples), batch):
|
||||
rows.extend(evaluate(model, tokenizer, examples[start:start+batch], SCHEDULES))
|
||||
write_json(path, rows)
|
||||
print('screen complete', len(rows), '/', len(examples), flush=True)
|
||||
summary = summarize(rows)
|
||||
write_json(args.out/'screen-summary.json', summary)
|
||||
write_json(args.out/'selection.json', {'frozen_sha256': fingerprint(manifest),
|
||||
'screen_sha256': fingerprint(path),
|
||||
'chosen': choose(summary)})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,223 @@
|
||||
"""Fit LiSA on a development-selected schedule, then evaluate fresh continuations."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
from crossqkv.lisa_effect_audit import paired
|
||||
from crossqkv.lisa_full_answer import (SCHEDULES, STOP_TEXT, choose, evaluate, fingerprint,
|
||||
prompt, summarize)
|
||||
from crossqkv.lisa_tail import TorchTail, weight_chunks
|
||||
from crossqkv.lisa_train import LearnableSharingAttention, huber_distillation, language_model_loss
|
||||
from functional.model import PREFIX, StreamingLM
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
class FitCapture(TorchTail):
|
||||
def norm(self, x, name, centered=True):
|
||||
if name == f'layers.{self.sites[0]}.input_layernorm':
|
||||
self.residual = x
|
||||
return super().norm(x, name, centered)
|
||||
|
||||
|
||||
def load_locked(source, screen):
|
||||
fixed = screen/'frozen.json'
|
||||
rows = screen/'screen-rows.json'
|
||||
chosen = json.loads((screen/'selection.json').read_text())
|
||||
if (chosen['frozen_sha256'] != fingerprint(fixed)
|
||||
or chosen['screen_sha256'] != fingerprint(rows)):
|
||||
raise ValueError('Locked screening hashes do not match')
|
||||
manifest = json.loads(fixed.read_text())
|
||||
screen_rows = json.loads(rows.read_text())
|
||||
expected = [(x['id'], x['task'], x['answer']) for x in manifest['problems']['screen']]
|
||||
if [(x['id'], x['task'], x['gold']) for x in screen_rows] != expected:
|
||||
raise ValueError('Screening did not evaluate the frozen development set')
|
||||
expected_selection = choose(summarize(screen_rows))
|
||||
if expected_selection is None or chosen['chosen'] != expected_selection:
|
||||
raise ValueError('Development screen did not produce a qualifying schedule')
|
||||
for name, digest in manifest['protocol']['weights'].items():
|
||||
if fingerprint(source/name) != digest:
|
||||
raise ValueError(f'Model input {name} changed')
|
||||
return chosen, manifest
|
||||
|
||||
|
||||
def verified_fit_captures(source, fit):
|
||||
"""Verify the frozen fit inputs and return their archives by question ID."""
|
||||
captures = source/'fit-capture'
|
||||
receipt = source/'verified-fit-capture.json'
|
||||
if fingerprint(receipt) != '682bc035a5bed9f9245f589cacf3e9616300e8bf5e85d3743b1264a56360fa55':
|
||||
raise ValueError('Capture receipt mismatch')
|
||||
records = json.loads(receipt.read_text())['records']
|
||||
if ([r['id'] for r in records] != [r['id'] for r in fit] or
|
||||
sorted(x.name for x in captures.glob('*.npz')) != [r['file'] for r in records]):
|
||||
raise ValueError('Unexpected capture set')
|
||||
for row in records:
|
||||
if fingerprint(captures/row['file']) != row['sha256']:
|
||||
raise ValueError('Fit capture mismatch')
|
||||
return {r['id']: captures/r['file'] for r in records}
|
||||
|
||||
|
||||
@torch.no_grad()
|
||||
def capture(model, tokenizer, fit_examples, directory):
|
||||
directory.mkdir(exist_ok=True)
|
||||
teacher = FitCapture(model, 0)
|
||||
teacher.sites = model.sites
|
||||
for i, row in enumerate(fit_examples):
|
||||
path = directory/f'{i:03}.npz'
|
||||
if path.exists():
|
||||
continue
|
||||
text = prompt(row['question'])
|
||||
base = tokenizer.encode(text, add_special_tokens=False).ids
|
||||
complete = tokenizer.encode(text + str(row['answer']) + STOP_TEXT[0],
|
||||
add_special_tokens=False).ids
|
||||
if complete[:len(base)] != base or len(complete) <= len(base):
|
||||
raise ValueError('Answer did not tokenize as an extension of the frozen prompt')
|
||||
ids = np.array([complete])
|
||||
model.guard()
|
||||
hidden = torch.from_numpy(model.embedding(ids))
|
||||
_, side = teacher(hidden, None, torch.tensor([len(complete)]), 'native', ())
|
||||
pending = path.with_suffix('.tmp.npz')
|
||||
np.savez(pending, ids=ids, start=[len(base)], residual=teacher.residual.numpy(),
|
||||
donor=side[model.sites[0]-4][0].numpy(),
|
||||
teacher=np.stack([side[i][0].numpy() for i in model.sites]))
|
||||
pending.replace(path)
|
||||
print('fit capture', i+1, '/', len(fit_examples), flush=True)
|
||||
|
||||
|
||||
def checkpoint(path, obj):
|
||||
pending = path.with_suffix('.tmp')
|
||||
torch.save(obj, pending)
|
||||
pending.replace(path)
|
||||
|
||||
|
||||
def train(model, tokenizer, out, split, epochs, rank, *, adapters=None, captures=None):
|
||||
if adapters is None:
|
||||
c = model.config
|
||||
rope = c['rope_parameters']
|
||||
adapters = {i: LearnableSharingAttention(c['hidden_size'], c['num_attention_heads'],
|
||||
c['num_key_value_heads'], rank, rope['rope_theta'], rope['partial_rotary_factor'],
|
||||
bias=c.get('attention_bias', False)) for i in model.sites}
|
||||
tail = TorchTail(model, model.sites[0], adapters)
|
||||
optim = torch.optim.AdamW(tail.parameters(), lr=.0003, weight_decay=.1)
|
||||
last = out/'resume.pt'
|
||||
selected = out/'lisa.pt'
|
||||
state = {'epoch': 0, 'steps': [], 'trace': [], 'best_correct': -1}
|
||||
if last.exists():
|
||||
state = torch.load(last, weights_only=True, map_location='cpu')
|
||||
tail.adapters.load_state_dict(state['parameters'])
|
||||
optim.load_state_dict(state['optimizer'])
|
||||
|
||||
embedding = model.tensors[PREFIX+'embed_tokens.weight']
|
||||
|
||||
def vocab():
|
||||
start = 0
|
||||
for w in weight_chunks(embedding, 0, embedding.shape[0], rows=1024):
|
||||
yield start, w
|
||||
start += len(w)
|
||||
|
||||
paths = sorted((captures or out/'fit-capture').glob('*.npz'))
|
||||
for epoch in range(state['epoch'], epochs):
|
||||
for path in paths[len(state['steps']):]:
|
||||
with np.load(path, allow_pickle=False) as entry:
|
||||
b = {key: torch.from_numpy(entry[key]) for key in entry.files}
|
||||
lengths = torch.tensor([b['ids'].shape[1]])
|
||||
optim.zero_grad(set_to_none=True)
|
||||
h, side = tail(b['residual'], b['donor'], lengths, 'lisa', model.sites)
|
||||
kd = torch.stack([huber_distillation(side[i][0], t, lengths)
|
||||
for i, t in zip(model.sites, b['teacher'])]).mean()
|
||||
ce = language_model_loss(h, b['ids'], lengths, vocab, completion_starts=b['start'])
|
||||
loss = .25*kd + .75*ce
|
||||
loss.backward()
|
||||
if any(p.grad is None or not torch.isfinite(p.grad).all() for p in tail.parameters()):
|
||||
raise FloatingPointError('Nonfinite LiSA gradient')
|
||||
optim.step()
|
||||
state['steps'].append({'capture': path.name, 'huber': float(kd.detach()),
|
||||
'completion_ce': float(ce.detach())})
|
||||
checkpoint(last, {**state, 'parameters': tail.adapters.state_dict(),
|
||||
'optimizer': optim.state_dict()})
|
||||
print('fit epoch', epoch+1, 'step', len(state['steps']), '/', len(paths), flush=True)
|
||||
val = []
|
||||
for start in range(0, len(split['validation']), 2):
|
||||
val.extend(evaluate(model, tokenizer, split['validation'][start:start+2],
|
||||
{'lisa': model.sites}, adapters))
|
||||
correct = sum(x['arms']['lisa']['correct'] for x in val)
|
||||
if correct > state['best_correct']:
|
||||
state['best_correct'] = correct
|
||||
state['best_epoch'] = epoch+1
|
||||
state['best_parameters'] = {
|
||||
name: param.detach().clone() for name, param in tail.adapters.state_dict().items()
|
||||
}
|
||||
state['trace'].append({'epoch': epoch+1, 'steps': state['steps'], 'validation': val})
|
||||
state['steps'] = []
|
||||
state['epoch'] = epoch+1
|
||||
checkpoint(last, {**state, 'parameters': tail.adapters.state_dict(),
|
||||
'optimizer': optim.state_dict()})
|
||||
write_json(out/'trace.json', {'selected_epoch': state['best_epoch'], 'epochs': state['trace']})
|
||||
checkpoint(selected, state['best_parameters'])
|
||||
tail.adapters.load_state_dict(state['best_parameters'])
|
||||
return adapters
|
||||
|
||||
|
||||
def audit(rows):
|
||||
correct = {name: np.array([r['arms'][name]['correct'] for r in rows])
|
||||
for name in ('native', 'direct', 'lisa')}
|
||||
bad_value = [r for r in rows if r['arms']['native']['correct']
|
||||
and r['arms']['direct']['answer'] is not None and not r['arms']['direct']['correct']]
|
||||
return {'n': len(rows), 'correct': {name: int(x.sum()) for name, x in correct.items()},
|
||||
'substantive_loss_ids': [r['id'] for r in bad_value],
|
||||
'substantive_rescued_ids': [r['id'] for r in bad_value if r['arms']['lisa']['correct']],
|
||||
'unscored': {name: sum(r['arms'][name]['answer'] is None for r in rows) for name in correct},
|
||||
**paired(correct['native'], correct['direct'], correct['lisa'])}
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__)
|
||||
for path in ('source', 'screen', 'out'):
|
||||
p.add_argument('--'+path, type=Path, required=True)
|
||||
p.add_argument('--epochs', type=int, default=2)
|
||||
args = p.parse_args()
|
||||
if args.epochs < 1:
|
||||
p.error('--epochs must be positive')
|
||||
torch.set_num_threads(1)
|
||||
torch.manual_seed(621011)
|
||||
locked, manifest = load_locked(args.source, args.screen)
|
||||
selection = locked['chosen']
|
||||
sites = tuple(selection['recipients'])
|
||||
if sites != SCHEDULES[selection['arm']]:
|
||||
raise ValueError('Unexpected selected schedule')
|
||||
spec = {'screen': locked, 'epochs': args.epochs, 'rank': 40, 'seed': 621011,
|
||||
'objective': '0.25 teacher attention Huber + 0.75 full-vocabulary completion CE'}
|
||||
args.out.mkdir(exist_ok=True)
|
||||
run = args.out/'train-spec.json'
|
||||
if run.exists() and json.loads(run.read_text()) != spec:
|
||||
raise ValueError('Cannot resume with a different experiment definition')
|
||||
write_json(run, spec)
|
||||
tasks = {name: [r for r in rows if r['task'] == selection['task']]
|
||||
for name, rows in manifest['problems'].items()}
|
||||
model = StreamingLM(args.source/'weights', json.loads((args.source/'model_config.json').read_text()),
|
||||
seconds=86400, process_swap_limit_kib=None)
|
||||
model.sites = sites
|
||||
tokenizer = Tokenizer.from_file(str(args.source/'tokenizer.json'))
|
||||
capture(model, tokenizer, tasks['fit'], args.out/'fit-capture')
|
||||
adapters = train(model, tokenizer, args.out, tasks, args.epochs, spec['rank'])
|
||||
output = args.out/'test-items.json'
|
||||
rows = json.loads(output.read_text()) if output.exists() else []
|
||||
if [r['id'] for r in rows] != [x['id'] for x in tasks['test'][:len(rows)]]:
|
||||
raise ValueError('Test continuation does not match the frozen rows')
|
||||
for start in range(len(rows), len(tasks['test']), 2):
|
||||
batch = tasks['test'][start:start+2]
|
||||
base = evaluate(model, tokenizer, batch, {'native': (), 'direct': sites})
|
||||
lisa = evaluate(model, tokenizer, batch, {'lisa': sites}, adapters)
|
||||
for x, y in zip(base, lisa):
|
||||
x['arms'].update(y['arms'])
|
||||
rows.extend(base)
|
||||
write_json(output, rows)
|
||||
print('test complete', len(rows), '/', len(tasks['test']), flush=True)
|
||||
write_json(args.out/'test-audit.json', audit(rows))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,73 @@
|
||||
"""Reconstruct complete-answer scores from the saved token streams."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
from crossqkv.lisa_full_answer import SCHEDULES, fingerprint, grade
|
||||
from crossqkv.lisa_full_answer_train import audit
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
def verify(tokenizer, protocol, expected, rows, arms, allow_prefix=False):
|
||||
"""Validate each recorded model answer against its frozen prompt and token IDs."""
|
||||
if not rows or len(rows) > len(expected) or (not allow_prefix and len(rows) != len(expected)):
|
||||
raise ValueError('Unexpected number of evaluated items')
|
||||
stop_ids = {tokenizer.token_to_id(text) for text in protocol['stops']}
|
||||
if None in stop_ids:
|
||||
raise ValueError('Missing stop token in the frozen tokenizer')
|
||||
for item, row in zip(expected, rows):
|
||||
if (row['id'], row['task'], row['gold']) != (item['id'], item['task'], item['answer']):
|
||||
raise ValueError(f"Unexpected row for {item['id']}")
|
||||
if set(row['arms']) != set(arms):
|
||||
raise ValueError(f"Unexpected arms for {item['id']}")
|
||||
for arm in arms:
|
||||
stored = row['arms'][arm]
|
||||
tokens = stored['tokens']
|
||||
if (not 0 < len(tokens) <= protocol['cap']
|
||||
or any(type(token) is not int or tokenizer.id_to_token(token) is None
|
||||
for token in tokens)
|
||||
or any(token in stop_ids for token in tokens[:-1])):
|
||||
raise ValueError(f"Invalid generated token stream for {item['id']} / {arm}")
|
||||
ended = tokens[-1] in stop_ids
|
||||
if not ended and len(tokens) != protocol['cap']:
|
||||
raise ValueError(f"Generation ended before a stop or the cap for {item['id']} / {arm}")
|
||||
score = grade(tokenizer, tokens, 'eos' if ended else 'max_new_tokens', item['answer'])
|
||||
if stored != score:
|
||||
raise ValueError(f"Archived score does not match the tokens for {item['id']} / {arm}")
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
for name in ('tokenizer', 'frozen', 'rows', 'out'):
|
||||
parser.add_argument('--'+name, required=True, type=Path)
|
||||
parser.add_argument('--selection', type=Path, help='Verify the selected task on the test split')
|
||||
parser.add_argument('--allow-screen-prefix', action='store_true')
|
||||
args = parser.parse_args()
|
||||
if args.selection and args.allow_screen_prefix:
|
||||
parser.error('Test verification requires all frozen test rows')
|
||||
frozen = json.loads(args.frozen.read_bytes())
|
||||
protocol = frozen['protocol']
|
||||
if fingerprint(args.tokenizer) != protocol['weights']['tokenizer.json']:
|
||||
raise ValueError('Tokenizer differs from the frozen experiment')
|
||||
rows = json.loads(args.rows.read_bytes())
|
||||
tokenizer = Tokenizer.from_file(str(args.tokenizer))
|
||||
report = {'frozen_sha256': fingerprint(args.frozen), 'rows_sha256': fingerprint(args.rows),
|
||||
'rows_verified': len(rows)}
|
||||
if args.selection:
|
||||
chosen = json.loads(args.selection.read_bytes())
|
||||
if chosen['frozen_sha256'] != report['frozen_sha256']:
|
||||
raise ValueError('Selection points to a different frozen manifest')
|
||||
expected = [item for item in frozen['problems']['test']
|
||||
if item['task'] == chosen['chosen']['task']]
|
||||
verify(tokenizer, protocol, expected, rows, ('native', 'direct', 'lisa'))
|
||||
report['final_answer_audit'] = audit(rows)
|
||||
else:
|
||||
verify(tokenizer, protocol, frozen['problems']['screen'], rows, SCHEDULES,
|
||||
allow_prefix=args.allow_screen_prefix)
|
||||
write_json(args.out, report)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,131 @@
|
||||
"""Cached autoregressive Qwen text generation for the LiSA comparisons."""
|
||||
import math
|
||||
|
||||
import torch
|
||||
from torch.nn import functional as F
|
||||
|
||||
from crossqkv.lisa_tail import TorchTail, rotate, weight_chunks
|
||||
from functional.model import PREFIX
|
||||
|
||||
|
||||
class GenerationDecoder(TorchTail):
|
||||
"""Share the previous full-attention layer's actual scores per batch lane."""
|
||||
|
||||
def __init__(self, source, schedules, padding, adapters=None):
|
||||
super().__init__(source, 0, adapters)
|
||||
full = [i for i, kind in enumerate(self.c['layer_types']) if kind == 'full_attention']
|
||||
if (len(schedules) != len(padding) or not schedules
|
||||
or any(set(sites) - set(full[1:]) for sites in schedules)):
|
||||
raise ValueError('Recipients need an earlier full-attention layer')
|
||||
if self.adapters and any(tuple(sites) != tuple(map(int, self.adapters)) for sites in schedules):
|
||||
raise ValueError('LiSA decoding requires one shared schedule for the batch')
|
||||
self.padding = torch.tensor(padding)
|
||||
self.share = {i: torch.tensor([i in sites for sites in schedules])[:, None, None, None]
|
||||
for i in set().union(*schedules)}
|
||||
self.position = 0
|
||||
self.states = {}
|
||||
|
||||
def attention_chunk(self, h, layer, positions, allowed, donor):
|
||||
heads, kv, dim = (self.c[k] for k in
|
||||
('num_attention_heads', 'num_key_value_heads', 'head_dim'))
|
||||
p = f'layers.{layer}.self_attn.'
|
||||
adapter = self.adapters[str(layer)] if str(layer) in self.adapters else None
|
||||
if adapter is None:
|
||||
q, gate = self.linear(h, p+'q_proj').unflatten(-1, (heads, 2*dim)).chunk(2, -1)
|
||||
k = self.linear(h, p+'k_proj').unflatten(-1, (kv, dim))
|
||||
rope = self.c['rope_parameters']
|
||||
q = rotate(self.norm(q, p+'q_norm'), rope['rope_theta'],
|
||||
rope['partial_rotary_factor'], positions)
|
||||
k = rotate(self.norm(k, p+'k_norm'), rope['rope_theta'],
|
||||
rope['partial_rotary_factor'], positions)
|
||||
else:
|
||||
gate = self.gate_only(h, p)
|
||||
q = adapter.rotate(adapter.q_proj(h).unflatten(-1, (heads, adapter.rank)), positions)
|
||||
k = adapter.rotate(adapter.k_proj(h).unflatten(-1, (kv, adapter.rank)), positions)
|
||||
v = self.linear(h, p+'v_proj').unflatten(-1, (kv, dim))
|
||||
if layer in self.states:
|
||||
prior_k, prior_v = self.states[layer]
|
||||
k = torch.cat((prior_k, k), dim=1)
|
||||
v = torch.cat((prior_v, v), dim=1)
|
||||
self.states[layer] = k, v
|
||||
repeats = heads // kv
|
||||
scores = torch.einsum('bthd,bshd->bhts', q, k.repeat_interleave(repeats, 2))
|
||||
scores = scores / math.sqrt(q.shape[-1])
|
||||
if adapter is not None:
|
||||
both = torch.cat((scores, donor), dim=1).permute(0, 2, 3, 1)
|
||||
scores = adapter.fuse(both).permute(0, 3, 1, 2)
|
||||
elif layer in self.share:
|
||||
scores = torch.where(self.share[layer], donor, scores)
|
||||
weights = scores.masked_fill(~allowed, -torch.inf).softmax(dim=-1)
|
||||
context = torch.einsum('bhts,bshd->bthd', weights, v.repeat_interleave(repeats, 2))
|
||||
return self.linear((context * gate.sigmoid()).flatten(-2), p+'o_proj'), scores
|
||||
|
||||
@torch.no_grad()
|
||||
def advance(self, ids):
|
||||
"""Consume a prompt or continuation and return the final-normalized states."""
|
||||
stop = self.position + ids.shape[1]
|
||||
queries = torch.arange(self.position, stop)
|
||||
keys = torch.arange(stop)
|
||||
positions = (queries[None, :] - self.padding[:, None]).clamp_min(0)
|
||||
q_valid = queries[None, :] >= self.padding[:, None]
|
||||
k_valid = keys[None, :] >= self.padding[:, None]
|
||||
allowed = (queries[:, None] >= keys)[None, None] & (
|
||||
k_valid[:, None, None, :] | ~q_valid[:, None, :, None])
|
||||
h = torch.from_numpy(self.source.embedding(ids.numpy())) * q_valid[..., None]
|
||||
donor = None
|
||||
trim = getattr(self.source, 'malloc_trim', None)
|
||||
for layer, kind in enumerate(self.c['layer_types']):
|
||||
if hasattr(self.source, 'guard'):
|
||||
self.source.guard()
|
||||
p = f'layers.{layer}.'
|
||||
n = self.norm(h, p+'input_layernorm')
|
||||
if kind == 'full_attention':
|
||||
out, donor = self.attention_chunk(n, layer, positions, allowed, donor)
|
||||
else:
|
||||
out, self.states[layer] = self.linear_attention_chunk(n, layer, self.states.get(layer))
|
||||
h = h + out
|
||||
n = self.norm(h, p+'post_attention_layernorm')
|
||||
activation = F.silu(self.linear(n, p+'mlp.gate_proj')) * self.linear(n, p+'mlp.up_proj')
|
||||
h = h + self.linear(activation, p+'mlp.down_proj')
|
||||
del n, out, activation
|
||||
if trim is not None:
|
||||
trim(0)
|
||||
self.position = stop
|
||||
return self.norm(h, 'norm')
|
||||
|
||||
|
||||
def greedy_tokens(hidden, embedding):
|
||||
"""Take the argmax over the complete tied vocabulary in bounded blocks."""
|
||||
peak = hidden.new_full((len(hidden),), -torch.inf)
|
||||
ids = torch.zeros(len(hidden), dtype=torch.long)
|
||||
start = 0
|
||||
for weight in weight_chunks(embedding, 0, embedding.shape[0], rows=1024):
|
||||
score, arg = F.linear(hidden, weight).max(dim=-1)
|
||||
ids = torch.where(score > peak, arg + start, ids)
|
||||
peak = torch.maximum(peak, score)
|
||||
start += len(weight)
|
||||
if not torch.isfinite(peak).all():
|
||||
raise FloatingPointError('Non-finite next-token score')
|
||||
return ids
|
||||
|
||||
|
||||
@torch.no_grad()
|
||||
def generate(source, prompts, schedules, stop_tokens, max_new_tokens, adapters=None):
|
||||
width = max(map(len, prompts))
|
||||
padding = [width - len(prompt) for prompt in prompts]
|
||||
seed = torch.tensor([[0] * n + prompt for prompt, n in zip(prompts, padding)])
|
||||
decoder = GenerationDecoder(source, schedules, padding, adapters)
|
||||
head = source.tensors[PREFIX+'embed_tokens.weight']
|
||||
state = decoder.advance(seed)[:, -1]
|
||||
output = [[] for _ in prompts]
|
||||
finished = [False] * len(prompts)
|
||||
for step in range(max_new_tokens):
|
||||
ids = greedy_tokens(state, head)
|
||||
for row, token in enumerate(ids.tolist()):
|
||||
if not finished[row]:
|
||||
output[row].append(token)
|
||||
finished[row] = token in stop_tokens
|
||||
if all(finished) or step + 1 == max_new_tokens:
|
||||
break
|
||||
state = decoder.advance(ids[:, None])[:, -1]
|
||||
return [(tokens, 'eos' if done else 'max_new_tokens') for tokens, done in zip(output, finished)]
|
||||
@@ -0,0 +1,153 @@
|
||||
"""Compare diagnostic rank allocation and uniform ranks under matched training."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import torch
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
from crossqkv.lisa_combination_screen import ADAPTER_SHA, SITES
|
||||
from crossqkv.lisa_effect_answer_audit import vocabulary_scores
|
||||
from crossqkv.lisa_full_answer import STOP_TEXT, fingerprint, prompt
|
||||
from crossqkv.lisa_full_answer_train import FitCapture, load_locked, train, verified_fit_captures
|
||||
from crossqkv.lisa_tail import TorchTail
|
||||
from crossqkv.lisa_train import LearnableSharingAttention
|
||||
from functional.model import PREFIX, StreamingLM
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
def assignments(protocol, directory):
|
||||
expected = [(q['id'], q['answer']) for q in protocol['splits']['diagnostic']]
|
||||
scores = {}
|
||||
for label in ('baseline', *(f'restore-{i}' for i in SITES)):
|
||||
rows = json.loads((directory/(label+'.json')).read_text())
|
||||
if [(r['id'], r['gold']) for r in rows] != expected:
|
||||
raise ValueError(f'Incomplete diagnostic arm {label}')
|
||||
scores[label] = sum(r['arms'][label]['correct'] for r in rows)
|
||||
ordered = sorted(SITES, key=lambda i: (-scores[f'restore-{i}'], i))
|
||||
selected = dict(zip(ordered, reversed(protocol['rank_budget'])))
|
||||
reverse = dict(zip(ordered, protocol['rank_budget']))
|
||||
return scores, {'allocated':selected, 'reversed':reverse, 'uniform':dict.fromkeys(SITES, 40)}
|
||||
|
||||
|
||||
def local_scores_only(module, args):
|
||||
local, donor = args[0].chunk(2, dim=-1)
|
||||
return (torch.cat((local, torch.zeros_like(donor)), dim=-1),)
|
||||
|
||||
|
||||
def make_adapters(config, ranks, shared):
|
||||
rope = config['rope_parameters']
|
||||
adapters = {i: LearnableSharingAttention(config['hidden_size'], config['num_attention_heads'],
|
||||
config['num_key_value_heads'], ranks[i], rope['rope_theta'], rope['partial_rotary_factor'],
|
||||
bias=config.get('attention_bias', False)) for i in SITES}
|
||||
if not shared:
|
||||
for adapter in adapters.values():
|
||||
adapter.fuse.register_forward_pre_hook(local_scores_only)
|
||||
return adapters
|
||||
|
||||
|
||||
def score_gold_answers(outputs, sequences, starts, embedding):
|
||||
gold = [ids[first:] for ids, first in zip(sequences, starts)]
|
||||
targets = torch.tensor([token for answer in gold for token in answer])
|
||||
sizes = [len(answer) for answer in gold]
|
||||
vectors = torch.cat([out[i, first-1:len(ids)-1] for out in outputs.values()
|
||||
for i, (ids, first) in enumerate(zip(sequences, starts))])
|
||||
_, nll = vocabulary_scores(vectors, targets.repeat(len(outputs)), embedding)
|
||||
if not torch.isfinite(nll).all():
|
||||
raise FloatingPointError('Invalid full-vocabulary diagnostic score')
|
||||
scores = [{} for _ in gold]
|
||||
for label, values in zip(outputs, nll.split(len(targets))):
|
||||
for row, part in zip(scores, values.split(sizes)):
|
||||
row[label] = (-part).tolist()
|
||||
return gold, scores
|
||||
|
||||
|
||||
@torch.no_grad()
|
||||
def diagnostic_log_probs(model, tok, weights, questions, path):
|
||||
"""Teacher-force gold answers; all restorations share the same frozen stem."""
|
||||
if fingerprint(weights) != ADAPTER_SHA:
|
||||
raise ValueError('Unexpected diagnostic checkpoint')
|
||||
adapters = make_adapters(model.config, dict.fromkeys(SITES, 40), True)
|
||||
tail = TorchTail(model, SITES[0], adapters)
|
||||
tail.adapters.load_state_dict(torch.load(weights, weights_only=True, map_location='cpu'))
|
||||
native = FitCapture(model, 0)
|
||||
native.sites = SITES
|
||||
rows = json.loads(path.read_text()) if path.exists() else []
|
||||
if [r['id'] for r in rows] != [q['id'] for q in questions[:len(rows)]]:
|
||||
raise ValueError('Unexpected gold-score prefix')
|
||||
for start in range(len(rows), len(questions), 2):
|
||||
batch = questions[start:start+2]
|
||||
sequences, starts = [], []
|
||||
for item in batch:
|
||||
text = prompt(item['question'])
|
||||
base = tok.encode(text, add_special_tokens=False).ids
|
||||
ids = tok.encode(text + str(item['answer']) + STOP_TEXT[0], add_special_tokens=False).ids
|
||||
if ids[:len(base)] != base or len(ids) <= len(base):
|
||||
raise ValueError('Gold answer is not an extension of its prompt')
|
||||
sequences.append(ids)
|
||||
starts.append(len(base))
|
||||
lengths = torch.tensor([len(ids)-1 for ids in sequences])
|
||||
width = int(lengths.max())
|
||||
padded = torch.tensor([ids[:-1] + [0]*(width-len(ids)+1) for ids in sequences])
|
||||
h = torch.from_numpy(model.embedding(padded.numpy()))
|
||||
original, maps = native(h, None, lengths, 'native', ())
|
||||
outputs = {'native':original}
|
||||
for restored in (None, *SITES):
|
||||
sites = tuple(i for i in SITES if i != restored)
|
||||
label = 'baseline' if restored is None else f'restore-{restored}'
|
||||
outputs[label], _ = tail(native.residual, maps[SITES[0]-4][0], lengths, 'lisa', sites)
|
||||
gold_tokens, log_probs = score_gold_answers(outputs, sequences, starts,
|
||||
model.tensors[PREFIX+'embed_tokens.weight'])
|
||||
results = [{'id': item['id'], 'gold': item['answer'], 'tokens': gold, 'log_probs': scores}
|
||||
for item, gold, scores in zip(batch, gold_tokens, log_probs)]
|
||||
rows.extend(results)
|
||||
write_json(path, rows)
|
||||
print('diagnostic gold sequence', len(rows), '/', len(questions), flush=True)
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__)
|
||||
for name in ('source','prior','out'):
|
||||
p.add_argument('--'+name, type=Path, required=True)
|
||||
args = p.parse_args()
|
||||
torch.set_num_threads(1)
|
||||
protocol_file = args.out/'protocol.json'
|
||||
if fingerprint(protocol_file) != '6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef':
|
||||
raise ValueError('Protocol mismatch')
|
||||
protocol = json.loads(protocol_file.read_text())
|
||||
scores, ranks = assignments(protocol,args.out)
|
||||
_, prior = load_locked(args.source,args.prior)
|
||||
source = args.prior/'final'
|
||||
captures = source/'fit-capture'
|
||||
fit = [r for r in prior['problems']['fit'] if r['task']=='lookup']
|
||||
verified_fit_captures(source, fit)
|
||||
config = json.loads((args.source/'model_config.json').read_text())
|
||||
tok = Tokenizer.from_file(str(args.source/'tokenizer.json'))
|
||||
diagnostic_model = StreamingLM(args.source/'weights', config, seconds=172800, process_swap_limit_kib=None)
|
||||
diagnostic_log_probs(diagnostic_model, tok, source/'lisa.pt', protocol['splits']['diagnostic'],
|
||||
args.out/'diagnostic-gold-log-probs.json')
|
||||
del diagnostic_model
|
||||
arms = [('allocated',True),('uniform',True),('reversed',True),
|
||||
('uniform',False),('allocated',False)]
|
||||
for allocation, shared in arms:
|
||||
label = ('shared-' if shared else 'local-')+allocation
|
||||
out = args.out/label
|
||||
out.mkdir(exist_ok=True)
|
||||
torch.manual_seed(621011)
|
||||
model = StreamingLM(args.source/'weights',config,seconds=172800,process_swap_limit_kib=None)
|
||||
model.sites = SITES
|
||||
adapters = make_adapters(model.config, ranks[allocation], shared)
|
||||
count = sum(p.numel() for adapter in adapters.values() for p in adapter.parameters())
|
||||
spec = {'diagnostic_correct':scores,'ranks':{str(k):v for k,v in ranks[allocation].items()},
|
||||
'shared':shared,'parameters':count,'seed':621011,'epochs':2}
|
||||
path = out/'config.json'
|
||||
if count != 2476032 or (path.exists() and json.loads(path.read_text()) != spec):
|
||||
raise ValueError('Unmatched rank budget or run configuration')
|
||||
write_json(path,spec)
|
||||
if not (out/'lisa.pt').exists():
|
||||
train(model,tok,out,protocol['splits'],2,40,adapters=adapters,captures=captures)
|
||||
print(label,'finished',flush=True)
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
main()
|
||||
@@ -0,0 +1,103 @@
|
||||
"""Measure how much native attention score error extra rank can remove on frozen fit captures."""
|
||||
import argparse
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
from itertools import permutations
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
||||
RECEIPT_SHA = '682bc035a5bed9f9245f589cacf3e9616300e8bf5e85d3743b1264a56360fa55'
|
||||
RANKS = (32, 40, 48)
|
||||
|
||||
|
||||
def matrices(directory, record):
|
||||
data = (directory / record['file']).read_bytes()
|
||||
if hashlib.sha256(data).hexdigest() != record['sha256']:
|
||||
raise ValueError(f"Capture changed for {record['id']}")
|
||||
with np.load(io.BytesIO(data), allow_pickle=False) as capture:
|
||||
donor = capture['donor'][0].astype(np.float64)
|
||||
teachers = capture['teacher'][:, 0].astype(np.float64)
|
||||
length = capture['ids'].shape[1]
|
||||
start = int(capture['start'][0])
|
||||
if start != record['input_tokens'] or length - start != record['answer_and_eos_tokens']:
|
||||
raise ValueError(f"Unexpected token counts for {record['id']}")
|
||||
if teachers.shape != (3, 8, length, length) or donor.shape != teachers.shape[1:]:
|
||||
raise ValueError(f"Unexpected score shapes for {record['id']}")
|
||||
features = donor.reshape(8, -1).T
|
||||
features = np.column_stack((features, np.ones(length * length)))
|
||||
targets = teachers.reshape(24, -1).T
|
||||
return features, targets, length
|
||||
|
||||
|
||||
def layer_designs(donor, teachers, adjacent_native):
|
||||
for layer, target in enumerate(np.hsplit(teachers, 3)):
|
||||
if adjacent_native and layer:
|
||||
start = (layer - 1) * 8
|
||||
features = np.column_stack((teachers[:, start:start + 8], donor[:, -1]))
|
||||
else:
|
||||
features = donor
|
||||
yield features, target
|
||||
|
||||
|
||||
def measure(prior, adjacent_native=False):
|
||||
raw = (prior / 'verified-fit-capture.json').read_bytes()
|
||||
if hashlib.sha256(raw).hexdigest() != RECEIPT_SHA:
|
||||
raise ValueError('Expected the verified 24-example native score capture')
|
||||
receipt = json.loads(raw)
|
||||
records = receipt['records']
|
||||
sites = receipt['recipients']
|
||||
directory = prior / 'fit-capture'
|
||||
# Fit one affine donor-head map on each half of the training examples.
|
||||
gram = np.zeros((2, 3, 9, 9))
|
||||
cross = np.zeros((2, 3, 9, 8))
|
||||
for i, record in enumerate(records):
|
||||
donor, teachers, _ = matrices(directory, record)
|
||||
for layer, (x, y) in enumerate(layer_designs(donor, teachers, adjacent_native)):
|
||||
gram[i % 2, layer] += x.T @ x
|
||||
cross[i % 2, layer] += x.T @ y
|
||||
coefficients = np.linalg.solve(gram, cross)
|
||||
|
||||
rows = []
|
||||
for i, record in enumerate(records):
|
||||
donor, teachers, length = matrices(directory, record)
|
||||
errors = [(y - x @ coef).T.reshape(8, length, length)
|
||||
for (x, y), coef in zip(layer_designs(donor, teachers, adjacent_native),
|
||||
coefficients[1 - i % 2])]
|
||||
residual = np.stack(errors)
|
||||
singular_values = np.linalg.svd(residual, compute_uv=False)
|
||||
energy = singular_values**2
|
||||
np.testing.assert_allclose(energy.sum(-1), (residual**2).sum(axis=(-1, -2)), rtol=1e-10)
|
||||
rows.append({
|
||||
'id': record['id'], 'length': length,
|
||||
'mse': {str(site): {str(rank): float(energy[j, :, rank:].sum() / (8 * length**2))
|
||||
for rank in (0, *RANKS)} for j, site in enumerate(sites)}
|
||||
})
|
||||
|
||||
means = {str(site): {str(rank): float(np.mean([r['mse'][str(site)][str(rank)] for r in rows]))
|
||||
for rank in (0, *RANKS)} for site in sites}
|
||||
uniform = np.array([np.mean([row['mse'][str(site)]['40'] for site in sites]) for row in rows])
|
||||
configs = []
|
||||
for ranks in ((40, 40, 40), *permutations(RANKS)):
|
||||
errors = [np.mean([row['mse'][str(site)][str(rank)] for site, rank in zip(sites, ranks)])
|
||||
for row in rows]
|
||||
configs.append({'ranks': list(ranks), 'mean_mse': float(np.mean(errors)),
|
||||
'examples_below_uniform_mse': int(np.sum(errors < uniform))})
|
||||
return {
|
||||
'source_receipt_sha256': RECEIPT_SHA, 'split': 'fit', 'sites': sites,
|
||||
**({'native_donor_layers': [11, 15, 19]} if adjacent_native else {'donor_layer': 11}),
|
||||
'donor_fit': 'affine, opposite index parity',
|
||||
'metric': 'mean per-example, per-layer, per-head, all token-pair squared raw score residual',
|
||||
'mean_mse': means, 'configurations': configs, 'examples': rows
|
||||
}
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('prior_final', type=Path)
|
||||
parser.add_argument('--adjacent-native', action='store_true',
|
||||
help='Use each previous native full-attention layer as the donor')
|
||||
args = parser.parse_args()
|
||||
print(json.dumps(measure(args.prior_final, args.adjacent_native), indent=2, allow_nan=False))
|
||||
@@ -0,0 +1,200 @@
|
||||
"""Capture Qwen sequences and train/evaluate the complete last-layer LiSA method."""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
|
||||
from crossqkv.forward_search import encode, problems, SEEDS
|
||||
from crossqkv.lisa_pilot import DONOR, TARGET, Study
|
||||
from functional.run import write_json
|
||||
|
||||
BATCH = 4
|
||||
EPOCHS = 8
|
||||
RANK = 40
|
||||
|
||||
|
||||
def digest(path):
|
||||
return hashlib.sha256(path.read_bytes()).hexdigest()
|
||||
|
||||
|
||||
def capture(source, out):
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
model = Study(source / 'weights', json.loads((source / 'model_config.json').read_text()),
|
||||
seconds=3600)
|
||||
if TARGET != len(model.config['layer_types']) - 1:
|
||||
raise ValueError('Exact cached training requires the final layer as the only recipient')
|
||||
if any(model.config['layer_types'][i] != 'full_attention' for i in (DONOR, TARGET)):
|
||||
raise ValueError('Both sites must be full attention layers')
|
||||
model.capture_scores = True
|
||||
tokenizer = Tokenizer.from_file(str(source / 'tokenizer.json'))
|
||||
items = {split: problems(split) for split in SEEDS}
|
||||
write_json(out / 'problems.json', items)
|
||||
write_json(out / 'protocol.json', {
|
||||
'source_sha256': {name: digest(source / name) for name in
|
||||
('model_config.json', 'manifest.json', 'tokenizer.json')},
|
||||
'donor': DONOR, 'target': TARGET, 'rank_per_head': RANK, 'epochs': EPOCHS,
|
||||
'batch_size': BATCH, 'seed': 20261123, 'split_seeds': SEEDS,
|
||||
'optimizer': 'AdamW', 'learning_rate': .0003, 'weight_decay': .1,
|
||||
'objective': {'full_vocabulary_next_token_ce': .75, 'huber_delta_1': .25},
|
||||
})
|
||||
for split, rows in items.items():
|
||||
for start in range(0, len(rows), BATCH):
|
||||
batch = rows[start:start+BATCH]
|
||||
prefixes, lengths, labels = encode(tokenizer, batch)
|
||||
ids = np.pad(prefixes, ((0, 0), (0, 1)))
|
||||
gold = np.array([r['gold'] - 1 for r in batch])
|
||||
ids[np.arange(len(batch)), lengths] = np.asarray(labels)[gold]
|
||||
native, saved = model.forward(ids, capture=[('attn', TARGET)])
|
||||
rec = model.recipient
|
||||
np.savez(out / f'{split}-{start:02}.npz', ids=ids, lengths=lengths + 1,
|
||||
labels=labels, gold=gold, native=native, local=model.local,
|
||||
inp=saved[f'attn_{TARGET}'], donor=model.donor, teacher=model.teacher,
|
||||
values=rec['v'], gate=rec['gate'], residual=model.recipient_input)
|
||||
print(split, 'captured', start + len(batch), '/', len(rows), flush=True)
|
||||
|
||||
|
||||
def train(source, cache, out, linear_control):
|
||||
import torch
|
||||
|
||||
from crossqkv.forward_search_fit import LastLayer
|
||||
from crossqkv.lisa_train import (FrozenRecipient, LearnableSharingAttention, causal_attention,
|
||||
language_model_loss, objective)
|
||||
|
||||
torch.set_num_threads(1)
|
||||
torch.manual_seed(20261123)
|
||||
protocol = json.loads((cache / 'protocol.json').read_text())
|
||||
if any(digest(source / name) != sha for name, sha in protocol['source_sha256'].items()):
|
||||
raise ValueError('The cache does not match the selected source checkpoint')
|
||||
cfg = json.loads((source / 'model_config.json').read_text())['text_config']
|
||||
heads, kv = cfg['num_attention_heads'], cfg['num_key_value_heads']
|
||||
rp = cfg['rope_parameters']
|
||||
frozen = LastLayer(source)
|
||||
recipient = FrozenRecipient(frozen.weights, frozen.eps)
|
||||
adapter = LearnableSharingAttention(cfg['hidden_size'], heads, kv, RANK,
|
||||
rp['rope_theta'], rp['partial_rotary_factor'],
|
||||
bias=cfg.get('attention_bias', False))
|
||||
optimizer = torch.optim.AdamW(adapter.parameters(), lr=.0003, weight_decay=.1)
|
||||
t = frozen.embedding
|
||||
|
||||
def vocabulary():
|
||||
for start in range(0, t.shape[0], 1024):
|
||||
end = min(start + 1024, t.shape[0])
|
||||
yield start, torch.from_numpy(t.read(slice(start*t.shape[1], end*t.shape[1]))
|
||||
.reshape(end-start, t.shape[1]))
|
||||
t.evict()
|
||||
|
||||
def batches(split):
|
||||
for path in sorted(cache.glob(f'{split}-*.npz')):
|
||||
with np.load(path, allow_pickle=False) as data:
|
||||
yield {k: torch.from_numpy(data[k]) for k in data.files}
|
||||
|
||||
def adapter_scores(b):
|
||||
return adapter(b['inp'], b['donor'], torch.arange(b['ids'].shape[1])[None, :])
|
||||
|
||||
def decode(b, s):
|
||||
return recipient(causal_attention(s, b['values'], b['lengths']),
|
||||
b['gate'], b['residual'])
|
||||
|
||||
def losses(b, s, h):
|
||||
ce = language_model_loss(h, b['ids'], b['lengths'], vocabulary)
|
||||
total, kd = objective(s, b['teacher'], b['lengths'], ce)
|
||||
return total, ce, kd
|
||||
|
||||
def evaluate(split, modes, greedy=False):
|
||||
totals = {mode: [] for mode in modes}
|
||||
predictions = {mode: [] for mode in modes}
|
||||
with torch.no_grad():
|
||||
for b in batches(split):
|
||||
answer_at = b['lengths'] - 2
|
||||
valid = torch.arange(b['ids'].shape[1])[None, :] < b['lengths'][:, None]
|
||||
states = []
|
||||
for mode in modes:
|
||||
if mode == 'native':
|
||||
s = b['teacher']
|
||||
elif mode == 'direct':
|
||||
s = b['donor']
|
||||
elif mode == 'linear_joint':
|
||||
s = torch.einsum('bhts,hi->bits', torch.cat((b['donor'], b['local']), 1),
|
||||
linear_matrix)
|
||||
else:
|
||||
s = adapter_scores(b)
|
||||
h = decode(b, s)
|
||||
if mode == 'native':
|
||||
torch.testing.assert_close(h[valid], b['native'][valid], atol=4e-5, rtol=3e-5)
|
||||
loss = losses(b, s, h)
|
||||
totals[mode].append((int((b['lengths'] - 1).sum()),
|
||||
sum(int(n)**2 for n in b['lengths']),
|
||||
*map(float, loss)))
|
||||
states.append(h[torch.arange(len(answer_at)), answer_at].numpy())
|
||||
if greedy:
|
||||
preds = np.split(frozen.greedy(np.concatenate(states)), len(modes))
|
||||
labels = b['labels'][b['gold']].numpy()
|
||||
for mode, pred in zip(modes, preds):
|
||||
predictions[mode].extend((pred == labels).tolist())
|
||||
results = {}
|
||||
for mode, rows in totals.items():
|
||||
if not rows:
|
||||
raise ValueError(f'No complete capture batches for {split}')
|
||||
n = sum(r[0] for r in rows)
|
||||
pairs = sum(r[1] for r in rows)
|
||||
ce = sum(r[0] * r[3] for r in rows) / n
|
||||
kd = sum(r[1] * r[4] for r in rows) / pairs
|
||||
results[mode] = {'ce': ce, 'huber': kd, 'objective': .75 * ce + .25 * kd,
|
||||
'tokens': n, 'greedy_correct': sum(predictions[mode]),
|
||||
'greedy_n': len(predictions[mode])}
|
||||
return results
|
||||
|
||||
linear = json.loads(linear_control.read_text())['weights']['linear_joint']
|
||||
linear_matrix = torch.tensor(linear, dtype=torch.float32)
|
||||
trace = []
|
||||
best = float('inf')
|
||||
for epoch in range(EPOCHS):
|
||||
step_losses = []
|
||||
for batch in batches('fit'):
|
||||
optimizer.zero_grad(set_to_none=True)
|
||||
scores = adapter_scores(batch)
|
||||
loss = losses(batch, scores, decode(batch, scores))
|
||||
loss[0].backward()
|
||||
if any(p.grad is None or not torch.isfinite(p.grad).all() for p in adapter.parameters()):
|
||||
raise FloatingPointError('Invalid adapter gradient')
|
||||
optimizer.step()
|
||||
step_losses.append(list(map(lambda x: float(x.detach()), loss)))
|
||||
validation = evaluate('validation', ('lisa',))['lisa']
|
||||
trace.append({'epoch': epoch + 1, 'fit_batch_losses': step_losses, 'validation': validation})
|
||||
if validation['objective'] < best:
|
||||
best = validation['objective']
|
||||
torch.save(adapter.state_dict(), out / 'best-adapter.pt')
|
||||
write_json(out / 'trace.json', trace)
|
||||
print('epoch', epoch + 1, 'validation', validation, flush=True)
|
||||
adapter.load_state_dict(torch.load(out / 'best-adapter.pt', map_location='cpu', weights_only=True))
|
||||
modes = ('native', 'direct', 'linear_joint', 'lisa')
|
||||
result = {split: evaluate(split, modes, greedy=True) for split in ('validation', 'test')}
|
||||
result['best_epoch'] = min(trace, key=lambda r: r['validation']['objective'])['epoch']
|
||||
result['trainable_parameters'] = sum(p.numel() for p in adapter.parameters())
|
||||
result['linear_control_sha256'] = digest(linear_control)
|
||||
write_json(out / 'results.json', result)
|
||||
print(result, flush=True)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('phase', choices=('capture', 'train'))
|
||||
parser.add_argument('--source', required=True, type=Path)
|
||||
parser.add_argument('--out', required=True, type=Path)
|
||||
parser.add_argument('--cache', type=Path)
|
||||
parser.add_argument('--linear-control', type=Path)
|
||||
args = parser.parse_args()
|
||||
if args.phase == 'train' and (args.cache is None or args.linear_control is None):
|
||||
parser.error('train requires --cache and --linear-control')
|
||||
args.out.mkdir()
|
||||
if args.phase == 'capture':
|
||||
capture(args.source, args.out)
|
||||
else:
|
||||
train(args.source, args.cache, args.out, args.linear_control)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,190 @@
|
||||
"""Differentiable Qwen text tail with streamed frozen weights and LiSA sites."""
|
||||
import math
|
||||
|
||||
import torch
|
||||
from torch import nn
|
||||
from torch.nn import functional as F
|
||||
from torch.utils.checkpoint import checkpoint
|
||||
|
||||
from crossqkv.lisa_train import causal_attention
|
||||
from functional.model import PREFIX
|
||||
|
||||
|
||||
def weight_chunks(tensor, start, end, rows=512):
|
||||
width = tensor.shape[1]
|
||||
for lo in range(start, end, rows):
|
||||
hi = min(lo + rows, end)
|
||||
yield torch.from_numpy(tensor.read(slice(lo * width, hi * width)).reshape(hi-lo, width))
|
||||
tensor.evict()
|
||||
|
||||
|
||||
class FrozenLinear(torch.autograd.Function):
|
||||
"""Read only the requested output rows and stream them again for dX."""
|
||||
|
||||
@staticmethod
|
||||
def forward(ctx, hidden, weight, start, end):
|
||||
ctx.weight, ctx.start, ctx.end = weight, start, end
|
||||
return torch.cat([F.linear(hidden, w) for w in weight_chunks(weight, start, end)], dim=-1)
|
||||
|
||||
@staticmethod
|
||||
def backward(ctx, grad):
|
||||
out = grad.new_zeros((*grad.shape[:-1], ctx.weight.shape[1]))
|
||||
lo = 0
|
||||
for w in weight_chunks(ctx.weight, ctx.start, ctx.end):
|
||||
hi = lo + len(w)
|
||||
out = out + grad[..., lo:hi] @ w
|
||||
lo = hi
|
||||
return out, None, None, None
|
||||
|
||||
|
||||
def rotate(x, theta, fraction, positions=None):
|
||||
d = int(x.shape[-1] * fraction)
|
||||
inv = theta ** (-torch.arange(0, d, 2, dtype=x.dtype, device=x.device) / d)
|
||||
if positions is None:
|
||||
positions = torch.arange(x.shape[1], dtype=x.dtype, device=x.device)[None, :]
|
||||
phase = positions[..., None] * inv
|
||||
angle = torch.cat((phase, phase), dim=-1).unsqueeze(-2)
|
||||
a, b = x[..., :d].chunk(2, dim=-1)
|
||||
return torch.cat((x[..., :d] * angle.cos() + torch.cat((-b, a), -1) * angle.sin(),
|
||||
x[..., d:]), dim=-1)
|
||||
|
||||
|
||||
def gated_delta_chunk(q, k, v, g, beta, state=None):
|
||||
q = q * (q.square().sum(-1, keepdim=True) + 1e-6).rsqrt() / math.sqrt(q.shape[-1])
|
||||
k = k * (k.square().sum(-1, keepdim=True) + 1e-6).rsqrt()
|
||||
if state is None:
|
||||
state = v.new_zeros(v.shape[0], v.shape[2], k.shape[-1], v.shape[-1])
|
||||
rows = []
|
||||
for i in range(v.shape[1]):
|
||||
qt, kt, vt = q[:, i], k[:, i], v[:, i]
|
||||
state = state * g[:, i, :, None, None].exp()
|
||||
delta = (vt - (state * kt.unsqueeze(-1)).sum(-2)) * beta[:, i, :, None]
|
||||
state = state + kt.unsqueeze(-1) * delta.unsqueeze(-2)
|
||||
rows.append((state * qt.unsqueeze(-1)).sum(-2))
|
||||
return torch.stack(rows, dim=1), state
|
||||
|
||||
|
||||
def gated_delta(q, k, v, g, beta):
|
||||
return gated_delta_chunk(q, k, v, g, beta)[0]
|
||||
|
||||
|
||||
class TorchTail(nn.Module):
|
||||
"""Inputs start immediately before the first trainable recipient."""
|
||||
|
||||
def __init__(self, source_model, start, adapters=None):
|
||||
super().__init__()
|
||||
self.source = source_model
|
||||
self.c = source_model.config
|
||||
self.eps = source_model.eps
|
||||
self.start = start
|
||||
self.adapters = nn.ModuleDict({str(k): v for k, v in (adapters or {}).items()})
|
||||
self._small = {}
|
||||
|
||||
def small(self, name):
|
||||
if name not in self._small:
|
||||
self._small[name] = torch.from_numpy(self.source.small(name))
|
||||
return self._small[name]
|
||||
|
||||
def linear(self, h, name, start=0, end=None):
|
||||
t = self.source.tensors[PREFIX + name + '.weight']
|
||||
return FrozenLinear.apply(h, t, start, t.shape[0] if end is None else end)
|
||||
|
||||
def norm(self, x, name, centered=True):
|
||||
w = self.small(name + '.weight')
|
||||
return x * (x.square().mean(-1, keepdim=True) + self.eps).rsqrt() * (1+w if centered else w)
|
||||
|
||||
def gate_only(self, h, name):
|
||||
heads, dim = self.c['num_attention_heads'], self.c['head_dim']
|
||||
return torch.stack([self.linear(h, name+'q_proj', (2*j+1)*dim, (2*j+2)*dim)
|
||||
for j in range(heads)], dim=2)
|
||||
|
||||
def native_scores(self, q, h, name):
|
||||
c = self.c
|
||||
k = self.linear(h, name+'k_proj').unflatten(-1, (c['num_key_value_heads'], c['head_dim']))
|
||||
params = c['rope_parameters']
|
||||
q = rotate(self.norm(q, name+'q_norm'), params['rope_theta'], params['partial_rotary_factor'])
|
||||
k = rotate(self.norm(k, name+'k_norm'), params['rope_theta'], params['partial_rotary_factor'])
|
||||
k = k.repeat_interleave(q.shape[2] // k.shape[2], dim=2)
|
||||
return torch.einsum('bthd,bshd->bhts', q, k) / math.sqrt(q.shape[-1])
|
||||
|
||||
def full(self, h, layer, donor, lengths, mode, recipients, keep_teacher):
|
||||
c = self.c
|
||||
heads, kv_heads, dim = c['num_attention_heads'], c['num_key_value_heads'], c['head_dim']
|
||||
name = f'layers.{layer}.self_attn.'
|
||||
shared = layer in recipients and mode != 'native'
|
||||
if not shared or keep_teacher:
|
||||
packed = self.linear(h, name+'q_proj').unflatten(-1, (heads, 2*dim))
|
||||
q, gate = packed.chunk(2, dim=-1)
|
||||
if shared:
|
||||
with torch.no_grad():
|
||||
native = self.native_scores(q, h, name)
|
||||
else:
|
||||
native = self.native_scores(q, h, name)
|
||||
else:
|
||||
gate = self.gate_only(h, name)
|
||||
native = None
|
||||
if not shared:
|
||||
scores = native
|
||||
elif mode == 'direct':
|
||||
scores = donor
|
||||
elif mode == 'lisa':
|
||||
pos = torch.arange(h.shape[1], device=h.device)[None, :]
|
||||
scores = self.adapters[str(layer)](h, donor, pos)
|
||||
elif mode == 'linear':
|
||||
matrix = self.adapters[str(layer)]
|
||||
scores = matrix(donor.permute(0, 2, 3, 1)).permute(0, 3, 1, 2)
|
||||
else:
|
||||
raise ValueError(f'Unknown mode {mode}')
|
||||
v = self.linear(h, name+'v_proj').unflatten(-1, (kv_heads, dim))
|
||||
out = causal_attention(scores, v, lengths) * gate.sigmoid()
|
||||
return self.linear(out.flatten(-2), name+'o_proj'), scores, native
|
||||
|
||||
def linear_attention(self, x, layer):
|
||||
return self.linear_attention_chunk(x, layer)[0]
|
||||
|
||||
def linear_attention_chunk(self, x, layer, previous=None):
|
||||
p = f'layers.{layer}.linear_attn.'
|
||||
c = self.c
|
||||
kh, vh = c['linear_num_key_heads'], c['linear_num_value_heads']
|
||||
kd, vd = c['linear_key_head_dim'], c['linear_value_head_dim']
|
||||
projected = self.linear(x, p+'in_proj_qkv').transpose(1, 2)
|
||||
kernel = self.small(p+'conv1d.weight')
|
||||
history = kernel.shape[-1] - 1
|
||||
if previous is None:
|
||||
projected = F.pad(projected, (history, 0))
|
||||
state = None
|
||||
else:
|
||||
prefix, state = previous
|
||||
projected = torch.cat((prefix, projected), dim=-1)
|
||||
convolved = F.conv1d(projected, kernel, groups=projected.shape[1])
|
||||
q, k, v = F.silu(convolved.transpose(1, 2)).split((kh*kd, kh*kd, vh*vd), dim=-1)
|
||||
q = q.unflatten(-1, (kh, kd)).repeat_interleave(vh//kh, dim=2)
|
||||
k = k.unflatten(-1, (kh, kd)).repeat_interleave(vh//kh, dim=2)
|
||||
v = v.unflatten(-1, (vh, vd))
|
||||
gate = self.linear(x, p+'in_proj_z').unflatten(-1, (vh, vd))
|
||||
beta = self.linear(x, p+'in_proj_b').sigmoid()
|
||||
a = self.linear(x, p+'in_proj_a')
|
||||
g = -self.small(p+'A_log').exp() * F.softplus(a + self.small(p+'dt_bias'))
|
||||
out, state = gated_delta_chunk(q, k, v, g, beta, state)
|
||||
output = self.linear((self.norm(out, p+'norm', centered=False)*F.silu(gate)).flatten(-2),
|
||||
p+'out_proj')
|
||||
return output, (projected[..., projected.shape[-1]-history:].clone(), state)
|
||||
|
||||
def forward(self, h, donor, lengths, mode, recipients, keep_teacher=False):
|
||||
side = {}
|
||||
for layer, kind in enumerate(self.c['layer_types'][self.start:], self.start):
|
||||
p = f'layers.{layer}.'
|
||||
n = self.norm(h, p+'input_layernorm')
|
||||
if kind == 'full_attention':
|
||||
out, donor, native = self.full(n, layer, donor, lengths, mode, recipients,
|
||||
keep_teacher)
|
||||
side[layer] = (donor, native)
|
||||
elif torch.is_grad_enabled() and n.requires_grad:
|
||||
out = checkpoint(self.linear_attention, n, layer, use_reentrant=True)
|
||||
else:
|
||||
out = self.linear_attention(n, layer)
|
||||
h = h + out
|
||||
n = self.norm(h, p+'post_attention_layernorm')
|
||||
x = F.silu(self.linear(n, p+'mlp.gate_proj')) * self.linear(n, p+'mlp.up_proj')
|
||||
h = h + self.linear(x, p+'mlp.down_proj')
|
||||
return self.norm(h, 'norm'), side
|
||||
@@ -0,0 +1,126 @@
|
||||
"""Trainable LiSA attention adaptor for the Qwen text reference."""
|
||||
import math
|
||||
|
||||
import torch
|
||||
from torch import nn
|
||||
from torch.nn import functional as F
|
||||
|
||||
|
||||
class LearnableSharingAttention(nn.Module):
|
||||
"""Map low-rank local scores and donor logits to recipient logits."""
|
||||
|
||||
def __init__(self, hidden_size, heads, kv_heads, rank, theta, rotary_fraction,
|
||||
width=256, bias=False):
|
||||
super().__init__()
|
||||
rotary_dim = int(rank * rotary_fraction)
|
||||
if heads % kv_heads or not 0 < rotary_dim <= rank or rotary_dim % 2:
|
||||
raise ValueError('Expected grouped query heads and a positive even rotary dimension')
|
||||
self.heads, self.kv_heads, self.rank = heads, kv_heads, rank
|
||||
self.rotary_dim = rotary_dim
|
||||
inv_freq = theta ** (-torch.arange(0, rotary_dim, 2, dtype=torch.float32) / rotary_dim)
|
||||
self.register_buffer('inv_freq', inv_freq, persistent=False)
|
||||
self.q_proj = nn.Linear(hidden_size, heads * rank, bias=bias)
|
||||
self.k_proj = nn.Linear(hidden_size, kv_heads * rank, bias=bias)
|
||||
self.fuse = nn.Sequential(nn.Linear(2 * heads, width, bias=bias), nn.ReLU(),
|
||||
nn.Linear(width, heads, bias=bias))
|
||||
|
||||
def rotate(self, x, position_ids):
|
||||
phase = position_ids[..., None] * self.inv_freq
|
||||
angle = torch.cat((phase, phase), dim=-1).unsqueeze(2)
|
||||
a, b = x[..., :self.rotary_dim].chunk(2, dim=-1)
|
||||
first = torch.cat((a, b), dim=-1)
|
||||
rotated = torch.cat((-b, a), dim=-1)
|
||||
return torch.cat((first * angle.cos() + rotated * angle.sin(),
|
||||
x[..., self.rotary_dim:]), dim=-1)
|
||||
|
||||
def forward(self, hidden, donor, position_ids):
|
||||
b, t, _ = hidden.shape
|
||||
q = self.rotate(self.q_proj(hidden).reshape(b, t, self.heads, self.rank), position_ids)
|
||||
k = self.rotate(self.k_proj(hidden).reshape(b, t, self.kv_heads, self.rank), position_ids)
|
||||
k = k.repeat_interleave(self.heads // self.kv_heads, dim=2)
|
||||
delta = torch.einsum('bthd,bshd->btsh', q, k) / math.sqrt(self.rank)
|
||||
return self.fuse(torch.cat((delta, donor.permute(0, 2, 3, 1)), dim=-1)).permute(0, 3, 1, 2)
|
||||
|
||||
|
||||
def causal_attention(scores, values, lengths):
|
||||
"""Apply recipient values after causal masking of the fused scores."""
|
||||
positions = torch.arange(scores.shape[-1], device=scores.device)
|
||||
valid = positions[None, :] < lengths[:, None]
|
||||
causal = positions[:, None] >= positions[None, :]
|
||||
allowed = valid[:, None, None, :] & causal
|
||||
p = scores.masked_fill(~allowed, -torch.inf).softmax(dim=-1)
|
||||
repeats = scores.shape[1] // values.shape[2]
|
||||
return torch.einsum('bhts,bshd->bthd', p, values.repeat_interleave(repeats, dim=2))
|
||||
|
||||
|
||||
def huber_distillation(scores, teacher, lengths):
|
||||
"""Use raw pre-softmax scores and exclude sequence padding."""
|
||||
positions = torch.arange(scores.shape[-1], device=scores.device)
|
||||
valid = positions[None, :] < lengths[:, None]
|
||||
pairs = valid[:, None, :, None] & valid[:, None, None, :]
|
||||
return F.huber_loss(scores.masked_select(pairs), teacher.detach().masked_select(pairs),
|
||||
delta=1.0)
|
||||
|
||||
|
||||
def objective(scores, teacher, lengths, language_model_loss):
|
||||
kd = huber_distillation(scores, teacher, lengths)
|
||||
return 0.25 * kd + 0.75 * language_model_loss, kd
|
||||
|
||||
|
||||
class FrozenRecipient(nn.Module):
|
||||
"""The recipient's unchanged gated output projection, MLP and final norm."""
|
||||
|
||||
def __init__(self, weights, eps):
|
||||
super().__init__()
|
||||
for key in ('o', 'post', 'gate', 'up', 'down', 'final'):
|
||||
self.register_buffer('w_' + key, torch.as_tensor(weights[key]).detach())
|
||||
self.eps = eps
|
||||
|
||||
def norm(self, hidden, weight):
|
||||
return hidden * (hidden.square().mean(dim=-1, keepdim=True) + self.eps).rsqrt() * (1 + weight)
|
||||
|
||||
def forward(self, context, gate, residual):
|
||||
h = residual + F.linear((context * gate.sigmoid()).flatten(-2), self.w_o)
|
||||
n = self.norm(h, self.w_post)
|
||||
h = h + F.linear(F.silu(F.linear(n, self.w_gate)) * F.linear(n, self.w_up), self.w_down)
|
||||
return self.norm(h, self.w_final)
|
||||
|
||||
|
||||
class _FrozenVocabularyCE(torch.autograd.Function):
|
||||
"""Exact full-vocabulary CE with a streamed frozen head in both passes."""
|
||||
|
||||
@staticmethod
|
||||
def forward(ctx, hidden, targets, weights, vocabulary):
|
||||
log_total = hidden.new_full((hidden.shape[0],), -torch.inf)
|
||||
selected = hidden.new_zeros(hidden.shape[0])
|
||||
for start, w in vocabulary():
|
||||
logits = F.linear(hidden, w)
|
||||
log_total = torch.logaddexp(log_total, logits.logsumexp(dim=-1))
|
||||
belongs = (targets >= start) & (targets < start + w.shape[0])
|
||||
selected[belongs] = logits[belongs, targets[belongs] - start]
|
||||
ctx.save_for_backward(hidden, targets, log_total, weights)
|
||||
ctx.vocabulary = vocabulary
|
||||
return ((log_total - selected) * weights).sum() / weights.sum()
|
||||
|
||||
@staticmethod
|
||||
def backward(ctx, gradient):
|
||||
hidden, targets, log_total, weights = ctx.saved_tensors
|
||||
grad_hidden = torch.zeros_like(hidden)
|
||||
for start, w in ctx.vocabulary():
|
||||
probs = (F.linear(hidden, w) - log_total[:, None]).exp()
|
||||
belongs = (targets >= start) & (targets < start + w.shape[0])
|
||||
probs[belongs, targets[belongs] - start] -= 1
|
||||
grad_hidden.addmm_(probs, w)
|
||||
return grad_hidden * (gradient * weights[:, None] / weights.sum()), None, None, None
|
||||
|
||||
|
||||
def language_model_loss(hidden, ids, lengths, vocabulary, answer_weight=1.0,
|
||||
completion_starts=None):
|
||||
"""Train on all valid next-token targets, avoiding padding and final positions."""
|
||||
positions = torch.arange(ids.shape[1] - 1, device=ids.device)
|
||||
valid = positions[None, :] + 1 < lengths[:, None]
|
||||
if completion_starts is not None:
|
||||
valid = valid & (positions[None, :] + 1 >= completion_starts[:, None])
|
||||
weights = torch.where(positions[None, :] + 2 == lengths[:, None], answer_weight, 1.0)
|
||||
return _FrozenVocabularyCE.apply(hidden[:, :-1][valid], ids[:, 1:][valid],
|
||||
weights[valid].to(dtype=hidden.dtype), vocabulary)
|
||||
@@ -0,0 +1,169 @@
|
||||
"""Test a single predeclared shrinkage of the two trained LiSA distillation updates."""
|
||||
import argparse
|
||||
import fcntl
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
from crossqkv.lisa_combination_screen import ADAPTER_SHA, SITES
|
||||
from crossqkv.lisa_full_answer import fingerprint
|
||||
from crossqkv.lisa_full_answer_train import checkpoint, load_locked
|
||||
from crossqkv.lisa_full_answer_verify import verify
|
||||
from crossqkv.lisa_rank_compare import make_adapters
|
||||
from crossqkv.lisa_trajectory_train import validate_checkpoint
|
||||
from functional.model import StreamingLM
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
PROTOCOL_SHA = '6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef'
|
||||
TRAINED_SHA = {
|
||||
'student': '7faacdffbc81d0c786ef0c7a5acaf1724d82af155fed7b834dabc73dcf91f3a4',
|
||||
'reference': '21ae007cb7343c1a0042655824bdc98ee2f03071d5f5dc43dbc8b441a262d84f',
|
||||
}
|
||||
VALIDATION_SHA = {
|
||||
'prior-lisa': '3a10cdd0a22e110b5468ba496c3440a8b510ab3595328df330e7ea02b0ccbb76',
|
||||
'trajectory-student': 'af213ef477e99780d48b995f8a1d07ada6409bd70011202fb73db56247199c5f',
|
||||
'trajectory-reference': '3b5557336570cbeb1f6a592013780dc3e00e7f29b4192d59c53c6b2493779b91',
|
||||
}
|
||||
|
||||
|
||||
def read(path):
|
||||
return json.loads(path.read_bytes())
|
||||
|
||||
|
||||
def midpoint(base, trained):
|
||||
if base.keys() != trained.keys():
|
||||
raise ValueError('Adapter parameter names differ')
|
||||
result = {}
|
||||
for name, old in base.items():
|
||||
new = trained[name]
|
||||
if new.shape != old.shape or new.dtype != old.dtype or not old.is_floating_point():
|
||||
raise ValueError(f'Incompatible parameters for {name}')
|
||||
value = ((old.double() + new.double()) * 0.5).to(old.dtype)
|
||||
if not torch.isfinite(value).all():
|
||||
raise ValueError(f'Nonfinite midpoint for {name}')
|
||||
result[name] = value
|
||||
return result
|
||||
|
||||
|
||||
def prepare(prior, out, directory):
|
||||
base_path = prior / 'final/lisa.pt'
|
||||
if fingerprint(base_path) != ADAPTER_SHA:
|
||||
raise ValueError('Wrong starting LiSA model')
|
||||
base = torch.load(base_path, weights_only=True, map_location='cpu')
|
||||
spec = {'protocol_sha256': PROTOCOL_SHA, 'base_sha256': ADAPTER_SHA, 'fraction': 0.5,
|
||||
'parameters': sum(t.numel() for t in base.values()), 'endpoints': {}}
|
||||
for prefix, digest in TRAINED_SHA.items():
|
||||
endpoint = out / ('trajectory-' + prefix) / 'adapter.pt'
|
||||
if fingerprint(endpoint) != digest:
|
||||
raise ValueError(f'Wrong {prefix} distillation checkpoint')
|
||||
value = midpoint(base, torch.load(endpoint, weights_only=True, map_location='cpu'))
|
||||
path = directory / (prefix + '.pt')
|
||||
if path.exists():
|
||||
saved = torch.load(path, weights_only=True, map_location='cpu')
|
||||
if saved.keys() != value.keys() or any(not torch.equal(t, saved[k]) for k, t in value.items()):
|
||||
raise ValueError(f'Stored {prefix} midpoint differs from its endpoints')
|
||||
else:
|
||||
checkpoint(path, value)
|
||||
spec['endpoints'][prefix] = {'trained_sha256': digest, 'midpoint_sha256': fingerprint(path)}
|
||||
path = directory / 'spec.json'
|
||||
if path.exists() and read(path) != spec:
|
||||
raise ValueError('Midpoint experiment specification changed')
|
||||
write_json(path, spec)
|
||||
return spec
|
||||
|
||||
|
||||
def summarize(questions, answers, *, intervals):
|
||||
ids = [q['id'] for q in questions]
|
||||
flags = {name: np.array([a['correct'] for a in rows], dtype=int).reshape(-1, 2)
|
||||
for name, rows in answers.items()}
|
||||
draws = np.random.default_rng(72505).integers(0, len(ids)//2, (10000, len(ids)//2)) if intervals else None
|
||||
comparisons = {}
|
||||
for prefix in TRAINED_SHA:
|
||||
name = 'half-' + prefix
|
||||
controls = ['prior-lisa', 'trajectory-' + prefix]
|
||||
if prefix == 'student':
|
||||
controls.append('half-reference')
|
||||
for control in controls:
|
||||
delta = flags[name] - flags[control]
|
||||
comparison = {'delta': float(delta.mean()),
|
||||
'corrected': [q for q, d in zip(ids, delta.flat) if d > 0],
|
||||
'lost': [q for q, d in zip(ids, delta.flat) if d < 0]}
|
||||
if intervals:
|
||||
comparison['interval_95'] = np.quantile(delta.mean(1)[draws].mean(1), [.025, .975]).tolist()
|
||||
comparisons[name + '-vs-' + control] = comparison
|
||||
return {'questions': len(ids), 'correct': {k: int(v.sum()) for k, v in flags.items()},
|
||||
'pairs_both_correct': {k: int(v.all(1).sum()) for k, v in flags.items()}, 'comparisons': comparisons}
|
||||
|
||||
|
||||
def score_split(args, directory, questions, split, protocol, model, tok, spec):
|
||||
folder = directory / split
|
||||
folder.mkdir(exist_ok=True)
|
||||
answers = {}
|
||||
for name, digest in VALIDATION_SHA.items():
|
||||
prefix = name.removeprefix('trajectory-')
|
||||
if split == 'validation':
|
||||
path = (args.out/'validation-prior-lisa.json' if name == 'prior-lisa'
|
||||
else args.out/name/('validation-' + prefix + '.json'))
|
||||
if fingerprint(path) != digest:
|
||||
raise ValueError(f'Validation control changed for {name}')
|
||||
else:
|
||||
path = args.out/'holdout'/(name + '.json')
|
||||
expected = ADAPTER_SHA if name == 'prior-lisa' else TRAINED_SHA[prefix]
|
||||
if read(path.with_name(name + '-source.json')) != expected:
|
||||
raise ValueError(f'Holdout control source changed for {name}')
|
||||
rows = read(path)
|
||||
verify(tok, protocol, questions, rows, (path.stem,))
|
||||
answers[name] = [r['arms'][path.stem] for r in rows]
|
||||
for prefix in TRAINED_SHA:
|
||||
name = 'half-' + prefix
|
||||
path = directory / (prefix + '.pt')
|
||||
if fingerprint(path) != spec['endpoints'][prefix]['midpoint_sha256']:
|
||||
raise ValueError(f'Midpoint changed for {prefix}')
|
||||
adapters = make_adapters(model.config, dict.fromkeys(SITES, 40), True)
|
||||
torch.nn.ModuleDict({str(i): v for i, v in adapters.items()}).load_state_dict(
|
||||
torch.load(path, weights_only=True, map_location='cpu'))
|
||||
answer_path = folder / (name + '.json')
|
||||
validate_checkpoint(model, tok, adapters, questions, protocol, answer_path, split_name=split)
|
||||
rows = read(answer_path)
|
||||
verify(tok, protocol, questions, rows, (name,))
|
||||
answers[name] = [r['arms'][name] for r in rows]
|
||||
summary = summarize(questions, answers, intervals=split == 'test')
|
||||
write_json(folder/'summary.json', summary)
|
||||
return summary
|
||||
|
||||
|
||||
def run(args):
|
||||
if fingerprint(args.out/'protocol.json') != PROTOCOL_SHA:
|
||||
raise ValueError('Wrong comparison protocol')
|
||||
directory = args.out/'trajectory-midpoint'
|
||||
directory.mkdir(exist_ok=True)
|
||||
with (directory/'.lock').open('a') as lock:
|
||||
fcntl.flock(lock, fcntl.LOCK_EX)
|
||||
spec = prepare(args.prior, args.out, directory)
|
||||
if args.prepare_only:
|
||||
return
|
||||
_, prior = load_locked(args.source, args.prior)
|
||||
model = StreamingLM(args.source/'weights', read(args.source/'model_config.json'), seconds=172800,
|
||||
process_swap_limit_kib=None)
|
||||
tok = Tokenizer.from_file(str(args.source/'tokenizer.json'))
|
||||
splits = read(args.out/'protocol.json')['splits']
|
||||
val = score_split(args, directory, splits['validation'], 'validation', prior['protocol'], model, tok, spec)
|
||||
counts = val['correct']
|
||||
qualified = [p for p in TRAINED_SHA if counts['half-' + p] > counts['prior-lisa']]
|
||||
if qualified:
|
||||
score_split(args, directory, splits['test'], 'test', prior['protocol'], model, tok, spec)
|
||||
write_json(directory/'decision.json', {'qualified_validation_prefixes': qualified,
|
||||
'test_evaluated': bool(qualified)})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
for key in ('source', 'prior', 'out'):
|
||||
parser.add_argument('--' + key, required=True, type=Path)
|
||||
parser.add_argument('--prepare-only', action='store_true')
|
||||
torch.set_num_threads(1)
|
||||
run(parser.parse_args())
|
||||
@@ -0,0 +1,183 @@
|
||||
"""Distill next-token distributions along LiSA's current greedy trajectories."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from tokenizers import Tokenizer
|
||||
|
||||
from crossqkv.lisa_combination_screen import ADAPTER_SHA, SITES
|
||||
from crossqkv.lisa_full_answer import STOP_TEXT, evaluate, fingerprint, prompt
|
||||
from crossqkv.lisa_full_answer_train import FitCapture, checkpoint, load_locked, verified_fit_captures
|
||||
from crossqkv.lisa_full_answer_verify import verify
|
||||
from crossqkv.lisa_tail import TorchTail, weight_chunks
|
||||
from crossqkv.lisa_train import LearnableSharingAttention
|
||||
from functional.model import PREFIX, StreamingLM
|
||||
from functional.run import write_json
|
||||
|
||||
|
||||
def reverse_kl(student, teacher, chunks):
|
||||
"""Exact reverse KL and its first derivative for a streamed, frozen head."""
|
||||
with torch.no_grad():
|
||||
# Both models use the same frozen output weights. Read each block once
|
||||
# for the two projections, then revisit it only for the student gradient.
|
||||
student_logits = []
|
||||
teacher_logits = []
|
||||
for w in chunks():
|
||||
student_logits.append(student @ w.T)
|
||||
teacher_logits.append(teacher @ w.T)
|
||||
logp = torch.cat(student_logits, dim=-1).log_softmax(-1)
|
||||
del student_logits
|
||||
logq = torch.cat(teacher_logits, dim=-1).log_softmax(-1)
|
||||
del teacher_logits
|
||||
diff = logp - logq
|
||||
prob = logp.exp()
|
||||
kl = (prob * diff).sum(-1, keepdim=True)
|
||||
dlogits = prob * (diff - kl) / len(student)
|
||||
grad = torch.zeros_like(student)
|
||||
start = 0
|
||||
for w in chunks():
|
||||
grad.addmm_(dlogits[:, start:start+len(w)], w)
|
||||
start += len(w)
|
||||
return kl.mean() + ((student - student.detach()) * grad).sum()
|
||||
|
||||
|
||||
@torch.no_grad()
|
||||
def full_teacher_inputs(model, teacher, ids, lengths):
|
||||
hidden = torch.from_numpy(model.embedding(ids.numpy()))
|
||||
target, maps = teacher(hidden, None, lengths, 'native', ())
|
||||
return target, teacher.residual, maps[SITES[0]-4][0]
|
||||
|
||||
|
||||
@torch.no_grad()
|
||||
def replay_teacher_inputs(tail, path, ids, start, lengths):
|
||||
with np.load(path, allow_pickle=False) as saved:
|
||||
if int(saved['start'].item()) != start or not np.array_equal(saved['ids'], ids.numpy()):
|
||||
raise ValueError('Cached sequence does not match this gold answer and prompt')
|
||||
residual = torch.from_numpy(saved['residual'])
|
||||
donor = torch.from_numpy(saved['donor'])
|
||||
target, _ = tail(residual, donor, lengths, 'native', ())
|
||||
return target, residual, donor
|
||||
|
||||
|
||||
def validate_checkpoint(model, tokenizer, adapters, questions, decode_spec, path, *, split_name='validation'):
|
||||
label = path.stem
|
||||
rows = json.loads(path.read_text()) if path.exists() else []
|
||||
if rows:
|
||||
verify(tokenizer, decode_spec, questions, rows, (label,), allow_prefix=True)
|
||||
for start in range(len(rows), len(questions), 2):
|
||||
batch = questions[start:start+2]
|
||||
outputs = evaluate(model, tokenizer, batch, {label: SITES}, adapters)
|
||||
verify(tokenizer, decode_spec, batch, outputs, (label,))
|
||||
rows.extend(outputs)
|
||||
write_json(path, rows)
|
||||
correct = sum(row['arms'][label]['correct'] for row in rows)
|
||||
print(label, split_name, 'correct', correct, '/', len(rows), flush=True)
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__)
|
||||
for name in ('source', 'prior', 'out'):
|
||||
p.add_argument('--'+name, required=True, type=Path)
|
||||
p.add_argument('--prefix', choices=('student', 'reference'), required=True)
|
||||
args = p.parse_args()
|
||||
torch.set_num_threads(1)
|
||||
torch.manual_seed(72504)
|
||||
_, prior = load_locked(args.source, args.prior)
|
||||
tasks = [x for x in prior['problems']['fit'] if x['task']=='lookup']
|
||||
protocol = args.out/'protocol.json'
|
||||
if fingerprint(protocol) != '6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef':
|
||||
raise ValueError('Unknown combination study protocol')
|
||||
validation = json.loads(protocol.read_text())['splits']['validation']
|
||||
old = args.prior/'final/lisa.pt'
|
||||
if fingerprint(old) != ADAPTER_SHA:
|
||||
raise ValueError('Unknown baseline checkpoint')
|
||||
directory = args.out/('trajectory-'+args.prefix)
|
||||
directory.mkdir(exist_ok=True)
|
||||
config = json.loads((args.source/'model_config.json').read_text())
|
||||
model = StreamingLM(args.source/'weights', config, seconds=172800, process_swap_limit_kib=None)
|
||||
c = model.config
|
||||
rope = c['rope_parameters']
|
||||
adapters = {i: LearnableSharingAttention(c['hidden_size'], c['num_attention_heads'],
|
||||
c['num_key_value_heads'], 40, rope['rope_theta'], rope['partial_rotary_factor'],
|
||||
bias=c.get('attention_bias', False)) for i in SITES}
|
||||
tail = TorchTail(model, SITES[0], adapters)
|
||||
tail.adapters.load_state_dict(torch.load(old, weights_only=True))
|
||||
teacher = FitCapture(model, 0)
|
||||
teacher.sites = SITES
|
||||
opt = torch.optim.AdamW(tail.parameters(), lr=0.0001, weight_decay=0.1)
|
||||
tok = Tokenizer.from_file(str(args.source/'tokenizer.json'))
|
||||
if args.prefix == 'student':
|
||||
validate_checkpoint(model, tok, adapters, validation, prior['protocol'],
|
||||
args.out/'validation-prior-lisa.json')
|
||||
statefile = directory/'resume.pt'
|
||||
rows = []
|
||||
if statefile.exists():
|
||||
state = torch.load(statefile, weights_only=True)
|
||||
rows = state['rows']
|
||||
tail.adapters.load_state_dict(state['weights'])
|
||||
opt.load_state_dict(state['optimizer'])
|
||||
if [r['id'] for r in rows] != [x['id'] for x in tasks[:len(rows)]]:
|
||||
raise ValueError('Training prefix mismatch')
|
||||
embedding = model.tensors[PREFIX+'embed_tokens.weight']
|
||||
|
||||
def chunks():
|
||||
yield from weight_chunks(embedding, 0, embedding.shape[0], rows=1024)
|
||||
|
||||
captures = {}
|
||||
final = args.prior/'final'
|
||||
if args.prefix == 'reference' and (final/'verified-fit-capture.json').is_file():
|
||||
try:
|
||||
captures = verified_fit_captures(final, tasks)
|
||||
except (OSError, ValueError, KeyError) as exc:
|
||||
print('Using full native forward for reference prefixes:', exc, flush=True)
|
||||
|
||||
for offset, item in enumerate(tasks[len(rows):]):
|
||||
text = prompt(item['question'])
|
||||
base = tok.encode(text, add_special_tokens=False).ids
|
||||
if args.prefix == 'student':
|
||||
rollout = evaluate(model, tok, [item], {'student': SITES}, adapters)[0]['arms']['student']
|
||||
sampled = rollout['tokens']
|
||||
else:
|
||||
complete = tok.encode(text+str(item['answer'])+STOP_TEXT[0], add_special_tokens=False).ids
|
||||
assert complete[:len(base)] == base
|
||||
sampled = complete[len(base):]
|
||||
ids = torch.tensor([base+sampled])
|
||||
lengths = torch.tensor([ids.shape[1]])
|
||||
if captures:
|
||||
try:
|
||||
cached = replay_teacher_inputs(tail, captures[item['id']], ids, len(base), lengths)
|
||||
except (OSError, ValueError, KeyError) as exc:
|
||||
print('Using full native forward for reference prefixes:', exc, flush=True)
|
||||
captures = {}
|
||||
if not captures or offset == 0:
|
||||
inputs = full_teacher_inputs(model, teacher, ids, lengths)
|
||||
if captures:
|
||||
if all(torch.equal(a, b) for a, b in zip(inputs, cached)):
|
||||
print('Reference cache matches full native target, residual and donor', flush=True)
|
||||
else:
|
||||
print('Reference cache differs. Using full native forward', flush=True)
|
||||
captures = {}
|
||||
else:
|
||||
inputs = cached
|
||||
target, residual, donor = inputs
|
||||
opt.zero_grad(set_to_none=True)
|
||||
student, _ = tail(residual, donor, lengths, 'lisa', SITES)
|
||||
span = slice(len(base)-1, -1)
|
||||
loss = reverse_kl(student[0, span], target[0, span], chunks)
|
||||
loss.backward()
|
||||
if not torch.isfinite(loss) or any(p.grad is None or not torch.isfinite(p.grad).all() for p in tail.parameters()):
|
||||
raise FloatingPointError('Invalid reverse KL update')
|
||||
opt.step()
|
||||
rows.append({'id': item['id'], 'tokens': sampled, 'reverse_kl':float(loss.detach())})
|
||||
checkpoint(statefile, {'rows':rows,'weights':tail.adapters.state_dict(),'optimizer':opt.state_dict()})
|
||||
print(args.prefix, len(rows), '/', len(tasks), flush=True)
|
||||
checkpoint(directory/'adapter.pt', tail.adapters.state_dict())
|
||||
write_json(directory/'trace.json', rows)
|
||||
validate_checkpoint(model, tok, adapters, validation, prior['protocol'],
|
||||
directory/('validation-'+args.prefix+'.json'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,56 @@
|
||||
# 三层跨层注意力共享的两种改进实验
|
||||
|
||||
复用 Qwen3.5-2B 中层号为 15、19、23 的三个全注意力接收层(按整个模型从零编号),在新的查表任务上评估完整整数答案。上一轮第二个训练轮次的 LiSA 检查点作为轨迹蒸馏的起点,适配器 SHA-256 为 `c82db5af7fa42cf58a349f3e53961da2360b211a7ed606f53a728860c64f6f29`。
|
||||
|
||||
论文库中的三个条目是 LiSA(2197656)、AdaRank(2204577)和 MiniLLM(2176556)。LiSA 提供跨层共享与低秩修正。AdaRank 用模型分歧估计各模块所需的相对秩,本实验改用逐层恢复对完整答案的影响估计秩。MiniLLM 用学生轨迹和逆 KL 做蒸馏,本实验使用贪心轨迹。 [LiSA 原文](https://aclanthology.org/2026.tacl-1.30/) · [AdaRank 原文](https://arxiv.org/abs/2408.09015) · [MiniLLM 原文](https://arxiv.org/abs/2306.08543)
|
||||
|
||||
## 题集与验证
|
||||
|
||||
8 对诊断题用于为三个层分配秩,8 对验证题用于在两个分秩训练轮次之间选检查点,32 对新留出题用于最后的配对比较。每对保持键、查询和表格顺序一致,交换目标键和一个干扰键的值。训练使用上一轮的 24 道拟合题。生成上限为 24 个 token,判分要求正常结束并能提取完整整数。主指标是完整答案准确率,次指标是同一对的两个答案都正确的比例。准确率差的 bootstrap 以题对为重采样单位。
|
||||
|
||||
## 层敏感度与秩分配
|
||||
|
||||
依次用原生 Q/K 恢复单个接收层,其余层使用上一轮训练的 LiSA。在诊断集上恢复正确答案净增最多的层取秩 48,其次取 40,最后取 32。同分时层号小者优先。恢复分数并列时会弱化对敏感度排序的解释。对照包括均匀秩和反向分配,以及关闭跨层分数输入后的均匀秩和敏感度分配。关闭共享输入时在融合网络前将供给层的分数通道置零。每组名义参数量一致,置零通道对应的权重不会获得有效训练信号。
|
||||
|
||||
另在相同的 16 道诊断题上,分别为原模型、已有 LiSA 和三个逐层恢复条件计算标准答案各 token 的全词表对数概率,包含结束符。按题保存结果,用于观察恢复一层后,模型是否给正确答案分配了更大的概率。分秩仍按预先冻结的完整答案正确数与同分规则执行。
|
||||
|
||||
分秩实验沿用上一轮教师分数与训练题的缓存。五组从固定种子初始化,各做两轮、每轮 24 步。按验证正确数选择检查点,同分取较早轮次。四组交互项为共享时分秩相对均匀秩的增益,减去关闭共享输入时的同一增益。反向分配用于检验高秩是否确实给对了层。
|
||||
|
||||
在远程训练环境中,用同一配置、训练代码和种子重新初始化五组适配器,按层核对参数摘要。相同秩配置的共享开启组与关闭组逐层完全相同。第 15 层在五组中均为秩 40,五组起始权重一致。第 19 和 23 层各有三种起始状态,对应三种秩分配。因此,分秩对照测量整套秩配置及其训练效果。 [初始参数核验](../results/lisa-combinations/rank-initialization.json)
|
||||
|
||||
留出答卷还会列出每项两组比较中从错变对、从对变错的题号。对跨层共享与分秩的组合,单列两个单项均答错而组合答对的题,以及两单项均答对而组合答错的题,同时附上关闭共享且使用均匀秩时的结果。这些题号解释净正确数的来源,四组交互项衡量两种改动的增益是否相互影响。另将敏感度分秩、学生前缀蒸馏和标准答案前缀蒸馏分别与上一轮实际使用的 LiSA 检查点逐题比较,报告净正确率差、按题对重采样的区间以及得失题号。均匀秩组使用本轮验证集选择检查点,因此与上一轮的 LiSA 分别列出。
|
||||
|
||||
## 学生轨迹蒸馏
|
||||
|
||||
在同一批 8 对验证题上,分别生成起始检查点、学生前缀组和标准答案前缀组三种完整答卷,并用冻结的分词器从 token 重算判分。三个检查点预先指定。验证答卷可用于在留出评估之前判断轨迹训练是否值得进一步研究。
|
||||
|
||||
两组均从上一轮 LiSA 权重开始,依次在相同 24 道训练题上各更新一次。学生轨迹组每步先用更新前的学生生成完整的贪心回答,在这些前缀上最小化学生对原模型的全词表逆 KL。参考轨迹组使用标准答案前缀,学习率、优化器和题序相同。两组均使用最后一步权重。生成路径固定时反向传播下一 token 分布的梯度。这是借鉴 MiniLLM 的简化方法。两组的训练步数相等,生成与训练 token 数和实际训练开销可不同。
|
||||
|
||||
学生前缀随更新变化,当前学生组以提交 `2338679` 的蒸馏代码逐题运行原生教师。标准答案前缀固定,参考组可以复用上一轮保存的第 15 层输入及第 11 层供给分数。先核验缓存回执、24 个文件的摘要、题序,再逐题核对完整 token 序列与答案起点。每次启动或续跑时,首道待训题同时走完整前向和缓存路径,逐元素核对教师最终隐状态、接收层输入和供给分数。三者完全相等后,后续题才使用缓存。缓存缺失或核对不符时,以完整教师前向继续。分秩组使用同一份缓存回执。参考组实际采用的路径由训练日志记录,解释训练耗时需考虑这项缓存复用。
|
||||
|
||||
## 复跑顺序
|
||||
|
||||
使用上一轮远程 CPU Python 环境和完整仓库依赖。所有命令共用 `--source`(冻结模型目录)、`--prior`(上一轮包含 frozen.json 和 final 子目录的作业目录)、`--out`(本轮独立目录)。按顺序运行以下 Python 模块。
|
||||
|
||||
1. `crossqkv.lisa_combination_screen` 冻结清单并生成四种诊断条件。
|
||||
2. `crossqkv.lisa_trajectory_train --prefix student` 和 `crossqkv.lisa_trajectory_train --prefix reference` 训练两个轨迹条件。
|
||||
3. `crossqkv.lisa_rank_compare` 根据诊断分数分配秩,训练五个条件。
|
||||
4. `crossqkv.lisa_combination_eval` 生成十组留出答卷,逐题校验并写入 holdout/audit.json。
|
||||
|
||||
冻结清单 SHA-256 为 `6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef`。秩分配与轨迹方法分别和各自匹配的对照比较。跨路线的总训练预算不同。
|
||||
|
||||
留出评估按每批两题记录生成耗时,从提示词编码前计时到回答解析结束,同时汇总生成 token 数。远程 CPU 在多个作业间共享,这些运行记录用于解释实际开销。要验证部署加速,还需要在受控负载下重复测量。
|
||||
|
||||
标准答案前缀组运行期间,逐字节读取远程底座权重,核对 4,548,221,488 字节权重分片的 SHA-256 与冻结清单及上游摘要相同,并复核分词器和配置。[底座文件核验](../results/lisa-combinations/native-files.json)
|
||||
|
||||
已记录远程部署的 13 个实现与测试文件摘要。部署目录中的 `crossqkv/lisa_full_answer.py` 来自提交 `c53d78b`。它与本轮主线版本的差异限于该模块自身的筛选命令行入口,本轮调用的 `evaluate`、`prompt`、`grade` 等函数一致。 [远程代码摘要](../results/lisa-combinations/execution.sha256)
|
||||
|
||||
## 蒸馏权重更新幅度的补充实验
|
||||
|
||||
两个蒸馏终点在验证集分别答对 2/16 和 3/16,低于起始 LiSA 的 5/16。在主实验留出集开始生成前,为这两个终点各固定一个权重中点。对每个适配器张量,取起点和终点的算术平均,以 float64 计算后还原原精度。两个条件共享原底座,推理参数量与原 LiSA 相同,不增加训练步数。这个处理缩短了已训练的总权重位移,其效果可能与从头减半学习率不同。
|
||||
|
||||
在原定十组评估结束后,用相同的 16 道验证题、解码设置和完整答案判分比较起点、两个原终点、两个中点。单一插值系数固定为 0.5。任一中点在完整答案正确数上严格超过起点时,再对两个中点评估同一批 32 对留出题,与已生成的起点、相应终点和另一种前缀中点作配对比较。两者均未超过起点时,这项补充实验止于验证集。公布每组正确数、交换前后均正确的题对数以及各对照的救回和丢失题号。留出集差值以题对为单位、用固定种子 72505 做 10,000 次重采样。该补充分析因观察到验证退步而提出,结果单独记入 `trajectory-midpoint` 目录。
|
||||
|
||||
`python -m crossqkv.lisa_trajectory_midpoint` 接受与主实验一致的 `--source`、`--prior`、`--out`。附加 `--prepare-only` 时仅校验三个端点、生成两个中点及其摘要。正常运行会复核模型、已有答卷和已生成的中点,从每组已验证的完整答卷后续跑。
|
||||
|
||||
已在实验服务器用两个真实训练终点生成中点,并用独立实现逐元素复算。每个中点的 12 个张量、2,476,032 个参数均与按原精度取整的算术中点完全一致。[端点摘要及权重核验](../results/lisa-combinations/trajectory-midpoint/preparation.json)
|
||||
@@ -0,0 +1,81 @@
|
||||
# Qwen3.5-2B 三层 LiSA 共享实验结果
|
||||
|
||||
## 逐层恢复与分秩
|
||||
|
||||
在 Qwen3.5-2B 的 8 对查表题上,单独恢复第 19 层的原生 Q/K,16 道完整答案全部正确。恢复第 15 层答对 15 道,恢复第 23 层答对 1 道。其余两个接收层继续使用同一份 LiSA 权重,每次恢复都会影响下游计算。层号按整个模型从零开始。 [冻结协议](LISA_COMBINATIONS_PROTOCOL.md)
|
||||
|
||||
| 条件 | 完整答案正确 | 同一对交换前后均正确 |
|
||||
|---|---:|---:|
|
||||
| 原 LiSA | 0/16 | 0/8 |
|
||||
| 恢复第 15 层 | 15/16 | 7/8 |
|
||||
| 恢复第 19 层 | 16/16 | 8/8 |
|
||||
| 恢复第 23 层 | 1/16 | 0/8 |
|
||||
|
||||
四组共 64 次生成均得到完整整数。逐题复核使用冻结分词器重新解码 token,检查正常结束或长度上限、题目 ID、标准答案及记分。复核回执保存了原始答卷、题集、分词器及起始适配器的 SHA-256。 [逐题答卷及复核回执](../results/lisa-combinations/diagnostic/)
|
||||
|
||||
这组题可以区分模型是否跟随目标值变化,以及变化后是否答对。原 LiSA 在 8 对题上全都重复了交换前的数字,尽管每对的正确答案都变了。16 个错误答案中,12 个是该题表内其他键的值,4 个是表外数字。恢复第 15 层后,8 对的回答都随交换变化,7 对两次都正确。恢复第 19 层后,8 对两次都正确。恢复第 23 层后,4 对的回答发生变化,但没有一对两次都正确。这些计数来自同一诊断集,用于解释按层分秩的依据。 [成对题目](../results/lisa-combinations/protocol.json) · [四组原始回答](../results/lisa-combinations/diagnostic/)
|
||||
|
||||
第 15 层和第 19 层的正确性只在一题上有差异。目标键位于第 9 项,值为 39,恢复第 15 层生成第 8 项的 98,恢复第 19 层生成 39。交换表项后,两种恢复条件都正确生成 77。每次去掉一对题重新排序,第 23 层在 8 次中均居末位。去掉上述题对时,第 15 层和第 19 层打平,预定的同分规则将第 15 层排在前面。其他 7 次均为第 19 层领先。从这 8 对题中有放回地抽取 8 对,漏掉唯一分出高下的题对的比例为 (7/8)⁸,即 34.4%,此时第 15 层按同分规则排第一。其余 65.6% 的抽样中第 19 层排第一,第 23 层在所有抽样中均排最后。这个比例描述当前诊断题的重采样结果。 [配对复核](../results/lisa-combinations/diagnostic/verified.json)
|
||||
|
||||
按全部诊断题,敏感度分配给第 15、19、23 层的秩依次为 **40、48、32**。均匀对照为 40、40、40,反向对照为 40、32、48。上述结果衡量恢复原生 Q/K 的效果。增加低秩参数能救回多少答案,以及学生轨迹蒸馏能否改善生成,需在训练后用 32 对新留出题检验。
|
||||
|
||||
五个分秩条件各有 2,476,032 个适配器参数。关闭共享时,三个接收层各有 8 个供给分数通道被置零,每个通道连接到 256 个融合单元。因此共有 6,144 个权重(占 0.248%)的输入恒为零,其余 2,469,888 个权重保留连接。分别在开启和关闭共享的条件内比较分秩与均匀秩,两侧的连接数各自相等。
|
||||
|
||||
### 正确答案的概率
|
||||
|
||||
原 LiSA 对正确首位数字的平均概率为 **10.2%**。恢复第 15 或第 19 层后,这一概率分别达到 **76.8%** 和 **78.3%**。在已给定正确首位数字时,两种恢复条件对正确次位数字的平均概率都超过 99%。恢复第 23 层也在全部 16 题上提高了整段正确答案的概率,但首位数字的平均概率仅升至 **12.5%**,最终只答对 1 题。
|
||||
|
||||
| 条件 | 正确首位数字平均概率 | 给定正确首位后的次位数字平均概率 | 整段正确答案平均负对数概率(nats) |
|
||||
|---|---:|---:|---:|
|
||||
| 原生模型 | 96.8% | 99.9% | 0.035 |
|
||||
| 原 LiSA | 10.2% | 59.8% | 3.917 |
|
||||
| 恢复第 15 层 | 76.8% | 99.6% | 0.305 |
|
||||
| 恢复第 19 层 | 78.3% | 99.6% | 0.274 |
|
||||
| 恢复第 23 层 | 12.5% | 60.0% | 3.328 |
|
||||
|
||||
每个条件在同样的 16 题上按全词表评分。每题的整段分数为两个正确数字及结束符的负对数概率之和,再对题目取平均。在贪心解码得分仅相差一题的第 15、19 层之间,恢复第 19 层在 9 题上给整段标准答案更高概率,第 15 层在另外 7 题更高。两者唯一答对情况不同的题以数字 3 开头,恢复第 15 层和第 19 层给这个首位数字的概率分别是 39.9% 和 62.5%。这组数据支持优先关注第 15、19 层,对二者的内部排序证据较弱。原分配继续按预定规则训练。 [逐题逐 token 概率](../results/lisa-combinations/diagnostic/diagnostic-gold-log-probs.json) · [分词器、概率统计与贪心回答核验](../results/lisa-combinations/diagnostic/gold-probability-check.json)
|
||||
|
||||
## 固定参数预算下的分秩验证
|
||||
|
||||
两个共享组分别训练 48 步,使用同样的 24 个训练样本、题序及 2,476,032 个参数。第 15、19、23 层均取秩 40 的对照组复现了原 LiSA,48 步训练损失记录、选中检查点的各参数张量和权重文件 SHA-256 全部一致。两者在验证集的 16 个完整回答也逐 token 相同。 [均匀秩配置](../results/lisa-combinations/shared-uniform/config.json) · [两轮原始答卷](../results/lisa-combinations/shared-uniform/trace.json) · [参数与训练核验](../results/lisa-combinations/shared-uniform/verified.json)
|
||||
|
||||
| 第 15、19、23 层的秩 | 第 1 轮答对 | 第 2 轮答对 | 选中轮次 | 交换前后均正确 |
|
||||
|---|---:|---:|---:|---:|
|
||||
| 均匀分配 40、40、40 | 3/16 | 5/16 | 2 | 1/8 |
|
||||
| 按敏感度分配 40、48、32 | 2/16 | 3/16 | 2 | 0/8 |
|
||||
|
||||
在第一轮,敏感度分秩比均匀秩少答对 1 道。第二轮两组有 12/16 题逐 token 相同,分秩丢失 2 道,救回 0 道。两道退步都来自第 003 对题。均匀组随目标值交换从 93 改答 83,分秩组两次都回答表格第 1 项的 33。总体上,换值后分秩组有 3/8 对改变回答,均匀组有 2/8 对改变回答。只有均匀组在其中一对上两次都给出了目标值。 [分秩配置](../results/lisa-combinations/shared-allocated/config.json) · [分秩两轮答卷](../results/lisa-combinations/shared-allocated/trace.json) · [分秩核验](../results/lisa-combinations/shared-allocated/verified.json) · [两组逐题比较](../results/lisa-combinations/rank-validation.json)
|
||||
|
||||
如果逐题任选敏感度分秩或学生前缀蒸馏的回答,16 题里最多能答对 3 道。再允许选原 LiSA 的回答,上限是 5 道。两条路线在这批验证题上都没有贡献原 LiSA 答错的新题。预定的 32 对新留出题用于检验这一结果能否推广。
|
||||
|
||||
### 同一笔秩预算在注意力分数上能换来多少改善
|
||||
|
||||
取 24 道训练题的原生注意力分数,把题号按奇偶分半。在一半题上用第 11 层的 8 个头线性拟合三个接收层的分数(含截距),在另一半逐题计算剩余误差,两半互换。对每一题、每一层、每一个头,直接用奇异值分解求剩余分数矩阵的最佳秩近似。下表是所有 token 对的均方误差,各题等权。这项分析可用旧缓存复跑,不需要加载底座。 [计算脚本](../crossqkv/lisa_rank_residuals.py) · [逐题误差与七种分配](../results/lisa-combinations/fit-rank-residuals.json)
|
||||
|
||||
| 接收层 | 秩 32 | 秩 40 | 秩 48 | 从 40 增至 48 减少的误差 |
|
||||
|---|---:|---:|---:|---:|
|
||||
| 15 | 0.03952 | 0.02078 | 0.01084 | 0.00994 |
|
||||
| 19 | 0.04404 | 0.02256 | 0.01152 | 0.01104 |
|
||||
| 23 | 0.04279 | 0.02261 | 0.01179 | 0.01082 |
|
||||
|
||||
第 19 层从 40 增到 48,平均误差下降 0.01104。为它让出这 8 个秩,第 23 层从 40 降到 32,误差上升 0.02018。三层平均误差由均匀秩的 0.02198 升到敏感度分秩的 0.02503,增加 13.9%。对每一道训练题,把 32、40、48 任意分给三层的六种排列,其误差都高于三层各取 40。另用 QR 分解拟合供给头映射,显式重建各秩的矩阵,288 个逐题、逐层误差(含秩 0)与奇异值计算的最大绝对差小于 2×10⁻¹⁴。
|
||||
|
||||
这项近似用同一个第 11 层预测三个接收层,并可逐题看到原生目标矩阵。实际 LiSA 依次把第 11、15、19 层的分数传给第 15、19、23 层,后两次传递的是上一接收层的融合输出。模型还须从隐藏状态预测局部分数。13.9% 衡量的是固定第 11 层时的矩阵近似误差,实际链式共享的效果由完整答案检验。 [训练前向](../crossqkv/lisa_tail.py) · [贪心生成前向](../crossqkv/lisa_generate.py)
|
||||
|
||||
把供给改成上一全注意力层的**原生分数**后,均匀秩的三层平均误差为 0.01682,敏感度分秩为 0.01901(增加 13.0%),反向分秩为 0.01885(增加 12.1%)。六种非均匀排列在每道题上的误差仍然都更高,但两种分秩的相对顺序随供给层而改变。固定第 11 层时,敏感度分秩在 23/24 题上优于反向分秩。使用相邻层原生分数时,这一数字降至 2/24。两种分析都支持均匀秩在这七个配置里的分数近似优势,要判断多给第 19 层还是第 23 层更有利于完整答案,仍须比较训练后的链式模型。脚本选项为 `--adjacent-native`。独立 QR 拟合及逐头矩阵重建复核了 288 个误差值,最大绝对差小于 2×10⁻¹⁴。 [相邻原生供给的逐题数据](../results/lisa-combinations/fit-rank-adjacent-native.json)
|
||||
|
||||
## 两种蒸馏前缀的完整答案
|
||||
|
||||
两种蒸馏在同一批 16 道验证题上都丢掉了原 LiSA 答对的题,也都没有救回原本答错的题。学生前缀组比标准答案前缀组少答对 1 道。三组共 48 个回答均正常结束,可解析出完整整数。 [起始 LiSA 答卷](../results/lisa-combinations/validation-prior-lisa.json) · [学生前缀答卷](../results/lisa-combinations/trajectory-student/validation-student.json) · [标准答案前缀答卷](../results/lisa-combinations/trajectory-reference/validation-reference.json)
|
||||
|
||||
| 条件 | 完整答案正确 | 交换前后均正确 | 相对起始 LiSA 救回/丢失 |
|
||||
|---|---:|---:|---:|
|
||||
| 起始 LiSA | 5/16 | 1/8 | — |
|
||||
| 标准答案前缀蒸馏 | 3/16 | 0/8 | 0/2 |
|
||||
| 学生前缀蒸馏 | 2/16 | 0/8 | 0/3 |
|
||||
|
||||
第 003 对题的目标键在第 11 项,交换后其值从 93 变为 83。起始 LiSA 两次都答对,两种蒸馏都连续两次读出第 5 项的 43。这个退步在只使用标准答案前缀训练时也出现了。第 006 对的第一题是两种蒸馏在正确性上唯一有差别的题,标准答案前缀组答对 78,学生前缀组生成了表中没有的 38。两种蒸馏在全部 16 题中有 13 题生成完全相同的 token。 [逐题得失与题对比较](../results/lisa-combinations/trajectory-validation.json)
|
||||
|
||||
两组从同一份 LiSA 权重出发,在相同的 24 道训练题上按相同顺序各完成 24 次逆 KL 更新,各有 72 个下一 token 预测位置。11 道题的两条训练轨迹完全相同,全部 72 个位置中有 25 个位置的前缀不同。标准答案前缀组启动时,缓存路径的教师最终隐状态、接收层输入与供给分数同完整原生前向逐元素相等。 [学生训练轨迹](../results/lisa-combinations/trajectory-student/trace.json) · [标准答案训练轨迹](../results/lisa-combinations/trajectory-reference/trace.json)
|
||||
|
||||
两组验证答卷已用冻结的分词器重新判分,并核对优化器更新次数、最后一个训练检查点和实际评估的权重。本次验证支持这套蒸馏配置在这 8 对题上没有改善最终答案。32 对新留出题用于检验这个结果能否推广。 [学生组核验](../results/lisa-combinations/trajectory-student/verified.json) · [标准答案组核验](../results/lisa-combinations/trajectory-reference/verified.json) · [实验协议](LISA_COMBINATIONS_PROTOCOL.md)
|
||||
@@ -0,0 +1,165 @@
|
||||
# LiSA effect reproduction on Qwen3.5-2B
|
||||
|
||||
The earlier single-layer training verified the method but used an evaluation
|
||||
where the frozen 2B model answered only one of sixteen items. This protocol
|
||||
measures retention of an existing capability and the cost of exercising it.
|
||||
|
||||
## Comparison with the published experiment
|
||||
|
||||
The 96.44% in Table 2 is the average performance retained by LLaMA2-13B
|
||||
with 22 recipient layers across the reported benchmarks excluding LAMBADA.
|
||||
At the same 22 layers, direct score sharing retained 46.76% and the direct
|
||||
sharing plus LoRA baseline retained 65.95%. The published main uptraining
|
||||
used 4.2 billion sampled RedPajama tokens on eight A800 GPUs. This experiment
|
||||
uses a frozen Qwen3.5-2B backbone, two recipient layers, 12 synthetic fit
|
||||
prompts and a single CPU runner. Each epoch of the trainable variants sees
|
||||
1,874 next-token targets drawn from those same 12 prompts. The comparable
|
||||
effect is an improvement over direct sharing under a fixed layer schedule.
|
||||
The magnitude on a 32-item lookup test and the timing of CPU attention should
|
||||
be interpreted within those settings. [Mu et al., Table 2 and Appendix C.1](https://aclanthology.org/2026.tacl-1.30.pdf)
|
||||
|
||||
Qwen's text decoder has six full-attention layers and 18 linear-attention
|
||||
layers. The chained configuration modifies two of the six full-attention
|
||||
layers and two of the 24 decoder layers overall. Layer numbers are zero-based.
|
||||
The source record in `results/lisa-effect-reproduction/runtime.json` pins
|
||||
the original model revision, the checkpoint shard and its download-manifest hash.
|
||||
|
||||
## Task and layer screening
|
||||
|
||||
All four tasks, answer-position balances, and generators are fixed in
|
||||
`crossqkv/lisa_effect_screen.py`. The screening split is used only for
|
||||
selecting a primary task family and the schedule. Fit, validation, and test
|
||||
prompts have disjoint fixed seeds. The screen must finish before opening
|
||||
test metrics.
|
||||
|
||||
Test original attention, 19→23 direct reuse, and a chained 15→19→23
|
||||
configuration, with each donor providing its actual scores in the current
|
||||
run. Primary eligibility on the development screen requires original accuracy
|
||||
at least 5/8 and at least one original-correct item lost under shared
|
||||
attention. Compare candidate schedules by the count of native-correct items
|
||||
lost, preferring the two-receiver schedule among ties and recording net
|
||||
accuracy and four-option NLL. If none qualify, retain the screen and expand
|
||||
development coverage before choosing a new task; never pick based on test
|
||||
errors. The fixed test also reports all outcomes on the chosen task, including
|
||||
native-incorrect items.
|
||||
|
||||
## Performance comparison
|
||||
|
||||
Compare native, direct, fit-only linear calibration and trainable LiSA on
|
||||
identical prompts. Preserve Qwen recipient gates, V, and output projection.
|
||||
Compare the published 0.25 Huber and 0.75 next-token CE objective with an
|
||||
explicit answer-weighted variant. All adaptation and model selection use
|
||||
only fit/validation. Record the whole-sequence training loss. On held-out prompts, report
|
||||
answer-only loss, correctly recovered and newly lost questions, net
|
||||
accuracy, and performance at one and two recipients. A measured failure to recover is a valid outcome.
|
||||
|
||||
For speed, use a path that actually skips dense Q/K at shared sites, keeping
|
||||
gate rows. Verify against a reference first. With identical prompts,
|
||||
checkpoint and runner, report measured latency for the implemented prefill
|
||||
or decode path and its true scope. Account for both the reduced K storage
|
||||
and additional score tensors. Do not call analytical estimates measured
|
||||
speed or apply paper throughput figures to this CPU implementation.
|
||||
|
||||
The incremental recipient benchmark uses actual K/V buffers and compares the
|
||||
shared implementation with native attention at the same prefix length and FP32
|
||||
storage format. Numerical tests compare incremental scores and outputs with
|
||||
batched causal attention at every query position. Report observed allocation
|
||||
for K/V and the donor score row separately from end-to-end prefill or decode.
|
||||
It does not include upstream score generation or the rest of the decoder.
|
||||
|
||||
```sh
|
||||
python -B -m crossqkv.lisa_decode_bench --source runs/cpu-qwen35-2b \
|
||||
--capture runs/LISA_EFFECT_CAPTURE --checkpoint runs/LISA_EFFECT_RESULTS/lisa.pt \
|
||||
--out runs/LISA_EFFECT_RESULTS/decode.json
|
||||
```
|
||||
|
||||
An interrupted development screen can resume with the same fixed prompt set
|
||||
using `--resume`. Use `--reuse-prefix` to compute the frozen prefix once per
|
||||
prompt. The replay checks original-mode parity before accepting results.
|
||||
|
||||
## Recorded development selection
|
||||
|
||||
The fixed screen completed with 32 prompts. The prespecified eligibility rule
|
||||
selected the 16-entry lookup task with recipients at layers 19 and 23. Native
|
||||
and one-recipient direct sharing each scored 8/8. Two-recipient direct sharing
|
||||
scored 7/8 and lost one native-correct answer. The selected configuration,
|
||||
all screened logits, and the disjoint prompt manifest are archived under
|
||||
`results/lisa-effect-reproduction/`. This was selection evidence only.
|
||||
|
||||
The held-out analysis records rescue of native-correct errors, newly introduced
|
||||
errors, paired uncertainty and answer NLL. A second pass streams the complete
|
||||
vocabulary at the same answer positions and compares one- and two-recipient
|
||||
forward paths. In the one-recipient LiSA ablation the final adapter comes from
|
||||
the joint checkpoint. It is evaluated unchanged, with the earlier recipient
|
||||
restored to native attention.
|
||||
|
||||
Training also saves each finished epoch's adapter, AdamW state, validation
|
||||
history and selected weights atomically per variant. For interrupted training,
|
||||
re-run the same command with `--resume` and the same output directory and epoch
|
||||
budget. Resume verifies the frozen training configuration, preserves finished
|
||||
epochs and re-scores the locked test set from the validation-selected weights.
|
||||
The separate selected checkpoints retain the original weights-only schema.
|
||||
|
||||
The development error was `screen-lookup16-005`. Its correct choice was
|
||||
option 4. Across native, single-recipient direct reuse and chained direct reuse,
|
||||
the four-choice probability of option 4 was 0.706, 0.815 and 0.403,
|
||||
respectively. Its correct-versus-best-distractor logit margins were
|
||||
+1.265, +1.861 and −0.258. The chained result chose option 2. These are
|
||||
development observations that describe the selected condition, not test
|
||||
results or a basis for changing the frozen prompts.
|
||||
|
||||
## Reproduction commands
|
||||
|
||||
Run from the project code root on the confirmed remote CPU environment.
|
||||
Choose new output directories. Keep the same source checkpoint across all
|
||||
commands. The fixed manifest contains all four split definitions, and capture
|
||||
writes an independent selection record and source fingerprints.
|
||||
|
||||
```sh
|
||||
export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1
|
||||
PYTHON=venv/bin/python
|
||||
SOURCE=runs/cpu-qwen35-2b
|
||||
SCREEN=runs/NEW_EFFECT_SCREEN
|
||||
CAPTURE=runs/NEW_EFFECT_CAPTURE
|
||||
RESULT=runs/NEW_EFFECT_RESULT
|
||||
|
||||
"$PYTHON" -B -m crossqkv.lisa_effect_screen --source "$SOURCE" --out "$SCREEN" --reuse-prefix
|
||||
"$PYTHON" -B -m crossqkv.lisa_effect capture --source "$SOURCE" --input "$SCREEN" --out "$CAPTURE"
|
||||
"$PYTHON" -B -m crossqkv.lisa_effect train --source "$SOURCE" --input "$CAPTURE" --out "$RESULT" --epochs 2
|
||||
"$PYTHON" -B -m crossqkv.lisa_decode_bench --source "$SOURCE" --capture "$CAPTURE" \
|
||||
--checkpoint "$RESULT/lisa.pt" --out "$RESULT/decode.json"
|
||||
"$PYTHON" -B -m crossqkv.lisa_effect_answer_audit --source "$SOURCE" --cache "$CAPTURE" \
|
||||
--trained "$RESULT" --out "$RESULT/full-vocab-answers.json"
|
||||
"$PYTHON" -B -m crossqkv.lisa_effect_audit --fixed "$SCREEN/fixed-problems.json" \
|
||||
--selection "$CAPTURE/selection.json" --items "$RESULT/test-items.json" \
|
||||
--perf "$RESULT/performance.json" --decode "$RESULT/decode.json" \
|
||||
--full-vocab "$RESULT/full-vocab-answers.json" --out "$RESULT/paired-audit.json"
|
||||
```
|
||||
|
||||
The paired audit defines a rescue as a native-correct item made wrong by
|
||||
direct sharing and made correct again by the tested adapter. It reports
|
||||
newly lost native-and-direct-correct items separately. An improvement in
|
||||
mean four-option answer NLL, including among items already answered
|
||||
correctly, does not by itself establish a rescue. The audit computes paired
|
||||
intervals for NLL differences and checks that common arms have identical
|
||||
four-choice correctness in the primary test and the full-vocabulary pass.
|
||||
|
||||
Training scores *all* valid shifted tokens with exact full-vocabulary CE
|
||||
and uses the validation four-option answer loss to freeze checkpoints. The
|
||||
answer audit scores only the answer position over the whole vocabulary.
|
||||
The answer is one token per prompt. In the fit set, it accounts for about
|
||||
0.64% of the unweighted CE target mass and about 9.35% with the 16-fold answer
|
||||
weight. The objective applies the same 0.75 coefficient to the resulting
|
||||
mean CE in both trainable variants.
|
||||
It does not report whole-prompt CE for the held-out items or free-form
|
||||
multi-token answer accuracy. That distinction is important for interpreting
|
||||
the previous experiment, in which those two losses moved in opposite
|
||||
directions.
|
||||
|
||||
For the isolated incremental attention timing, report both streamed
|
||||
checkpoint projections and an otherwise identical timing with only that
|
||||
site's frozen projections resident in memory. Verify output and raw score
|
||||
parity before interpreting the pair of timings. The resident measurements
|
||||
exclude weight-load time, and both timings exclude upstream computation and
|
||||
other decoder blocks. K/V and upstream score-row allocation are itemized
|
||||
separately; neither timing is an end-to-end server throughput claim.
|
||||
@@ -0,0 +1,49 @@
|
||||
# Qwen3.5-2B 双层 LiSA 复现实验
|
||||
|
||||
在冻结的 32 道查找题上,原模型、直接共享、线性修正和两版 LiSA 的四选一准确率均为 32/32。全词表首 token 命中率从双层直接共享的 27/32 升到两版 LiSA 的 32/32。五道变化题都涉及首 token 从 `<think>` 变成正确选项。两个接收层各自的 K/V 缓存减少 42.2%。耗时随权重是否驻留及测量阶段而异。
|
||||
|
||||
## 四选一任务表现
|
||||
|
||||
开发筛选中,原模型和单层直接共享各答对 8/8,双层直接共享答对 7/8。以此冻结 16 条目查找任务,测试使用独立题目。共享链为 15→19→23,层号从 0 起算。第 19、23 层占 6 个全注意力层的三分之一,占 24 个解码层的十二分之一。
|
||||
|
||||
| 方法 | 留出正确数 | 四选一答案 NLL ↓ |
|
||||
| --- | ---: | ---: |
|
||||
| 原模型 | 32/32 | 0.1341 |
|
||||
| 双层直接共享 | 32/32 | 0.0728 |
|
||||
| 双层线性修正 | 32/32 | 0.0720 |
|
||||
| 双层 LiSA | 32/32 | 0.1846 |
|
||||
| 双层 LiSA,答案损失加权 | 32/32 | 0.1260 |
|
||||
|
||||
直接共享在留出集上丢失 0 道原模型答对的题,因此无法估计 LiSA 对这类错题的恢复率。答案加权把 LiSA 的四选一 NLL 降低了 0.0586,仍高于直接共享。相比直接共享,原版 LiSA 的 NLL 增加 0.1118,按题配对 bootstrap 95% 区间为 [0.0968, 0.1282]。答案加权 LiSA 的差为 0.0532,区间为 [0.0327, 0.0749]。三种训练方法各用 12 道拟合题跑两轮,并由另外 12 道验证题选择检查点。所选检查点都是第 2 轮。
|
||||
|
||||
## 全词表首 token
|
||||
|
||||
| 方法 | 正确选项为首 token | 全词表答案 NLL ↓ |
|
||||
| --- | ---: | ---: |
|
||||
| 原模型 | 27/32 | 0.5633 |
|
||||
| 单层直接共享,第 23 层 | 32/32 | 0.3124 |
|
||||
| 单层 LiSA,第 23 层,使用双层训练的适配器 | 32/32 | 0.2554 |
|
||||
| 双层直接共享 | 27/32 | 0.5579 |
|
||||
| 双层线性修正 | 27/32 | 0.5574 |
|
||||
| 双层 LiSA | 32/32 | 0.4706 |
|
||||
| 双层 LiSA,答案损失加权 | 32/32 | 0.1545 |
|
||||
|
||||
两版 LiSA 对双层直接共享的首 token 净改善均为 5/32,另有 0 道从正确变成错误,McNemar 精确双侧 p = 0.0625。双层直接共享比单层直接共享少答对的五道,恰好也是原模型和线性修正先输出 `<think>` 的五道。它们的正确选项都是 `4`,四选一口径在全部方法上均答对。输出符合格式是这里观察到的改善,后续生成内容没有记录。
|
||||
|
||||
原版 LiSA 相对双层直接共享的全词表 NLL 差为 −0.0872,按题配对 bootstrap 95% 区间为 [−0.1498, −0.0305]。答案加权版的差为 −0.4033,区间为 [−0.4796, −0.3344]。原版和加权版的首 token 命中数一致,加权版的平均答案 NLL 更低。由于五道变化集中于同一选项和同一个替代 token,推广到其它任务或输出格式还需要独立证据。
|
||||
|
||||
## CPU 计时和缓存
|
||||
|
||||
| 测量范围 | 原模型 | LiSA |
|
||||
| --- | ---: | ---: |
|
||||
| 缓存前缀后的尾部预填充,157 tokens | 12.37 s | 16.31 s |
|
||||
| 第 19 层单步,流式读取权重 | 136.15 ms | 96.32 ms |
|
||||
| 第 23 层单步,流式读取权重 | 136.39 ms | 138.80 ms |
|
||||
| 第 19 层单步,投影权重常驻 | 42.57 ms | 32.09 ms |
|
||||
| 第 23 层单步,投影权重常驻 | 44.80 ms | 22.79 ms |
|
||||
|
||||
每个接收层的 FP32 K/V 实际分配从 643,072 降到 371,776 字节,下降 42.2%。计入该层所用的 5,024 字节上游分数行后,单层合计下降 41.4%。V 缓存为 321,536 字节。解码计时的单位是单个接收层的一步,计时范围从接收现成分数行开始,至该层注意力输出结束。预填充用 3 次计时的中位数,单层解码每个配置用 9 步计时的中位数。
|
||||
|
||||
论文表 2 的 96.44% 衡量 LLaMA2-13B 在共享 22 层时多个基准上的平均性能保留率。这里每轮只有 1,874 个训练目标 token,测到的是单一查找任务的表现和 CPU 组件耗时。 [论文表 2、表 3 和附录 C.1](https://aclanthology.org/2026.tacl-1.30.pdf)
|
||||
|
||||
训练轨迹、两种答案口径的逐题记录、配对统计、缓存和时延原始结果均在 [实验结果目录](../results/lisa-effect-reproduction/)。[复跑协议](LISA_EFFECT_PROTOCOL.md)
|
||||
@@ -0,0 +1,42 @@
|
||||
# 完整答案评估下的 LiSA 共享实验
|
||||
|
||||
本轮在同一 Qwen3.5-2B 检查点上比较 3、4、5 个全注意力层接收共享分数的效果。上一轮发现首 token 命中的变化集中在 `<think>` 和同一个选项。本轮要求模型从全词表生成完整的多 token 数值答案,逐题复核答案的数值。
|
||||
|
||||
## 开发筛选与冻结
|
||||
|
||||
从 0 开始编号。接收层分别为 `[15, 19, 23]`、`[11, 15, 19, 23]` 和 `[7, 11, 15, 19, 23]`。每个接收层使用本次前向中前一全注意力层实际输出的分数。接收端保留自身的 V、门控和输出投影。原模型与三个直接共享配置配对生成。
|
||||
|
||||
候选任务为表中数值查找、重复键最后值查找、两位数加法、重复项计数。固定生成器在运行筛选之前写出每类任务 8 道开发题、24 道训练题、8 道验证题和 32 道留出测试题。同一数值题跨数据划分去重,加法按交换律规范操作数。每个候选都要满足原模型至少答对 6/8 且至少 2 道原模型答对的题在直接共享下生成了错误整数。选择时依次比较数字错误数、原模型正确数和接收层数,仍并列时取字典序最大的任务标识。完成了生成却没有可提取答案的情况单独记数。
|
||||
|
||||
使用检查点发布的单轮聊天模板和关闭 thinking 的生成前缀。所有配置从全词表逐 token 贪心生成,遇到回合结束或文本结束 token 停止,最多生成 24 tokens。主要指标要求已生成停止 token,并从整条答复提取完整整数。接受纯整数或明确的最终答案行,可去掉开头完整的 thinking 区块。原始 token、文本、停止原因和提取值都随结果存档。 [检查点聊天模板](https://huggingface.co/Qwen/Qwen3.5-2B/blob/15852e8c16360a2fea060d615a32b45270f8a8fc/chat_template.jinja)
|
||||
|
||||
## LiSA 训练与测试
|
||||
|
||||
开发筛选完成后用固定哈希验证题集、共享配置、原模型和筛选数据。仅在存在达标配置时启动训练。冻结原模型,只训练两个线性层组成的注意力头融合和 rank 40 的低秩 Q/K。用原模型在同一训练序列上的遮罩前注意力分数作为教师。损失为 0.25 倍 Huber 距离加 0.75 倍全词表交叉熵。Huber 覆盖实际序列长度内的所有查询和键,注意力前向应用因果遮罩。交叉熵覆盖参考答案的所有 token 和结束 token。每个训练样本更新后保存优化器和模型状态。验证集上生成完整答案,按正确数选择两轮中的最佳检查点,同分选较早者。
|
||||
|
||||
最终对同一批留出题的原模型、直接共享、训练后的 LiSA 分别生成并保存完整回答。报告准确率、直接共享造成的数值错误、其中被 LiSA 恢复的题、新增错误和缺少可提取答案的情况。准确率差按题配对估计,另报告 McNemar 精确双侧检验。
|
||||
|
||||
## 运行命令
|
||||
|
||||
在已确认的远程 CPU 环境中,从源代码目录运行,使用独立输出目录。模型源目录需要包含上一轮实验使用的权重、配置、下载清单和 tokenizer。
|
||||
|
||||
```sh
|
||||
export OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1
|
||||
PYTHON=venv/bin/python
|
||||
SOURCE=runs/cpu-qwen35-2b
|
||||
SCREEN=runs/NEW_FULL_ANSWER_SCREEN
|
||||
RESULT=runs/NEW_FULL_ANSWER_RESULT
|
||||
|
||||
"$PYTHON" -B -m crossqkv.lisa_full_answer --source "$SOURCE" --out "$SCREEN" --batch-prompts 1 --preflight
|
||||
"$PYTHON" -B -m crossqkv.lisa_full_answer --source "$SOURCE" --out "$SCREEN" --batch-prompts 1
|
||||
"$PYTHON" -B -m crossqkv.lisa_full_answer_train --source "$SOURCE" --screen "$SCREEN" --out "$RESULT"
|
||||
"$PYTHON" -B -m crossqkv.lisa_full_answer_verify --tokenizer "$SOURCE/tokenizer.json" \
|
||||
--frozen "$SCREEN/frozen.json" --selection "$SCREEN/selection.json" \
|
||||
--rows "$RESULT/test-items.json" --out "$RESULT/verified-test.json"
|
||||
```
|
||||
|
||||
使用原目录运行相同命令即可续跑。筛选和测试将按已保存的题号继续。训练使用已保存的优化器和训练步。
|
||||
|
||||
筛选续跑可加 `--execution-batch-prompts 2`。它会重跑已完成的前两题,要求所有配置的 token 序列、停止原因与判分逐项一致,才继续处理剩余题目,并把回放凭证写入 `execution-batch-replay.json`。冻结的 `--batch-prompts 1` 参数仍用于校验原实验。双题模式超出资源限制或未通过回放时,可用原单题命令从已保存的行继续。本次在第五题写盘后交接,前两题的四个配置均通过了完整回放核对。
|
||||
|
||||
服务器约有 1.7 GiB 内存。前五题采用单题批量,从第六题起采用通过回放的双题批量。每道题的四个配置共享权重读取。前两次预检和一次生成在服务器仍有约 1 GiB 可用内存时触发进程独立换页上限。当前作业沿用原冻结题集,并在每层结束时释放空闲内存。可用内存、进程 RSS、低可用内存下的持续换页压力和运行时间均由原检查器监控。
|
||||
@@ -0,0 +1,46 @@
|
||||
# 完整答案下的 3–5 层共享实验
|
||||
|
||||
开发集筛选选定表中数值查找和三个接收层 `[15, 19, 23]`,层号从 0 起算。原模型在查表组答对 8/8,3 层直接共享在这八题上都生成了用结束 token 收尾的错误整数。该条件用于后续 LiSA 训练和独立留出评估。
|
||||
|
||||
## 开发集筛选
|
||||
|
||||
每个任务各有八题。共享列依次列出正确数、原模型答对却在直接共享后得到错误整数的题数,以及未提取到答案的题数。
|
||||
|
||||
| 任务 | 原模型正确 | 3 层共享 | 4 层共享 | 5 层共享 |
|
||||
| --- | ---: | ---: | ---: | ---: |
|
||||
| 查表 | 8 | 0 / 8 / 0 | 0 / 4 / 4 | 0 / 0 / 8 |
|
||||
| 重复键最后值 | 6 | 0 / 6 / 0 | 0 / 3 / 4 | 0 / 0 / 8 |
|
||||
| 加法 | 7 | 0 / 7 / 0 | 0 / 1 / 7 | 0 / 0 / 8 |
|
||||
| 重复项计数 | 1 | 1 / 1 / 0 | 0 / 1 / 0 | 0 / 0 / 8 |
|
||||
|
||||
5 层配置的 32 道生成均达到 24-token 上限。3 层对查表、重复键和加法均达到筛选门槛,查表中从正确变成错误整数的题数最多。筛选结果用于选择条件。留出集将另行估计准确率差、恢复题和新增错误。
|
||||
|
||||
独立复核用原分词器重新解析 32 道题的全部四组 token 序列,核对终止原因和正确性。冻结清单、逐题生成、组内汇总、选择记录和训练配置均已归档。 [实验协议](LISA_FULL_ANSWER_PROTOCOL.md) · [原始数据](../results/lisa-full-answer-reproduction/)
|
||||
|
||||
## 训练与独立留出评估
|
||||
|
||||
三个接收层各训练 825,344 个参数,总计 2,476,032 个。完成了 24 道冻结拟合题的教师分数采集,复核按题检查输入 token、教师张量形状与有限值,并保存各采集文件的 SHA-256。
|
||||
|
||||
两轮各完成 24 次更新。用冻结分词器重新解码两轮各 8 道验证题的生成结果,首轮答对 1 道,第二轮答对 2 道。按预先固定的验证正确数选用第二轮检查点。两轮逐步损失、验证题原始输出及检查点选择见训练记录。 [训练记录](../results/lisa-full-answer-reproduction/trace.json)
|
||||
|
||||
### 留出集结果
|
||||
|
||||
在 32 道独立查表题上,三组共 96 条回答全部生成了正常的结束 token,并能提取完整整数。原模型全对。三层直接共享让 32 道题都答成了错误整数,LiSA 救回其中 3 道,另外 29 道仍答错。
|
||||
|
||||
| 配置 | 正确数 | 准确率 |
|
||||
| --- | ---: | ---: |
|
||||
| 原模型 | 32/32 | 100% |
|
||||
| 三层直接共享 | 0/32 | 0% |
|
||||
| 三层 LiSA | 3/32 | 9.38% |
|
||||
|
||||
| 恢复题 | 原模型及标准答案 | 直接共享 | LiSA |
|
||||
| --- | ---: | ---: | ---: |
|
||||
| `test-lookup-014` | 71 | 47 | 71 |
|
||||
| `test-lookup-020` | 94 | 5 | 94 |
|
||||
| `test-lookup-021` | 44 | 10 | 44 |
|
||||
|
||||
相对直接共享,LiSA 准确率提高 9.38 个百分点,按题配对 bootstrap 95% 区间为 0 至 21.88 个百分点。McNemar 精确双侧检验的 p 值为 0.25。逐题变化方向是 3 道从错变对、0 道从对变错。直接共享全错,因此这个留出集无法估计 LiSA 保留直接共享已有正确答案的能力。
|
||||
|
||||
结果确认了三个真实数值错误的恢复案例。样本上的准确率提升仍有较大不确定性。结论限于这一个 Qwen3.5-2B 检查点、查表任务和三个接收层,训练用 24 道合成题。四层和五层共享只做了开发筛选,其 LiSA 恢复效果仍待测。
|
||||
|
||||
远程实验和独立复核均以退出码 0 完成。复核从保存的 token 重新解析并重算三组分数,结果与训练进程生成的汇总一致。摘要记录的是远程原件路径,选中的适配器保存在该远程运行目录。 [逐题输出](../results/lisa-full-answer-reproduction/test-items.json) · [配对统计](../results/lisa-full-answer-reproduction/test-audit.json) · [复核回执](../results/lisa-full-answer-reproduction/verified-test.json) · [文件摘要](../results/lisa-full-answer-reproduction/result.sha256)
|
||||
+6
-2
@@ -77,11 +77,13 @@ def attention(q, k, v):
|
||||
|
||||
|
||||
class StreamingLM:
|
||||
def __init__(self, weights, config, seconds=7200, enforce_memory=True):
|
||||
def __init__(self, weights, config, seconds=7200, enforce_memory=True,
|
||||
process_swap_limit_kib=128*1024):
|
||||
self.tensors = load_tensors(Path(weights))
|
||||
self.config = config.get('text_config', config)
|
||||
self.deadline = time.monotonic() + seconds
|
||||
self.enforce_memory = enforce_memory
|
||||
self.process_swap_limit_kib = process_swap_limit_kib
|
||||
self.eps = self.config['rms_norm_eps']
|
||||
self.norm_replacement = None
|
||||
self.capture_qk = False
|
||||
@@ -107,7 +109,9 @@ class StreamingLM:
|
||||
rate = (count-self.swap_observation[1])*4096/elapsed
|
||||
self.swap_pressure_windows = self.swap_pressure_windows+1 if rate > 4*1024**2 else 0
|
||||
own_swap_kib = int(status.get('VmSwap', '0 kB').split()[0])
|
||||
if self.swap_pressure_windows >= 3 and (available < 384*1024 or own_swap_kib > 128*1024):
|
||||
over_process_limit = (self.process_swap_limit_kib is not None
|
||||
and own_swap_kib > self.process_swap_limit_kib)
|
||||
if self.swap_pressure_windows >= 3 and (available < 384*1024 or over_process_limit):
|
||||
raise MemoryError(f'Sustained host swap pressure plus constrained memory: available={available} KiB, process_swap={own_swap_kib} KiB')
|
||||
self.swap_observation = (now,count)
|
||||
if rss_kib > 512*1024 or available < 256*1024:
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
[
|
||||
{
|
||||
"id": "diagnostic-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 76,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
24,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "94<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 94,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 75,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
24,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "94<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 94,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 39,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
22,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "73<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 73,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 76,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
22,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "73<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 73,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
20,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"response": "52<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 52,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 22,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
20,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"response": "52<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 52,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
24,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"response": "90<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 90,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 21,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
24,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"response": "90<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 90,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 74,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
24,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "99<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 99,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
24,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "99<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 99,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 39,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
21,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "61<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 61,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 77,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
21,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "61<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 61,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 40,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
20,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"response": "50<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 50,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 67,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
20,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"response": "50<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 50,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
19,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "43<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 43,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 61,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tokens": [
|
||||
19,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "43<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 43,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,578 @@
|
||||
[
|
||||
{
|
||||
"id": "diagnostic-000-0",
|
||||
"gold": 76,
|
||||
"tokens": [
|
||||
22,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.024837493896484375,
|
||||
-0.0002384185791015625,
|
||||
-2.6702880859375e-05
|
||||
],
|
||||
"baseline": [
|
||||
-3.1313209533691406,
|
||||
-0.6160259246826172,
|
||||
-0.0002994537353515625
|
||||
],
|
||||
"restore-15": [
|
||||
-0.32304954528808594,
|
||||
-0.000881195068359375,
|
||||
-2.47955322265625e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.7100887298583984,
|
||||
-0.0026397705078125,
|
||||
-0.0001506805419921875
|
||||
],
|
||||
"restore-23": [
|
||||
-2.4421043395996094,
|
||||
-0.5711994171142578,
|
||||
-0.0023059844970703125
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-000-1",
|
||||
"gold": 75,
|
||||
"tokens": [
|
||||
22,
|
||||
20,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.014467239379882812,
|
||||
-0.000675201416015625,
|
||||
-2.09808349609375e-05
|
||||
],
|
||||
"baseline": [
|
||||
-3.0086593627929688,
|
||||
-2.8373260498046875,
|
||||
-0.0002994537353515625
|
||||
],
|
||||
"restore-15": [
|
||||
-0.29117584228515625,
|
||||
-0.0007476806640625,
|
||||
-2.47955322265625e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.6275234222412109,
|
||||
-0.022729873657226562,
|
||||
-0.000133514404296875
|
||||
],
|
||||
"restore-23": [
|
||||
-2.3499526977539062,
|
||||
-2.0442771911621094,
|
||||
-0.0018825531005859375
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-0",
|
||||
"gold": 39,
|
||||
"tokens": [
|
||||
18,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.0038299560546875,
|
||||
-0.0001392364501953125,
|
||||
-7.62939453125e-06
|
||||
],
|
||||
"baseline": [
|
||||
-1.949319839477539,
|
||||
-0.018270492553710938,
|
||||
-6.67572021484375e-05
|
||||
],
|
||||
"restore-15": [
|
||||
-0.2358112335205078,
|
||||
-0.000335693359375,
|
||||
-1.52587890625e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.10454750061035156,
|
||||
-8.58306884765625e-05,
|
||||
-4.9591064453125e-05
|
||||
],
|
||||
"restore-23": [
|
||||
-1.6455535888671875,
|
||||
-0.04067420959472656,
|
||||
-0.0001983642578125
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-1",
|
||||
"gold": 76,
|
||||
"tokens": [
|
||||
22,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.0050868988037109375,
|
||||
-0.0002613067626953125,
|
||||
-7.62939453125e-06
|
||||
],
|
||||
"baseline": [
|
||||
-0.32277679443359375,
|
||||
-1.6059131622314453,
|
||||
-9.1552734375e-05
|
||||
],
|
||||
"restore-15": [
|
||||
-0.13455772399902344,
|
||||
-0.0006656646728515625,
|
||||
-2.47955322265625e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.0066509246826171875,
|
||||
-0.0039806365966796875,
|
||||
-4.1961669921875e-05
|
||||
],
|
||||
"restore-23": [
|
||||
-0.36336517333984375,
|
||||
-1.0072898864746094,
|
||||
-0.00034332275390625
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-0",
|
||||
"gold": 49,
|
||||
"tokens": [
|
||||
19,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.0087738037109375,
|
||||
-0.00025177001953125,
|
||||
-2.09808349609375e-05
|
||||
],
|
||||
"baseline": [
|
||||
-2.0372848510742188,
|
||||
-0.009572982788085938,
|
||||
-0.0003986358642578125
|
||||
],
|
||||
"restore-15": [
|
||||
-0.09753608703613281,
|
||||
-0.00032806396484375,
|
||||
-4.00543212890625e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.2421588897705078,
|
||||
-0.00037384033203125,
|
||||
-0.0001430511474609375
|
||||
],
|
||||
"restore-23": [
|
||||
-1.860239028930664,
|
||||
-0.04126930236816406,
|
||||
-0.0017147064208984375
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-1",
|
||||
"gold": 22,
|
||||
"tokens": [
|
||||
17,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.002490997314453125,
|
||||
-0.0012187957763671875,
|
||||
-1.1444091796875e-05
|
||||
],
|
||||
"baseline": [
|
||||
-3.9617557525634766,
|
||||
-0.8179492950439453,
|
||||
-0.000637054443359375
|
||||
],
|
||||
"restore-15": [
|
||||
-0.035186767578125,
|
||||
-0.027009963989257812,
|
||||
-2.47955322265625e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.43062400817871094,
|
||||
-0.0025691986083984375,
|
||||
-0.000225067138671875
|
||||
],
|
||||
"restore-23": [
|
||||
-3.3459339141845703,
|
||||
-0.8381309509277344,
|
||||
-0.0040531158447265625
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-0",
|
||||
"gold": 63,
|
||||
"tokens": [
|
||||
21,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.012937545776367188,
|
||||
-0.0007839202880859375,
|
||||
-7.62939453125e-06
|
||||
],
|
||||
"baseline": [
|
||||
-3.4249229431152344,
|
||||
-0.07147789001464844,
|
||||
-0.0001373291015625
|
||||
],
|
||||
"restore-15": [
|
||||
-0.06400489807128906,
|
||||
-0.010293960571289062,
|
||||
-7.62939453125e-06
|
||||
],
|
||||
"restore-19": [
|
||||
-0.03154754638671875,
|
||||
-0.000339508056640625,
|
||||
-0.0001220703125
|
||||
],
|
||||
"restore-23": [
|
||||
-2.2207107543945312,
|
||||
-0.12037086486816406,
|
||||
-0.0005855560302734375
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-1",
|
||||
"gold": 21,
|
||||
"tokens": [
|
||||
17,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.000797271728515625,
|
||||
-0.0002193450927734375,
|
||||
-5.7220458984375e-06
|
||||
],
|
||||
"baseline": [
|
||||
-5.151775360107422,
|
||||
-1.0628166198730469,
|
||||
-0.00031280517578125
|
||||
],
|
||||
"restore-15": [
|
||||
-0.009588241577148438,
|
||||
-0.005767822265625,
|
||||
-7.62939453125e-06
|
||||
],
|
||||
"restore-19": [
|
||||
-0.06529045104980469,
|
||||
-0.0006694793701171875,
|
||||
-0.0003108978271484375
|
||||
],
|
||||
"restore-23": [
|
||||
-3.9648704528808594,
|
||||
-0.5995655059814453,
|
||||
-0.0019969940185546875
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-0",
|
||||
"gold": 74,
|
||||
"tokens": [
|
||||
22,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.01715850830078125,
|
||||
-0.0021381378173828125,
|
||||
-3.814697265625e-06
|
||||
],
|
||||
"baseline": [
|
||||
-2.838041305541992,
|
||||
-0.9877510070800781,
|
||||
-4.57763671875e-05
|
||||
],
|
||||
"restore-15": [
|
||||
-1.0562248229980469,
|
||||
-0.0022220611572265625,
|
||||
-3.814697265625e-06
|
||||
],
|
||||
"restore-19": [
|
||||
-0.03605461120605469,
|
||||
-0.016172409057617188,
|
||||
-3.24249267578125e-05
|
||||
],
|
||||
"restore-23": [
|
||||
-2.322092056274414,
|
||||
-1.1123313903808594,
|
||||
-0.0003261566162109375
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-1",
|
||||
"gold": 29,
|
||||
"tokens": [
|
||||
17,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.0016422271728515625,
|
||||
-0.0002899169921875,
|
||||
-3.814697265625e-06
|
||||
],
|
||||
"baseline": [
|
||||
-5.034467697143555,
|
||||
-0.5872783660888672,
|
||||
-8.20159912109375e-05
|
||||
],
|
||||
"restore-15": [
|
||||
-0.2858295440673828,
|
||||
-0.0021343231201171875,
|
||||
-3.814697265625e-06
|
||||
],
|
||||
"restore-19": [
|
||||
-0.23784446716308594,
|
||||
-0.000537872314453125,
|
||||
-4.9591064453125e-05
|
||||
],
|
||||
"restore-23": [
|
||||
-4.553504943847656,
|
||||
-0.6740207672119141,
|
||||
-0.0006809234619140625
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-0",
|
||||
"gold": 39,
|
||||
"tokens": [
|
||||
18,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.013723373413085938,
|
||||
-0.00012969970703125,
|
||||
-7.62939453125e-06
|
||||
],
|
||||
"baseline": [
|
||||
-5.65399169921875,
|
||||
-0.131378173828125,
|
||||
-0.000743865966796875
|
||||
],
|
||||
"restore-15": [
|
||||
-0.9178924560546875,
|
||||
-0.000484466552734375,
|
||||
-1.71661376953125e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.47063255310058594,
|
||||
-0.0001010894775390625,
|
||||
-0.00031280517578125
|
||||
],
|
||||
"restore-23": [
|
||||
-4.959165573120117,
|
||||
-0.28261756896972656,
|
||||
-0.0032291412353515625
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-1",
|
||||
"gold": 77,
|
||||
"tokens": [
|
||||
22,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.23149681091308594,
|
||||
-0.000152587890625,
|
||||
-1.71661376953125e-05
|
||||
],
|
||||
"baseline": [
|
||||
-2.2939319610595703,
|
||||
-1.0310783386230469,
|
||||
-0.0007724761962890625
|
||||
],
|
||||
"restore-15": [
|
||||
-0.4403190612792969,
|
||||
-0.0023441314697265625,
|
||||
-3.4332275390625e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.29297637939453125,
|
||||
-0.0004711151123046875,
|
||||
-0.0002765655517578125
|
||||
],
|
||||
"restore-23": [
|
||||
-2.098073959350586,
|
||||
-0.8647232055664062,
|
||||
-0.00260162353515625
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-0",
|
||||
"gold": 40,
|
||||
"tokens": [
|
||||
19,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.014951705932617188,
|
||||
-0.0005702972412109375,
|
||||
-7.62939453125e-06
|
||||
],
|
||||
"baseline": [
|
||||
-1.4999065399169922,
|
||||
-0.39727783203125,
|
||||
-0.000370025634765625
|
||||
],
|
||||
"restore-15": [
|
||||
-0.09920883178710938,
|
||||
-0.0010547637939453125,
|
||||
-7.62939453125e-06
|
||||
],
|
||||
"restore-19": [
|
||||
-0.059215545654296875,
|
||||
-0.004215240478515625,
|
||||
-0.00017547607421875
|
||||
],
|
||||
"restore-23": [
|
||||
-1.4863815307617188,
|
||||
-0.36647796630859375,
|
||||
-0.0021572113037109375
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-1",
|
||||
"gold": 67,
|
||||
"tokens": [
|
||||
21,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.144378662109375,
|
||||
-0.000316619873046875,
|
||||
-1.1444091796875e-05
|
||||
],
|
||||
"baseline": [
|
||||
-2.6766510009765625,
|
||||
-0.34818458557128906,
|
||||
-0.000194549560546875
|
||||
],
|
||||
"restore-15": [
|
||||
-0.09241104125976562,
|
||||
-0.0078125,
|
||||
-1.9073486328125e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.1442413330078125,
|
||||
-0.00060272216796875,
|
||||
-0.0001201629638671875
|
||||
],
|
||||
"restore-23": [
|
||||
-2.3896827697753906,
|
||||
-0.3394451141357422,
|
||||
-0.001068115234375
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-0",
|
||||
"gold": 89,
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.012271881103515625,
|
||||
-0.000148773193359375,
|
||||
-2.6702880859375e-05
|
||||
],
|
||||
"baseline": [
|
||||
-4.154172897338867,
|
||||
-0.5092639923095703,
|
||||
-0.000244140625
|
||||
],
|
||||
"restore-15": [
|
||||
-0.28399085998535156,
|
||||
-0.000385284423828125,
|
||||
-2.47955322265625e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.17025375366210938,
|
||||
-0.0014133453369140625,
|
||||
-0.0001506805419921875
|
||||
],
|
||||
"restore-23": [
|
||||
-3.85772705078125,
|
||||
-0.6171798706054688,
|
||||
-0.00144195556640625
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-1",
|
||||
"gold": 61,
|
||||
"tokens": [
|
||||
21,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"log_probs": {
|
||||
"native": [
|
||||
-0.03597068786621094,
|
||||
-0.0006103515625,
|
||||
-4.00543212890625e-05
|
||||
],
|
||||
"baseline": [
|
||||
-4.429452896118164,
|
||||
-0.06722450256347656,
|
||||
-0.000396728515625
|
||||
],
|
||||
"restore-15": [
|
||||
-0.4400196075439453,
|
||||
-0.0048809051513671875,
|
||||
-5.340576171875e-05
|
||||
],
|
||||
"restore-19": [
|
||||
-0.7014026641845703,
|
||||
-0.0012664794921875,
|
||||
-0.0002269744873046875
|
||||
],
|
||||
"restore-23": [
|
||||
-3.604585647583008,
|
||||
-0.2347412109375,
|
||||
-0.001617431640625
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"questions": 16,
|
||||
"scores_per_condition": 48,
|
||||
"mean_values": {
|
||||
"native": {
|
||||
"mean_gold_sequence_nll": 0.034574151039123535,
|
||||
"mean_gold_probability_by_position": [
|
||||
0.9682242448620498,
|
||||
0.9994912364442534,
|
||||
0.9999858142451772
|
||||
],
|
||||
"higher_gold_sequence_probability_than_baseline": 16
|
||||
},
|
||||
"baseline": {
|
||||
"mean_gold_sequence_nll": 3.9170196056365967,
|
||||
"mean_gold_probability_by_position": [
|
||||
0.10226646583984653,
|
||||
0.5978359563033113,
|
||||
0.9996817869409924
|
||||
],
|
||||
"higher_gold_sequence_probability_than_baseline": 0,
|
||||
"greedy_correct": 0
|
||||
},
|
||||
"restore-15": {
|
||||
"mean_gold_sequence_nll": 0.3046555519104004,
|
||||
"mean_gold_probability_by_position": [
|
||||
0.7682960002805064,
|
||||
0.9958208747441234,
|
||||
0.999979138680711
|
||||
],
|
||||
"higher_gold_sequence_probability_than_baseline": 16,
|
||||
"greedy_correct": 15
|
||||
},
|
||||
"restore-19": {
|
||||
"mean_gold_sequence_nll": 0.27448391914367676,
|
||||
"mean_gold_probability_by_position": [
|
||||
0.7832170789007052,
|
||||
0.9963902623442181,
|
||||
0.9998424217156324
|
||||
],
|
||||
"higher_gold_sequence_probability_than_baseline": 16,
|
||||
"greedy_correct": 16
|
||||
},
|
||||
"restore-23": {
|
||||
"mean_gold_sequence_nll": 3.3277788162231445,
|
||||
"mean_gold_probability_by_position": [
|
||||
0.12458921584706335,
|
||||
0.5997749958188688,
|
||||
0.9983642064347934
|
||||
],
|
||||
"higher_gold_sequence_probability_than_baseline": 16,
|
||||
"greedy_correct": 1
|
||||
}
|
||||
},
|
||||
"majority_gold_tokens_on_matching_generated_prefix": {
|
||||
"baseline": 1,
|
||||
"restore-15": 44,
|
||||
"restore-19": 46,
|
||||
"restore-23": 2
|
||||
},
|
||||
"majority_token_disagreements": [],
|
||||
"sha256": {
|
||||
"protocol.json": "6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef",
|
||||
"tokenizer.json": "5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42",
|
||||
"diagnostic-gold-log-probs.json": "7fb33eca323ab3ec45ceae8be77609e388fe88b2b77eb59c43726cc0c39b69e3",
|
||||
"baseline.json": "8f3fb8773fa790de01604db9a313365bab25a55c86b363eaf0269f94df020e8f",
|
||||
"restore-15.json": "53b2af36d1f5d5e960d1f7b22630f8f72d7e9a2016131747c48d7e5c17ef7fcb",
|
||||
"restore-19.json": "c1b158e61eaa98b1c24ead81363ef3193b392d36947f3199e7930fe199e5163a",
|
||||
"restore-23.json": "4513c537d5d957c1bfbe0e23741dad3d77cc76a08e7ff255e38661e9e7b58c8d"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
[
|
||||
{
|
||||
"id": "diagnostic-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 76,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
22,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"response": "76<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 76,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 75,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
22,
|
||||
20,
|
||||
248046
|
||||
],
|
||||
"response": "75<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 75,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 39,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
18,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "39<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 39,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 76,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
22,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"response": "76<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 76,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
19,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "49<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 49,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 22,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
17,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"response": "22<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 22,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
21,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "63<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 63,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 21,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
17,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "21<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 21,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 74,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
22,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "74<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 74,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
17,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "29<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 29,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 39,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
24,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"response": "98<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 98,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 77,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
22,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "77<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 77,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 40,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
19,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"response": "40<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 40,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 67,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
21,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "67<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 67,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "89<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 89,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 61,
|
||||
"arms": {
|
||||
"restore-15": {
|
||||
"tokens": [
|
||||
21,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "61<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 61,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,290 @@
|
||||
[
|
||||
{
|
||||
"id": "diagnostic-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 76,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
22,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"response": "76<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 76,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 75,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
22,
|
||||
20,
|
||||
248046
|
||||
],
|
||||
"response": "75<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 75,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 39,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
18,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "39<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 39,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 76,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
22,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"response": "76<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 76,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
19,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "49<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 49,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 22,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
17,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"response": "22<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 22,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
21,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "63<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 63,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 21,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
17,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "21<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 21,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 74,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
22,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "74<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 74,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
17,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "29<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 29,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 39,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
18,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "39<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 39,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 77,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
22,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "77<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 77,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 40,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
19,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"response": "40<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 40,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 67,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
21,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "67<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 67,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "89<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 89,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 61,
|
||||
"arms": {
|
||||
"restore-19": {
|
||||
"tokens": [
|
||||
21,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "61<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 61,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,290 @@
|
||||
[
|
||||
{
|
||||
"id": "diagnostic-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 76,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
24,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "94<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 94,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 75,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
24,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "94<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 94,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 39,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
22,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "73<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 73,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 76,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
22,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"response": "76<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 76,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
20,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"response": "52<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 52,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 22,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
20,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"response": "52<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 52,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
24,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"response": "90<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 90,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 21,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
24,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"response": "90<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 90,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 74,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
24,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "99<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 99,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
24,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "99<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 99,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 39,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
21,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "61<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 61,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 77,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
21,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "67<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 67,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 40,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
20,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"response": "50<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 50,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 67,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
19,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"response": "46<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 46,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 61,
|
||||
"arms": {
|
||||
"restore-23": {
|
||||
"tokens": [
|
||||
19,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "43<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 43,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"protocol_sha256": "6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef",
|
||||
"tokenizer_sha256": "5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42",
|
||||
"baseline_adapter_sha256": "c82db5af7fa42cf58a349f3e53961da2360b211a7ed606f53a728860c64f6f29",
|
||||
"answer_file_sha256": {
|
||||
"baseline.json": "8f3fb8773fa790de01604db9a313365bab25a55c86b363eaf0269f94df020e8f",
|
||||
"restore-15.json": "53b2af36d1f5d5e960d1f7b22630f8f72d7e9a2016131747c48d7e5c17ef7fcb",
|
||||
"restore-19.json": "c1b158e61eaa98b1c24ead81363ef3193b392d36947f3199e7930fe199e5163a",
|
||||
"restore-23.json": "4513c537d5d957c1bfbe0e23741dad3d77cc76a08e7ff255e38661e9e7b58c8d"
|
||||
},
|
||||
"questions": 16,
|
||||
"pairs": 8,
|
||||
"scores": {
|
||||
"baseline": {
|
||||
"correct": 0,
|
||||
"both_correct_pairs": 0,
|
||||
"complete_integer_answers": 16,
|
||||
"wrong_ids": [
|
||||
"diagnostic-000-0",
|
||||
"diagnostic-000-1",
|
||||
"diagnostic-001-0",
|
||||
"diagnostic-001-1",
|
||||
"diagnostic-002-0",
|
||||
"diagnostic-002-1",
|
||||
"diagnostic-003-0",
|
||||
"diagnostic-003-1",
|
||||
"diagnostic-004-0",
|
||||
"diagnostic-004-1",
|
||||
"diagnostic-005-0",
|
||||
"diagnostic-005-1",
|
||||
"diagnostic-006-0",
|
||||
"diagnostic-006-1",
|
||||
"diagnostic-007-0",
|
||||
"diagnostic-007-1"
|
||||
]
|
||||
},
|
||||
"restore-15": {
|
||||
"correct": 15,
|
||||
"both_correct_pairs": 7,
|
||||
"complete_integer_answers": 16,
|
||||
"wrong_ids": [
|
||||
"diagnostic-005-0"
|
||||
]
|
||||
},
|
||||
"restore-19": {
|
||||
"correct": 16,
|
||||
"both_correct_pairs": 8,
|
||||
"complete_integer_answers": 16,
|
||||
"wrong_ids": []
|
||||
},
|
||||
"restore-23": {
|
||||
"correct": 1,
|
||||
"both_correct_pairs": 0,
|
||||
"complete_integer_answers": 16,
|
||||
"wrong_ids": [
|
||||
"diagnostic-000-0",
|
||||
"diagnostic-000-1",
|
||||
"diagnostic-001-0",
|
||||
"diagnostic-002-0",
|
||||
"diagnostic-002-1",
|
||||
"diagnostic-003-0",
|
||||
"diagnostic-003-1",
|
||||
"diagnostic-004-0",
|
||||
"diagnostic-004-1",
|
||||
"diagnostic-005-0",
|
||||
"diagnostic-005-1",
|
||||
"diagnostic-006-0",
|
||||
"diagnostic-006-1",
|
||||
"diagnostic-007-0",
|
||||
"diagnostic-007-1"
|
||||
]
|
||||
}
|
||||
},
|
||||
"ranks_by_layer": {
|
||||
"allocated": {
|
||||
"19": 48,
|
||||
"15": 40,
|
||||
"23": 32
|
||||
},
|
||||
"reversed": {
|
||||
"19": 32,
|
||||
"15": 40,
|
||||
"23": 48
|
||||
},
|
||||
"uniform": {
|
||||
"15": 40,
|
||||
"19": 40,
|
||||
"23": 40
|
||||
}
|
||||
},
|
||||
"rank_order_after_omitting_one_pair": {
|
||||
"19,15,23": 7,
|
||||
"15,19,23": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
024720e9eae7556e4d5ca2ca1d71dd544815c79ed2c51b113564d5a6fb4ad004 crossqkv/lisa_combination_screen.py
|
||||
663d4dad556f08b69521543e73d67362d46dc694c747e72b6cb786da7484e090 crossqkv/lisa_rank_compare.py
|
||||
f212bd1b17b38d995060fc04b20a77b4e572cffc9b3776dc16ef7cf012ee89a3 crossqkv/lisa_trajectory_train.py
|
||||
e03e7edf719026ffd99bfc99a539ee22c71884baa5cdaf629d8f4e44e1565c41 crossqkv/lisa_combination_eval.py
|
||||
519e0a031efcfb69c9b86fca1cb649fe8bb93d799401c8023ff7b6549cded448 crossqkv/lisa_full_answer.py
|
||||
1a1a4cbc8e3c5b97accfe2d0ba18a21c9e2ebfa25d66561d7ef9c59668049efa crossqkv/lisa_full_answer_train.py
|
||||
57e73f1e30c8db8daec7b13d6455af2822b2db3e600531f8a60e2381d093ad91 crossqkv/lisa_full_answer_verify.py
|
||||
98927a1ccd935b2f7a438bad31bbd973e210a54deceac911c61551092e52c96c crossqkv/lisa_generate.py
|
||||
d47b4c9cc34082e9b356e745821298a43981e4cd18ed55a3f59b4b6fe7cc46e3 crossqkv/lisa_tail.py
|
||||
9f0b6a53f107950661e91c16f03b49440708b3936120e2f84ef1d66f185257b6 crossqkv/lisa_train.py
|
||||
94437e0138c54ec34b1beaaa0e08a334ce0822f60af598a5a896459b778a3a1c functional/model.py
|
||||
e5953ed7e4cc58c49290bf768c173828ce1c29f36795f5c657ed0f1d76f0a371 tests/test_lisa_combinations.py
|
||||
e1d70b10863dab1e13dfa9573c0d87fc6ca017039c3cf9b90f7628f3e7fe5664 crossqkv/lisa_effect_answer_audit.py
|
||||
@@ -0,0 +1,679 @@
|
||||
{
|
||||
"source_receipt_sha256": "682bc035a5bed9f9245f589cacf3e9616300e8bf5e85d3743b1264a56360fa55",
|
||||
"split": "fit",
|
||||
"sites": [
|
||||
15,
|
||||
19,
|
||||
23
|
||||
],
|
||||
"native_donor_layers": [
|
||||
11,
|
||||
15,
|
||||
19
|
||||
],
|
||||
"donor_fit": "affine, opposite index parity",
|
||||
"metric": "mean per-example, per-layer, per-head, all token-pair squared raw score residual",
|
||||
"mean_mse": {
|
||||
"15": {
|
||||
"0": 3.0491509033035786,
|
||||
"32": 0.039521781594895264,
|
||||
"40": 0.020783290371489457,
|
||||
"48": 0.010840281262399451
|
||||
},
|
||||
"19": {
|
||||
"0": 2.512677766820607,
|
||||
"32": 0.028017079240270398,
|
||||
"40": 0.014575690475241961,
|
||||
"48": 0.0075188286924900765
|
||||
},
|
||||
"23": {
|
||||
"0": 2.32949672919509,
|
||||
"32": 0.028727581321570477,
|
||||
"40": 0.015100597622509863,
|
||||
"48": 0.007748733860780121
|
||||
}
|
||||
},
|
||||
"configurations": [
|
||||
{
|
||||
"ranks": [
|
||||
40,
|
||||
40,
|
||||
40
|
||||
],
|
||||
"mean_mse": 0.016819859489747093,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
32,
|
||||
40,
|
||||
48
|
||||
],
|
||||
"mean_mse": 0.02061540197697245,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
32,
|
||||
48,
|
||||
40
|
||||
],
|
||||
"mean_mse": 0.020713735969965067,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
40,
|
||||
32,
|
||||
48
|
||||
],
|
||||
"mean_mse": 0.018849701157513325,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
40,
|
||||
48,
|
||||
32
|
||||
],
|
||||
"mean_mse": 0.019009900128516666,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
48,
|
||||
32,
|
||||
40
|
||||
],
|
||||
"mean_mse": 0.017985986041726573,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
48,
|
||||
40,
|
||||
32
|
||||
],
|
||||
"mean_mse": 0.018047851019737295,
|
||||
"examples_below_uniform_mse": 0
|
||||
}
|
||||
],
|
||||
"examples": [
|
||||
{
|
||||
"id": "fit-lookup-000",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.088659967440397,
|
||||
"32": 0.04236259250553502,
|
||||
"40": 0.022141397788788392,
|
||||
"48": 0.011514037850336353
|
||||
},
|
||||
"19": {
|
||||
"0": 2.60677435406026,
|
||||
"32": 0.030297211627820866,
|
||||
"40": 0.01598283395379536,
|
||||
"48": 0.008219940043388664
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3563735679615907,
|
||||
"32": 0.02892025119959655,
|
||||
"40": 0.015145857942858488,
|
||||
"48": 0.007854447730351124
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-001",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0437552842711924,
|
||||
"32": 0.041460379107627,
|
||||
"40": 0.02197332831278948,
|
||||
"48": 0.01154738790723923
|
||||
},
|
||||
"19": {
|
||||
"0": 2.6002811453342303,
|
||||
"32": 0.029788866923491097,
|
||||
"40": 0.015212847384373162,
|
||||
"48": 0.007800509698369113
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3453950294400725,
|
||||
"32": 0.028961945449738232,
|
||||
"40": 0.015314327377369019,
|
||||
"48": 0.007819546227552078
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-002",
|
||||
"length": 103,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.1611634458593403,
|
||||
"32": 0.039321211199099995,
|
||||
"40": 0.020199787980594405,
|
||||
"48": 0.010459417590053765
|
||||
},
|
||||
"19": {
|
||||
"0": 2.4157809408598623,
|
||||
"32": 0.02655148904575669,
|
||||
"40": 0.013735592399044141,
|
||||
"48": 0.007057144763423892
|
||||
},
|
||||
"23": {
|
||||
"0": 2.325402166282838,
|
||||
"32": 0.027055553748214518,
|
||||
"40": 0.013891678650954479,
|
||||
"48": 0.006962328419010828
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-003",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.040995331406837,
|
||||
"32": 0.03762918598377188,
|
||||
"40": 0.01984353470077239,
|
||||
"48": 0.010574553412406797
|
||||
},
|
||||
"19": {
|
||||
"0": 2.3597098591507217,
|
||||
"32": 0.02773534955136491,
|
||||
"40": 0.014466135600102365,
|
||||
"48": 0.0074571195122997225
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3234745384230875,
|
||||
"32": 0.029123405193316097,
|
||||
"40": 0.015470646972640318,
|
||||
"48": 0.008016444188761525
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-004",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0215199092782723,
|
||||
"32": 0.040987579290442236,
|
||||
"40": 0.02187090698894471,
|
||||
"48": 0.011580689428509917
|
||||
},
|
||||
"19": {
|
||||
"0": 2.573071094425272,
|
||||
"32": 0.02882784504735971,
|
||||
"40": 0.015108305637581228,
|
||||
"48": 0.007925058462351522
|
||||
},
|
||||
"23": {
|
||||
"0": 2.340310773344382,
|
||||
"32": 0.028890642640557497,
|
||||
"40": 0.015253046125958373,
|
||||
"48": 0.007854863994071565
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-005",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0330234103086564,
|
||||
"32": 0.040488127570967286,
|
||||
"40": 0.021191326763191246,
|
||||
"48": 0.011073238036764401
|
||||
},
|
||||
"19": {
|
||||
"0": 2.454760989612247,
|
||||
"32": 0.02946771758936749,
|
||||
"40": 0.01545794859144716,
|
||||
"48": 0.00802543841461683
|
||||
},
|
||||
"23": {
|
||||
"0": 2.2967207477889273,
|
||||
"32": 0.029778415586498647,
|
||||
"40": 0.01600304961677946,
|
||||
"48": 0.0083111870016772
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-006",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.013331118405758,
|
||||
"32": 0.04131749410468123,
|
||||
"40": 0.022042406028810038,
|
||||
"48": 0.011636497469555758
|
||||
},
|
||||
"19": {
|
||||
"0": 2.528745937676687,
|
||||
"32": 0.02826800264634013,
|
||||
"40": 0.014733505683104612,
|
||||
"48": 0.0076718514475501865
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3072629450831816,
|
||||
"32": 0.0289161816884407,
|
||||
"40": 0.015426171607648538,
|
||||
"48": 0.008021220293678933
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-007",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 2.9797496554592016,
|
||||
"32": 0.04008678098041669,
|
||||
"40": 0.021471205229520018,
|
||||
"48": 0.011298897793875518
|
||||
},
|
||||
"19": {
|
||||
"0": 2.524372130523825,
|
||||
"32": 0.02903602273670119,
|
||||
"40": 0.015166059667194653,
|
||||
"48": 0.007834174908611297
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3610797089906277,
|
||||
"32": 0.029450602936166363,
|
||||
"40": 0.015499606337721955,
|
||||
"48": 0.00805269819015974
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-008",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.019527986904939,
|
||||
"32": 0.040274185385297874,
|
||||
"40": 0.021116286802696557,
|
||||
"48": 0.010885256441784055
|
||||
},
|
||||
"19": {
|
||||
"0": 2.523656269236793,
|
||||
"32": 0.02772895841962885,
|
||||
"40": 0.014412311378240944,
|
||||
"48": 0.007384325810057883
|
||||
},
|
||||
"23": {
|
||||
"0": 2.320639636723277,
|
||||
"32": 0.027954408126430304,
|
||||
"40": 0.014598363754756497,
|
||||
"48": 0.007555480787878869
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-009",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.1093965867603957,
|
||||
"32": 0.03755905434822006,
|
||||
"40": 0.019840372604972834,
|
||||
"48": 0.010344465475210821
|
||||
},
|
||||
"19": {
|
||||
"0": 2.505387553072129,
|
||||
"32": 0.027001747506091436,
|
||||
"40": 0.013899598887412037,
|
||||
"48": 0.007008295926413987
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3448651884655374,
|
||||
"32": 0.029100983555730472,
|
||||
"40": 0.015379827992887235,
|
||||
"48": 0.007858481884474376
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-010",
|
||||
"length": 107,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0311224516019064,
|
||||
"32": 0.04091108401342763,
|
||||
"40": 0.02180213747578483,
|
||||
"48": 0.011590187257245059
|
||||
},
|
||||
"19": {
|
||||
"0": 2.5713354258542362,
|
||||
"32": 0.029039653431551533,
|
||||
"40": 0.01531556329140523,
|
||||
"48": 0.007899517545272823
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3511743607212607,
|
||||
"32": 0.03012251758846437,
|
||||
"40": 0.016076320232085935,
|
||||
"48": 0.008327212573692013
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-011",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 2.978140786774899,
|
||||
"32": 0.03878118161674924,
|
||||
"40": 0.020375268025433116,
|
||||
"48": 0.01067361843154627
|
||||
},
|
||||
"19": {
|
||||
"0": 2.545974192767094,
|
||||
"32": 0.02905582052089718,
|
||||
"40": 0.01503920798962135,
|
||||
"48": 0.007825902631264234
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3154443153866144,
|
||||
"32": 0.029736139916476785,
|
||||
"40": 0.015719287229754325,
|
||||
"48": 0.00816518344542446
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-012",
|
||||
"length": 107,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0087156260860324,
|
||||
"32": 0.039908258905094224,
|
||||
"40": 0.020951748129681164,
|
||||
"48": 0.0109459493750372
|
||||
},
|
||||
"19": {
|
||||
"0": 2.5004236680399994,
|
||||
"32": 0.027530296227075,
|
||||
"40": 0.014297426111298323,
|
||||
"48": 0.0073502099933688055
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3037441781455907,
|
||||
"32": 0.028300959976612527,
|
||||
"40": 0.014905029499610128,
|
||||
"48": 0.0076801742973075585
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-013",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.090885110032237,
|
||||
"32": 0.037628764689048785,
|
||||
"40": 0.01983888726146963,
|
||||
"48": 0.010323019538322292
|
||||
},
|
||||
"19": {
|
||||
"0": 2.4559173768588263,
|
||||
"32": 0.027772754396836425,
|
||||
"40": 0.014524390215698612,
|
||||
"48": 0.007483559779230743
|
||||
},
|
||||
"23": {
|
||||
"0": 2.287404497389505,
|
||||
"32": 0.02819735934494258,
|
||||
"40": 0.014912927963379,
|
||||
"48": 0.007726565200995596
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-014",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.13819959885641,
|
||||
"32": 0.039420418861715725,
|
||||
"40": 0.020868132899275662,
|
||||
"48": 0.010854347550869874
|
||||
},
|
||||
"19": {
|
||||
"0": 2.5679901885805516,
|
||||
"32": 0.028098421308328406,
|
||||
"40": 0.014312423513410482,
|
||||
"48": 0.00732004539511427
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3466282966243877,
|
||||
"32": 0.02880736726984329,
|
||||
"40": 0.014808088738714507,
|
||||
"48": 0.00750811978348572
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-015",
|
||||
"length": 104,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0692672104629573,
|
||||
"32": 0.037746196997427546,
|
||||
"40": 0.019899233229636805,
|
||||
"48": 0.01029592139206912
|
||||
},
|
||||
"19": {
|
||||
"0": 2.4838282610330245,
|
||||
"32": 0.026826048708958952,
|
||||
"40": 0.013808543684409204,
|
||||
"48": 0.006989747600969923
|
||||
},
|
||||
"23": {
|
||||
"0": 2.322057578321556,
|
||||
"32": 0.02797636928934322,
|
||||
"40": 0.014399908661816594,
|
||||
"48": 0.007212087854706693
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-016",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0007538969450036,
|
||||
"32": 0.03916077842933745,
|
||||
"40": 0.020493545446600054,
|
||||
"48": 0.010682154227783146
|
||||
},
|
||||
"19": {
|
||||
"0": 2.5872858743785674,
|
||||
"32": 0.028776526081457792,
|
||||
"40": 0.015233754140328008,
|
||||
"48": 0.007916572897216386
|
||||
},
|
||||
"23": {
|
||||
"0": 2.347073684588352,
|
||||
"32": 0.029756068268149995,
|
||||
"40": 0.015805893856473047,
|
||||
"48": 0.00809506288386048
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-017",
|
||||
"length": 104,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.097493153149071,
|
||||
"32": 0.03850921447926972,
|
||||
"40": 0.019769321682123874,
|
||||
"48": 0.010122230466840895
|
||||
},
|
||||
"19": {
|
||||
"0": 2.4503922223577725,
|
||||
"32": 0.025405658587984905,
|
||||
"40": 0.013039908579401138,
|
||||
"48": 0.006659946143533161
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3199401227863863,
|
||||
"32": 0.02735269039309821,
|
||||
"40": 0.014341351722532756,
|
||||
"48": 0.007256346435349317
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-018",
|
||||
"length": 108,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0013828310609036,
|
||||
"32": 0.03971017933680606,
|
||||
"40": 0.02104882562580656,
|
||||
"48": 0.011115656621268687
|
||||
},
|
||||
"19": {
|
||||
"0": 2.5217980667349007,
|
||||
"32": 0.030615218969447338,
|
||||
"40": 0.01612161718714934,
|
||||
"48": 0.008545605297330143
|
||||
},
|
||||
"23": {
|
||||
"0": 2.326397701784687,
|
||||
"32": 0.03073856758564035,
|
||||
"40": 0.016339969467014808,
|
||||
"48": 0.008568277707684677
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-019",
|
||||
"length": 103,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0112006462653227,
|
||||
"32": 0.03764011794064314,
|
||||
"40": 0.019441597324216794,
|
||||
"48": 0.009988085038926689
|
||||
},
|
||||
"19": {
|
||||
"0": 2.543471885532161,
|
||||
"32": 0.02619589976045457,
|
||||
"40": 0.013660075369000754,
|
||||
"48": 0.007015486171297309
|
||||
},
|
||||
"23": {
|
||||
"0": 2.3365870614142663,
|
||||
"32": 0.027970465568334695,
|
||||
"40": 0.014406812634280746,
|
||||
"48": 0.007354861080531025
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-020",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0499784330668795,
|
||||
"32": 0.04122577355978497,
|
||||
"40": 0.021592165464748382,
|
||||
"48": 0.011222263753869933
|
||||
},
|
||||
"19": {
|
||||
"0": 2.4914495907758174,
|
||||
"32": 0.028387678466645947,
|
||||
"40": 0.014732006285955,
|
||||
"48": 0.007600996890895566
|
||||
},
|
||||
"23": {
|
||||
"0": 2.333302869555968,
|
||||
"32": 0.028901195362459362,
|
||||
"40": 0.015146381684210501,
|
||||
"48": 0.007708436189913433
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-021",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.000190717302482,
|
||||
"32": 0.036974093576619696,
|
||||
"40": 0.019188918824031505,
|
||||
"48": 0.009750811653384532
|
||||
},
|
||||
"19": {
|
||||
"0": 2.504255342893704,
|
||||
"32": 0.02679008610350141,
|
||||
"40": 0.013656397393850609,
|
||||
"48": 0.007080721321304438
|
||||
},
|
||||
"23": {
|
||||
"0": 2.343114821525361,
|
||||
"32": 0.027011591312553825,
|
||||
"40": 0.014172719903089378,
|
||||
"48": 0.007187917055432581
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-022",
|
||||
"length": 103,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.1429597973216787,
|
||||
"32": 0.03808212093085827,
|
||||
"40": 0.019726271041694738,
|
||||
"48": 0.010127914275230446
|
||||
},
|
||||
"19": {
|
||||
"0": 2.5344581089967053,
|
||||
"32": 0.02599389167658157,
|
||||
"40": 0.013376992897619809,
|
||||
"48": 0.006852960444486019
|
||||
},
|
||||
"23": {
|
||||
"0": 2.291104635624609,
|
||||
"32": 0.02783449426763895,
|
||||
"40": 0.01437474325606307,
|
||||
"48": 0.007167743463725208
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-023",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.048208724265116,
|
||||
"32": 0.04133798446464467,
|
||||
"40": 0.022112363284163734,
|
||||
"48": 0.011560149309456123
|
||||
},
|
||||
"19": {
|
||||
"0": 2.453145924939178,
|
||||
"32": 0.027218736432846176,
|
||||
"40": 0.01452312556436353,
|
||||
"48": 0.007526757521394901
|
||||
},
|
||||
"23": {
|
||||
"0": 2.362423074310092,
|
||||
"32": 0.028603775449443824,
|
||||
"40": 0.015022331711637587,
|
||||
"48": 0.007704925968997894
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,675 @@
|
||||
{
|
||||
"source_receipt_sha256": "682bc035a5bed9f9245f589cacf3e9616300e8bf5e85d3743b1264a56360fa55",
|
||||
"split": "fit",
|
||||
"sites": [
|
||||
15,
|
||||
19,
|
||||
23
|
||||
],
|
||||
"donor_layer": 11,
|
||||
"donor_fit": "affine, opposite index parity",
|
||||
"metric": "mean per-example, per-layer, per-head, all token-pair squared raw score residual",
|
||||
"mean_mse": {
|
||||
"15": {
|
||||
"0": 3.0491509033035786,
|
||||
"32": 0.0395217815948953,
|
||||
"40": 0.020783290371489474,
|
||||
"48": 0.010840281262399469
|
||||
},
|
||||
"19": {
|
||||
"0": 3.857443153106972,
|
||||
"32": 0.04404012339850357,
|
||||
"40": 0.022555703253053838,
|
||||
"48": 0.011519385659275065
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0209357835593145,
|
||||
"32": 0.04279017456139522,
|
||||
"40": 0.022611030031209806,
|
||||
"48": 0.01179076608337388
|
||||
}
|
||||
},
|
||||
"configurations": [
|
||||
{
|
||||
"ranks": [
|
||||
40,
|
||||
40,
|
||||
40
|
||||
],
|
||||
"mean_mse": 0.021983341218584373,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
32,
|
||||
40,
|
||||
48
|
||||
],
|
||||
"mean_mse": 0.024622750310441005,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
32,
|
||||
48,
|
||||
40
|
||||
],
|
||||
"mean_mse": 0.024550732428460054,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
40,
|
||||
32,
|
||||
48
|
||||
],
|
||||
"mean_mse": 0.025538059951122308,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
40,
|
||||
48,
|
||||
32
|
||||
],
|
||||
"mean_mse": 0.02503095019738659,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
48,
|
||||
32,
|
||||
40
|
||||
],
|
||||
"mean_mse": 0.02583047823070428,
|
||||
"examples_below_uniform_mse": 0
|
||||
},
|
||||
{
|
||||
"ranks": [
|
||||
48,
|
||||
40,
|
||||
32
|
||||
],
|
||||
"mean_mse": 0.02539538635894951,
|
||||
"examples_below_uniform_mse": 0
|
||||
}
|
||||
],
|
||||
"examples": [
|
||||
{
|
||||
"id": "fit-lookup-000",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.088659967440397,
|
||||
"32": 0.042362592505534986,
|
||||
"40": 0.022141397788788385,
|
||||
"48": 0.011514037850336351
|
||||
},
|
||||
"19": {
|
||||
"0": 3.9943518537218665,
|
||||
"32": 0.04591974433321144,
|
||||
"40": 0.024057801139955103,
|
||||
"48": 0.012400994145531046
|
||||
},
|
||||
"23": {
|
||||
"0": 3.043062165797575,
|
||||
"32": 0.043840611411928194,
|
||||
"40": 0.023782948692401322,
|
||||
"48": 0.012654655382485485
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-001",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.043755284271191,
|
||||
"32": 0.04146037910762712,
|
||||
"40": 0.021973328312789527,
|
||||
"48": 0.011547387907239248
|
||||
},
|
||||
"19": {
|
||||
"0": 3.9598790566955886,
|
||||
"32": 0.045888230039258966,
|
||||
"40": 0.023175579379109502,
|
||||
"48": 0.011920069339334243
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0228768421518657,
|
||||
"32": 0.04389074185450007,
|
||||
"40": 0.02298613226861967,
|
||||
"48": 0.01201903802540863
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-002",
|
||||
"length": 103,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.1611634458593403,
|
||||
"32": 0.039321211199099954,
|
||||
"40": 0.020199787980594377,
|
||||
"48": 0.010459417590053765
|
||||
},
|
||||
"19": {
|
||||
"0": 3.7504174288845213,
|
||||
"32": 0.04261753426778668,
|
||||
"40": 0.021543287068594312,
|
||||
"48": 0.010728145288211992
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0404045066898244,
|
||||
"32": 0.04148977907847477,
|
||||
"40": 0.021596132424008038,
|
||||
"48": 0.01100976489064943
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-003",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0409953314068368,
|
||||
"32": 0.03762918598377197,
|
||||
"40": 0.019843534700772446,
|
||||
"48": 0.010574553412406835
|
||||
},
|
||||
"19": {
|
||||
"0": 3.688879228913018,
|
||||
"32": 0.04392129860493001,
|
||||
"40": 0.022968772572630233,
|
||||
"48": 0.011682937781274223
|
||||
},
|
||||
"23": {
|
||||
"0": 2.9696612315728035,
|
||||
"32": 0.04365312259554772,
|
||||
"40": 0.023110205181705423,
|
||||
"48": 0.012251188178660657
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-004",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.021519909278273,
|
||||
"32": 0.040987579290442194,
|
||||
"40": 0.0218709069889447,
|
||||
"48": 0.011580689428509915
|
||||
},
|
||||
"19": {
|
||||
"0": 3.8603281075397944,
|
||||
"32": 0.043717190016046695,
|
||||
"40": 0.022459706664211883,
|
||||
"48": 0.011489303457101622
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0533279734811867,
|
||||
"32": 0.0429414877038192,
|
||||
"40": 0.022566893434764704,
|
||||
"48": 0.011829068992343534
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-005",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.033023410308657,
|
||||
"32": 0.04048812757096736,
|
||||
"40": 0.021191326763191305,
|
||||
"48": 0.011073238036764433
|
||||
},
|
||||
"19": {
|
||||
"0": 3.7947891522935953,
|
||||
"32": 0.046712646076783715,
|
||||
"40": 0.02369760775856494,
|
||||
"48": 0.012093032569584385
|
||||
},
|
||||
"23": {
|
||||
"0": 2.9266299087225995,
|
||||
"32": 0.04418105299845767,
|
||||
"40": 0.023223134094120208,
|
||||
"48": 0.012197499278392794
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-006",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.013331118405758,
|
||||
"32": 0.04131749410468121,
|
||||
"40": 0.022042406028810024,
|
||||
"48": 0.011636497469555753
|
||||
},
|
||||
"19": {
|
||||
"0": 3.823321135345336,
|
||||
"32": 0.043444020469542224,
|
||||
"40": 0.023039572744899546,
|
||||
"48": 0.012151077808294013
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0123366474248527,
|
||||
"32": 0.043892186138404905,
|
||||
"40": 0.023768489833834446,
|
||||
"48": 0.012493576292187758
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-007",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 2.9797496554592016,
|
||||
"32": 0.040086780980416785,
|
||||
"40": 0.021471205229520056,
|
||||
"48": 0.011298897793875544
|
||||
},
|
||||
"19": {
|
||||
"0": 3.826629680630135,
|
||||
"32": 0.046253373518954505,
|
||||
"40": 0.02394178399044027,
|
||||
"48": 0.012263827559098354
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0080892417871485,
|
||||
"32": 0.04416354613658148,
|
||||
"40": 0.02347209773759818,
|
||||
"48": 0.01214014313596462
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-008",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0195279869049405,
|
||||
"32": 0.04027418538529785,
|
||||
"40": 0.021116286802696546,
|
||||
"48": 0.010885256441784051
|
||||
},
|
||||
"19": {
|
||||
"0": 3.9049296662519,
|
||||
"32": 0.044775724860484895,
|
||||
"40": 0.023020902804934695,
|
||||
"48": 0.01181115860807368
|
||||
},
|
||||
"23": {
|
||||
"0": 3.022332594278084,
|
||||
"32": 0.04271748172881601,
|
||||
"40": 0.022841955815524173,
|
||||
"48": 0.011960985252592796
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-009",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.109396586760397,
|
||||
"32": 0.03755905434822013,
|
||||
"40": 0.019840372604972886,
|
||||
"48": 0.010344465475210856
|
||||
},
|
||||
"19": {
|
||||
"0": 3.889074040521854,
|
||||
"32": 0.042862804080481424,
|
||||
"40": 0.021958251337402295,
|
||||
"48": 0.011303882000132073
|
||||
},
|
||||
"23": {
|
||||
"0": 3.036374564918723,
|
||||
"32": 0.042727702436651936,
|
||||
"40": 0.022601026341831074,
|
||||
"48": 0.011770845282018036
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-010",
|
||||
"length": 107,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0311224516019055,
|
||||
"32": 0.04091108401342758,
|
||||
"40": 0.0218021374757848,
|
||||
"48": 0.01159018725724504
|
||||
},
|
||||
"19": {
|
||||
"0": 3.9363469267180835,
|
||||
"32": 0.04567514334168894,
|
||||
"40": 0.02376781635912793,
|
||||
"48": 0.012322024685530862
|
||||
},
|
||||
"23": {
|
||||
"0": 3.014115868352978,
|
||||
"32": 0.044461534712689404,
|
||||
"40": 0.023592730803344734,
|
||||
"48": 0.012495188587781836
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-011",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 2.978140786774898,
|
||||
"32": 0.0387811816167493,
|
||||
"40": 0.02037526802543315,
|
||||
"48": 0.0106736184315463
|
||||
},
|
||||
"19": {
|
||||
"0": 3.844477663585858,
|
||||
"32": 0.045556113791662724,
|
||||
"40": 0.023331656132232113,
|
||||
"48": 0.011906942552667195
|
||||
},
|
||||
"23": {
|
||||
"0": 2.9601191176649757,
|
||||
"32": 0.043240836434076536,
|
||||
"40": 0.02260293695313534,
|
||||
"48": 0.0119007769151467
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-012",
|
||||
"length": 107,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0087156260860324,
|
||||
"32": 0.039908258905094175,
|
||||
"40": 0.02095174812968115,
|
||||
"48": 0.010945949375037204
|
||||
},
|
||||
"19": {
|
||||
"0": 3.8500214677028963,
|
||||
"32": 0.04244640193219456,
|
||||
"40": 0.021656130249074597,
|
||||
"48": 0.011118828008838963
|
||||
},
|
||||
"23": {
|
||||
"0": 3.012859888829719,
|
||||
"32": 0.04171247094948818,
|
||||
"40": 0.0222639528061427,
|
||||
"48": 0.011602191423433644
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-013",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.090885110032237,
|
||||
"32": 0.03762876468904888,
|
||||
"40": 0.019838887261469686,
|
||||
"48": 0.010323019538322325
|
||||
},
|
||||
"19": {
|
||||
"0": 3.8526016885782073,
|
||||
"32": 0.04267441235679496,
|
||||
"40": 0.021965440593552564,
|
||||
"48": 0.011204493115001445
|
||||
},
|
||||
"23": {
|
||||
"0": 2.9829829723700807,
|
||||
"32": 0.04183375644979849,
|
||||
"40": 0.022193649610459963,
|
||||
"48": 0.0116555170847707
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-014",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.1381995988564113,
|
||||
"32": 0.0394204188617157,
|
||||
"40": 0.02086813289927566,
|
||||
"48": 0.010854347550869876
|
||||
},
|
||||
"19": {
|
||||
"0": 3.96491581298912,
|
||||
"32": 0.044485907588952385,
|
||||
"40": 0.022877678884423304,
|
||||
"48": 0.01175281372917842
|
||||
},
|
||||
"23": {
|
||||
"0": 3.056772542795872,
|
||||
"32": 0.04255880849165352,
|
||||
"40": 0.022612492155258415,
|
||||
"48": 0.011914870920016675
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-015",
|
||||
"length": 104,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.069267210462956,
|
||||
"32": 0.037746196997427636,
|
||||
"40": 0.01989923322963685,
|
||||
"48": 0.01029592139206914
|
||||
},
|
||||
"19": {
|
||||
"0": 3.8705993446575504,
|
||||
"32": 0.042685739359091625,
|
||||
"40": 0.021382466243261136,
|
||||
"48": 0.01075929182481224
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0856817422797613,
|
||||
"32": 0.041619385601778976,
|
||||
"40": 0.021868313984371644,
|
||||
"48": 0.0112163979206816
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-016",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0007538969450036,
|
||||
"32": 0.03916077842933743,
|
||||
"40": 0.02049354544660005,
|
||||
"48": 0.010682154227783142
|
||||
},
|
||||
"19": {
|
||||
"0": 3.870593473010357,
|
||||
"32": 0.04499375247587852,
|
||||
"40": 0.023060264604825936,
|
||||
"48": 0.011894306441044961
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0078244299495527,
|
||||
"32": 0.04343119038793748,
|
||||
"40": 0.02305271005274073,
|
||||
"48": 0.012061257691392924
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-017",
|
||||
"length": 104,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.097493153149072,
|
||||
"32": 0.03850921447926982,
|
||||
"40": 0.019769321682123944,
|
||||
"48": 0.010122230466840933
|
||||
},
|
||||
"19": {
|
||||
"0": 3.820263396381217,
|
||||
"32": 0.04169650174393219,
|
||||
"40": 0.020890787003452566,
|
||||
"48": 0.010491055604303079
|
||||
},
|
||||
"23": {
|
||||
"0": 3.055860371881066,
|
||||
"32": 0.04156449816886682,
|
||||
"40": 0.02182786872676137,
|
||||
"48": 0.011057894501810384
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-018",
|
||||
"length": 108,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0013828310609028,
|
||||
"32": 0.03971017933680604,
|
||||
"40": 0.021048825625806546,
|
||||
"48": 0.011115656621268686
|
||||
},
|
||||
"19": {
|
||||
"0": 3.8060033369100768,
|
||||
"32": 0.04542715302568046,
|
||||
"40": 0.023526612657494325,
|
||||
"48": 0.012077680832697587
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0269971279675176,
|
||||
"32": 0.04410912108278284,
|
||||
"40": 0.023608312332425496,
|
||||
"48": 0.012556557224355341
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-019",
|
||||
"length": 103,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0112006462653227,
|
||||
"32": 0.037640117940643265,
|
||||
"40": 0.019441597324216846,
|
||||
"48": 0.009988085038926717
|
||||
},
|
||||
"19": {
|
||||
"0": 3.8768517398640947,
|
||||
"32": 0.04158191015113058,
|
||||
"40": 0.020643499621951257,
|
||||
"48": 0.01039837221786275
|
||||
},
|
||||
"23": {
|
||||
"0": 3.065298751963704,
|
||||
"32": 0.040825522024696886,
|
||||
"40": 0.021289032661542927,
|
||||
"48": 0.010876842781099974
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-020",
|
||||
"length": 106,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0499784330668804,
|
||||
"32": 0.04122577355978493,
|
||||
"40": 0.021592165464748375,
|
||||
"48": 0.011222263753869931
|
||||
},
|
||||
"19": {
|
||||
"0": 3.8824985292132834,
|
||||
"32": 0.04492968673719023,
|
||||
"40": 0.022922977828289975,
|
||||
"48": 0.011503317232916728
|
||||
},
|
||||
"23": {
|
||||
"0": 3.033711254655971,
|
||||
"32": 0.043830061367554726,
|
||||
"40": 0.02317944512208468,
|
||||
"48": 0.012154593458581674
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-021",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.0001907173024827,
|
||||
"32": 0.03697409357661978,
|
||||
"40": 0.019188918824031547,
|
||||
"48": 0.009750811653384558
|
||||
},
|
||||
"19": {
|
||||
"0": 3.766616992263308,
|
||||
"32": 0.042624045486801626,
|
||||
"40": 0.02124433468816115,
|
||||
"48": 0.010587855522900326
|
||||
},
|
||||
"23": {
|
||||
"0": 2.9766873470897104,
|
||||
"32": 0.041481534529769944,
|
||||
"40": 0.02121486238795562,
|
||||
"48": 0.010788750140809036
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-022",
|
||||
"length": 103,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.1429597973216787,
|
||||
"32": 0.03808212093085823,
|
||||
"40": 0.019726271041694728,
|
||||
"48": 0.010127914275230436
|
||||
},
|
||||
"19": {
|
||||
"0": 3.8598970499663743,
|
||||
"32": 0.04248202181605006,
|
||||
"40": 0.0214628237211103,
|
||||
"48": 0.010853348943230156
|
||||
},
|
||||
"23": {
|
||||
"0": 3.049645123879466,
|
||||
"32": 0.039979464021990575,
|
||||
"40": 0.02080617789667549,
|
||||
"48": 0.010634926145447776
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-023",
|
||||
"length": 105,
|
||||
"mse": {
|
||||
"15": {
|
||||
"0": 3.048208724265116,
|
||||
"32": 0.041337984464644754,
|
||||
"40": 0.022112363284163796,
|
||||
"48": 0.011560149309456157
|
||||
},
|
||||
"19": {
|
||||
"0": 3.8843489019292843,
|
||||
"32": 0.043591605489556345,
|
||||
"40": 0.02274112402559217,
|
||||
"48": 0.011750496554981203
|
||||
},
|
||||
"23": {
|
||||
"0": 3.0388065889185087,
|
||||
"32": 0.04281829316721918,
|
||||
"40": 0.022603219431728962,
|
||||
"48": 0.01173585649494112
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"revision": "15852e8c16360a2fea060d615a32b45270f8a8fc",
|
||||
"inputs": {
|
||||
"manifest.json": "28efbaf94a5034333339a35f08ead151459a7d20c6c2d2f07a451e7f3bf154de",
|
||||
"model_config.json": "ed1c1723241f23f7f4e23430759cbd7dcfb4103cbdfe052bfe7626b57c2615b4",
|
||||
"tokenizer.json": "5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42"
|
||||
},
|
||||
"shards": [
|
||||
{
|
||||
"name": "model.safetensors-00001-of-00001.safetensors",
|
||||
"bytes": 4548221488,
|
||||
"sha256": "aa33250c4fc64891ddfaba3a314fd9542ea371843c387178b425fbcc5ed680b1"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,602 @@
|
||||
{
|
||||
"splits": {
|
||||
"diagnostic": [
|
||||
{
|
||||
"id": "diagnostic-000-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: vine=39, nettle=36, umber=91, quartz=28, larch=76, fern=47, heath=48, iris=82, reed=75, kelp=89, thyme=34, maple=94.\nWhat is the recorded number for larch?",
|
||||
"answer": 76
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-000-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: vine=39, nettle=36, umber=91, quartz=28, larch=75, fern=47, heath=48, iris=82, reed=76, kelp=89, thyme=34, maple=94.\nWhat is the recorded number for larch?",
|
||||
"answer": 75
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: maple=44, iris=23, fern=88, kelp=77, thyme=73, elm=29, birch=84, umber=76, amber=63, reed=72, quartz=27, yew=39.\nWhat is the recorded number for yew?",
|
||||
"answer": 39
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-001-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: maple=44, iris=23, fern=88, kelp=77, thyme=73, elm=29, birch=84, umber=39, amber=63, reed=72, quartz=27, yew=76.\nWhat is the recorded number for yew?",
|
||||
"answer": 76
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: iris=25, cedar=56, fern=69, jade=66, nettle=53, yew=78, kelp=67, quartz=31, elm=22, dune=52, amber=84, umber=49.\nWhat is the recorded number for umber?",
|
||||
"answer": 49
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-002-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: iris=25, cedar=56, fern=69, jade=66, nettle=53, yew=78, kelp=67, quartz=31, elm=49, dune=52, amber=84, umber=22.\nWhat is the recorded number for umber?",
|
||||
"answer": 22
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=73, elm=86, thyme=44, vine=87, dune=75, slate=80, maple=84, larch=90, olive=70, yew=99, reed=63, quartz=21.\nWhat is the recorded number for reed?",
|
||||
"answer": 63
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-003-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=73, elm=86, thyme=44, vine=87, dune=75, slate=80, maple=84, larch=90, olive=70, yew=99, reed=21, quartz=63.\nWhat is the recorded number for reed?",
|
||||
"answer": 21
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: yew=78, jade=99, maple=84, cedar=88, iris=74, quartz=42, willow=75, dune=89, fern=73, amber=23, reed=29, nettle=47.\nWhat is the recorded number for iris?",
|
||||
"answer": 74
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-004-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: yew=78, jade=99, maple=84, cedar=88, iris=29, quartz=42, willow=75, dune=89, fern=73, amber=23, reed=74, nettle=47.\nWhat is the recorded number for iris?",
|
||||
"answer": 29
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: dune=25, cedar=24, birch=92, nettle=64, slate=56, olive=69, grove=67, elm=98, willow=39, iris=81, reed=77, fern=48.\nWhat is the recorded number for willow?",
|
||||
"answer": 39
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-005-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: dune=25, cedar=24, birch=92, nettle=64, slate=56, olive=69, grove=67, elm=98, willow=77, iris=81, reed=39, fern=48.\nWhat is the recorded number for willow?",
|
||||
"answer": 77
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: quartz=35, kelp=51, reed=36, iris=55, vine=67, yew=70, thyme=83, heath=49, nettle=96, cedar=40, amber=31, dune=27.\nWhat is the recorded number for cedar?",
|
||||
"answer": 40
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-006-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: quartz=35, kelp=51, reed=36, iris=55, vine=40, yew=70, thyme=83, heath=49, nettle=96, cedar=67, amber=31, dune=27.\nWhat is the recorded number for cedar?",
|
||||
"answer": 67
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: umber=48, iris=43, grove=44, maple=73, thyme=89, birch=61, larch=81, amber=93, olive=46, cedar=76, kelp=33, yew=51.\nWhat is the recorded number for thyme?",
|
||||
"answer": 89
|
||||
},
|
||||
{
|
||||
"id": "diagnostic-007-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: umber=48, iris=43, grove=44, maple=73, thyme=61, birch=89, larch=81, amber=93, olive=46, cedar=76, kelp=33, yew=51.\nWhat is the recorded number for thyme?",
|
||||
"answer": 61
|
||||
}
|
||||
],
|
||||
"validation": [
|
||||
{
|
||||
"id": "validation-000-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: kelp=68, dune=98, nettle=92, maple=60, reed=72, birch=74, thyme=91, umber=83, cedar=25, willow=44, grove=79, olive=78.\nWhat is the recorded number for willow?",
|
||||
"answer": 44
|
||||
},
|
||||
{
|
||||
"id": "validation-000-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: kelp=68, dune=98, nettle=92, maple=60, reed=72, birch=74, thyme=44, umber=83, cedar=25, willow=91, grove=79, olive=78.\nWhat is the recorded number for willow?",
|
||||
"answer": 91
|
||||
},
|
||||
{
|
||||
"id": "validation-001-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: vine=46, kelp=91, cedar=72, reed=97, heath=28, pine=48, willow=20, quartz=69, maple=45, elm=22, thyme=33, fern=47.\nWhat is the recorded number for thyme?",
|
||||
"answer": 33
|
||||
},
|
||||
{
|
||||
"id": "validation-001-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: vine=46, kelp=91, cedar=72, reed=97, heath=33, pine=48, willow=20, quartz=69, maple=45, elm=22, thyme=28, fern=47.\nWhat is the recorded number for thyme?",
|
||||
"answer": 28
|
||||
},
|
||||
{
|
||||
"id": "validation-002-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: iris=57, fern=72, elm=56, vine=69, dune=42, yew=51, cedar=71, nettle=93, umber=75, maple=43, slate=22, olive=66.\nWhat is the recorded number for dune?",
|
||||
"answer": 42
|
||||
},
|
||||
{
|
||||
"id": "validation-002-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: iris=57, fern=72, elm=42, vine=69, dune=56, yew=51, cedar=71, nettle=93, umber=75, maple=43, slate=22, olive=66.\nWhat is the recorded number for dune?",
|
||||
"answer": 56
|
||||
},
|
||||
{
|
||||
"id": "validation-003-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: jade=33, quartz=72, slate=34, dune=81, elm=43, willow=95, thyme=83, vine=23, reed=56, fern=48, iris=93, maple=82.\nWhat is the recorded number for iris?",
|
||||
"answer": 93
|
||||
},
|
||||
{
|
||||
"id": "validation-003-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: jade=33, quartz=72, slate=34, dune=81, elm=43, willow=95, thyme=93, vine=23, reed=56, fern=48, iris=83, maple=82.\nWhat is the recorded number for iris?",
|
||||
"answer": 83
|
||||
},
|
||||
{
|
||||
"id": "validation-004-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=70, vine=25, cedar=72, dune=69, olive=23, iris=81, kelp=89, maple=85, quartz=88, jade=32, slate=91, thyme=29.\nWhat is the recorded number for olive?",
|
||||
"answer": 23
|
||||
},
|
||||
{
|
||||
"id": "validation-004-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=70, vine=25, cedar=72, dune=69, olive=89, iris=81, kelp=23, maple=85, quartz=88, jade=32, slate=91, thyme=29.\nWhat is the recorded number for olive?",
|
||||
"answer": 89
|
||||
},
|
||||
{
|
||||
"id": "validation-005-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: willow=60, iris=36, grove=22, thyme=82, pine=74, maple=63, vine=44, yew=62, heath=32, amber=49, slate=96, umber=47.\nWhat is the recorded number for maple?",
|
||||
"answer": 63
|
||||
},
|
||||
{
|
||||
"id": "validation-005-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: willow=60, iris=36, grove=22, thyme=82, pine=74, maple=49, vine=44, yew=62, heath=32, amber=63, slate=96, umber=47.\nWhat is the recorded number for maple?",
|
||||
"answer": 49
|
||||
},
|
||||
{
|
||||
"id": "validation-006-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: pine=32, iris=35, amber=88, heath=48, thyme=77, kelp=78, willow=37, jade=31, grove=97, maple=74, slate=69, umber=29.\nWhat is the recorded number for kelp?",
|
||||
"answer": 78
|
||||
},
|
||||
{
|
||||
"id": "validation-006-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: pine=32, iris=35, amber=88, heath=48, thyme=77, kelp=29, willow=37, jade=31, grove=97, maple=74, slate=69, umber=78.\nWhat is the recorded number for kelp?",
|
||||
"answer": 29
|
||||
},
|
||||
{
|
||||
"id": "validation-007-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=86, grove=50, iris=83, maple=64, reed=95, olive=46, jade=97, umber=24, amber=53, thyme=33, birch=93, pine=96.\nWhat is the recorded number for maple?",
|
||||
"answer": 64
|
||||
},
|
||||
{
|
||||
"id": "validation-007-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=86, grove=64, iris=83, maple=50, reed=95, olive=46, jade=97, umber=24, amber=53, thyme=33, birch=93, pine=96.\nWhat is the recorded number for maple?",
|
||||
"answer": 50
|
||||
}
|
||||
],
|
||||
"test": [
|
||||
{
|
||||
"id": "test-000-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: larch=28, willow=64, thyme=87, dune=51, birch=63, umber=24, olive=72, kelp=97, slate=82, cedar=49, heath=46, nettle=37.\nWhat is the recorded number for nettle?",
|
||||
"answer": 37
|
||||
},
|
||||
{
|
||||
"id": "test-000-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: larch=28, willow=64, thyme=87, dune=51, birch=63, umber=24, olive=72, kelp=97, slate=82, cedar=49, heath=37, nettle=46.\nWhat is the recorded number for nettle?",
|
||||
"answer": 46
|
||||
},
|
||||
{
|
||||
"id": "test-001-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=60, nettle=61, birch=31, cedar=67, umber=88, elm=44, grove=72, amber=78, thyme=48, quartz=33, yew=29, slate=25.\nWhat is the recorded number for cedar?",
|
||||
"answer": 67
|
||||
},
|
||||
{
|
||||
"id": "test-001-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=60, nettle=61, birch=31, cedar=33, umber=88, elm=44, grove=72, amber=78, thyme=48, quartz=67, yew=29, slate=25.\nWhat is the recorded number for cedar?",
|
||||
"answer": 33
|
||||
},
|
||||
{
|
||||
"id": "test-002-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=41, iris=93, heath=36, vine=91, thyme=73, elm=25, reed=83, maple=55, birch=99, grove=35, larch=49, slate=29.\nWhat is the recorded number for grove?",
|
||||
"answer": 35
|
||||
},
|
||||
{
|
||||
"id": "test-002-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=35, iris=93, heath=36, vine=91, thyme=73, elm=25, reed=83, maple=55, birch=99, grove=41, larch=49, slate=29.\nWhat is the recorded number for grove?",
|
||||
"answer": 41
|
||||
},
|
||||
{
|
||||
"id": "test-003-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: slate=59, dune=25, olive=64, nettle=70, grove=89, cedar=76, kelp=54, larch=97, umber=36, amber=71, elm=53, pine=80.\nWhat is the recorded number for umber?",
|
||||
"answer": 36
|
||||
},
|
||||
{
|
||||
"id": "test-003-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: slate=59, dune=25, olive=64, nettle=70, grove=89, cedar=36, kelp=54, larch=97, umber=76, amber=71, elm=53, pine=80.\nWhat is the recorded number for umber?",
|
||||
"answer": 76
|
||||
},
|
||||
{
|
||||
"id": "test-004-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: olive=26, reed=73, yew=37, jade=54, thyme=76, umber=95, cedar=59, slate=52, birch=49, kelp=43, willow=69, pine=63.\nWhat is the recorded number for jade?",
|
||||
"answer": 54
|
||||
},
|
||||
{
|
||||
"id": "test-004-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: olive=26, reed=73, yew=37, jade=52, thyme=76, umber=95, cedar=59, slate=54, birch=49, kelp=43, willow=69, pine=63.\nWhat is the recorded number for jade?",
|
||||
"answer": 52
|
||||
},
|
||||
{
|
||||
"id": "test-005-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: thyme=92, amber=21, larch=31, jade=80, birch=52, willow=99, pine=88, cedar=57, kelp=61, slate=33, nettle=67, quartz=69.\nWhat is the recorded number for amber?",
|
||||
"answer": 21
|
||||
},
|
||||
{
|
||||
"id": "test-005-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: thyme=92, amber=52, larch=31, jade=80, birch=21, willow=99, pine=88, cedar=57, kelp=61, slate=33, nettle=67, quartz=69.\nWhat is the recorded number for amber?",
|
||||
"answer": 52
|
||||
},
|
||||
{
|
||||
"id": "test-006-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: elm=38, yew=66, iris=28, pine=25, quartz=79, willow=49, maple=75, jade=32, umber=96, cedar=86, grove=61, slate=55.\nWhat is the recorded number for jade?",
|
||||
"answer": 32
|
||||
},
|
||||
{
|
||||
"id": "test-006-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: elm=38, yew=66, iris=28, pine=25, quartz=32, willow=49, maple=75, jade=79, umber=96, cedar=86, grove=61, slate=55.\nWhat is the recorded number for jade?",
|
||||
"answer": 79
|
||||
},
|
||||
{
|
||||
"id": "test-007-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: yew=29, maple=50, kelp=83, jade=76, thyme=53, elm=26, reed=90, iris=23, willow=33, quartz=31, cedar=57, grove=49.\nWhat is the recorded number for thyme?",
|
||||
"answer": 53
|
||||
},
|
||||
{
|
||||
"id": "test-007-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: yew=29, maple=50, kelp=83, jade=76, thyme=33, elm=26, reed=90, iris=23, willow=53, quartz=31, cedar=57, grove=49.\nWhat is the recorded number for thyme?",
|
||||
"answer": 33
|
||||
},
|
||||
{
|
||||
"id": "test-008-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: reed=20, willow=26, maple=62, cedar=52, larch=47, kelp=29, slate=84, grove=49, thyme=37, elm=30, olive=66, nettle=58.\nWhat is the recorded number for cedar?",
|
||||
"answer": 52
|
||||
},
|
||||
{
|
||||
"id": "test-008-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: reed=52, willow=26, maple=62, cedar=20, larch=47, kelp=29, slate=84, grove=49, thyme=37, elm=30, olive=66, nettle=58.\nWhat is the recorded number for cedar?",
|
||||
"answer": 20
|
||||
},
|
||||
{
|
||||
"id": "test-009-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: slate=91, iris=23, jade=93, elm=92, maple=99, amber=66, thyme=74, nettle=59, grove=81, olive=67, yew=68, reed=60.\nWhat is the recorded number for maple?",
|
||||
"answer": 99
|
||||
},
|
||||
{
|
||||
"id": "test-009-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: slate=91, iris=23, jade=93, elm=92, maple=74, amber=66, thyme=99, nettle=59, grove=81, olive=67, yew=68, reed=60.\nWhat is the recorded number for maple?",
|
||||
"answer": 74
|
||||
},
|
||||
{
|
||||
"id": "test-010-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: olive=97, heath=37, amber=20, birch=59, larch=58, reed=35, vine=87, kelp=65, thyme=83, cedar=99, dune=96, willow=27.\nWhat is the recorded number for heath?",
|
||||
"answer": 37
|
||||
},
|
||||
{
|
||||
"id": "test-010-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: olive=97, heath=20, amber=37, birch=59, larch=58, reed=35, vine=87, kelp=65, thyme=83, cedar=99, dune=96, willow=27.\nWhat is the recorded number for heath?",
|
||||
"answer": 20
|
||||
},
|
||||
{
|
||||
"id": "test-011-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: reed=37, iris=78, amber=28, grove=38, olive=61, heath=94, birch=55, kelp=99, pine=91, maple=59, willow=36, vine=22.\nWhat is the recorded number for willow?",
|
||||
"answer": 36
|
||||
},
|
||||
{
|
||||
"id": "test-011-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: reed=37, iris=78, amber=28, grove=38, olive=61, heath=94, birch=55, kelp=99, pine=91, maple=36, willow=59, vine=22.\nWhat is the recorded number for willow?",
|
||||
"answer": 59
|
||||
},
|
||||
{
|
||||
"id": "test-012-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: iris=41, reed=70, jade=98, willow=28, slate=34, birch=69, elm=80, nettle=46, pine=33, amber=86, vine=72, kelp=73.\nWhat is the recorded number for jade?",
|
||||
"answer": 98
|
||||
},
|
||||
{
|
||||
"id": "test-012-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: iris=41, reed=70, jade=46, willow=28, slate=34, birch=69, elm=80, nettle=98, pine=33, amber=86, vine=72, kelp=73.\nWhat is the recorded number for jade?",
|
||||
"answer": 46
|
||||
},
|
||||
{
|
||||
"id": "test-013-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: vine=81, olive=56, willow=24, slate=93, elm=82, heath=59, grove=97, fern=57, thyme=78, yew=52, dune=37, umber=23.\nWhat is the recorded number for fern?",
|
||||
"answer": 57
|
||||
},
|
||||
{
|
||||
"id": "test-013-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: vine=81, olive=56, willow=24, slate=57, elm=82, heath=59, grove=97, fern=93, thyme=78, yew=52, dune=37, umber=23.\nWhat is the recorded number for fern?",
|
||||
"answer": 93
|
||||
},
|
||||
{
|
||||
"id": "test-014-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: iris=89, amber=56, cedar=47, slate=31, elm=34, kelp=38, nettle=50, grove=23, fern=90, willow=61, vine=94, heath=68.\nWhat is the recorded number for elm?",
|
||||
"answer": 34
|
||||
},
|
||||
{
|
||||
"id": "test-014-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: iris=89, amber=56, cedar=47, slate=31, elm=94, kelp=38, nettle=50, grove=23, fern=90, willow=61, vine=34, heath=68.\nWhat is the recorded number for elm?",
|
||||
"answer": 94
|
||||
},
|
||||
{
|
||||
"id": "test-015-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: willow=73, thyme=57, amber=49, quartz=58, olive=81, heath=64, fern=93, nettle=74, iris=61, reed=32, yew=35, vine=26.\nWhat is the recorded number for reed?",
|
||||
"answer": 32
|
||||
},
|
||||
{
|
||||
"id": "test-015-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: willow=73, thyme=32, amber=49, quartz=58, olive=81, heath=64, fern=93, nettle=74, iris=61, reed=57, yew=35, vine=26.\nWhat is the recorded number for reed?",
|
||||
"answer": 57
|
||||
},
|
||||
{
|
||||
"id": "test-016-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: nettle=58, willow=62, olive=93, thyme=38, elm=27, cedar=20, birch=86, heath=73, kelp=53, pine=34, dune=50, fern=88.\nWhat is the recorded number for willow?",
|
||||
"answer": 62
|
||||
},
|
||||
{
|
||||
"id": "test-016-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: nettle=58, willow=20, olive=93, thyme=38, elm=27, cedar=62, birch=86, heath=73, kelp=53, pine=34, dune=50, fern=88.\nWhat is the recorded number for willow?",
|
||||
"answer": 20
|
||||
},
|
||||
{
|
||||
"id": "test-017-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: slate=55, reed=97, heath=36, pine=35, grove=70, fern=37, elm=38, nettle=59, thyme=34, larch=47, vine=30, olive=87.\nWhat is the recorded number for grove?",
|
||||
"answer": 70
|
||||
},
|
||||
{
|
||||
"id": "test-017-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: slate=70, reed=97, heath=36, pine=35, grove=55, fern=37, elm=38, nettle=59, thyme=34, larch=47, vine=30, olive=87.\nWhat is the recorded number for grove?",
|
||||
"answer": 55
|
||||
},
|
||||
{
|
||||
"id": "test-018-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: dune=58, umber=27, willow=59, larch=43, nettle=64, jade=50, slate=42, heath=44, cedar=77, reed=85, iris=65, yew=72.\nWhat is the recorded number for yew?",
|
||||
"answer": 72
|
||||
},
|
||||
{
|
||||
"id": "test-018-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: dune=58, umber=27, willow=59, larch=72, nettle=64, jade=50, slate=42, heath=44, cedar=77, reed=85, iris=65, yew=43.\nWhat is the recorded number for yew?",
|
||||
"answer": 43
|
||||
},
|
||||
{
|
||||
"id": "test-019-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: pine=99, slate=58, yew=25, quartz=54, willow=88, vine=40, heath=68, grove=33, elm=32, cedar=80, fern=98, jade=85.\nWhat is the recorded number for fern?",
|
||||
"answer": 98
|
||||
},
|
||||
{
|
||||
"id": "test-019-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: pine=99, slate=58, yew=25, quartz=54, willow=88, vine=40, heath=68, grove=33, elm=32, cedar=80, fern=85, jade=98.\nWhat is the recorded number for fern?",
|
||||
"answer": 85
|
||||
},
|
||||
{
|
||||
"id": "test-020-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: amber=80, umber=98, dune=50, maple=90, slate=41, pine=57, birch=74, elm=27, quartz=66, larch=61, iris=35, kelp=49.\nWhat is the recorded number for iris?",
|
||||
"answer": 35
|
||||
},
|
||||
{
|
||||
"id": "test-020-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: amber=80, umber=98, dune=50, maple=90, slate=35, pine=57, birch=74, elm=27, quartz=66, larch=61, iris=41, kelp=49.\nWhat is the recorded number for iris?",
|
||||
"answer": 41
|
||||
},
|
||||
{
|
||||
"id": "test-021-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=74, olive=20, elm=37, kelp=33, slate=86, iris=99, quartz=61, yew=39, jade=21, pine=50, amber=64, thyme=73.\nWhat is the recorded number for elm?",
|
||||
"answer": 37
|
||||
},
|
||||
{
|
||||
"id": "test-021-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=74, olive=20, elm=64, kelp=33, slate=86, iris=99, quartz=61, yew=39, jade=21, pine=50, amber=37, thyme=73.\nWhat is the recorded number for elm?",
|
||||
"answer": 64
|
||||
},
|
||||
{
|
||||
"id": "test-022-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: dune=48, reed=49, birch=31, jade=83, thyme=72, willow=50, heath=54, pine=39, slate=56, nettle=26, vine=22, grove=57.\nWhat is the recorded number for heath?",
|
||||
"answer": 54
|
||||
},
|
||||
{
|
||||
"id": "test-022-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: dune=48, reed=49, birch=31, jade=83, thyme=72, willow=50, heath=56, pine=39, slate=54, nettle=26, vine=22, grove=57.\nWhat is the recorded number for heath?",
|
||||
"answer": 56
|
||||
},
|
||||
{
|
||||
"id": "test-023-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: thyme=82, vine=61, jade=68, quartz=93, cedar=76, grove=59, willow=67, fern=65, amber=38, dune=29, maple=37, slate=21.\nWhat is the recorded number for fern?",
|
||||
"answer": 65
|
||||
},
|
||||
{
|
||||
"id": "test-023-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: thyme=82, vine=61, jade=68, quartz=93, cedar=76, grove=59, willow=67, fern=29, amber=38, dune=65, maple=37, slate=21.\nWhat is the recorded number for fern?",
|
||||
"answer": 29
|
||||
},
|
||||
{
|
||||
"id": "test-024-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=27, elm=39, willow=90, heath=36, slate=61, grove=85, vine=67, birch=56, cedar=47, iris=93, kelp=54, thyme=84.\nWhat is the recorded number for thyme?",
|
||||
"answer": 84
|
||||
},
|
||||
{
|
||||
"id": "test-024-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: fern=27, elm=39, willow=90, heath=84, slate=61, grove=85, vine=67, birch=56, cedar=47, iris=93, kelp=54, thyme=36.\nWhat is the recorded number for thyme?",
|
||||
"answer": 36
|
||||
},
|
||||
{
|
||||
"id": "test-025-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=41, quartz=66, reed=48, willow=47, fern=44, slate=40, pine=52, grove=90, nettle=33, maple=23, larch=92, olive=55.\nWhat is the recorded number for maple?",
|
||||
"answer": 23
|
||||
},
|
||||
{
|
||||
"id": "test-025-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=41, quartz=66, reed=48, willow=47, fern=23, slate=40, pine=52, grove=90, nettle=33, maple=44, larch=92, olive=55.\nWhat is the recorded number for maple?",
|
||||
"answer": 44
|
||||
},
|
||||
{
|
||||
"id": "test-026-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: thyme=30, olive=71, quartz=40, cedar=37, larch=55, amber=90, maple=74, grove=21, pine=23, birch=70, jade=89, slate=43.\nWhat is the recorded number for maple?",
|
||||
"answer": 74
|
||||
},
|
||||
{
|
||||
"id": "test-026-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: thyme=30, olive=71, quartz=40, cedar=37, larch=55, amber=90, maple=70, grove=21, pine=23, birch=74, jade=89, slate=43.\nWhat is the recorded number for maple?",
|
||||
"answer": 70
|
||||
},
|
||||
{
|
||||
"id": "test-027-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=84, yew=47, amber=48, reed=91, elm=79, grove=99, fern=95, kelp=90, olive=29, dune=39, maple=92, vine=98.\nWhat is the recorded number for heath?",
|
||||
"answer": 84
|
||||
},
|
||||
{
|
||||
"id": "test-027-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=39, yew=47, amber=48, reed=91, elm=79, grove=99, fern=95, kelp=90, olive=29, dune=84, maple=92, vine=98.\nWhat is the recorded number for heath?",
|
||||
"answer": 39
|
||||
},
|
||||
{
|
||||
"id": "test-028-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: slate=79, umber=50, heath=41, larch=87, elm=48, yew=51, willow=45, olive=53, fern=60, cedar=27, kelp=68, reed=30.\nWhat is the recorded number for slate?",
|
||||
"answer": 79
|
||||
},
|
||||
{
|
||||
"id": "test-028-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: slate=68, umber=50, heath=41, larch=87, elm=48, yew=51, willow=45, olive=53, fern=60, cedar=27, kelp=79, reed=30.\nWhat is the recorded number for slate?",
|
||||
"answer": 68
|
||||
},
|
||||
{
|
||||
"id": "test-029-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: maple=24, elm=41, amber=60, willow=78, quartz=20, thyme=28, olive=92, vine=23, fern=72, iris=33, umber=47, pine=66.\nWhat is the recorded number for quartz?",
|
||||
"answer": 20
|
||||
},
|
||||
{
|
||||
"id": "test-029-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: maple=24, elm=41, amber=60, willow=20, quartz=78, thyme=28, olive=92, vine=23, fern=72, iris=33, umber=47, pine=66.\nWhat is the recorded number for quartz?",
|
||||
"answer": 78
|
||||
},
|
||||
{
|
||||
"id": "test-030-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: grove=47, fern=45, elm=26, amber=22, quartz=86, reed=78, birch=29, cedar=74, willow=99, slate=52, larch=58, maple=55.\nWhat is the recorded number for fern?",
|
||||
"answer": 45
|
||||
},
|
||||
{
|
||||
"id": "test-030-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: grove=47, fern=74, elm=26, amber=22, quartz=86, reed=78, birch=29, cedar=45, willow=99, slate=52, larch=58, maple=55.\nWhat is the recorded number for fern?",
|
||||
"answer": 74
|
||||
},
|
||||
{
|
||||
"id": "test-031-0",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=50, jade=46, birch=70, larch=99, dune=78, nettle=49, umber=38, vine=60, amber=28, grove=69, olive=58, kelp=92.\nWhat is the recorded number for kelp?",
|
||||
"answer": 92
|
||||
},
|
||||
{
|
||||
"id": "test-031-1",
|
||||
"task": "lookup",
|
||||
"question": "Records in time order: heath=50, jade=46, birch=92, larch=99, dune=78, nettle=49, umber=38, vine=60, amber=28, grove=69, olive=58, kelp=70.\nWhat is the recorded number for kelp?",
|
||||
"answer": 70
|
||||
}
|
||||
]
|
||||
},
|
||||
"base_adapter": "c82db5af7fa42cf58a349f3e53961da2360b211a7ed606f53a728860c64f6f29",
|
||||
"sites": [
|
||||
15,
|
||||
19,
|
||||
23
|
||||
],
|
||||
"rank_budget": [
|
||||
32,
|
||||
40,
|
||||
48
|
||||
],
|
||||
"uniform_rank": 40,
|
||||
"cap": 24,
|
||||
"rank_selection": "Order layers by increase in complete-answer correct count upon single restoration; ties by ascending layer index, earlier gets higher rank.",
|
||||
"primary_metric": "complete answer accuracy; paired uncertainty resamples counterfactual pairs",
|
||||
"secondary_metric": "both members of pair correct"
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"seed": 621011,
|
||||
"parameters": 2476032,
|
||||
"diagnostic_scores": {
|
||||
"baseline": 0,
|
||||
"restore-15": 15,
|
||||
"restore-19": 16,
|
||||
"restore-23": 1
|
||||
},
|
||||
"ranks": {
|
||||
"allocated": {
|
||||
"19": 48,
|
||||
"15": 40,
|
||||
"23": 32
|
||||
},
|
||||
"reversed": {
|
||||
"19": 32,
|
||||
"15": 40,
|
||||
"23": 48
|
||||
},
|
||||
"uniform": {
|
||||
"15": 40,
|
||||
"19": 40,
|
||||
"23": 40
|
||||
}
|
||||
},
|
||||
"initial_state_by_layer_sha256": {
|
||||
"shared-allocated": {
|
||||
"15": "9af9d1b0a03933874ac6bca5b42337d0a569d5649d0f5a3b210ee229c475d2fe",
|
||||
"19": "3b5f0f486671233b03f16cfa973eddbfbb4851a2f2027ecbe222bc24439e074a",
|
||||
"23": "639d755d4d403c688c887e56f01dc3f45ba0fe2733cdce2ea9dff5ce8f7de204"
|
||||
},
|
||||
"shared-uniform": {
|
||||
"15": "9af9d1b0a03933874ac6bca5b42337d0a569d5649d0f5a3b210ee229c475d2fe",
|
||||
"19": "4f3db2093ff2360e651ff62a938d45d1a8af3c3115c7bde81bf2dee49ca8f2a4",
|
||||
"23": "f4308bfa4436812592db5e799db3fe5cd5f1d5908bfd1a8cbf1718801436ef44"
|
||||
},
|
||||
"shared-reversed": {
|
||||
"15": "9af9d1b0a03933874ac6bca5b42337d0a569d5649d0f5a3b210ee229c475d2fe",
|
||||
"19": "e852591d89c30c8d367b3d3de8c5182fcdd3bd76b9f4e13d962faad4c8c975df",
|
||||
"23": "c1d7b72136e328821614f4e28e1e0287567df65459d80302537e2085c1777800"
|
||||
},
|
||||
"local-uniform": {
|
||||
"15": "9af9d1b0a03933874ac6bca5b42337d0a569d5649d0f5a3b210ee229c475d2fe",
|
||||
"19": "4f3db2093ff2360e651ff62a938d45d1a8af3c3115c7bde81bf2dee49ca8f2a4",
|
||||
"23": "f4308bfa4436812592db5e799db3fe5cd5f1d5908bfd1a8cbf1718801436ef44"
|
||||
},
|
||||
"local-allocated": {
|
||||
"15": "9af9d1b0a03933874ac6bca5b42337d0a569d5649d0f5a3b210ee229c475d2fe",
|
||||
"19": "3b5f0f486671233b03f16cfa973eddbfbb4851a2f2027ecbe222bc24439e074a",
|
||||
"23": "639d755d4d403c688c887e56f01dc3f45ba0fe2733cdce2ea9dff5ce8f7de204"
|
||||
}
|
||||
},
|
||||
"digest_encoding": "Sorted state_dict names per layer. For each tensor: compact JSON [name,dtype,shape], newline, contiguous native tensor bytes (little endian)."
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"split": "validation",
|
||||
"questions": 16,
|
||||
"pairs": 8,
|
||||
"planned_rank_conditions": [
|
||||
"shared-allocated",
|
||||
"shared-uniform",
|
||||
"shared-reversed",
|
||||
"local-uniform",
|
||||
"local-allocated"
|
||||
],
|
||||
"completed_rank_conditions": 2,
|
||||
"prior_pairs_with_changed_answers": [
|
||||
"validation-003",
|
||||
"validation-006"
|
||||
],
|
||||
"selected_models": {
|
||||
"shared-allocated": {
|
||||
"validation_correct_by_epoch": [
|
||||
2,
|
||||
3
|
||||
],
|
||||
"selected_epoch": 2,
|
||||
"selected_correct": 3,
|
||||
"selected_pairs_both_correct": 0,
|
||||
"pairs_with_changed_answers": [
|
||||
"validation-004",
|
||||
"validation-005",
|
||||
"validation-006"
|
||||
],
|
||||
"versus_prior": {
|
||||
"corrected": [],
|
||||
"lost": [
|
||||
"validation-003-0",
|
||||
"validation-003-1"
|
||||
],
|
||||
"net": -2,
|
||||
"same_token_streams": 12
|
||||
}
|
||||
},
|
||||
"shared-uniform": {
|
||||
"validation_correct_by_epoch": [
|
||||
3,
|
||||
5
|
||||
],
|
||||
"selected_epoch": 2,
|
||||
"selected_correct": 5,
|
||||
"selected_pairs_both_correct": 1,
|
||||
"pairs_with_changed_answers": [
|
||||
"validation-003",
|
||||
"validation-006"
|
||||
],
|
||||
"versus_prior": {
|
||||
"corrected": [],
|
||||
"lost": [],
|
||||
"net": 0,
|
||||
"same_token_streams": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
"comparisons": {
|
||||
"shared-allocated-vs-shared-uniform": {
|
||||
"selected": {
|
||||
"corrected": [],
|
||||
"lost": [
|
||||
"validation-003-0",
|
||||
"validation-003-1"
|
||||
],
|
||||
"net": -2,
|
||||
"same_token_streams": 12
|
||||
},
|
||||
"at_same_epoch": [
|
||||
{
|
||||
"corrected": [],
|
||||
"lost": [
|
||||
"validation-005-1"
|
||||
],
|
||||
"net": -1,
|
||||
"same_token_streams": 13
|
||||
},
|
||||
{
|
||||
"corrected": [],
|
||||
"lost": [
|
||||
"validation-003-0",
|
||||
"validation-003-1"
|
||||
],
|
||||
"net": -2,
|
||||
"same_token_streams": 12
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"question_ids_with_a_correct_candidate_answer": {
|
||||
"allocated_or_student": [
|
||||
"validation-000-1",
|
||||
"validation-004-1",
|
||||
"validation-006-0"
|
||||
],
|
||||
"allocated_or_student_or_prior": [
|
||||
"validation-000-1",
|
||||
"validation-003-0",
|
||||
"validation-003-1",
|
||||
"validation-004-1",
|
||||
"validation-006-0"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"diagnostic_correct": {
|
||||
"baseline": 0,
|
||||
"restore-15": 15,
|
||||
"restore-19": 16,
|
||||
"restore-23": 1
|
||||
},
|
||||
"ranks": {
|
||||
"19": 48,
|
||||
"15": 40,
|
||||
"23": 32
|
||||
},
|
||||
"shared": true,
|
||||
"parameters": 2476032,
|
||||
"seed": 621011,
|
||||
"epochs": 2
|
||||
}
|
||||
@@ -0,0 +1,835 @@
|
||||
{
|
||||
"selected_epoch": 2,
|
||||
"epochs": [
|
||||
{
|
||||
"epoch": 1,
|
||||
"steps": [
|
||||
{
|
||||
"capture": "000.npz",
|
||||
"huber": 6.484985828399658,
|
||||
"completion_ce": 3.689948320388794
|
||||
},
|
||||
{
|
||||
"capture": "001.npz",
|
||||
"huber": 6.435533046722412,
|
||||
"completion_ce": 2.815239667892456
|
||||
},
|
||||
{
|
||||
"capture": "002.npz",
|
||||
"huber": 6.501165866851807,
|
||||
"completion_ce": 2.2910900115966797
|
||||
},
|
||||
{
|
||||
"capture": "003.npz",
|
||||
"huber": 6.459116458892822,
|
||||
"completion_ce": 1.4170297384262085
|
||||
},
|
||||
{
|
||||
"capture": "004.npz",
|
||||
"huber": 6.366516590118408,
|
||||
"completion_ce": 1.6510658264160156
|
||||
},
|
||||
{
|
||||
"capture": "005.npz",
|
||||
"huber": 6.376306533813477,
|
||||
"completion_ce": 1.031119704246521
|
||||
},
|
||||
{
|
||||
"capture": "006.npz",
|
||||
"huber": 6.363456726074219,
|
||||
"completion_ce": 1.2906379699707031
|
||||
},
|
||||
{
|
||||
"capture": "007.npz",
|
||||
"huber": 6.301973819732666,
|
||||
"completion_ce": 1.2287101745605469
|
||||
},
|
||||
{
|
||||
"capture": "008.npz",
|
||||
"huber": 6.219982147216797,
|
||||
"completion_ce": 1.8168309926986694
|
||||
},
|
||||
{
|
||||
"capture": "009.npz",
|
||||
"huber": 6.2503790855407715,
|
||||
"completion_ce": 1.3349508047103882
|
||||
},
|
||||
{
|
||||
"capture": "010.npz",
|
||||
"huber": 6.146358013153076,
|
||||
"completion_ce": 0.8580843806266785
|
||||
},
|
||||
{
|
||||
"capture": "011.npz",
|
||||
"huber": 6.143476963043213,
|
||||
"completion_ce": 1.3071588277816772
|
||||
},
|
||||
{
|
||||
"capture": "012.npz",
|
||||
"huber": 6.126444339752197,
|
||||
"completion_ce": 1.2763277292251587
|
||||
},
|
||||
{
|
||||
"capture": "013.npz",
|
||||
"huber": 6.020519733428955,
|
||||
"completion_ce": 0.9891433715820312
|
||||
},
|
||||
{
|
||||
"capture": "014.npz",
|
||||
"huber": 5.930761337280273,
|
||||
"completion_ce": 0.878393828868866
|
||||
},
|
||||
{
|
||||
"capture": "015.npz",
|
||||
"huber": 5.9369354248046875,
|
||||
"completion_ce": 1.1470876932144165
|
||||
},
|
||||
{
|
||||
"capture": "016.npz",
|
||||
"huber": 5.919126987457275,
|
||||
"completion_ce": 0.3603922426700592
|
||||
},
|
||||
{
|
||||
"capture": "017.npz",
|
||||
"huber": 5.926023483276367,
|
||||
"completion_ce": 2.0578842163085938
|
||||
},
|
||||
{
|
||||
"capture": "018.npz",
|
||||
"huber": 5.8985443115234375,
|
||||
"completion_ce": 1.4073950052261353
|
||||
},
|
||||
{
|
||||
"capture": "019.npz",
|
||||
"huber": 5.787118434906006,
|
||||
"completion_ce": 0.5757427215576172
|
||||
},
|
||||
{
|
||||
"capture": "020.npz",
|
||||
"huber": 5.741567611694336,
|
||||
"completion_ce": 0.9653084874153137
|
||||
},
|
||||
{
|
||||
"capture": "021.npz",
|
||||
"huber": 5.615768909454346,
|
||||
"completion_ce": 1.2124963998794556
|
||||
},
|
||||
{
|
||||
"capture": "022.npz",
|
||||
"huber": 5.636579990386963,
|
||||
"completion_ce": 1.0802103281021118
|
||||
},
|
||||
{
|
||||
"capture": "023.npz",
|
||||
"huber": 5.545068264007568,
|
||||
"completion_ce": 1.0685577392578125
|
||||
}
|
||||
],
|
||||
"validation": [
|
||||
{
|
||||
"id": "validation-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 44,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 91,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 33,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 28,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 42,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 56,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 93,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 83,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 23,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
17,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "29<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 29,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "44<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 44,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "44<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 44,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 78,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 64,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 50,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"epoch": 2,
|
||||
"steps": [
|
||||
{
|
||||
"capture": "000.npz",
|
||||
"huber": 5.412282943725586,
|
||||
"completion_ce": 1.240404725074768
|
||||
},
|
||||
{
|
||||
"capture": "001.npz",
|
||||
"huber": 5.291560173034668,
|
||||
"completion_ce": 0.4346771240234375
|
||||
},
|
||||
{
|
||||
"capture": "002.npz",
|
||||
"huber": 5.254405975341797,
|
||||
"completion_ce": 1.4337667226791382
|
||||
},
|
||||
{
|
||||
"capture": "003.npz",
|
||||
"huber": 5.112814426422119,
|
||||
"completion_ce": 0.49626222252845764
|
||||
},
|
||||
{
|
||||
"capture": "004.npz",
|
||||
"huber": 4.9319281578063965,
|
||||
"completion_ce": 0.5854136347770691
|
||||
},
|
||||
{
|
||||
"capture": "005.npz",
|
||||
"huber": 4.811761379241943,
|
||||
"completion_ce": 0.5730641484260559
|
||||
},
|
||||
{
|
||||
"capture": "006.npz",
|
||||
"huber": 4.663804054260254,
|
||||
"completion_ce": 1.0617586374282837
|
||||
},
|
||||
{
|
||||
"capture": "007.npz",
|
||||
"huber": 4.466916561126709,
|
||||
"completion_ce": 0.34136962890625
|
||||
},
|
||||
{
|
||||
"capture": "008.npz",
|
||||
"huber": 4.245267868041992,
|
||||
"completion_ce": 0.9211139678955078
|
||||
},
|
||||
{
|
||||
"capture": "009.npz",
|
||||
"huber": 4.138031959533691,
|
||||
"completion_ce": 0.912613570690155
|
||||
},
|
||||
{
|
||||
"capture": "010.npz",
|
||||
"huber": 3.917837142944336,
|
||||
"completion_ce": 0.7355403900146484
|
||||
},
|
||||
{
|
||||
"capture": "011.npz",
|
||||
"huber": 3.8383302688598633,
|
||||
"completion_ce": 0.86811763048172
|
||||
},
|
||||
{
|
||||
"capture": "012.npz",
|
||||
"huber": 3.793792486190796,
|
||||
"completion_ce": 0.525964081287384
|
||||
},
|
||||
{
|
||||
"capture": "013.npz",
|
||||
"huber": 3.7311267852783203,
|
||||
"completion_ce": 0.6477171778678894
|
||||
},
|
||||
{
|
||||
"capture": "014.npz",
|
||||
"huber": 3.660640001296997,
|
||||
"completion_ce": 0.3576374053955078
|
||||
},
|
||||
{
|
||||
"capture": "015.npz",
|
||||
"huber": 3.590545415878296,
|
||||
"completion_ce": 0.42681822180747986
|
||||
},
|
||||
{
|
||||
"capture": "016.npz",
|
||||
"huber": 3.478916883468628,
|
||||
"completion_ce": 0.2565886080265045
|
||||
},
|
||||
{
|
||||
"capture": "017.npz",
|
||||
"huber": 3.4254138469696045,
|
||||
"completion_ce": 1.4864343404769897
|
||||
},
|
||||
{
|
||||
"capture": "018.npz",
|
||||
"huber": 3.2207138538360596,
|
||||
"completion_ce": 0.25919023156166077
|
||||
},
|
||||
{
|
||||
"capture": "019.npz",
|
||||
"huber": 3.0474510192871094,
|
||||
"completion_ce": 0.08626111596822739
|
||||
},
|
||||
{
|
||||
"capture": "020.npz",
|
||||
"huber": 2.88421893119812,
|
||||
"completion_ce": 0.09066835790872574
|
||||
},
|
||||
{
|
||||
"capture": "021.npz",
|
||||
"huber": 2.696475028991699,
|
||||
"completion_ce": 0.09523773193359375
|
||||
},
|
||||
{
|
||||
"capture": "022.npz",
|
||||
"huber": 2.649243116378784,
|
||||
"completion_ce": 0.6278018951416016
|
||||
},
|
||||
{
|
||||
"capture": "023.npz",
|
||||
"huber": 2.5207579135894775,
|
||||
"completion_ce": 0.4561271667480469
|
||||
}
|
||||
],
|
||||
"validation": [
|
||||
{
|
||||
"id": "validation-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 44,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 91,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 33,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 28,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 42,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 56,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 93,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
18,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "33<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 33,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 83,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
18,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "33<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 33,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 23,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
17,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "29<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 29,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "89<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 89,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "49<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 49,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "44<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 44,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 78,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
22,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"response": "78<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 78,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
22,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "74<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 74,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 64,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 50,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"updates": 48,
|
||||
"validation_correct": [
|
||||
2,
|
||||
3
|
||||
],
|
||||
"selected_epoch": 2,
|
||||
"selected_pairs_both_correct": 0,
|
||||
"corrected_vs_prior": [],
|
||||
"lost_vs_prior": [
|
||||
"validation-003-0",
|
||||
"validation-003-1"
|
||||
],
|
||||
"sha256": {
|
||||
"config.json": "fb6392312500cbfd043b59f374a1605a50e50537fe7e7c5ce1f93e81d956cc10",
|
||||
"trace.json": "5b2cc6113d00d4c9af92de29605127c5f7a2ad4d1e0b58300cc78639a5167db2",
|
||||
"lisa.pt": "f77ab651298bb59af17d43bdf7a2bb9102b8f90ee45db2d8f8fd579c2557e31b"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"diagnostic_correct": {
|
||||
"baseline": 0,
|
||||
"restore-15": 15,
|
||||
"restore-19": 16,
|
||||
"restore-23": 1
|
||||
},
|
||||
"ranks": {
|
||||
"15": 40,
|
||||
"19": 40,
|
||||
"23": 40
|
||||
},
|
||||
"shared": true,
|
||||
"parameters": 2476032,
|
||||
"seed": 621011,
|
||||
"epochs": 2
|
||||
}
|
||||
@@ -0,0 +1,835 @@
|
||||
{
|
||||
"selected_epoch": 2,
|
||||
"epochs": [
|
||||
{
|
||||
"epoch": 1,
|
||||
"steps": [
|
||||
{
|
||||
"capture": "000.npz",
|
||||
"huber": 6.466125965118408,
|
||||
"completion_ce": 3.640169858932495
|
||||
},
|
||||
{
|
||||
"capture": "001.npz",
|
||||
"huber": 6.416173458099365,
|
||||
"completion_ce": 2.7350101470947266
|
||||
},
|
||||
{
|
||||
"capture": "002.npz",
|
||||
"huber": 6.482085704803467,
|
||||
"completion_ce": 2.03899884223938
|
||||
},
|
||||
{
|
||||
"capture": "003.npz",
|
||||
"huber": 6.430853366851807,
|
||||
"completion_ce": 1.5210151672363281
|
||||
},
|
||||
{
|
||||
"capture": "004.npz",
|
||||
"huber": 6.329977512359619,
|
||||
"completion_ce": 1.6759847402572632
|
||||
},
|
||||
{
|
||||
"capture": "005.npz",
|
||||
"huber": 6.335151195526123,
|
||||
"completion_ce": 1.0699304342269897
|
||||
},
|
||||
{
|
||||
"capture": "006.npz",
|
||||
"huber": 6.317526340484619,
|
||||
"completion_ce": 1.4101346731185913
|
||||
},
|
||||
{
|
||||
"capture": "007.npz",
|
||||
"huber": 6.251140594482422,
|
||||
"completion_ce": 1.1468429565429688
|
||||
},
|
||||
{
|
||||
"capture": "008.npz",
|
||||
"huber": 6.1668524742126465,
|
||||
"completion_ce": 1.6777559518814087
|
||||
},
|
||||
{
|
||||
"capture": "009.npz",
|
||||
"huber": 6.1963043212890625,
|
||||
"completion_ce": 1.2596086263656616
|
||||
},
|
||||
{
|
||||
"capture": "010.npz",
|
||||
"huber": 6.088558673858643,
|
||||
"completion_ce": 0.6729698181152344
|
||||
},
|
||||
{
|
||||
"capture": "011.npz",
|
||||
"huber": 6.079294681549072,
|
||||
"completion_ce": 1.2998491525650024
|
||||
},
|
||||
{
|
||||
"capture": "012.npz",
|
||||
"huber": 6.054551601409912,
|
||||
"completion_ce": 1.4103832244873047
|
||||
},
|
||||
{
|
||||
"capture": "013.npz",
|
||||
"huber": 5.936060428619385,
|
||||
"completion_ce": 1.0076059103012085
|
||||
},
|
||||
{
|
||||
"capture": "014.npz",
|
||||
"huber": 5.830902576446533,
|
||||
"completion_ce": 0.8567708134651184
|
||||
},
|
||||
{
|
||||
"capture": "015.npz",
|
||||
"huber": 5.81991720199585,
|
||||
"completion_ce": 0.9816989898681641
|
||||
},
|
||||
{
|
||||
"capture": "016.npz",
|
||||
"huber": 5.782172679901123,
|
||||
"completion_ce": 0.32713380455970764
|
||||
},
|
||||
{
|
||||
"capture": "017.npz",
|
||||
"huber": 5.763124465942383,
|
||||
"completion_ce": 2.0601158142089844
|
||||
},
|
||||
{
|
||||
"capture": "018.npz",
|
||||
"huber": 5.706521511077881,
|
||||
"completion_ce": 1.5579833984375
|
||||
},
|
||||
{
|
||||
"capture": "019.npz",
|
||||
"huber": 5.558866500854492,
|
||||
"completion_ce": 0.44708251953125
|
||||
},
|
||||
{
|
||||
"capture": "020.npz",
|
||||
"huber": 5.477881908416748,
|
||||
"completion_ce": 1.1636791229248047
|
||||
},
|
||||
{
|
||||
"capture": "021.npz",
|
||||
"huber": 5.311099529266357,
|
||||
"completion_ce": 1.1208223104476929
|
||||
},
|
||||
{
|
||||
"capture": "022.npz",
|
||||
"huber": 5.279181957244873,
|
||||
"completion_ce": 1.268227219581604
|
||||
},
|
||||
{
|
||||
"capture": "023.npz",
|
||||
"huber": 5.142008304595947,
|
||||
"completion_ce": 0.9710490107536316
|
||||
}
|
||||
],
|
||||
"validation": [
|
||||
{
|
||||
"id": "validation-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 44,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 91,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 33,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 28,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 42,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 56,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 93,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 83,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 23,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "49<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 49,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "49<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 49,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 78,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 64,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 50,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"epoch": 2,
|
||||
"steps": [
|
||||
{
|
||||
"capture": "000.npz",
|
||||
"huber": 4.952552318572998,
|
||||
"completion_ce": 1.4009037017822266
|
||||
},
|
||||
{
|
||||
"capture": "001.npz",
|
||||
"huber": 4.789427280426025,
|
||||
"completion_ce": 0.5592880249023438
|
||||
},
|
||||
{
|
||||
"capture": "002.npz",
|
||||
"huber": 4.726945400238037,
|
||||
"completion_ce": 1.2972265481948853
|
||||
},
|
||||
{
|
||||
"capture": "003.npz",
|
||||
"huber": 4.5856170654296875,
|
||||
"completion_ce": 0.5974127650260925
|
||||
},
|
||||
{
|
||||
"capture": "004.npz",
|
||||
"huber": 4.457610607147217,
|
||||
"completion_ce": 0.4448140561580658
|
||||
},
|
||||
{
|
||||
"capture": "005.npz",
|
||||
"huber": 4.406347274780273,
|
||||
"completion_ce": 0.6005427241325378
|
||||
},
|
||||
{
|
||||
"capture": "006.npz",
|
||||
"huber": 4.3611578941345215,
|
||||
"completion_ce": 1.11090087890625
|
||||
},
|
||||
{
|
||||
"capture": "007.npz",
|
||||
"huber": 4.287736415863037,
|
||||
"completion_ce": 0.4663238525390625
|
||||
},
|
||||
{
|
||||
"capture": "008.npz",
|
||||
"huber": 4.187578201293945,
|
||||
"completion_ce": 1.04208242893219
|
||||
},
|
||||
{
|
||||
"capture": "009.npz",
|
||||
"huber": 4.137438774108887,
|
||||
"completion_ce": 0.754715621471405
|
||||
},
|
||||
{
|
||||
"capture": "010.npz",
|
||||
"huber": 3.979546308517456,
|
||||
"completion_ce": 0.5380516052246094
|
||||
},
|
||||
{
|
||||
"capture": "011.npz",
|
||||
"huber": 3.8709640502929688,
|
||||
"completion_ce": 0.7800388336181641
|
||||
},
|
||||
{
|
||||
"capture": "012.npz",
|
||||
"huber": 3.749253273010254,
|
||||
"completion_ce": 0.5718275904655457
|
||||
},
|
||||
{
|
||||
"capture": "013.npz",
|
||||
"huber": 3.5951597690582275,
|
||||
"completion_ce": 0.8369833827018738
|
||||
},
|
||||
{
|
||||
"capture": "014.npz",
|
||||
"huber": 3.4549624919891357,
|
||||
"completion_ce": 0.37712350487709045
|
||||
},
|
||||
{
|
||||
"capture": "015.npz",
|
||||
"huber": 3.3932430744171143,
|
||||
"completion_ce": 0.47049713134765625
|
||||
},
|
||||
{
|
||||
"capture": "016.npz",
|
||||
"huber": 3.3298141956329346,
|
||||
"completion_ce": 0.24415016174316406
|
||||
},
|
||||
{
|
||||
"capture": "017.npz",
|
||||
"huber": 3.315248727798462,
|
||||
"completion_ce": 1.5147151947021484
|
||||
},
|
||||
{
|
||||
"capture": "018.npz",
|
||||
"huber": 3.2439496517181396,
|
||||
"completion_ce": 0.15868441760540009
|
||||
},
|
||||
{
|
||||
"capture": "019.npz",
|
||||
"huber": 3.1188666820526123,
|
||||
"completion_ce": 0.05583127215504646
|
||||
},
|
||||
{
|
||||
"capture": "020.npz",
|
||||
"huber": 3.04500412940979,
|
||||
"completion_ce": 0.022246679291129112
|
||||
},
|
||||
{
|
||||
"capture": "021.npz",
|
||||
"huber": 2.903524160385132,
|
||||
"completion_ce": 0.07955551147460938
|
||||
},
|
||||
{
|
||||
"capture": "022.npz",
|
||||
"huber": 2.9015865325927734,
|
||||
"completion_ce": 1.1182270050048828
|
||||
},
|
||||
{
|
||||
"capture": "023.npz",
|
||||
"huber": 2.8223178386688232,
|
||||
"completion_ce": 0.44306373596191406
|
||||
}
|
||||
],
|
||||
"validation": [
|
||||
{
|
||||
"id": "validation-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 44,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 91,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 33,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 28,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 42,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 56,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 93,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 83,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
23,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "83<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 83,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 23,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "89<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 89,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "89<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 89,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "44<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 44,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "44<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 44,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 78,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
22,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"response": "78<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 78,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
22,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "74<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 74,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 64,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 50,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"updates": 48,
|
||||
"validation_correct": [
|
||||
3,
|
||||
5
|
||||
],
|
||||
"selected_epoch": 2,
|
||||
"selected_pairs_both_correct": 1,
|
||||
"corrected_vs_prior": [],
|
||||
"lost_vs_prior": [],
|
||||
"matches_prior_48_fit_loss_records": true,
|
||||
"selected_tensors_match_prior": true,
|
||||
"sha256": {
|
||||
"config.json": "59b9f4c954269294a59ca40227a9fcd69f6a591e9a023f01a2cad4f51bcd15bb",
|
||||
"trace.json": "34be3c67e5c82aed4bfdd6bdd17ac8bf8b6efb830faa08c7373dc3af03936d52",
|
||||
"lisa.pt": "c82db5af7fa42cf58a349f3e53961da2360b211a7ed606f53a728860c64f6f29"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"spec": {
|
||||
"protocol_sha256": "6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef",
|
||||
"base_sha256": "c82db5af7fa42cf58a349f3e53961da2360b211a7ed606f53a728860c64f6f29",
|
||||
"fraction": 0.5,
|
||||
"parameters": 2476032,
|
||||
"endpoints": {
|
||||
"student": {
|
||||
"trained_sha256": "7faacdffbc81d0c786ef0c7a5acaf1724d82af155fed7b834dabc73dcf91f3a4",
|
||||
"midpoint_sha256": "d0cf6b4ad1b4791dcaa4ebf50eb623f16260249996fe810ee8f0905dedb8a335"
|
||||
},
|
||||
"reference": {
|
||||
"trained_sha256": "21ae007cb7343c1a0042655824bdc98ee2f03071d5f5dc43dbc8b441a262d84f",
|
||||
"midpoint_sha256": "e0e2c61fcaecb591631a66889c838d351c1bf5a608638c05622a20487d8de324"
|
||||
}
|
||||
}
|
||||
},
|
||||
"independent_checks": {
|
||||
"student": {
|
||||
"tensors_checked": 12,
|
||||
"parameters_checked": 2476032,
|
||||
"update_l2_ratio": 0.49999999981533333
|
||||
},
|
||||
"reference": {
|
||||
"tensors_checked": 12,
|
||||
"parameters_checked": 2476032,
|
||||
"update_l2_ratio": 0.5000000004162759
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
[
|
||||
{
|
||||
"id": "fit-lookup-000",
|
||||
"tokens": [
|
||||
23,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.0708420276641846
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-001",
|
||||
"tokens": [
|
||||
20,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.359794944524765
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-002",
|
||||
"tokens": [
|
||||
22,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.7561622858047485
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-003",
|
||||
"tokens": [
|
||||
21,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.8009884357452393
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-004",
|
||||
"tokens": [
|
||||
24,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.570459008216858
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-005",
|
||||
"tokens": [
|
||||
20,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.1894524097442627
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-006",
|
||||
"tokens": [
|
||||
22,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 2.783402442932129
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-007",
|
||||
"tokens": [
|
||||
17,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.4688148498535156
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-008",
|
||||
"tokens": [
|
||||
19,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.3527965545654297
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-009",
|
||||
"tokens": [
|
||||
18,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.4242044687271118
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-010",
|
||||
"tokens": [
|
||||
19,
|
||||
20,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.16955293715000153
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-011",
|
||||
"tokens": [
|
||||
17,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 2.670910596847534
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-012",
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.7502222061157227
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-013",
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.21196232736110687
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-014",
|
||||
"tokens": [
|
||||
19,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.677167296409607
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-015",
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.1573168784379959
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-016",
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.09522029012441635
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-017",
|
||||
"tokens": [
|
||||
23,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.6205872297286987
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-018",
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.0968724489212036
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-019",
|
||||
"tokens": [
|
||||
24,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.365121454000473
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-020",
|
||||
"tokens": [
|
||||
24,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.20771723985671997
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-021",
|
||||
"tokens": [
|
||||
24,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.0566303730010986
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-022",
|
||||
"tokens": [
|
||||
17,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 2.1767852306365967
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-023",
|
||||
"tokens": [
|
||||
19,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.3833431005477905
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,290 @@
|
||||
[
|
||||
{
|
||||
"id": "validation-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 44,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 91,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 33,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 28,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 42,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 56,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 93,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
19,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "43<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 43,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 83,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
19,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "43<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 43,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 23,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
17,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "29<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 29,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "89<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 89,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
19,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "49<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 49,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "44<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 44,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 78,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
22,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"response": "78<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 78,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
18,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "31<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 31,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 64,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 50,
|
||||
"arms": {
|
||||
"validation-reference": {
|
||||
"tokens": [
|
||||
19,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "43<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 43,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"arm": "reference",
|
||||
"updates": 24,
|
||||
"identical_training_answer_tokens": 24,
|
||||
"training_prefix_positions": 72,
|
||||
"student_only_prefix_positions": 0,
|
||||
"baseline_correct": 5,
|
||||
"candidate_correct": 3,
|
||||
"baseline_pairs_both": 1,
|
||||
"candidate_pairs_both": 0,
|
||||
"validation_corrected_ids": [],
|
||||
"validation_lost_ids": [
|
||||
"validation-003-0",
|
||||
"validation-003-1"
|
||||
],
|
||||
"sha256": {
|
||||
"protocol.json": "6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef",
|
||||
"trajectory-reference/adapter.pt": "21ae007cb7343c1a0042655824bdc98ee2f03071d5f5dc43dbc8b441a262d84f",
|
||||
"trajectory-reference/trace.json": "e9412a8033fd81c269cda1f3a8999b04f756f51c53b10e6bbeae81907066e40e",
|
||||
"trajectory-reference/validation-reference.json": "3b5557336570cbeb1f6a592013780dc3e00e7f29b4192d59c53c6b2493779b91",
|
||||
"validation-prior-lisa.json": "3a10cdd0a22e110b5468ba496c3440a8b510ab3595328df330e7ea02b0ccbb76"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
[
|
||||
{
|
||||
"id": "fit-lookup-000",
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.3920799493789673
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-001",
|
||||
"tokens": [
|
||||
20,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.3670388162136078
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-002",
|
||||
"tokens": [
|
||||
20,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.607092261314392
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-003",
|
||||
"tokens": [
|
||||
21,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.8484256267547607
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-004",
|
||||
"tokens": [
|
||||
24,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.487722396850586
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-005",
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.9051605463027954
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-006",
|
||||
"tokens": [
|
||||
22,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.4778107404708862
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-007",
|
||||
"tokens": [
|
||||
22,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 2.0440306663513184
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-008",
|
||||
"tokens": [
|
||||
24,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.3969637155532837
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-009",
|
||||
"tokens": [
|
||||
20,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 2.133025646209717
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-010",
|
||||
"tokens": [
|
||||
19,
|
||||
20,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.16392825543880463
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-011",
|
||||
"tokens": [
|
||||
18,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 2.76891827583313
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-012",
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 2.3396949768066406
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-013",
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.2812904715538025
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-014",
|
||||
"tokens": [
|
||||
23,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.5917729139328003
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-015",
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.20547236502170563
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-016",
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.10026532411575317
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-017",
|
||||
"tokens": [
|
||||
22,
|
||||
15,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.7930327653884888
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-018",
|
||||
"tokens": [
|
||||
22,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.4335891008377075
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-019",
|
||||
"tokens": [
|
||||
24,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.3742959797382355
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-020",
|
||||
"tokens": [
|
||||
24,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 0.4034559428691864
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-021",
|
||||
"tokens": [
|
||||
24,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.055336594581604
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-022",
|
||||
"tokens": [
|
||||
18,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 2.550983428955078
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-023",
|
||||
"tokens": [
|
||||
19,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"reverse_kl": 1.3725028038024902
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,290 @@
|
||||
[
|
||||
{
|
||||
"id": "validation-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 44,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 91,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 33,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 28,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 42,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 56,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 93,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
19,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "43<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 43,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 83,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
19,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "43<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 43,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 23,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
17,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "29<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 29,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "89<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 89,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
19,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "49<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 49,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "44<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 44,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 78,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
18,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"response": "38<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 38,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
18,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "31<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 31,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 64,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
19,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "49<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 49,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 50,
|
||||
"arms": {
|
||||
"validation-student": {
|
||||
"tokens": [
|
||||
19,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"response": "46<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 46,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"arm": "student",
|
||||
"updates": 24,
|
||||
"identical_training_answer_tokens": 11,
|
||||
"training_prefix_positions": 72,
|
||||
"student_only_prefix_positions": 25,
|
||||
"baseline_correct": 5,
|
||||
"candidate_correct": 2,
|
||||
"baseline_pairs_both": 1,
|
||||
"candidate_pairs_both": 0,
|
||||
"validation_corrected_ids": [],
|
||||
"validation_lost_ids": [
|
||||
"validation-003-0",
|
||||
"validation-003-1",
|
||||
"validation-006-0"
|
||||
],
|
||||
"sha256": {
|
||||
"protocol.json": "6858dbc64db0b989e8112e9dbea70662a2a05f66f11b180e8f2c668c74c43aef",
|
||||
"trajectory-student/adapter.pt": "7faacdffbc81d0c786ef0c7a5acaf1724d82af155fed7b834dabc73dcf91f3a4",
|
||||
"trajectory-student/trace.json": "9ca7cc53002073f7764ce855e91a2fd44029c9c63dd6ce55e9f7db43309f7e45",
|
||||
"trajectory-student/validation-student.json": "af213ef477e99780d48b995f8a1d07ada6409bd70011202fb73db56247199c5f",
|
||||
"validation-prior-lisa.json": "3a10cdd0a22e110b5468ba496c3440a8b510ab3595328df330e7ea02b0ccbb76"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"validation_questions": 16,
|
||||
"validation_pairs": 8,
|
||||
"scores": {
|
||||
"prior-lisa": {
|
||||
"correct": 5,
|
||||
"both_correct": 1,
|
||||
"answers_unchanged_after_swap": 6
|
||||
},
|
||||
"student": {
|
||||
"correct": 2,
|
||||
"both_correct": 0,
|
||||
"answers_unchanged_after_swap": 4
|
||||
},
|
||||
"reference": {
|
||||
"correct": 3,
|
||||
"both_correct": 0,
|
||||
"answers_unchanged_after_swap": 4
|
||||
}
|
||||
},
|
||||
"changes": {
|
||||
"student-vs-prior-lisa": {
|
||||
"net": -3,
|
||||
"corrected": [],
|
||||
"lost": [
|
||||
"validation-003-0",
|
||||
"validation-003-1",
|
||||
"validation-006-0"
|
||||
],
|
||||
"identical_validation_token_streams": 8
|
||||
},
|
||||
"reference-vs-prior-lisa": {
|
||||
"net": -2,
|
||||
"corrected": [],
|
||||
"lost": [
|
||||
"validation-003-0",
|
||||
"validation-003-1"
|
||||
],
|
||||
"identical_validation_token_streams": 10
|
||||
},
|
||||
"student-vs-reference": {
|
||||
"net": -1,
|
||||
"corrected": [],
|
||||
"lost": [
|
||||
"validation-006-0"
|
||||
],
|
||||
"identical_validation_token_streams": 13
|
||||
}
|
||||
},
|
||||
"fit_trajectory_overlap": {
|
||||
"same_complete_trajectory": 11,
|
||||
"distinct_student_prefix_positions": 25,
|
||||
"student_positions": 72,
|
||||
"reference_positions": 72
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
[
|
||||
{
|
||||
"id": "validation-000-0",
|
||||
"task": "lookup",
|
||||
"gold": 44,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-000-1",
|
||||
"task": "lookup",
|
||||
"gold": 91,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-0",
|
||||
"task": "lookup",
|
||||
"gold": 33,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-001-1",
|
||||
"task": "lookup",
|
||||
"gold": 28,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "47<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 47,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-0",
|
||||
"task": "lookup",
|
||||
"gold": 42,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-002-1",
|
||||
"task": "lookup",
|
||||
"gold": 56,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "51<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 51,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-0",
|
||||
"task": "lookup",
|
||||
"gold": 93,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-003-1",
|
||||
"task": "lookup",
|
||||
"gold": 83,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
23,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "83<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 83,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-0",
|
||||
"task": "lookup",
|
||||
"gold": 23,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "89<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 89,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-004-1",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
23,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "89<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 89,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-0",
|
||||
"task": "lookup",
|
||||
"gold": 63,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "44<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 44,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-005-1",
|
||||
"task": "lookup",
|
||||
"gold": 49,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "44<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 44,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-0",
|
||||
"task": "lookup",
|
||||
"gold": 78,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
22,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"response": "78<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 78,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-006-1",
|
||||
"task": "lookup",
|
||||
"gold": 29,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
22,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "74<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 74,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-0",
|
||||
"task": "lookup",
|
||||
"gold": 64,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-007-1",
|
||||
"task": "lookup",
|
||||
"gold": 50,
|
||||
"arms": {
|
||||
"validation-prior-lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "93<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 93,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,104 @@
|
||||
{
|
||||
"tokenizer_sha256": "5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42",
|
||||
"source_sha256": "b3a113d5ea1e4d11e9fdd2ff5e066a50ad3e75b3c20b109e2add05179c7e3eb4",
|
||||
"decoded_tokens": {
|
||||
"16": "1",
|
||||
"17": "2",
|
||||
"18": "3",
|
||||
"19": "4",
|
||||
"248068": "<think>"
|
||||
},
|
||||
"target_counts": {
|
||||
"1": 8,
|
||||
"4": 8,
|
||||
"2": 8,
|
||||
"3": 8
|
||||
},
|
||||
"wrong_first_tokens": {
|
||||
"native": [
|
||||
{
|
||||
"item": "test-lookup16-012",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-017",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-022",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-024",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-029",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
}
|
||||
],
|
||||
"direct_23": [],
|
||||
"lisa_23_ablation": [],
|
||||
"direct_chain": [
|
||||
{
|
||||
"item": "test-lookup16-012",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-017",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-022",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-024",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-029",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
}
|
||||
],
|
||||
"lisa_chain": [],
|
||||
"linear": [
|
||||
{
|
||||
"item": "test-lookup16-012",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-017",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-022",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-024",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
},
|
||||
{
|
||||
"item": "test-lookup16-029",
|
||||
"expected": "4",
|
||||
"produced": "<think>"
|
||||
}
|
||||
],
|
||||
"lisa_answer_weighted": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"scope": "isolated full-attention recipient, FP32, frozen true activations; excludes donor generation and full-model decode",
|
||||
"sites": {
|
||||
"19": {
|
||||
"seconds_per_token": {
|
||||
"native": [
|
||||
0.13286287058144808,
|
||||
0.1361464262008667,
|
||||
0.12924433965235949,
|
||||
0.1288278056308627,
|
||||
0.13502545654773712,
|
||||
0.14447933342307806,
|
||||
0.21267611254006624,
|
||||
0.19696053490042686,
|
||||
0.17250606417655945
|
||||
],
|
||||
"lisa": [
|
||||
0.0882081063464284,
|
||||
0.0963163236156106,
|
||||
0.0912644388154149,
|
||||
0.09147092420607805,
|
||||
0.09272865019738674,
|
||||
0.11763023491948843,
|
||||
0.09996491950005293,
|
||||
0.11747161205857992,
|
||||
0.11429349146783352
|
||||
]
|
||||
},
|
||||
"resident_seconds_per_token": {
|
||||
"native": [
|
||||
0.03415969293564558,
|
||||
0.030925235711038113,
|
||||
0.03575391788035631,
|
||||
0.04256666451692581,
|
||||
0.04327994678169489,
|
||||
0.0476421257480979,
|
||||
0.04229569900780916,
|
||||
0.04316695313900709,
|
||||
0.04567800182849169
|
||||
],
|
||||
"lisa": [
|
||||
0.041921489872038364,
|
||||
0.04422656074166298,
|
||||
0.03127973526716232,
|
||||
0.03182042483240366,
|
||||
0.03665950056165457,
|
||||
0.03138743154704571,
|
||||
0.028396621346473694,
|
||||
0.037525477819144726,
|
||||
0.03209121432155371
|
||||
]
|
||||
},
|
||||
"resident_median_s_per_token": {
|
||||
"native": 0.04256666451692581,
|
||||
"lisa": 0.03209121432155371
|
||||
},
|
||||
"resident_matches_streamed": true,
|
||||
"allocated_bytes": {
|
||||
"native": {
|
||||
"k": 321536,
|
||||
"v": 321536
|
||||
},
|
||||
"lisa": {
|
||||
"k": 50240,
|
||||
"v": 321536
|
||||
}
|
||||
},
|
||||
"lisa_input_score_row_bytes": 5024,
|
||||
"sequence_length": 157
|
||||
},
|
||||
"23": {
|
||||
"seconds_per_token": {
|
||||
"native": [
|
||||
0.1291032126173377,
|
||||
0.12674292363226414,
|
||||
0.1282597053796053,
|
||||
0.13638535235077143,
|
||||
0.1298640752211213,
|
||||
0.1457589939236641,
|
||||
0.20920543558895588,
|
||||
0.20562185905873775,
|
||||
0.19381640758365393
|
||||
],
|
||||
"lisa": [
|
||||
0.14143545273691416,
|
||||
0.08705597650259733,
|
||||
0.08696427289396524,
|
||||
0.1120216203853488,
|
||||
0.1387955490499735,
|
||||
0.13695972133427858,
|
||||
0.14612034149467945,
|
||||
0.1524249343201518,
|
||||
0.1556852562353015
|
||||
]
|
||||
},
|
||||
"resident_seconds_per_token": {
|
||||
"native": [
|
||||
0.04479535948485136,
|
||||
0.04507693089544773,
|
||||
0.04067131970077753,
|
||||
0.04552943166345358,
|
||||
0.05950945522636175,
|
||||
0.05104204546660185,
|
||||
0.03087245672941208,
|
||||
0.03152573574334383,
|
||||
0.03583979792892933
|
||||
],
|
||||
"lisa": [
|
||||
0.022208196111023426,
|
||||
0.021793252788484097,
|
||||
0.03165019955486059,
|
||||
0.025800297036767006,
|
||||
0.022528269328176975,
|
||||
0.022276684641838074,
|
||||
0.02320440299808979,
|
||||
0.0227946899831295,
|
||||
0.024175109341740608
|
||||
]
|
||||
},
|
||||
"resident_median_s_per_token": {
|
||||
"native": 0.04479535948485136,
|
||||
"lisa": 0.0227946899831295
|
||||
},
|
||||
"resident_matches_streamed": true,
|
||||
"allocated_bytes": {
|
||||
"native": {
|
||||
"k": 321536,
|
||||
"v": 321536
|
||||
},
|
||||
"lisa": {
|
||||
"k": 50240,
|
||||
"v": 321536
|
||||
}
|
||||
},
|
||||
"lisa_input_score_row_bytes": 5024,
|
||||
"sequence_length": 157
|
||||
}
|
||||
},
|
||||
"streamed_timings_include_weight_reads": true,
|
||||
"resident_timings_exclude_projection_load": true
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"task": "lookup16",
|
||||
"source": "frozen Qwen3.5-2B hidden states at the answer position from native forward",
|
||||
"metric": "4-option accuracy and mean NLL over four option logits",
|
||||
"frozen_native_reference": {
|
||||
"fit": {"samples": 12, "native_correct": 12, "choice_nll": 0.13035377124382475},
|
||||
"validation": {"samples": 12, "native_correct": 12, "choice_nll": 0.13171539331834095}
|
||||
},
|
||||
"test_predictions_opened": false
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"selected_task": "lookup16",
|
||||
"sites": [
|
||||
19,
|
||||
23
|
||||
],
|
||||
"n": 32,
|
||||
"arms": {
|
||||
"native": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.1341308259358034,
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"direct": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.07281379044277814,
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"linear": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.07204867493801925,
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"lisa": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.1846203565157959,
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"lisa_answer_weighted": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.12601824456448818,
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
}
|
||||
},
|
||||
"prefill": {
|
||||
"scope": "cached-prefix last layers, prefill",
|
||||
"median_s": {
|
||||
"native": 12.369724708609283,
|
||||
"direct": 11.017615622840822,
|
||||
"lisa": 16.311319678090513
|
||||
},
|
||||
"lisa_median_ratio_to_native": 1.3186485602818545
|
||||
},
|
||||
"decode": {
|
||||
"scope": "isolated full-attention recipient, FP32, frozen true activations; excludes donor generation and full-model decode",
|
||||
"sites": {
|
||||
"19": {
|
||||
"median_s_per_token": {
|
||||
"native": 0.1361464262008667,
|
||||
"lisa": 0.0963163236156106
|
||||
},
|
||||
"measured_kv_bytes": {
|
||||
"native": 643072,
|
||||
"lisa": 371776
|
||||
},
|
||||
"lisa_upstream_score_row_bytes": 5024,
|
||||
"recipient_bytes_delta": -266272
|
||||
},
|
||||
"23": {
|
||||
"median_s_per_token": {
|
||||
"native": 0.13638535235077143,
|
||||
"lisa": 0.1387955490499735
|
||||
},
|
||||
"measured_kv_bytes": {
|
||||
"native": 643072,
|
||||
"lisa": 371776
|
||||
},
|
||||
"lisa_upstream_score_row_bytes": 5024,
|
||||
"recipient_bytes_delta": -266272
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"scope": "cached-prefix last layers, prefill",
|
||||
"seconds": {
|
||||
"native": [
|
||||
11.3411781527102,
|
||||
12.700857263058424,
|
||||
12.369724708609283
|
||||
],
|
||||
"direct": [
|
||||
11.017615622840822,
|
||||
10.737364768981934,
|
||||
11.625513913109899
|
||||
],
|
||||
"lisa": [
|
||||
15.469715679064393,
|
||||
16.857490073889494,
|
||||
16.311319678090513
|
||||
]
|
||||
},
|
||||
"real_tokens": 157,
|
||||
"cache_estimate": {
|
||||
"scope": "formula for one sequence, BF16 keys and score buffers",
|
||||
"native_recipient_key_bytes": 321536,
|
||||
"lisa_recipient_key_bytes": 50240,
|
||||
"one_shared_decode_score_row_bytes": 2512,
|
||||
"one_full_prefill_score_matrix_bytes": 394384
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"date": "2026-11-23",
|
||||
"task": "lookup16",
|
||||
"item": "fit-lookup16-000",
|
||||
"recipient_layers": [19, 23],
|
||||
"sample_tokens_including_answer": 158,
|
||||
"native_hidden_max_abs_error_against_streaming_reference": 0.000020503997802734375,
|
||||
"skipped_dense_qk_max_abs_difference": 0.0,
|
||||
"finite_nonzero_huber_gradients_for_all_adapter_parameters": true,
|
||||
"peak_rss_kib": 555036,
|
||||
"scope": "One real Qwen3.5-2B fit sample, synthetic task; the backward path used attention distillation only."
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"runtime": "3.14.4",
|
||||
"platform": "Linux",
|
||||
"machine": "x86_64",
|
||||
"logical_cpus": 2,
|
||||
"cpu": "Intel(R) Xeon(R) Platinum",
|
||||
"numpy": "2.5.4",
|
||||
"torch": "2.15.0+cpu",
|
||||
"tokenizers": "0.23.3",
|
||||
"model_source": {
|
||||
"repository": "Qwen/Qwen3.5-2B",
|
||||
"revision": "15852e8c16360a2fea060d615a32b45270f8a8fc",
|
||||
"manifest_sha256": "28efbaf94a5034333339a35f08ead151459a7d20c6c2d2f07a451e7f3bf154de",
|
||||
"weight_shard": {
|
||||
"name": "model.safetensors-00001-of-00001.safetensors",
|
||||
"bytes": 4548221488,
|
||||
"sha256_in_download_manifest": "aa33250c4fc64891ddfaba3a314fd9542ea371843c387178b425fbcc5ed680b1"
|
||||
},
|
||||
"decoder_layers": 24,
|
||||
"linear_attention_layers": 18,
|
||||
"full_attention_layers_zero_based": [3, 7, 11, 15, 19, 23],
|
||||
"query_heads": 8,
|
||||
"key_value_heads": 2,
|
||||
"native_head_dimension": 256,
|
||||
"hidden_size": 2048,
|
||||
"vocabulary_size": 248320
|
||||
},
|
||||
"capture_sizes": {
|
||||
"fit": {"prompts": 12, "input_tokens": 1886, "shifted_target_tokens": 1874, "min_input_tokens": 155, "median_input_tokens": 157.5, "max_input_tokens": 158},
|
||||
"validation": {"prompts": 12, "input_tokens": 1882, "shifted_target_tokens": 1870, "min_input_tokens": 154, "median_input_tokens": 157.0, "max_input_tokens": 160},
|
||||
"test": {"prompts": 32, "input_tokens": 5017, "shifted_target_tokens": 4985, "min_input_tokens": 153, "median_input_tokens": 157.0, "max_input_tokens": 159}
|
||||
},
|
||||
"validation_selected_checkpoints": {
|
||||
"trace_sha256": "b432fba669d45c09634e96498a15f9d93f971d1ee2b67a826d6f8bc979525866",
|
||||
"linear.pt": {"epoch": 2, "sha256": "cf204dc784a925de69faa8bed0789ef42877204edb9537d914486d39518fe8ce"},
|
||||
"lisa.pt": {"epoch": 2, "sha256": "358272c5eb90cea9e3ed006b2c75a4bcd7f5db4f857982e078dd7f71c6c46c5b"},
|
||||
"lisa_answer_weighted.pt": {"epoch": 2, "sha256": "2b384d5618c190b29bdbb1bc0151c1eb64e1699e209a50ed8171a2d"}
|
||||
},
|
||||
"final_remote_verification": {
|
||||
"pipeline_exit_code": 0,
|
||||
"unittest_modules": [
|
||||
"tests.test_lisa_train",
|
||||
"tests.test_lisa_tail",
|
||||
"tests.test_lisa_effect_screen",
|
||||
"tests.test_lisa_effect_resume",
|
||||
"tests.test_lisa_effect_audit"
|
||||
],
|
||||
"passed": 13,
|
||||
"sha256": {
|
||||
"test-items.json": "e978b482479deec2d78f8b19d75a5f708bd383111a4c360aad41384e572d48af",
|
||||
"full-vocab-answers.json": "b3a113d5ea1e4d11e9fdd2ff5e066a50ad3e75b3c20b109e2add05179c7e3eb4",
|
||||
"paired-audit.json": "f66e60b229cdeaaf6c295382b3bf617332e28f95d6610c11be571edd937e4570",
|
||||
"verified-audit.json": "a5d496bb5f6d5518a5da2fd6ca3007934558860397a7678c8af8ee23a8d9b92d",
|
||||
"decode.json": "36b84fbba56bd609f24f550124cd1417e67781eaa6a2401f152fb9f86641370b",
|
||||
"performance.json": "5f806f713f00b794592899feb3b8188b352fb73052daf304d9026a1294801e17",
|
||||
"train-protocol.json": "98c71cde7f8ab1bcdb9e05a814fd2c303a046cca51a0d8dfdc936c699da62cce"
|
||||
}
|
||||
},
|
||||
"main_code_sha256": {
|
||||
"lisa_effect.py": "8a3ecad71f23e3e8b8faf4a7c21c0c93f00fd0bffe14bdee6117921b548dce8a",
|
||||
"lisa_tail.py": "4bd2c3c8690a8ae30cc1a9573ec17b7bbe25edf43a33507482719dc03cfeb9af",
|
||||
"lisa_train.py": "d9b96258111e13a3c72483c954714b9ee56e1f308ec4371bafe47026246051a5",
|
||||
"lisa_decode.py": "9c723fa245ee4dd8f4d0f9a0d7a3d15e3db3ae40db3fa82ea413ecd24fe20f06",
|
||||
"lisa_decode_bench.py": "979e566a3391b9418b49beb10c200a48aac706ee95c145510850c929bcc2885a",
|
||||
"lisa_effect_screen.py": "8aaf515d888f921e60082b69d898cb5037a160c5d09a584db2599f197c4aa74b"
|
||||
},
|
||||
"audit_code_sha256": {
|
||||
"lisa_effect_audit.py": "75c3445d96521daa2832ee96eb128383fc81f6914d491c2804a9337d1d6af35b",
|
||||
"lisa_effect_answer_audit.py": "e1d70b10863dab1e13dfa9573c0d87fc6ca017039c3cf9b90f7628f3e7fe5664"
|
||||
},
|
||||
"local_code_match": {
|
||||
"lisa_effect.py": true,
|
||||
"lisa_tail.py": true,
|
||||
"lisa_train.py": true,
|
||||
"lisa_decode.py": true,
|
||||
"lisa_decode_bench.py": true,
|
||||
"lisa_effect_screen.py": true,
|
||||
"lisa_effect_audit.py": true,
|
||||
"lisa_effect_answer_audit.py": true
|
||||
},
|
||||
"phase_updates": {
|
||||
"lisa_decode_bench.py": {
|
||||
"initial_unexecuted_benchmark_sha256": "0b9867b3f17dbe6373627fa3901c2ea113fc7e0d690b4a358350cfaae62ef223",
|
||||
"validated_remote_benchmark_sha256": "979e566a3391b9418b49beb10c200a48aac706ee95c145510850c929bcc2885a",
|
||||
"reason": "Measure compute with resident projections separately from streamed execution",
|
||||
"remote_numeric_tests": "4 passed; resident projection outputs compared with streamed output"
|
||||
},
|
||||
"lisa_effect_audit.py": {
|
||||
"verified_audit_sha256": "2d7feb79c23bed05d4d961ead7cbdfcff61b5425f1c3ef88192c2c3cd5afecb4",
|
||||
"reason": "Cross-check the four-choice arms against the full-vocabulary pass and quantify paired answer-loss changes",
|
||||
"remote_numeric_tests": "4 passed in an isolated source directory",
|
||||
"outputs": {
|
||||
"paired-audit.json": "original audit hash in audit_code_sha256",
|
||||
"verified-audit.json": "verified_audit_sha256"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"lookup8": {
|
||||
"native": {
|
||||
"n": 8,
|
||||
"correct": 8,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 0.22260868260464628
|
||||
},
|
||||
"direct_23": {
|
||||
"n": 8,
|
||||
"correct": 8,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 0.15405775362854435
|
||||
},
|
||||
"direct_19_23": {
|
||||
"n": 8,
|
||||
"correct": 8,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 0.1474619847851022
|
||||
}
|
||||
},
|
||||
"lookup16": {
|
||||
"native": {
|
||||
"n": 8,
|
||||
"correct": 8,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 0.137068848385562
|
||||
},
|
||||
"direct_23": {
|
||||
"n": 8,
|
||||
"correct": 8,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 0.08428237400849126
|
||||
},
|
||||
"direct_19_23": {
|
||||
"n": 8,
|
||||
"correct": 7,
|
||||
"native_wins_lost": 1,
|
||||
"nll": 0.17225019742912862
|
||||
}
|
||||
},
|
||||
"latest8": {
|
||||
"native": {
|
||||
"n": 8,
|
||||
"correct": 6,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 0.5951684205201615
|
||||
},
|
||||
"direct_23": {
|
||||
"n": 8,
|
||||
"correct": 6,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 0.5312782958402527
|
||||
},
|
||||
"direct_19_23": {
|
||||
"n": 8,
|
||||
"correct": 7,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 0.5573033796086375
|
||||
}
|
||||
},
|
||||
"arithmetic": {
|
||||
"native": {
|
||||
"n": 8,
|
||||
"correct": 3,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 1.2998106862759977
|
||||
},
|
||||
"direct_23": {
|
||||
"n": 8,
|
||||
"correct": 3,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 1.2773446956117458
|
||||
},
|
||||
"direct_19_23": {
|
||||
"n": 8,
|
||||
"correct": 4,
|
||||
"native_wins_lost": 0,
|
||||
"nll": 1.2912787564044454
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"task": "lookup16",
|
||||
"sites": [
|
||||
19,
|
||||
23
|
||||
],
|
||||
"fixed_problems_sha256": "34252a9e02e79c0e0d786ee8b90bb0c5a4fe22e97852929fedf73db7b6dc7826",
|
||||
"source_sha256": {
|
||||
"manifest.json": "28efbaf94a5034333339a35f08ead151459a7d20c6c2d2f07a451e7f3bf154de",
|
||||
"model_config.json": "ed1c1723241f23f7f4e23430759cbd7dcfb4103cbdfe052bfe7626b57c2615b4",
|
||||
"tokenizer.json": "5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"linear": [
|
||||
{
|
||||
"epoch": 1,
|
||||
"fit_loss": 1.528187096118927,
|
||||
"validation_answer_nll": 0.08188676834106445
|
||||
},
|
||||
{
|
||||
"epoch": 2,
|
||||
"fit_loss": 1.4630066951115925,
|
||||
"validation_answer_nll": 0.08137226104736328
|
||||
}
|
||||
],
|
||||
"lisa": [
|
||||
{
|
||||
"epoch": 1,
|
||||
"fit_loss": 2.8282371163368225,
|
||||
"validation_answer_nll": 0.21536986033121744
|
||||
},
|
||||
{
|
||||
"epoch": 2,
|
||||
"fit_loss": 2.06735689441363,
|
||||
"validation_answer_nll": 0.18566656112670898
|
||||
}
|
||||
],
|
||||
"lisa_answer_weighted": [
|
||||
{
|
||||
"epoch": 1,
|
||||
"fit_loss": 2.752801299095154,
|
||||
"validation_answer_nll": 0.23118178049723306
|
||||
},
|
||||
{
|
||||
"epoch": 2,
|
||||
"fit_loss": 1.9780630469322205,
|
||||
"validation_answer_nll": 0.1396172841389974
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"epochs": 2,
|
||||
"selection": {
|
||||
"task": "lookup16",
|
||||
"sites": [
|
||||
19,
|
||||
23
|
||||
],
|
||||
"fixed_problems_sha256": "34252a9e02e79c0e0d786ee8b90bb0c5a4fe22e97852929fedf73db7b6dc7826",
|
||||
"source_sha256": {
|
||||
"manifest.json": "28efbaf94a5034333339a35f08ead151459a7d20c6c2d2f07a451e7f3bf154de",
|
||||
"model_config.json": "ed1c1723241f23f7f4e23430759cbd7dcfb4103cbdfe052bfe7626b57c2615b4",
|
||||
"tokenizer.json": "5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42"
|
||||
}
|
||||
},
|
||||
"optimizer": "AdamW",
|
||||
"lr": 0.0003,
|
||||
"weight_decay": 0.1,
|
||||
"answer_weight": 16.0,
|
||||
"seed": 415005
|
||||
}
|
||||
@@ -0,0 +1,297 @@
|
||||
{
|
||||
"selected_task": "lookup16",
|
||||
"sites": [
|
||||
19,
|
||||
23
|
||||
],
|
||||
"n": 32,
|
||||
"arms": {
|
||||
"native": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.1341308259358034,
|
||||
"answer_nll_4_vs_direct": {
|
||||
"mean_delta": 0.06131703549302525,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.04199299138593708,
|
||||
0.07944046845013401
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"direct": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.07281379044277814,
|
||||
"answer_nll_4_vs_direct": {
|
||||
"mean_delta": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"linear": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.07204867493801925,
|
||||
"answer_nll_4_vs_direct": {
|
||||
"mean_delta": -0.0007651155047588842,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
-0.0011749581537977532,
|
||||
-0.00035981557985461103
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"lisa": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.1846203565157959,
|
||||
"answer_nll_4_vs_direct": {
|
||||
"mean_delta": 0.11180656607301775,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.09675488440532508,
|
||||
0.12821407122333472
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"lisa_answer_weighted": {
|
||||
"correct": 32,
|
||||
"answer_nll_4": 0.12601824456448818,
|
||||
"answer_nll_4_vs_direct": {
|
||||
"mean_delta": 0.05320445412171004,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.03266015039585242,
|
||||
0.07493446492664697
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
}
|
||||
},
|
||||
"prefill": {
|
||||
"scope": "cached-prefix last layers, prefill",
|
||||
"median_s": {
|
||||
"native": 12.369724708609283,
|
||||
"direct": 11.017615622840822,
|
||||
"lisa": 16.311319678090513
|
||||
},
|
||||
"lisa_median_ratio_to_native": 1.3186485602818545
|
||||
},
|
||||
"decode": {
|
||||
"scope": "isolated full-attention recipient, FP32, frozen true activations; excludes donor generation and full-model decode",
|
||||
"sites": {
|
||||
"19": {
|
||||
"median_s_per_token": {
|
||||
"native": 0.1361464262008667,
|
||||
"lisa": 0.0963163236156106
|
||||
},
|
||||
"measured_kv_bytes": {
|
||||
"native": 643072,
|
||||
"lisa": 371776
|
||||
},
|
||||
"lisa_upstream_score_row_bytes": 5024,
|
||||
"recipient_bytes_delta": -266272
|
||||
},
|
||||
"23": {
|
||||
"median_s_per_token": {
|
||||
"native": 0.13638535235077143,
|
||||
"lisa": 0.1387955490499735
|
||||
},
|
||||
"measured_kv_bytes": {
|
||||
"native": 643072,
|
||||
"lisa": 371776
|
||||
},
|
||||
"lisa_upstream_score_row_bytes": 5024,
|
||||
"recipient_bytes_delta": -266272
|
||||
}
|
||||
}
|
||||
},
|
||||
"full_vocab": {
|
||||
"arms": {
|
||||
"native": {
|
||||
"correct": 27,
|
||||
"answer_nll": 0.5633379220962524
|
||||
},
|
||||
"direct_23": {
|
||||
"correct": 32,
|
||||
"answer_nll": 0.31241124868392944
|
||||
},
|
||||
"lisa_23_ablation": {
|
||||
"correct": 32,
|
||||
"answer_nll": 0.2554302215576172
|
||||
},
|
||||
"direct_chain": {
|
||||
"correct": 27,
|
||||
"answer_nll": 0.5578678846359253
|
||||
},
|
||||
"lisa_chain": {
|
||||
"correct": 32,
|
||||
"answer_nll": 0.4706266522407532
|
||||
},
|
||||
"linear": {
|
||||
"correct": 27,
|
||||
"answer_nll": 0.5574188828468323
|
||||
},
|
||||
"lisa_answer_weighted": {
|
||||
"correct": 32,
|
||||
"answer_nll": 0.15454155206680298
|
||||
}
|
||||
},
|
||||
"matched_direct_comparisons": {
|
||||
"lisa_23_ablation": {
|
||||
"baseline": "direct_23",
|
||||
"answer_nll_delta": {
|
||||
"mean_delta": -0.056981027126312256,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
-0.0759883001446724,
|
||||
-0.03968979567289353
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"native": {
|
||||
"baseline": "direct_chain",
|
||||
"answer_nll_delta": {
|
||||
"mean_delta": 0.0054700374603271484,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
-0.04259051829576492,
|
||||
0.05237825959920882
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"linear": {
|
||||
"baseline": "direct_chain",
|
||||
"answer_nll_delta": {
|
||||
"mean_delta": -0.0004490017890930176,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
-0.002629266679286957,
|
||||
0.0016906306147575377
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 0,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.0,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"mcnemar_exact_p": 1.0
|
||||
},
|
||||
"lisa_answer_weighted": {
|
||||
"baseline": "direct_chain",
|
||||
"answer_nll_delta": {
|
||||
"mean_delta": -0.4033263325691223,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
-0.47958737164735793,
|
||||
-0.33443659693002703
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 5,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.15625,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.03125,
|
||||
0.28125
|
||||
],
|
||||
"mcnemar_exact_p": 0.0625
|
||||
},
|
||||
"lisa_chain": {
|
||||
"baseline": "direct_chain",
|
||||
"answer_nll_delta": {
|
||||
"mean_delta": -0.08724123239517212,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
-0.14977428913116456,
|
||||
-0.030542241036891984
|
||||
]
|
||||
},
|
||||
"native_correct_lost_by_direct": 0,
|
||||
"rescued": 0,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 5,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.15625,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.03125,
|
||||
0.28125
|
||||
],
|
||||
"mcnemar_exact_p": 0.0625
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
07179a56936844f1bd639e1f31ee7f9d0110ec28c472fe6a59c7fcaf3e033355 crossqkv/lisa_full_answer.py
|
||||
@@ -0,0 +1,9 @@
|
||||
94437e0138c54ec34b1beaaa0e08a334ce0822f60af598a5a896459b778a3a1c functional/model.py
|
||||
98927a1ccd935b2f7a438bad31bbd973e210a54deceac911c61551092e52c96c crossqkv/lisa_generate.py
|
||||
519e0a031efcfb69c9b86fca1cb649fe8bb93d799401c8023ff7b6549cded448 crossqkv/lisa_full_answer.py
|
||||
74d6cbe3be94a8118f670c8810037b6d8abe085bd42b638a58af856eb45a17f3 crossqkv/lisa_full_answer_train.py
|
||||
d47b4c9cc34082e9b356e745821298a43981e4cd18ed55a3f59b4b6fe7cc46e3 crossqkv/lisa_tail.py
|
||||
9f0b6a53f107950661e91c16f03b49440708b3936120e2f84ef1d66f185257b6 crossqkv/lisa_train.py
|
||||
96d12fdfa266ca02ac50330971ff403e04b977358f479d63c8d6276a514fe025 tests/test_lisa_full_answer.py
|
||||
d1f3b3b2b92005c47f7fbc4f558407749b7059592c3b54d8b784da58ea12b3ef tests/test_lisa_tail.py
|
||||
d249035103ed7f43978c0d6452bf70ec9a345777289cb92c0b6a2a181e6d4380 tests/test_lisa_train.py
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"frozen_sha256": "409cadff8b2ef2f0efcfa71bf0a94802391a341ed04cb6e374154b8b8ff1b545",
|
||||
"batch_prompts": 2,
|
||||
"matched_rows": [
|
||||
"screen-lookup-000",
|
||||
"screen-lookup-001"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows": 5, "rows_sha256": "ff93a751537895e3d7fc55e3496afbbc46df34bb04ed89663319e38b8aa7a6e2", "stopped_pid": 4124128}
|
||||
@@ -0,0 +1,94 @@
|
||||
[
|
||||
{
|
||||
"id": "screen-lookup-000",
|
||||
"task": "lookup",
|
||||
"gold": 82,
|
||||
"arms": {
|
||||
"native": {
|
||||
"tokens": [
|
||||
23,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"response": "82<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 82,
|
||||
"correct": true
|
||||
},
|
||||
"direct_3": {
|
||||
"tokens": [
|
||||
20,
|
||||
248044
|
||||
],
|
||||
"response": "5<|endoftext|>",
|
||||
"stop": "eos",
|
||||
"answer": 5,
|
||||
"correct": false
|
||||
},
|
||||
"direct_4": {
|
||||
"tokens": [
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16,
|
||||
16
|
||||
],
|
||||
"response": "111111111111111111111111",
|
||||
"stop": "max_new_tokens",
|
||||
"answer": null,
|
||||
"correct": false
|
||||
},
|
||||
"direct_5": {
|
||||
"tokens": [
|
||||
1206,
|
||||
1423,
|
||||
279,
|
||||
4087,
|
||||
11,
|
||||
1042,
|
||||
579,
|
||||
1353,
|
||||
506,
|
||||
279,
|
||||
1103,
|
||||
314,
|
||||
4947,
|
||||
488,
|
||||
3766,
|
||||
25,
|
||||
271,
|
||||
332,
|
||||
16,
|
||||
13,
|
||||
220,
|
||||
16,
|
||||
332,
|
||||
198
|
||||
],
|
||||
"response": "To find the answer, let's look at the list of numbers you provided:\n\n**1. 1**\n",
|
||||
"stop": "max_new_tokens",
|
||||
"answer": null,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"frozen_sha256": "409cadff8b2ef2f0efcfa71bf0a94802391a341ed04cb6e374154b8b8ff1b545",
|
||||
"rows_sha256": "630c27e010ac00677bd2e7a280f17e9076c802c245f4857ec8f6795418e00c3d",
|
||||
"rows_verified": 1
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"prompt_id": "screen-lookup-000",
|
||||
"prompt_tokens": 103,
|
||||
"tail_hidden_max_abs": 0.0001049041748046875
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
df49b966e0f68bcb0f06642e9ec141008aaf8550d63fc467f00c6b9e864af799 /opt/exp-model-parameter-similarity/runs/lisa-full-answer-20261124-run/final/train-spec.json
|
||||
3366a4f4653837e4698ebabaa1d9656788b920f04f3b4e01f776342347c3604d /opt/exp-model-parameter-similarity/runs/lisa-full-answer-20261124-run/final/trace.json
|
||||
c82db5af7fa42cf58a349f3e53961da2360b211a7ed606f53a728860c64f6f29 /opt/exp-model-parameter-similarity/runs/lisa-full-answer-20261124-run/final/lisa.pt
|
||||
5c04ffff27c8b31a0be2d39553ed035d3c677907cabc1d17a9ea5886f97f8e5d /opt/exp-model-parameter-similarity/runs/lisa-full-answer-20261124-run/final/test-items.json
|
||||
c5f8b769819335d4a0969575f33c783859b4114dbf13405feeb06f3610a593c8 /opt/exp-model-parameter-similarity/runs/lisa-full-answer-20261124-run/final/test-audit.json
|
||||
74c5b1a4a4a88420d3965e57671d765f22cc3440eb74e9737d0ecbb7b0776ad1 /opt/exp-model-parameter-similarity/runs/lisa-full-answer-20261124-run/final/verified-test.json
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,145 @@
|
||||
{
|
||||
"lookup": {
|
||||
"native": {
|
||||
"n": 8,
|
||||
"correct": 8,
|
||||
"unscored": 0,
|
||||
"native_correct_to_wrong_integer": []
|
||||
},
|
||||
"direct_3": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 0,
|
||||
"native_correct_to_wrong_integer": [
|
||||
"screen-lookup-000",
|
||||
"screen-lookup-001",
|
||||
"screen-lookup-002",
|
||||
"screen-lookup-003",
|
||||
"screen-lookup-004",
|
||||
"screen-lookup-005",
|
||||
"screen-lookup-006",
|
||||
"screen-lookup-007"
|
||||
]
|
||||
},
|
||||
"direct_4": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 4,
|
||||
"native_correct_to_wrong_integer": [
|
||||
"screen-lookup-001",
|
||||
"screen-lookup-003",
|
||||
"screen-lookup-004",
|
||||
"screen-lookup-005"
|
||||
]
|
||||
},
|
||||
"direct_5": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 8,
|
||||
"native_correct_to_wrong_integer": []
|
||||
}
|
||||
},
|
||||
"latest": {
|
||||
"native": {
|
||||
"n": 8,
|
||||
"correct": 6,
|
||||
"unscored": 0,
|
||||
"native_correct_to_wrong_integer": []
|
||||
},
|
||||
"direct_3": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 0,
|
||||
"native_correct_to_wrong_integer": [
|
||||
"screen-latest-000",
|
||||
"screen-latest-001",
|
||||
"screen-latest-004",
|
||||
"screen-latest-005",
|
||||
"screen-latest-006",
|
||||
"screen-latest-007"
|
||||
]
|
||||
},
|
||||
"direct_4": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 4,
|
||||
"native_correct_to_wrong_integer": [
|
||||
"screen-latest-000",
|
||||
"screen-latest-001",
|
||||
"screen-latest-005"
|
||||
]
|
||||
},
|
||||
"direct_5": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 8,
|
||||
"native_correct_to_wrong_integer": []
|
||||
}
|
||||
},
|
||||
"addition": {
|
||||
"native": {
|
||||
"n": 8,
|
||||
"correct": 7,
|
||||
"unscored": 0,
|
||||
"native_correct_to_wrong_integer": []
|
||||
},
|
||||
"direct_3": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 0,
|
||||
"native_correct_to_wrong_integer": [
|
||||
"screen-addition-000",
|
||||
"screen-addition-001",
|
||||
"screen-addition-002",
|
||||
"screen-addition-004",
|
||||
"screen-addition-005",
|
||||
"screen-addition-006",
|
||||
"screen-addition-007"
|
||||
]
|
||||
},
|
||||
"direct_4": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 7,
|
||||
"native_correct_to_wrong_integer": [
|
||||
"screen-addition-000"
|
||||
]
|
||||
},
|
||||
"direct_5": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 8,
|
||||
"native_correct_to_wrong_integer": []
|
||||
}
|
||||
},
|
||||
"count": {
|
||||
"native": {
|
||||
"n": 8,
|
||||
"correct": 1,
|
||||
"unscored": 0,
|
||||
"native_correct_to_wrong_integer": []
|
||||
},
|
||||
"direct_3": {
|
||||
"n": 8,
|
||||
"correct": 1,
|
||||
"unscored": 0,
|
||||
"native_correct_to_wrong_integer": [
|
||||
"screen-count-002"
|
||||
]
|
||||
},
|
||||
"direct_4": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 0,
|
||||
"native_correct_to_wrong_integer": [
|
||||
"screen-count-002"
|
||||
]
|
||||
},
|
||||
"direct_5": {
|
||||
"n": 8,
|
||||
"correct": 0,
|
||||
"unscored": 8,
|
||||
"native_correct_to_wrong_integer": []
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"frozen_sha256": "409cadff8b2ef2f0efcfa71bf0a94802391a341ed04cb6e374154b8b8ff1b545",
|
||||
"screen_sha256": "59225fa1b583af3a5890c020b9cc18487d182312728865e4386fa9007fee0da4",
|
||||
"chosen": {
|
||||
"task": "lookup",
|
||||
"arm": "direct_3",
|
||||
"recipients": [
|
||||
15,
|
||||
19,
|
||||
23
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"n": 32,
|
||||
"correct": {
|
||||
"native": 32,
|
||||
"direct": 0,
|
||||
"lisa": 3
|
||||
},
|
||||
"substantive_loss_ids": [
|
||||
"test-lookup-000",
|
||||
"test-lookup-001",
|
||||
"test-lookup-002",
|
||||
"test-lookup-003",
|
||||
"test-lookup-004",
|
||||
"test-lookup-005",
|
||||
"test-lookup-006",
|
||||
"test-lookup-007",
|
||||
"test-lookup-008",
|
||||
"test-lookup-009",
|
||||
"test-lookup-010",
|
||||
"test-lookup-011",
|
||||
"test-lookup-012",
|
||||
"test-lookup-013",
|
||||
"test-lookup-014",
|
||||
"test-lookup-015",
|
||||
"test-lookup-016",
|
||||
"test-lookup-017",
|
||||
"test-lookup-018",
|
||||
"test-lookup-019",
|
||||
"test-lookup-020",
|
||||
"test-lookup-021",
|
||||
"test-lookup-022",
|
||||
"test-lookup-023",
|
||||
"test-lookup-024",
|
||||
"test-lookup-025",
|
||||
"test-lookup-026",
|
||||
"test-lookup-027",
|
||||
"test-lookup-028",
|
||||
"test-lookup-029",
|
||||
"test-lookup-030",
|
||||
"test-lookup-031"
|
||||
],
|
||||
"substantive_rescued_ids": [
|
||||
"test-lookup-014",
|
||||
"test-lookup-020",
|
||||
"test-lookup-021"
|
||||
],
|
||||
"unscored": {
|
||||
"native": 0,
|
||||
"direct": 0,
|
||||
"lisa": 0
|
||||
},
|
||||
"native_correct_lost_by_direct": 32,
|
||||
"rescued": 3,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 3,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.09375,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.21875
|
||||
],
|
||||
"mcnemar_exact_p": 0.25
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,547 @@
|
||||
{
|
||||
"selected_epoch": 2,
|
||||
"epochs": [
|
||||
{
|
||||
"epoch": 1,
|
||||
"steps": [
|
||||
{
|
||||
"capture": "000.npz",
|
||||
"huber": 6.466125965118408,
|
||||
"completion_ce": 3.640169858932495
|
||||
},
|
||||
{
|
||||
"capture": "001.npz",
|
||||
"huber": 6.416173458099365,
|
||||
"completion_ce": 2.7350101470947266
|
||||
},
|
||||
{
|
||||
"capture": "002.npz",
|
||||
"huber": 6.482085704803467,
|
||||
"completion_ce": 2.03899884223938
|
||||
},
|
||||
{
|
||||
"capture": "003.npz",
|
||||
"huber": 6.430853366851807,
|
||||
"completion_ce": 1.5210151672363281
|
||||
},
|
||||
{
|
||||
"capture": "004.npz",
|
||||
"huber": 6.329977512359619,
|
||||
"completion_ce": 1.6759847402572632
|
||||
},
|
||||
{
|
||||
"capture": "005.npz",
|
||||
"huber": 6.335151195526123,
|
||||
"completion_ce": 1.0699304342269897
|
||||
},
|
||||
{
|
||||
"capture": "006.npz",
|
||||
"huber": 6.317526340484619,
|
||||
"completion_ce": 1.4101346731185913
|
||||
},
|
||||
{
|
||||
"capture": "007.npz",
|
||||
"huber": 6.251140594482422,
|
||||
"completion_ce": 1.1468429565429688
|
||||
},
|
||||
{
|
||||
"capture": "008.npz",
|
||||
"huber": 6.1668524742126465,
|
||||
"completion_ce": 1.6777559518814087
|
||||
},
|
||||
{
|
||||
"capture": "009.npz",
|
||||
"huber": 6.1963043212890625,
|
||||
"completion_ce": 1.2596086263656616
|
||||
},
|
||||
{
|
||||
"capture": "010.npz",
|
||||
"huber": 6.088558673858643,
|
||||
"completion_ce": 0.6729698181152344
|
||||
},
|
||||
{
|
||||
"capture": "011.npz",
|
||||
"huber": 6.079294681549072,
|
||||
"completion_ce": 1.2998491525650024
|
||||
},
|
||||
{
|
||||
"capture": "012.npz",
|
||||
"huber": 6.054551601409912,
|
||||
"completion_ce": 1.4103832244873047
|
||||
},
|
||||
{
|
||||
"capture": "013.npz",
|
||||
"huber": 5.936060428619385,
|
||||
"completion_ce": 1.0076059103012085
|
||||
},
|
||||
{
|
||||
"capture": "014.npz",
|
||||
"huber": 5.830902576446533,
|
||||
"completion_ce": 0.8567708134651184
|
||||
},
|
||||
{
|
||||
"capture": "015.npz",
|
||||
"huber": 5.81991720199585,
|
||||
"completion_ce": 0.9816989898681641
|
||||
},
|
||||
{
|
||||
"capture": "016.npz",
|
||||
"huber": 5.782172679901123,
|
||||
"completion_ce": 0.32713380455970764
|
||||
},
|
||||
{
|
||||
"capture": "017.npz",
|
||||
"huber": 5.763124465942383,
|
||||
"completion_ce": 2.0601158142089844
|
||||
},
|
||||
{
|
||||
"capture": "018.npz",
|
||||
"huber": 5.706521511077881,
|
||||
"completion_ce": 1.5579833984375
|
||||
},
|
||||
{
|
||||
"capture": "019.npz",
|
||||
"huber": 5.558866500854492,
|
||||
"completion_ce": 0.44708251953125
|
||||
},
|
||||
{
|
||||
"capture": "020.npz",
|
||||
"huber": 5.477881908416748,
|
||||
"completion_ce": 1.1636791229248047
|
||||
},
|
||||
{
|
||||
"capture": "021.npz",
|
||||
"huber": 5.311099529266357,
|
||||
"completion_ce": 1.1208223104476929
|
||||
},
|
||||
{
|
||||
"capture": "022.npz",
|
||||
"huber": 5.279181957244873,
|
||||
"completion_ce": 1.268227219581604
|
||||
},
|
||||
{
|
||||
"capture": "023.npz",
|
||||
"huber": 5.142008304595947,
|
||||
"completion_ce": 0.9710490107536316
|
||||
}
|
||||
],
|
||||
"validation": [
|
||||
{
|
||||
"id": "validation-lookup-000",
|
||||
"task": "lookup",
|
||||
"gold": 28,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-001",
|
||||
"task": "lookup",
|
||||
"gold": 92,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
21,
|
||||
248046
|
||||
],
|
||||
"response": "96<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 96,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-002",
|
||||
"task": "lookup",
|
||||
"gold": 71,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "41<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 41,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-003",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
23,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "84<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 84,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-004",
|
||||
"task": "lookup",
|
||||
"gold": 98,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"response": "98<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 98,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-005",
|
||||
"task": "lookup",
|
||||
"gold": 26,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "59<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 59,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-006",
|
||||
"task": "lookup",
|
||||
"gold": 38,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-007",
|
||||
"task": "lookup",
|
||||
"gold": 32,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
24,
|
||||
248046
|
||||
],
|
||||
"response": "59<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 59,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"epoch": 2,
|
||||
"steps": [
|
||||
{
|
||||
"capture": "000.npz",
|
||||
"huber": 4.952552318572998,
|
||||
"completion_ce": 1.4009037017822266
|
||||
},
|
||||
{
|
||||
"capture": "001.npz",
|
||||
"huber": 4.789427280426025,
|
||||
"completion_ce": 0.5592880249023438
|
||||
},
|
||||
{
|
||||
"capture": "002.npz",
|
||||
"huber": 4.726945400238037,
|
||||
"completion_ce": 1.2972265481948853
|
||||
},
|
||||
{
|
||||
"capture": "003.npz",
|
||||
"huber": 4.5856170654296875,
|
||||
"completion_ce": 0.5974127650260925
|
||||
},
|
||||
{
|
||||
"capture": "004.npz",
|
||||
"huber": 4.457610607147217,
|
||||
"completion_ce": 0.4448140561580658
|
||||
},
|
||||
{
|
||||
"capture": "005.npz",
|
||||
"huber": 4.406347274780273,
|
||||
"completion_ce": 0.6005427241325378
|
||||
},
|
||||
{
|
||||
"capture": "006.npz",
|
||||
"huber": 4.3611578941345215,
|
||||
"completion_ce": 1.11090087890625
|
||||
},
|
||||
{
|
||||
"capture": "007.npz",
|
||||
"huber": 4.287736415863037,
|
||||
"completion_ce": 0.4663238525390625
|
||||
},
|
||||
{
|
||||
"capture": "008.npz",
|
||||
"huber": 4.187578201293945,
|
||||
"completion_ce": 1.04208242893219
|
||||
},
|
||||
{
|
||||
"capture": "009.npz",
|
||||
"huber": 4.137438774108887,
|
||||
"completion_ce": 0.754715621471405
|
||||
},
|
||||
{
|
||||
"capture": "010.npz",
|
||||
"huber": 3.979546308517456,
|
||||
"completion_ce": 0.5380516052246094
|
||||
},
|
||||
{
|
||||
"capture": "011.npz",
|
||||
"huber": 3.8709640502929688,
|
||||
"completion_ce": 0.7800388336181641
|
||||
},
|
||||
{
|
||||
"capture": "012.npz",
|
||||
"huber": 3.749253273010254,
|
||||
"completion_ce": 0.5718275904655457
|
||||
},
|
||||
{
|
||||
"capture": "013.npz",
|
||||
"huber": 3.5951597690582275,
|
||||
"completion_ce": 0.8369833827018738
|
||||
},
|
||||
{
|
||||
"capture": "014.npz",
|
||||
"huber": 3.4549624919891357,
|
||||
"completion_ce": 0.37712350487709045
|
||||
},
|
||||
{
|
||||
"capture": "015.npz",
|
||||
"huber": 3.3932430744171143,
|
||||
"completion_ce": 0.47049713134765625
|
||||
},
|
||||
{
|
||||
"capture": "016.npz",
|
||||
"huber": 3.3298141956329346,
|
||||
"completion_ce": 0.24415016174316406
|
||||
},
|
||||
{
|
||||
"capture": "017.npz",
|
||||
"huber": 3.315248727798462,
|
||||
"completion_ce": 1.5147151947021484
|
||||
},
|
||||
{
|
||||
"capture": "018.npz",
|
||||
"huber": 3.2439496517181396,
|
||||
"completion_ce": 0.15868441760540009
|
||||
},
|
||||
{
|
||||
"capture": "019.npz",
|
||||
"huber": 3.1188666820526123,
|
||||
"completion_ce": 0.05583127215504646
|
||||
},
|
||||
{
|
||||
"capture": "020.npz",
|
||||
"huber": 3.04500412940979,
|
||||
"completion_ce": 0.022246679291129112
|
||||
},
|
||||
{
|
||||
"capture": "021.npz",
|
||||
"huber": 2.903524160385132,
|
||||
"completion_ce": 0.07955551147460938
|
||||
},
|
||||
{
|
||||
"capture": "022.npz",
|
||||
"huber": 2.9015865325927734,
|
||||
"completion_ce": 1.1182270050048828
|
||||
},
|
||||
{
|
||||
"capture": "023.npz",
|
||||
"huber": 2.8223178386688232,
|
||||
"completion_ce": 0.44306373596191406
|
||||
}
|
||||
],
|
||||
"validation": [
|
||||
{
|
||||
"id": "validation-lookup-000",
|
||||
"task": "lookup",
|
||||
"gold": 28,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
22,
|
||||
248046
|
||||
],
|
||||
"response": "97<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 97,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-001",
|
||||
"task": "lookup",
|
||||
"gold": 92,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
17,
|
||||
248046
|
||||
],
|
||||
"response": "92<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 92,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-002",
|
||||
"task": "lookup",
|
||||
"gold": 71,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
19,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "41<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 41,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-003",
|
||||
"task": "lookup",
|
||||
"gold": 89,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
19,
|
||||
248046
|
||||
],
|
||||
"response": "54<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 54,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-004",
|
||||
"task": "lookup",
|
||||
"gold": 98,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
23,
|
||||
248046
|
||||
],
|
||||
"response": "98<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 98,
|
||||
"correct": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-005",
|
||||
"task": "lookup",
|
||||
"gold": 26,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
21,
|
||||
20,
|
||||
248046
|
||||
],
|
||||
"response": "65<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 65,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-006",
|
||||
"task": "lookup",
|
||||
"gold": 38,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
24,
|
||||
16,
|
||||
248046
|
||||
],
|
||||
"response": "91<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 91,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "validation-lookup-007",
|
||||
"task": "lookup",
|
||||
"gold": 32,
|
||||
"arms": {
|
||||
"lisa": {
|
||||
"tokens": [
|
||||
20,
|
||||
18,
|
||||
248046
|
||||
],
|
||||
"response": "53<|im_end|>",
|
||||
"stop": "eos",
|
||||
"answer": 53,
|
||||
"correct": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"screen": {
|
||||
"frozen_sha256": "409cadff8b2ef2f0efcfa71bf0a94802391a341ed04cb6e374154b8b8ff1b545",
|
||||
"screen_sha256": "59225fa1b583af3a5890c020b9cc18487d182312728865e4386fa9007fee0da4",
|
||||
"chosen": {
|
||||
"task": "lookup",
|
||||
"arm": "direct_3",
|
||||
"recipients": [
|
||||
15,
|
||||
19,
|
||||
23
|
||||
]
|
||||
}
|
||||
},
|
||||
"epochs": 2,
|
||||
"rank": 40,
|
||||
"seed": 621011,
|
||||
"objective": "0.25 teacher attention Huber + 0.75 full-vocabulary completion CE"
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
{
|
||||
"frozen_sha256": "409cadff8b2ef2f0efcfa71bf0a94802391a341ed04cb6e374154b8b8ff1b545",
|
||||
"train_spec_sha256": "df49b966e0f68bcb0f06642e9ec141008aaf8550d63fc467f00c6b9e864af799",
|
||||
"task": "lookup",
|
||||
"recipients": [
|
||||
15,
|
||||
19,
|
||||
23
|
||||
],
|
||||
"captures_verified": 24,
|
||||
"records": [
|
||||
{
|
||||
"id": "fit-lookup-000",
|
||||
"file": "000.npz",
|
||||
"input_tokens": 102,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "e7489bf56a40293759ac2e24822cbf3cd5fbd88a3d2429f069009e9197de2c46"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-001",
|
||||
"file": "001.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "27e531a27d9ad9f04675f4df1ffd66b4ec89089e23d11b9b0de6285a4a729af3"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-002",
|
||||
"file": "002.npz",
|
||||
"input_tokens": 100,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "45a01a55c646e0ea3635b5794072b5371984f7fa9aca1b1c827155579a06fb9d"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-003",
|
||||
"file": "003.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "38792661d7a9372a32609a52f64724b2553bc12311b56b482324ddb52165f97d"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-004",
|
||||
"file": "004.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "c9a628e3d17ff06d276dabf26008fbb139f53ecbc814c0cd497c9be80c2e6bd3"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-005",
|
||||
"file": "005.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "d1c0b5b50dbdba10488fb655d7414bc309647ae6f79a1835f7e91a6594859845"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-006",
|
||||
"file": "006.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "744daf42b3431fdb56de9710ddbf5f3e322ed99181742643dd5c053af9ae6a11"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-007",
|
||||
"file": "007.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "4b2f194edddc6da7fd79676db47580e31e3345d753b4e5b961c3bd539f29e582"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-008",
|
||||
"file": "008.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "b839bc0393ba2ddd4fa8f0d15cbbfac319585a336e26c3ce1cb3a3e0708769df"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-009",
|
||||
"file": "009.npz",
|
||||
"input_tokens": 102,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "e24b25781451ba931dcc1b2319cf40b946456cfaaafc15100351f9aff1c23846"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-010",
|
||||
"file": "010.npz",
|
||||
"input_tokens": 104,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "5576e4a26f4d255b39683e503cf4c868c582d668639255d034a82b91f723b9d3"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-011",
|
||||
"file": "011.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "b659078ce11cc5e175a3987e14353b95fd837f13ea6b3aad54cfb5ebc6ff3d8f"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-012",
|
||||
"file": "012.npz",
|
||||
"input_tokens": 104,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "adb5d0128a5146cd6662c7f2fdb8dc9404032bb17cbe8eea2a6387a8d0054a9d"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-013",
|
||||
"file": "013.npz",
|
||||
"input_tokens": 102,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "7e704a18185ef9b0e7c4f001444841c9a0aa40bfaf392fa549ec69f8b7e7c288"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-014",
|
||||
"file": "014.npz",
|
||||
"input_tokens": 102,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "4033dbdaa677b4eb49f7aab020a8f1329da8753326bd11e07be64471ea39559a"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-015",
|
||||
"file": "015.npz",
|
||||
"input_tokens": 101,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "6fd9fc00fdbb0dfb4c3fd385c411c9e09931c3bd30d7406881d61bd00150f891"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-016",
|
||||
"file": "016.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "be79c79a87ed2c3ced2c9fa4efacb7d373d521dd301fad48d0ce7d0b714f60ba"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-017",
|
||||
"file": "017.npz",
|
||||
"input_tokens": 101,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "f2e2ac748ac1c136e18725be7e4d31b8501ada2c2f2f46a0a5ca399b087ca572"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-018",
|
||||
"file": "018.npz",
|
||||
"input_tokens": 105,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "5befccbda4c55e06b2b8cdd7dd040dcbe7cb3dc8d3d09ad55542f03820e066ad"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-019",
|
||||
"file": "019.npz",
|
||||
"input_tokens": 100,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "3037fea3ed609eb068ebcc85bf58fc56288df201e21e0988339710a981734e87"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-020",
|
||||
"file": "020.npz",
|
||||
"input_tokens": 103,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "93e7764c575f8d3b9a2a4619d4458bf732fb20240e5c9a6261700d6bae59bc29"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-021",
|
||||
"file": "021.npz",
|
||||
"input_tokens": 102,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "f79679202390c4bf2d41db5e12a00867c4d77f2f5b912006cdf43200b93dcc3c"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-022",
|
||||
"file": "022.npz",
|
||||
"input_tokens": 100,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "c66571c5ad7cc0328eec7c170392c0ed027151b46097030e87dab9c44d488cf0"
|
||||
},
|
||||
{
|
||||
"id": "fit-lookup-023",
|
||||
"file": "023.npz",
|
||||
"input_tokens": 102,
|
||||
"answer_and_eos_tokens": 3,
|
||||
"sha256": "3f971f14a8cbfde8644b4e82f4ce8c4b10d3df0314ea15ae5141a50d957c53ff"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"frozen_sha256": "409cadff8b2ef2f0efcfa71bf0a94802391a341ed04cb6e374154b8b8ff1b545",
|
||||
"rows_sha256": "59225fa1b583af3a5890c020b9cc18487d182312728865e4386fa9007fee0da4",
|
||||
"rows_verified": 32
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"frozen_sha256": "409cadff8b2ef2f0efcfa71bf0a94802391a341ed04cb6e374154b8b8ff1b545",
|
||||
"rows_sha256": "5c04ffff27c8b31a0be2d39553ed035d3c677907cabc1d17a9ea5886f97f8e5d",
|
||||
"rows_verified": 32,
|
||||
"final_answer_audit": {
|
||||
"n": 32,
|
||||
"correct": {
|
||||
"native": 32,
|
||||
"direct": 0,
|
||||
"lisa": 3
|
||||
},
|
||||
"substantive_loss_ids": [
|
||||
"test-lookup-000",
|
||||
"test-lookup-001",
|
||||
"test-lookup-002",
|
||||
"test-lookup-003",
|
||||
"test-lookup-004",
|
||||
"test-lookup-005",
|
||||
"test-lookup-006",
|
||||
"test-lookup-007",
|
||||
"test-lookup-008",
|
||||
"test-lookup-009",
|
||||
"test-lookup-010",
|
||||
"test-lookup-011",
|
||||
"test-lookup-012",
|
||||
"test-lookup-013",
|
||||
"test-lookup-014",
|
||||
"test-lookup-015",
|
||||
"test-lookup-016",
|
||||
"test-lookup-017",
|
||||
"test-lookup-018",
|
||||
"test-lookup-019",
|
||||
"test-lookup-020",
|
||||
"test-lookup-021",
|
||||
"test-lookup-022",
|
||||
"test-lookup-023",
|
||||
"test-lookup-024",
|
||||
"test-lookup-025",
|
||||
"test-lookup-026",
|
||||
"test-lookup-027",
|
||||
"test-lookup-028",
|
||||
"test-lookup-029",
|
||||
"test-lookup-030",
|
||||
"test-lookup-031"
|
||||
],
|
||||
"substantive_rescued_ids": [
|
||||
"test-lookup-014",
|
||||
"test-lookup-020",
|
||||
"test-lookup-021"
|
||||
],
|
||||
"unscored": {
|
||||
"native": 0,
|
||||
"direct": 0,
|
||||
"lisa": 0
|
||||
},
|
||||
"native_correct_lost_by_direct": 32,
|
||||
"rescued": 3,
|
||||
"newly_lost_among_native_and_direct_correct": 0,
|
||||
"candidate_correct_direct_wrong": 3,
|
||||
"direct_correct_candidate_wrong": 0,
|
||||
"accuracy_delta_vs_direct": 0.09375,
|
||||
"paired_prompt_bootstrap_95": [
|
||||
0.0,
|
||||
0.21875
|
||||
],
|
||||
"mcnemar_exact_p": 0.25
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
# Qwen3.5-2B 单层 LiSA 方法复现
|
||||
|
||||
在冻结的 Qwen3.5-2B 上将实际第 19 层注意力 logits 共享给第 23 层。新增可学习的低秩 Q/K(每头 40 维)和 256 单元双层 ReLU 头融合。保持接收层的 V、gate、O、MLP 与归一化不变。使用官方实现的联合目标,0.25 × Huber(delta=1)注意力蒸馏和 0.75 × 全词表下一 token 交叉熵。对新增的 825,344 个参数执行反向传播和 AdamW。
|
||||
|
||||
| 方法 | 留出全词表 CE ↓ | 困惑度 ↓ | 首个答案 token 正确 |
|
||||
| --- | ---: | ---: | ---: |
|
||||
| 原模型 | 2.9298 | 18.72 | 1/16 |
|
||||
| 直接共享 | 3.1380 | 23.06 | 1/16 |
|
||||
| 上轮联合线性拟合 | 2.9601 | 19.30 | 1/16 |
|
||||
| LiSA | 2.8605 | 17.47 | 1/16 |
|
||||
|
||||
留出损失覆盖 868 个有效下一 token 目标,包括题目文本以及答案。LiSA 将相对直接共享的 CE 降低约 0.278,也略低于原模型。四组均只答对一道,整段语言建模损失的改善未体现为答题准确率提升。
|
||||
|
||||
## 训练、验证和范围
|
||||
|
||||
- 使用与上一轮完全相同的 36 道合成题,按 12/8/16 划分拟合、验证和留出。训练 8 轮、24 次更新。按验证联合损失选择第 8 轮。
|
||||
- 第 1 到第 8 轮的验证 Huber 从 6.0394 降至 0.9594,CE 从 3.2446 降至 3.1057。最终验证 CE 的同题原模型对照是 3.1723。混合目标的下降主要来自蒸馏项,困惑度只用 CE 计算。
|
||||
- 远程两项数值检查通过。分块全词表 CE 和输入梯度与密集计算一致,因果遮罩和两个新增组件的梯度均已验证。真实前向评估中,原样重放与原模型的有效位置隐藏状态一致性检查通过。
|
||||
- 这是 Qwen 混合架构上的单接收层方法复现。论文的 LLaMA 多层设置、42 亿训练 token、13 项基准、推理吞吐及 KV 缓存节省未重跑。
|
||||
- 冻结检查点保存在原 CPU 服务器的 `/opt/exp-model-parameter-similarity/runs/lisa-full-results-20261123/best-adapter.pt`,SHA256 为 `91e8ab434581f9de3ee6ffa0cfdc17ff7f770563916a43839fb5bce4bcde74ae`。Git 归档可复现代码、训练轨迹、题目与统计,激活缓存和权重保留在服务器。
|
||||
|
||||
复现命令见 [crossqkv/README.md](../../crossqkv/README.md)。
|
||||
@@ -0,0 +1,260 @@
|
||||
{
|
||||
"fit": [
|
||||
{
|
||||
"prompt": "Records (oldest first): pine=6, cedar=5, maple=9, moss=5, yew=7, oak=2. What is the latest value of moss? Answer with one digit:",
|
||||
"gold": 5,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "fit-00"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): fir=2, maple=1, moss=1, fern=4, fern=1, elm=5. What is the latest value of fern? Answer with one digit:",
|
||||
"gold": 1,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "fit-01"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): pine=1, elm=4, ash=2, birch=7, moss=3, fir=4. What is the latest value of moss? Answer with one digit:",
|
||||
"gold": 3,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "fit-02"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): cedar=7, pine=8, elm=7, fern=5, yew=1, elm=3. What is the latest value of elm? Answer with one digit:",
|
||||
"gold": 3,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "fit-03"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): maple=5, fir=4, elm=4, moss=2, cedar=9, fern=4. What is the latest value of fir? Answer with one digit:",
|
||||
"gold": 4,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "fit-04"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): ash=2, ash=1, fir=7, yew=4, cedar=9, maple=9. What is the latest value of ash? Answer with one digit:",
|
||||
"gold": 1,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "fit-05"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): yew=4, fir=5, ash=1, elm=3, cedar=1, pine=5. What is the latest value of pine? Answer with one digit:",
|
||||
"gold": 5,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "fit-06"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): fern=3, reed=6, cedar=2, moss=1, fir=1, moss=9. What is the latest value of moss? Answer with one digit:",
|
||||
"gold": 9,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "fit-07"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): elm=5, reed=4, fern=5, fir=9, moss=9, cedar=6. What is the latest value of reed? Answer with one digit:",
|
||||
"gold": 4,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "fit-08"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): fern=8, ash=7, oak=9, maple=2, pine=5, pine=9. What is the latest value of pine? Answer with one digit:",
|
||||
"gold": 9,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "fit-09"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): maple=3, fir=1, birch=4, fern=6, yew=9, cedar=6. What is the latest value of fern? Answer with one digit:",
|
||||
"gold": 6,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "fit-10"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): yew=5, birch=4, birch=3, fir=8, oak=1, elm=9. What is the latest value of birch? Answer with one digit:",
|
||||
"gold": 3,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "fit-11"
|
||||
}
|
||||
],
|
||||
"validation": [
|
||||
{
|
||||
"prompt": "Records (oldest first): ash=7, fern=4, birch=9, yew=8, moss=9, cedar=9. What is the latest value of cedar? Answer with one digit:",
|
||||
"gold": 9,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "validation-00"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): fern=2, cedar=6, yew=6, fir=1, elm=8, fern=8. What is the latest value of fern? Answer with one digit:",
|
||||
"gold": 8,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "validation-01"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): birch=1, pine=2, yew=5, ash=1, fern=9, fir=3. What is the latest value of ash? Answer with one digit:",
|
||||
"gold": 1,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "validation-02"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): reed=6, maple=6, cedar=1, ash=3, yew=8, reed=4. What is the latest value of reed? Answer with one digit:",
|
||||
"gold": 4,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "validation-03"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): maple=5, pine=3, fern=7, oak=8, birch=6, yew=2. What is the latest value of oak? Answer with one digit:",
|
||||
"gold": 8,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "validation-04"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): cedar=6, birch=6, oak=6, cedar=4, ash=8, elm=6. What is the latest value of cedar? Answer with one digit:",
|
||||
"gold": 4,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "validation-05"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): maple=5, yew=5, fir=4, pine=4, elm=6, reed=3. What is the latest value of yew? Answer with one digit:",
|
||||
"gold": 5,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "validation-06"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): fir=4, yew=4, moss=4, moss=1, oak=3, reed=4. What is the latest value of moss? Answer with one digit:",
|
||||
"gold": 1,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "validation-07"
|
||||
}
|
||||
],
|
||||
"test": [
|
||||
{
|
||||
"prompt": "Records (oldest first): pine=4, ash=1, birch=9, maple=7, fern=6, fir=9. What is the latest value of pine? Answer with one digit:",
|
||||
"gold": 4,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "test-00"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): fir=9, pine=5, cedar=8, elm=9, maple=3, elm=8. What is the latest value of elm? Answer with one digit:",
|
||||
"gold": 8,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "test-01"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): yew=4, fir=6, maple=1, oak=9, moss=2, reed=2, cedar=4, elm=7, fern=5, pine=3. What is the latest value of reed? Answer with one digit:",
|
||||
"gold": 2,
|
||||
"entries": 10,
|
||||
"duplicate": false,
|
||||
"id": "test-02"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): moss=5, ash=4, pine=6, reed=4, cedar=7, oak=7, elm=6, birch=8, fir=6, ash=6. What is the latest value of ash? Answer with one digit:",
|
||||
"gold": 6,
|
||||
"entries": 10,
|
||||
"duplicate": true,
|
||||
"id": "test-03"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): maple=9, elm=7, oak=7, pine=5, reed=4, cedar=8. What is the latest value of elm? Answer with one digit:",
|
||||
"gold": 7,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "test-04"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): ash=7, fir=4, pine=5, fern=8, fern=9, oak=7. What is the latest value of fern? Answer with one digit:",
|
||||
"gold": 9,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "test-05"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): elm=5, reed=9, oak=4, yew=8, cedar=1, fir=1, ash=4, maple=5, fern=3, pine=7. What is the latest value of elm? Answer with one digit:",
|
||||
"gold": 5,
|
||||
"entries": 10,
|
||||
"duplicate": false,
|
||||
"id": "test-06"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): moss=8, ash=7, pine=7, reed=7, yew=3, birch=4, elm=9, maple=3, ash=6, fir=9. What is the latest value of ash? Answer with one digit:",
|
||||
"gold": 6,
|
||||
"entries": 10,
|
||||
"duplicate": true,
|
||||
"id": "test-07"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): birch=5, elm=9, yew=9, ash=3, cedar=9, reed=9. What is the latest value of yew? Answer with one digit:",
|
||||
"gold": 9,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "test-08"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): maple=7, yew=6, birch=3, reed=8, ash=6, maple=2. What is the latest value of maple? Answer with one digit:",
|
||||
"gold": 2,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "test-09"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): ash=9, cedar=3, maple=5, fern=4, oak=2, reed=3, birch=7, pine=5, moss=3, elm=6. What is the latest value of elm? Answer with one digit:",
|
||||
"gold": 6,
|
||||
"entries": 10,
|
||||
"duplicate": false,
|
||||
"id": "test-10"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): elm=2, birch=3, moss=6, oak=2, fir=5, pine=9, yew=2, pine=2, cedar=7, fern=2. What is the latest value of pine? Answer with one digit:",
|
||||
"gold": 2,
|
||||
"entries": 10,
|
||||
"duplicate": true,
|
||||
"id": "test-11"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): yew=2, pine=2, fir=2, elm=3, moss=4, reed=9. What is the latest value of yew? Answer with one digit:",
|
||||
"gold": 2,
|
||||
"entries": 6,
|
||||
"duplicate": false,
|
||||
"id": "test-12"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): maple=8, birch=9, birch=2, oak=1, moss=8, cedar=2. What is the latest value of birch? Answer with one digit:",
|
||||
"gold": 2,
|
||||
"entries": 6,
|
||||
"duplicate": true,
|
||||
"id": "test-13"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): fern=2, pine=4, maple=3, yew=4, ash=8, reed=1, birch=3, fir=5, elm=6, cedar=2. What is the latest value of birch? Answer with one digit:",
|
||||
"gold": 3,
|
||||
"entries": 10,
|
||||
"duplicate": false,
|
||||
"id": "test-14"
|
||||
},
|
||||
{
|
||||
"prompt": "Records (oldest first): birch=7, yew=4, elm=5, cedar=3, pine=1, oak=8, fern=3, ash=7, reed=1, ash=8. What is the latest value of ash? Answer with one digit:",
|
||||
"gold": 8,
|
||||
"entries": 10,
|
||||
"duplicate": true,
|
||||
"id": "test-15"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"source_sha256": {
|
||||
"model_config.json": "ed1c1723241f23f7f4e23430759cbd7dcfb4103cbdfe052bfe7626b57c2615b4",
|
||||
"manifest.json": "28efbaf94a5034333339a35f08ead151459a7d20c6c2d2f07a451e7f3bf154de",
|
||||
"tokenizer.json": "5f9e4d4901a92b997e463c1f46055088b6cca5ca61a6522d1b9f64c4bb81cb42"
|
||||
},
|
||||
"donor": 19,
|
||||
"target": 23,
|
||||
"rank_per_head": 40,
|
||||
"epochs": 8,
|
||||
"batch_size": 4,
|
||||
"seed": 20261123,
|
||||
"split_seeds": {
|
||||
"fit": 22301,
|
||||
"validation": 22302,
|
||||
"test": 22303
|
||||
},
|
||||
"optimizer": "AdamW",
|
||||
"learning_rate": 0.0003,
|
||||
"weight_decay": 0.1,
|
||||
"objective": {
|
||||
"full_vocabulary_next_token_ce": 0.75,
|
||||
"huber_delta_1": 0.25
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"validation": {
|
||||
"native": {
|
||||
"ce": 3.1722529108931377,
|
||||
"huber": 0.0,
|
||||
"objective": 2.3791896831698534,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 3,
|
||||
"greedy_n": 8
|
||||
},
|
||||
"direct": {
|
||||
"ce": 3.3412215412470707,
|
||||
"huber": 1.3496817071496994,
|
||||
"objective": 2.8433365827227277,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 3,
|
||||
"greedy_n": 8
|
||||
},
|
||||
"linear_joint": {
|
||||
"ce": 3.2096430021249827,
|
||||
"huber": 1.3686958207991813,
|
||||
"objective": 2.749406206793532,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 2,
|
||||
"greedy_n": 8
|
||||
},
|
||||
"lisa": {
|
||||
"ce": 3.1057116765639967,
|
||||
"huber": 0.9593932409738036,
|
||||
"objective": 2.569132067666448,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 3,
|
||||
"greedy_n": 8
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"native": {
|
||||
"ce": 2.9298480589818294,
|
||||
"huber": 0.0,
|
||||
"objective": 2.197386044236372,
|
||||
"tokens": 868,
|
||||
"greedy_correct": 1,
|
||||
"greedy_n": 16
|
||||
},
|
||||
"direct": {
|
||||
"ce": 3.138041972289986,
|
||||
"huber": 1.358337819454631,
|
||||
"objective": 2.6931159340811472,
|
||||
"tokens": 868,
|
||||
"greedy_correct": 1,
|
||||
"greedy_n": 16
|
||||
},
|
||||
"linear_joint": {
|
||||
"ce": 2.9600665113343623,
|
||||
"huber": 1.414523463154858,
|
||||
"objective": 2.573680749289486,
|
||||
"tokens": 868,
|
||||
"greedy_correct": 1,
|
||||
"greedy_n": 16
|
||||
},
|
||||
"lisa": {
|
||||
"ce": 2.860453250221393,
|
||||
"huber": 0.9796017867318627,
|
||||
"objective": 2.3902403843490103,
|
||||
"tokens": 868,
|
||||
"greedy_correct": 1,
|
||||
"greedy_n": 16
|
||||
}
|
||||
},
|
||||
"best_epoch": 8,
|
||||
"trainable_parameters": 825344,
|
||||
"linear_control_sha256": "38861f80bbf5c787ab3bcc5a2825167fdc504a432c04656250d205a742723305"
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
[
|
||||
{
|
||||
"epoch": 1,
|
||||
"fit_batch_losses": [
|
||||
[
|
||||
4.240320205688477,
|
||||
3.3694403171539307,
|
||||
6.852958679199219
|
||||
],
|
||||
[
|
||||
4.238736152648926,
|
||||
3.441174030303955,
|
||||
6.63142204284668
|
||||
],
|
||||
[
|
||||
4.0119500160217285,
|
||||
3.22914981842041,
|
||||
6.360350131988525
|
||||
]
|
||||
],
|
||||
"validation": {
|
||||
"ce": 3.244636496231162,
|
||||
"huber": 6.039419658543698,
|
||||
"objective": 3.9433322868092957,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 0,
|
||||
"greedy_n": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"epoch": 2,
|
||||
"fit_batch_losses": [
|
||||
[
|
||||
4.002936363220215,
|
||||
3.331604242324829,
|
||||
6.016933441162109
|
||||
],
|
||||
[
|
||||
3.945413112640381,
|
||||
3.3933796882629395,
|
||||
5.601512908935547
|
||||
],
|
||||
[
|
||||
3.6650333404541016,
|
||||
3.191150188446045,
|
||||
5.08668327331543
|
||||
]
|
||||
],
|
||||
"validation": {
|
||||
"ce": 3.2106871456311645,
|
||||
"huber": 4.549601500568102,
|
||||
"objective": 3.545415734365399,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 0,
|
||||
"greedy_n": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"epoch": 3,
|
||||
"fit_batch_losses": [
|
||||
[
|
||||
3.5972979068756104,
|
||||
3.294156312942505,
|
||||
4.506722450256348
|
||||
],
|
||||
[
|
||||
3.517723321914673,
|
||||
3.362154722213745,
|
||||
3.9844295978546143
|
||||
],
|
||||
[
|
||||
3.265709400177002,
|
||||
3.1815831661224365,
|
||||
3.518087863922119
|
||||
]
|
||||
],
|
||||
"validation": {
|
||||
"ce": 3.206055250917347,
|
||||
"huber": 3.1522311060280925,
|
||||
"objective": 3.1925992146950337,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 0,
|
||||
"greedy_n": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"epoch": 4,
|
||||
"fit_batch_losses": [
|
||||
[
|
||||
3.245277166366577,
|
||||
3.2835733890533447,
|
||||
3.1303882598876953
|
||||
],
|
||||
[
|
||||
3.230419635772705,
|
||||
3.3477752208709717,
|
||||
2.8783535957336426
|
||||
],
|
||||
[
|
||||
3.0425515174865723,
|
||||
3.1663742065429688,
|
||||
2.671083450317383
|
||||
]
|
||||
],
|
||||
"validation": {
|
||||
"ce": 3.1862243559302352,
|
||||
"huber": 2.37091732447708,
|
||||
"objective": 2.9823975980669464,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 0,
|
||||
"greedy_n": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"epoch": 5,
|
||||
"fit_batch_losses": [
|
||||
[
|
||||
3.0486488342285156,
|
||||
3.2668204307556152,
|
||||
2.394134521484375
|
||||
],
|
||||
[
|
||||
2.9993457794189453,
|
||||
3.3244380950927734,
|
||||
2.024068832397461
|
||||
],
|
||||
[
|
||||
2.7900328636169434,
|
||||
3.149345636367798,
|
||||
1.7120943069458008
|
||||
]
|
||||
],
|
||||
"validation": {
|
||||
"ce": 3.17030225859748,
|
||||
"huber": 1.4550986285551193,
|
||||
"objective": 2.7415013510868893,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 0,
|
||||
"greedy_n": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"epoch": 6,
|
||||
"fit_batch_losses": [
|
||||
[
|
||||
2.8061752319335938,
|
||||
3.25311279296875,
|
||||
1.4653630256652832
|
||||
],
|
||||
[
|
||||
2.80643892288208,
|
||||
3.3129684925079346,
|
||||
1.2868504524230957
|
||||
],
|
||||
[
|
||||
2.657257080078125,
|
||||
3.1405460834503174,
|
||||
1.207390308380127
|
||||
]
|
||||
],
|
||||
"validation": {
|
||||
"ce": 3.1583746939816773,
|
||||
"huber": 1.162790216028888,
|
||||
"objective": 2.65947857449348,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 0,
|
||||
"greedy_n": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"epoch": 7,
|
||||
"fit_batch_losses": [
|
||||
[
|
||||
2.7146036624908447,
|
||||
3.2380752563476562,
|
||||
1.1441890001296997
|
||||
],
|
||||
[
|
||||
2.7471532821655273,
|
||||
3.2967944145202637,
|
||||
1.0982303619384766
|
||||
],
|
||||
[
|
||||
2.6067111492156982,
|
||||
3.11966609954834,
|
||||
1.0678465366363525
|
||||
]
|
||||
],
|
||||
"validation": {
|
||||
"ce": 3.13518099410101,
|
||||
"huber": 1.0293640556892425,
|
||||
"objective": 2.6087267594980683,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 0,
|
||||
"greedy_n": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"epoch": 8,
|
||||
"fit_batch_losses": [
|
||||
[
|
||||
2.6548426151275635,
|
||||
3.2067410945892334,
|
||||
0.9991476535797119
|
||||
],
|
||||
[
|
||||
2.6914961338043213,
|
||||
3.2658684253692627,
|
||||
0.9683787822723389
|
||||
],
|
||||
[
|
||||
2.5550029277801514,
|
||||
3.083840847015381,
|
||||
0.9684897661209106
|
||||
]
|
||||
],
|
||||
"validation": {
|
||||
"ce": 3.1057116765639967,
|
||||
"huber": 0.9593932409738036,
|
||||
"objective": 2.569132067666448,
|
||||
"tokens": 369,
|
||||
"greedy_correct": 0,
|
||||
"greedy_n": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,169 @@
|
||||
"""Regression checks for rank allocation, donor controls and reverse KL."""
|
||||
import json
|
||||
import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
from crossqkv.lisa_combination_eval import changed_answers, score_differences
|
||||
from crossqkv.lisa_combination_screen import SITES, paired_questions
|
||||
from crossqkv.lisa_rank_compare import assignments, make_adapters, score_gold_answers
|
||||
from crossqkv.lisa_trajectory_midpoint import midpoint, summarize
|
||||
from crossqkv.lisa_trajectory_train import replay_teacher_inputs, reverse_kl
|
||||
|
||||
|
||||
class CombinationTests(unittest.TestCase):
|
||||
def test_checkpoint_midpoint_preserves_shape_dtype_and_endpoints(self):
|
||||
base = {'a': torch.tensor([2., -4.]), 'b': torch.tensor([1.], dtype=torch.bfloat16)}
|
||||
trained = {'a': torch.tensor([0., 6.]), 'b': torch.tensor([3.], dtype=torch.bfloat16)}
|
||||
middle = midpoint(base, trained)
|
||||
torch.testing.assert_close(middle['a'], torch.tensor([1., 1.]))
|
||||
torch.testing.assert_close(middle['b'], torch.tensor([2.], dtype=torch.bfloat16))
|
||||
self.assertEqual(base['a'].tolist(), [2., -4.])
|
||||
self.assertEqual(trained['a'].tolist(), [0., 6.])
|
||||
with self.assertRaises(ValueError):
|
||||
midpoint(base, {'a': torch.ones(1), 'b': trained['b']})
|
||||
|
||||
def test_midpoint_comparisons_keep_gains_losses_and_pairs(self):
|
||||
qs = [{'id': f'q{i}'} for i in range(4)]
|
||||
flags = {'prior-lisa': [1, 0, 1, 0], 'trajectory-student': [0, 0, 1, 0],
|
||||
'trajectory-reference': [1, 0, 0, 0], 'half-reference': [1, 0, 0, 0],
|
||||
'half-student': [1, 1, 0, 1]}
|
||||
answers = {k: [{'correct': bool(x)} for x in v] for k, v in flags.items()}
|
||||
val = summarize(qs, answers, intervals=False)
|
||||
self.assertEqual(val['correct']['half-student'], 3)
|
||||
self.assertEqual(val['pairs_both_correct']['half-student'], 1)
|
||||
result = val['comparisons']['half-student-vs-prior-lisa']
|
||||
self.assertEqual(result, {'delta': .25, 'corrected': ['q1', 'q3'], 'lost': ['q2']})
|
||||
test = summarize(qs, answers, intervals=True)
|
||||
self.assertEqual(test['comparisons']['half-student-vs-prior-lisa']['interval_95'], [0., .5])
|
||||
self.assertEqual(test['comparisons']['half-student-vs-half-reference']['corrected'], ['q1', 'q3'])
|
||||
|
||||
def test_reference_replay_uses_native_tail_only_on_matching_gold_tokens(self):
|
||||
ids = torch.tensor([[13, 4, 7, 9]])
|
||||
lengths = torch.tensor([4])
|
||||
residual = torch.arange(12).reshape(1, 4, 3).float()
|
||||
donor = torch.arange(16).reshape(1, 1, 4, 4).float()
|
||||
|
||||
def native_tail(h, scores, sizes, mode, recipients):
|
||||
self.assertTrue(torch.equal(sizes, lengths))
|
||||
self.assertEqual((mode, recipients), ('native', ()))
|
||||
return h * 2, {}
|
||||
|
||||
with tempfile.TemporaryDirectory() as folder:
|
||||
path = Path(folder)/'capture.npz'
|
||||
np.savez(path, ids=ids.numpy(), start=[2], residual=residual.numpy(), donor=donor.numpy())
|
||||
target, h, scores = replay_teacher_inputs(native_tail, path, ids, 2, lengths)
|
||||
self.assertTrue(torch.equal(target, 2 * residual))
|
||||
self.assertTrue(torch.equal(h, residual))
|
||||
self.assertTrue(torch.equal(scores, donor))
|
||||
for wrong_ids, start in [(ids + 1, 2), (ids, 1)]:
|
||||
with self.assertRaises(ValueError):
|
||||
replay_teacher_inputs(native_tail, path, wrong_ids, start, lengths)
|
||||
|
||||
def test_combinations_compare_to_the_original_and_matched_controls(self):
|
||||
scores = {
|
||||
'prior-lisa': np.array([[0, 1]]), 'shared-uniform': np.array([[1, 0]]),
|
||||
'shared-allocated': np.array([[1, 1]]), 'shared-reversed': np.array([[0, 0]]),
|
||||
'local-allocated': np.array([[1, 0]]), 'local-uniform': np.array([[0, 0]]),
|
||||
'trajectory-student': np.array([[1, 0]]), 'trajectory-reference': np.array([[0, 0]]),
|
||||
}
|
||||
differences = score_differences(scores)
|
||||
for name, expected in {
|
||||
'rank-vs-prior': [[1, 0]], 'rank-vs-uniform': [[0, 1]],
|
||||
'rank-vs-reversed': [[1, 1]], 'rank-vs-local': [[0, 1]],
|
||||
'rank-interaction': [[-1, 1]], 'student-vs-prior': [[1, -1]],
|
||||
'reference-vs-prior': [[0, -1]], 'student-vs-reference': [[1, 0]],
|
||||
}.items():
|
||||
np.testing.assert_array_equal(differences[name], expected, err_msg=name)
|
||||
|
||||
def test_joint_recoveries_require_beating_both_single_methods_on_one_item(self):
|
||||
items = [{'id': name} for name in ['a', 'b', 'c', 'd']]
|
||||
diffs = {'rank-vs-uniform': np.array([[1, -1], [1, 0]]),
|
||||
'rank-vs-local': np.array([[1, -1], [0, 0]]),
|
||||
'rank-interaction': np.array([[2, -2], [0, 0]])}
|
||||
result = changed_answers(items, diffs, np.array([[0, 1], [0, 1]]))
|
||||
self.assertEqual(result['pairwise']['rank-vs-uniform'],
|
||||
{'corrected': ['a', 'c'], 'lost': ['b']})
|
||||
self.assertNotIn('rank-interaction', result['pairwise'])
|
||||
self.assertEqual(result['rank_combination'], {
|
||||
'corrected_against_both': [{'id': 'a', 'local_uniform_correct': False}],
|
||||
'lost_against_both': [{'id': 'b', 'local_uniform_correct': True}]})
|
||||
|
||||
def test_reverse_kl_gradient_matches_dense_unequal_vocab_chunks(self):
|
||||
rng = torch.Generator().manual_seed(72504)
|
||||
def normal(*shape):
|
||||
return torch.randn(*shape, dtype=torch.float64, generator=rng)
|
||||
student = normal(3, 4).requires_grad_()
|
||||
teacher = normal(3, 4)
|
||||
weight = normal(13, 4)
|
||||
traversals = 0
|
||||
def chunks():
|
||||
nonlocal traversals
|
||||
traversals += 1
|
||||
yield from weight.split(5)
|
||||
|
||||
loss = reverse_kl(student, teacher, chunks)
|
||||
self.assertEqual(traversals, 2)
|
||||
logp = (student @ weight.T).log_softmax(-1)
|
||||
logq = (teacher @ weight.T).log_softmax(-1)
|
||||
dense = (logp.exp() * (logp - logq)).sum(-1).mean()
|
||||
torch.testing.assert_close(loss, dense)
|
||||
torch.testing.assert_close(torch.autograd.grad(loss, student)[0],
|
||||
torch.autograd.grad(dense, student)[0])
|
||||
|
||||
def test_gold_scores_cover_only_answer_and_stop_at_the_correct_shift(self):
|
||||
class Embedding:
|
||||
def __init__(self, weights):
|
||||
self.shape = weights.shape
|
||||
self.flat = weights.numpy().ravel()
|
||||
|
||||
def read(self, span):
|
||||
return self.flat[span]
|
||||
|
||||
def evict(self):
|
||||
pass
|
||||
|
||||
rng = torch.Generator().manual_seed(72507)
|
||||
weights = torch.randn(9, 4, generator=rng)
|
||||
outputs = {label: torch.randn(2, 5, 4, generator=rng) for label in ('baseline', 'restore-15')}
|
||||
ids = [[0, 1, 2, 3, 4, 8], [1, 0, 6, 8]]
|
||||
gold, scores = score_gold_answers(outputs, ids, [3, 2], Embedding(weights))
|
||||
self.assertEqual(gold, [[3, 4, 8], [6, 8]])
|
||||
for label, hidden in outputs.items():
|
||||
logp = (hidden @ weights.T).log_softmax(-1)
|
||||
expected = ([logp[0, 2, 3], logp[0, 3, 4], logp[0, 4, 8]],
|
||||
[logp[1, 1, 6], logp[1, 2, 8]])
|
||||
for row, answer in zip(scores, expected):
|
||||
torch.testing.assert_close(torch.tensor(row[label]), torch.stack(answer))
|
||||
|
||||
def test_diagnostic_tie_rule_and_wrong_assignment_control(self):
|
||||
rows = paired_questions('diagnostic', 2, 72501)
|
||||
protocol = {'splits': {'diagnostic': rows}, 'rank_budget': [32, 40, 48]}
|
||||
with tempfile.TemporaryDirectory() as folder:
|
||||
directory = Path(folder)
|
||||
for label, correct in [('baseline', 0), ('restore-15', 1),
|
||||
('restore-19', 3), ('restore-23', 1)]:
|
||||
data = [{'id': x['id'], 'gold': x['answer'],
|
||||
'arms': {label: {'correct': i < correct}}} for i, x in enumerate(rows)]
|
||||
(directory/(label+'.json')).write_text(json.dumps(data))
|
||||
_, ranks = assignments(protocol, directory)
|
||||
self.assertEqual(ranks['allocated'], {19: 48, 15: 40, 23: 32})
|
||||
self.assertEqual(ranks['reversed'], {19: 32, 15: 40, 23: 48})
|
||||
|
||||
def test_local_control_is_insensitive_to_donor_with_equal_parameter_count(self):
|
||||
config = {'hidden_size': 8, 'num_attention_heads': 4, 'num_key_value_heads': 2,
|
||||
'rope_parameters': {'rope_theta': 10000, 'partial_rotary_factor': 0.25}}
|
||||
allocated = dict(zip(SITES, (32, 40, 48)))
|
||||
local = make_adapters(config, allocated, False)
|
||||
uniform = make_adapters(config, dict.fromkeys(SITES, 40), True)
|
||||
def count(adapters):
|
||||
return sum(p.numel() for a in adapters.values() for p in a.parameters())
|
||||
self.assertEqual(count(local), count(uniform))
|
||||
h = torch.randn(1, 3, 8)
|
||||
donor = torch.randn(1, 4, 3, 3)
|
||||
pos = torch.arange(3)[None, :]
|
||||
a = local[15]
|
||||
torch.testing.assert_close(a(h, donor, pos), a(h, donor * 5 + 2, pos))
|
||||
@@ -0,0 +1,66 @@
|
||||
"""Check answer-only metrics and isolate recovery from newly lost items."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
import unittest
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from torch.nn import functional as F
|
||||
|
||||
from crossqkv.lisa_effect_answer_audit import vocabulary_scores
|
||||
from crossqkv.lisa_effect_audit import MODES, full_vocab_metrics, loss_delta, paired
|
||||
from tests.test_lisa_tail import Tensor
|
||||
|
||||
|
||||
class EffectAuditTests(unittest.TestCase):
|
||||
def test_loss_interval_uses_paired_differences(self):
|
||||
direct = np.array([0.5, 1.0, 4.0, 9.0])
|
||||
result = loss_delta(direct - 0.25, direct)
|
||||
self.assertEqual(result, {'mean_delta': -0.25,
|
||||
'paired_prompt_bootstrap_95': [-0.25, -0.25]})
|
||||
|
||||
def test_full_vocab_compares_each_recipient_schedule_to_matched_direct(self):
|
||||
mapped = ('native', 'linear', 'direct_chain', 'lisa_chain', 'lisa_answer_weighted',
|
||||
'direct_23', 'lisa_23_ablation')
|
||||
payload = {'candidate_sites': [19, 23], 'single_lisa_is_ablation_of_joint_checkpoint': True,
|
||||
'arms': {}}
|
||||
for name in mapped:
|
||||
correct = name not in ('direct_chain', 'direct_23')
|
||||
payload['arms'][name] = {
|
||||
'n': 1, 'full_vocab_correct': int(correct), 'four_choice_correct': 1,
|
||||
'full_vocab_nll': 0.25 if correct else 2.0,
|
||||
'rows': [{'id': 'test-a', 'gold_id': 3, 'greedy_id': 3 if correct else 4,
|
||||
'choice_id': 3, 'nll': 0.25 if correct else 2.0}],
|
||||
}
|
||||
choices = {name: np.array([True]) for name in MODES}
|
||||
with TemporaryDirectory() as scratch:
|
||||
path = Path(scratch) / 'answers.json'
|
||||
path.write_text(json.dumps(payload))
|
||||
measured = full_vocab_metrics(path, [('test-a', 0)], [19, 23], choices)
|
||||
comparisons = measured['matched_direct_comparisons']
|
||||
self.assertEqual(comparisons['lisa_chain']['baseline'], 'direct_chain')
|
||||
self.assertEqual(comparisons['lisa_23_ablation']['baseline'], 'direct_23')
|
||||
self.assertEqual(comparisons['lisa_chain']['rescued'], 1)
|
||||
self.assertEqual(comparisons['lisa_chain']['answer_nll_delta']['mean_delta'], -1.75)
|
||||
choices['lisa'] = np.array([False])
|
||||
with self.assertRaisesRegex(ValueError, 'lisa_chain choices differ'):
|
||||
full_vocab_metrics(path, [('test-a', 0)], [19, 23], choices)
|
||||
|
||||
def test_paired_rescue_excludes_natively_wrong_items(self):
|
||||
native, direct, candidate = (np.array(x, dtype=bool) for x in
|
||||
[(1, 1, 1, 0), (0, 0, 1, 1), (1, 0, 0, 1)])
|
||||
result = paired(native, direct, candidate)
|
||||
self.assertEqual(result['native_correct_lost_by_direct'], 2)
|
||||
self.assertEqual(result['rescued'], 1)
|
||||
self.assertEqual(result['newly_lost_among_native_and_direct_correct'], 1)
|
||||
self.assertEqual(result['accuracy_delta_vs_direct'], 0)
|
||||
|
||||
def test_streamed_answer_scores_match_full_reference(self):
|
||||
g = torch.Generator().manual_seed(9)
|
||||
h, w = torch.randn(4, 6, generator=g), torch.randn(1033, 6, generator=g)
|
||||
target = torch.tensor([2, 1032, 22, 1024])
|
||||
actual, loss = vocabulary_scores(h, target, Tensor(w.numpy()))
|
||||
logits = F.linear(h, w)
|
||||
torch.testing.assert_close(actual, logits.argmax(-1))
|
||||
torch.testing.assert_close(loss, F.cross_entropy(logits, target, reduction='none'))
|
||||
@@ -0,0 +1,62 @@
|
||||
"""Check exact epoch resume through the actual LiSA training entry point."""
|
||||
import json
|
||||
from pathlib import Path
|
||||
from tempfile import TemporaryDirectory
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
|
||||
from crossqkv.lisa_effect import train
|
||||
from functional.model import PREFIX
|
||||
from functional.reference_check import ArrayLM
|
||||
from tests.test_lisa_tail import Tensor
|
||||
|
||||
|
||||
class TrainingResumeTests(unittest.TestCase):
|
||||
def test_checkpoint_resume_preserves_all_selected_outputs(self):
|
||||
rng = np.random.default_rng(22)
|
||||
|
||||
def rand(shape):
|
||||
return (.13*rng.standard_normal(shape)).astype('f4')
|
||||
|
||||
torch.set_num_threads(1)
|
||||
c = {'rms_norm_eps': 1e-6, 'layer_types': ['full_attention'], 'hidden_size': 8,
|
||||
'num_attention_heads': 2, 'num_key_value_heads': 1, 'head_dim': 8,
|
||||
'rope_parameters': {'rope_theta': 10000., 'partial_rotary_factor': .5}}
|
||||
shapes = {'input_layernorm': (8,), 'post_attention_layernorm': (8,),
|
||||
'self_attn.q_proj': (32, 8), 'self_attn.k_proj': (8, 8),
|
||||
'self_attn.v_proj': (8, 8), 'self_attn.o_proj': (8, 16),
|
||||
'self_attn.q_norm': (8,), 'self_attn.k_norm': (8,),
|
||||
'mlp.gate_proj': (13, 8), 'mlp.up_proj': (13, 8), 'mlp.down_proj': (8, 13)}
|
||||
weights = {f'layers.0.{k}.weight': rand(v) for k, v in shapes.items()}
|
||||
weights.update({'embed_tokens.weight': rand((12,8)), 'norm.weight': rand((8,))})
|
||||
model = ArrayLM(weights, c)
|
||||
model.tensors = {PREFIX+k: Tensor(v) for k,v in weights.items()}
|
||||
with TemporaryDirectory() as directory:
|
||||
p = Path(directory)
|
||||
cache, out = p/'cache', p/'out'
|
||||
cache.mkdir()
|
||||
out.mkdir()
|
||||
(p/'model_config.json').write_text(json.dumps(c))
|
||||
(cache/'selection.json').write_text(json.dumps({'sites':[0], 'task':'fixture',
|
||||
'source_sha256':{}}))
|
||||
labels = np.arange(1, 5, dtype=np.int64)
|
||||
for split, count in [('fit',12), ('validation',12), ('test',32)]:
|
||||
for i in range(0, count, 4):
|
||||
ids = rng.integers(1, 12, size=(4, 4))
|
||||
gold = rng.integers(0, 4, size=4)
|
||||
ids[:, -1] = labels[gold]
|
||||
expected, _ = model.forward(ids)
|
||||
np.savez(cache/f'{split}-{i:03}.npz', ids=ids, lengths=np.full(4,4),
|
||||
labels=labels, gold=gold, residual=model.embedding(ids),
|
||||
donor=rand((4,2,4,4)), expected=expected,
|
||||
names=[f'{split}-{k}' for k in range(i,i+4)])
|
||||
with patch('functional.model.StreamingLM', return_value=model), patch('builtins.print'):
|
||||
train(p, cache, out, 1)
|
||||
before = (out/'test-items.json').read_bytes()
|
||||
lines = (out/'trace.json').read_bytes()
|
||||
train(p, cache, out, 1, resume=True)
|
||||
self.assertEqual(before, (out/'test-items.json').read_bytes())
|
||||
self.assertEqual(lines, (out/'trace.json').read_bytes())
|
||||
@@ -0,0 +1,53 @@
|
||||
"""Prove shared-prefix replay matches the original replicated-batch screen."""
|
||||
import unittest
|
||||
|
||||
import numpy as np
|
||||
from tokenizers import Tokenizer
|
||||
from tokenizers.models import WordLevel
|
||||
from tokenizers.pre_tokenizers import Whitespace
|
||||
|
||||
from crossqkv.lisa_effect_screen import MODES, ScreeningModel, evaluate, problems
|
||||
from functional.model import PREFIX
|
||||
from functional.reference_check import ArrayLM
|
||||
|
||||
|
||||
class ArrayTensor:
|
||||
def __init__(self, values):
|
||||
self.raw = values
|
||||
self.shape = values.shape
|
||||
self.dtype = 'F32'
|
||||
|
||||
def evict(self):
|
||||
pass
|
||||
|
||||
|
||||
class TinyScreen(ScreeningModel, ArrayLM):
|
||||
pass
|
||||
|
||||
|
||||
class ScreenTests(unittest.TestCase):
|
||||
def test_replay_preserves_all_three_arms(self):
|
||||
rng = np.random.default_rng(11)
|
||||
cfg = {'rms_norm_eps': 1e-6, 'layer_types': ['full_attention']*24,
|
||||
'num_attention_heads': 2, 'num_key_value_heads': 1, 'head_dim': 8,
|
||||
'rope_parameters': {'rope_theta': 10000., 'partial_rotary_factor': .5}}
|
||||
rand = lambda shape: (.12*rng.standard_normal(shape)).astype('f4')
|
||||
weights = {'norm.weight': rand((8,)), 'embed_tokens.weight': rand((15, 8))}
|
||||
shapes = {'input_layernorm': (8,), 'post_attention_layernorm': (8,),
|
||||
'self_attn.q_proj': (32, 8), 'self_attn.k_proj': (8, 8),
|
||||
'self_attn.v_proj': (8, 8), 'self_attn.o_proj': (8, 16),
|
||||
'self_attn.q_norm': (8,), 'self_attn.k_norm': (8,),
|
||||
'mlp.gate_proj': (13, 8), 'mlp.up_proj': (13, 8), 'mlp.down_proj': (8, 13)}
|
||||
weights.update({f'layers.{i}.{k}.weight': rand(v) for i in range(24) for k,v in shapes.items()})
|
||||
model = TinyScreen(weights, cfg)
|
||||
model.tensors = {PREFIX+k: ArrayTensor(v) for k,v in weights.items()}
|
||||
tok = Tokenizer(WordLevel({'[UNK]': 0, **{str(i): i for i in range(1, 10)}}, unk_token='[UNK]'))
|
||||
tok.pre_tokenizer = Whitespace()
|
||||
examples = problems('screen', 2)
|
||||
originals = evaluate(model, tok, examples)
|
||||
model.reuse_prefix = True
|
||||
replay = evaluate(model, tok, examples)
|
||||
for orig, new in zip(originals, replay):
|
||||
for key in MODES:
|
||||
np.testing.assert_allclose(orig['scores'][key]['logits'],
|
||||
new['scores'][key]['logits'], atol=1e-6)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user