Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .pytest_cache/README.md +8 -0
- results/ppl_rescore_20260923/pythia-1b/lm1b/mdlm_sdtt/steps_1.json +31 -0
- results/smoke/samples/owt/duo/steps_1/upstream_hydra/.hydra/config.yaml +151 -0
- results/smoke/samples/owt/duo/steps_1/upstream_hydra/.hydra/hydra.yaml +181 -0
- results/smoke/samples/owt/duo/steps_16/stderr.log +10 -0
- results/smoke/samples/owt/duo/steps_16/upstream_hydra/dlb_pinned_upstream_main.log +5 -0
- results/smoke/samples/owt/duo/steps_32/stdout.log +173 -0
- results/smoke/samples/owt/duo/steps_4/run_metadata.json +78 -0
- results/smoke/samples/owt/duo/steps_4/stdout.log +173 -0
- results/smoke/samples/owt/duo_dcd/steps_1/upstream_token_ids.json +0 -0
- results/smoke/samples/owt/flm/steps_1/upstream_token_ids.json +0 -0
- results/smoke/samples/owt/flm/steps_1024/upstream_hydra/.hydra/hydra.yaml +182 -0
- results/smoke/samples/owt/flm/steps_32/upstream_hydra/.hydra/hydra.yaml +182 -0
- results/smoke/samples/owt/fmlm/steps_16/request.json +90 -0
- results/smoke/samples/owt/fmlm/steps_4/upstream_token_ids.json +0 -0
- results/smoke/samples/owt/fmlm/steps_8/conversion_metadata.json +31 -0
- results/smoke/samples/owt/langflow/steps_2/stdout.log +0 -0
- results/smoke/samples/owt/langflow/steps_32/stdout.log +0 -0
- results/smoke/samples/owt/langflow/steps_4/stdout.log +0 -0
- results/smoke/samples/owt/langflow/steps_8/stdout.log +0 -0
- results/smoke/samples/owt/mdlm_di4c/steps_4/request.json +99 -0
- results/smoke/samples/owt/mdlm_di4c/steps_4/stderr.log +9 -0
- results/smoke/samples/owt/mdlm_sdtt/steps_1/conversion_metadata.json +30 -0
- results/smoke/samples/owt/mdlm_sdtt/steps_1/stderr.log +1 -0
- results/smoke/samples/owt/mdlm_sdtt/steps_32/samples.jsonl +1 -0
- results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstream_hydra/.hydra/config.yaml +151 -0
- results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstream_hydra/config_tree.txt +169 -0
- results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstream_hydra/dlb_pinned_upstream_main.log +4 -0
- results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_2/upstream_hydra/.hydra/overrides.yaml +19 -0
- results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_32/upstream_hydra/.hydra/overrides.yaml +19 -0
- results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_32/upstream_hydra/dlb_pinned_upstream_main.log +4 -0
- results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_4/upstream_hydra/config_tree.txt +169 -0
- results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_8/upstream_hydra/config_tree.txt +169 -0
- scripts/aggregate_results.py +43 -0
- scripts/audit_elf_inputs.py +115 -0
- scripts/benchmark_4gpu.sh +48 -0
- scripts/benchmark_conditional_4gpu.sh +48 -0
- scripts/benchmark_conditional_all.sh +46 -0
- scripts/benchmark_one.sh +66 -0
- scripts/distill/di4c.sh +8 -0
- scripts/distill/fmlm.sh +8 -0
- scripts/elf_common.py +131 -0
- scripts/evaluate_4gpu.sh +48 -0
- scripts/evaluate_all.sh +47 -0
- scripts/evaluate_conditional_4gpu.sh +48 -0
- scripts/evaluate_elf.py +154 -0
- scripts/evaluate_elf_owt_baseline.py +175 -0
- scripts/fetch_checkpoints.py +67 -0
- scripts/fetch_data.py +201 -0
- scripts/inspect_elf_progress.py +84 -0
.pytest_cache/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# pytest cache directory #
|
| 2 |
+
|
| 3 |
+
This directory contains data from the pytest's cache plugin,
|
| 4 |
+
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
|
| 5 |
+
|
| 6 |
+
**Do not** commit this to version control.
|
| 7 |
+
|
| 8 |
+
See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
|
results/ppl_rescore_20260923/pythia-1b/lm1b/mdlm_sdtt/steps_1.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"dataset": "lm1b",
|
| 3 |
+
"evaluation": "independent_unconditional_ppl_rescore",
|
| 4 |
+
"generative_perplexity": {
|
| 5 |
+
"aggregation": "sum_nll_over_sum_valid_next_tokens",
|
| 6 |
+
"batch_size": 8,
|
| 7 |
+
"context_length": 1024,
|
| 8 |
+
"forward_dtype": "float32",
|
| 9 |
+
"loss_dtype": "float32",
|
| 10 |
+
"model_id": "EleutherAI/pythia-1b",
|
| 11 |
+
"model_revision": "f73d7dcc545c8bd326d8559c8ef84ffe92fea6b2",
|
| 12 |
+
"model_snapshot": "/home/ruizzhao/.cache/huggingface/hub/models--EleutherAI--pythia-1b/snapshots/f73d7dcc545c8bd326d8559c8ef84ffe92fea6b2",
|
| 13 |
+
"offline_scoring": true,
|
| 14 |
+
"perplexity": 919.9931469085786,
|
| 15 |
+
"sample_count": 1024,
|
| 16 |
+
"tokenizer_id": "EleutherAI/pythia-1b",
|
| 17 |
+
"tokenizer_revision": "f73d7dcc545c8bd326d8559c8ef84ffe92fea6b2",
|
| 18 |
+
"tokenizer_snapshot": "/home/ruizzhao/.cache/huggingface/hub/models--EleutherAI--pythia-1b/snapshots/f73d7dcc545c8bd326d8559c8ef84ffe92fea6b2",
|
| 19 |
+
"torch_version": "2.8.0+cu128",
|
| 20 |
+
"total_nll": 987205.9931640625,
|
| 21 |
+
"transformers_version": "4.57.1",
|
| 22 |
+
"truncation": "right",
|
| 23 |
+
"valid_token_count": 144659
|
| 24 |
+
},
|
| 25 |
+
"generator": "mdlm_sdtt",
|
| 26 |
+
"sample_count": 1024,
|
| 27 |
+
"samples": "/home/ruizzhao/diffusion_baseline/results/samples/lm1b/mdlm_sdtt/steps_1/samples.jsonl",
|
| 28 |
+
"samples_sha256": "67edbe5a58df7c44186d924dd2d50a8e78397b546c1412fe8bf9efe6a7c246ab",
|
| 29 |
+
"schema_version": 1,
|
| 30 |
+
"steps": 1
|
| 31 |
+
}
|
results/smoke/samples/owt/duo/steps_1/upstream_hydra/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
mode: sample_eval
|
| 2 |
+
seed: 42
|
| 3 |
+
loader:
|
| 4 |
+
global_batch_size: 512
|
| 5 |
+
eval_global_batch_size: ${.global_batch_size}
|
| 6 |
+
batch_size: 2
|
| 7 |
+
eval_batch_size: 8
|
| 8 |
+
num_workers: ${eval:"len(__import__('os').sched_getaffinity(0))"}
|
| 9 |
+
pin_memory: true
|
| 10 |
+
sampling:
|
| 11 |
+
predictor: ancestral
|
| 12 |
+
steps: 1
|
| 13 |
+
noise_removal: ancestral
|
| 14 |
+
use_float64: true
|
| 15 |
+
p_nucleus: 1.0
|
| 16 |
+
num_sample_batches: 1
|
| 17 |
+
num_sample_log: 2
|
| 18 |
+
semi_ar: false
|
| 19 |
+
stride_length: 1
|
| 20 |
+
num_strides: 1
|
| 21 |
+
guid_weight: null
|
| 22 |
+
psi:
|
| 23 |
+
time_profile: linear
|
| 24 |
+
high_mode: pure-posterior
|
| 25 |
+
middle_mode: pure-posterior
|
| 26 |
+
low_mode: pure-posterior
|
| 27 |
+
high_frac: 0.2
|
| 28 |
+
middle_frac: 0.6
|
| 29 |
+
training:
|
| 30 |
+
ema: 0.9999
|
| 31 |
+
antithetic_sampling: true
|
| 32 |
+
importance_sampling: false
|
| 33 |
+
sampling_eps: 0.001
|
| 34 |
+
change_of_variables: false
|
| 35 |
+
loss_precision: bf16
|
| 36 |
+
finetune_path: ''
|
| 37 |
+
class_dropout_p: 0.1
|
| 38 |
+
eval:
|
| 39 |
+
checkpoint_path: /home/ruizzhao/diffusion_baseline/checkpoints/official/duo/owt
|
| 40 |
+
disable_ema: false
|
| 41 |
+
compute_generative_perplexity: false
|
| 42 |
+
perplexity_batch_size: 8
|
| 43 |
+
compute_perplexity_on_sanity: false
|
| 44 |
+
gen_ppl_eval_model_name_or_path: gpt2-large
|
| 45 |
+
generate_samples: true
|
| 46 |
+
generated_samples_path: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_1/upstream_samples.json
|
| 47 |
+
optim:
|
| 48 |
+
weight_decay: 0
|
| 49 |
+
lr: 0.0003
|
| 50 |
+
beta1: 0.9
|
| 51 |
+
beta2: 0.999
|
| 52 |
+
eps: 1.0e-08
|
| 53 |
+
trainer:
|
| 54 |
+
_target_: lightning.Trainer
|
| 55 |
+
accelerator: cuda
|
| 56 |
+
num_nodes: 1
|
| 57 |
+
devices: 1
|
| 58 |
+
accumulate_grad_batches: ${div_up:${loader.global_batch_size}, ${eval:${trainer.devices}
|
| 59 |
+
* ${loader.batch_size} * ${trainer.num_nodes}}}
|
| 60 |
+
gradient_clip_val: 1.0
|
| 61 |
+
precision: bf16
|
| 62 |
+
num_sanity_val_steps: 2
|
| 63 |
+
max_steps: 1000000
|
| 64 |
+
log_every_n_steps: 100
|
| 65 |
+
limit_train_batches: 1.0
|
| 66 |
+
limit_val_batches: 1.0
|
| 67 |
+
val_check_interval: 5000
|
| 68 |
+
check_val_every_n_epoch: null
|
| 69 |
+
wandb:
|
| 70 |
+
project: duo
|
| 71 |
+
group: null
|
| 72 |
+
job_type: null
|
| 73 |
+
name: null
|
| 74 |
+
id: ${.name}_${seed}
|
| 75 |
+
tags:
|
| 76 |
+
- ${noise.type}
|
| 77 |
+
- ${data.train}
|
| 78 |
+
- ${data.valid}
|
| 79 |
+
- ${algo.name}
|
| 80 |
+
offline: true
|
| 81 |
+
checkpointing:
|
| 82 |
+
save_dir: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_1/upstream_hydra
|
| 83 |
+
resume_from_ckpt: true
|
| 84 |
+
resume_ckpt_path: ${.save_dir}/checkpoints/last.ckpt
|
| 85 |
+
callbacks:
|
| 86 |
+
checkpoint_every_n_steps:
|
| 87 |
+
_target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 88 |
+
save_top_k: -1
|
| 89 |
+
save_last: true
|
| 90 |
+
dirpath: ${checkpointing.save_dir}/checkpoints
|
| 91 |
+
verbose: true
|
| 92 |
+
auto_insert_metric_name: false
|
| 93 |
+
every_n_train_steps: 500
|
| 94 |
+
checkpoint_monitor:
|
| 95 |
+
_target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 96 |
+
monitor: val/nll
|
| 97 |
+
mode: min
|
| 98 |
+
save_top_k: 1
|
| 99 |
+
save_last: false
|
| 100 |
+
dirpath: ${checkpointing.save_dir}/checkpoints
|
| 101 |
+
filename: best
|
| 102 |
+
auto_insert_metric_name: false
|
| 103 |
+
verbose: true
|
| 104 |
+
learning_rate_monitor:
|
| 105 |
+
_target_: lightning.pytorch.callbacks.LearningRateMonitor
|
| 106 |
+
logging_interval: step
|
| 107 |
+
data:
|
| 108 |
+
train: openwebtext-train
|
| 109 |
+
valid: openwebtext-valid
|
| 110 |
+
modality: text
|
| 111 |
+
tokenizer_name_or_path: gpt2
|
| 112 |
+
cache_dir: /share/kuleshov/ssahoo/textdiffusion/data
|
| 113 |
+
wrap: true
|
| 114 |
+
streaming: false
|
| 115 |
+
insert_train_eos: true
|
| 116 |
+
insert_valid_eos: true
|
| 117 |
+
model:
|
| 118 |
+
name: small
|
| 119 |
+
type: ddit
|
| 120 |
+
hidden_size: 768
|
| 121 |
+
cond_dim: 128
|
| 122 |
+
length: 1024
|
| 123 |
+
n_blocks: 12
|
| 124 |
+
n_heads: 12
|
| 125 |
+
scale_by_sigma: true
|
| 126 |
+
dropout: 0.1
|
| 127 |
+
tie_word_embeddings: false
|
| 128 |
+
vocab_lookup: true
|
| 129 |
+
strategy:
|
| 130 |
+
_target_: lightning.pytorch.strategies.DDPStrategy
|
| 131 |
+
find_unused_parameters: false
|
| 132 |
+
noise:
|
| 133 |
+
type: log-linear
|
| 134 |
+
eps: 0.001
|
| 135 |
+
lr_scheduler:
|
| 136 |
+
_target_: transformers.get_constant_schedule_with_warmup
|
| 137 |
+
num_warmup_steps: 2500
|
| 138 |
+
prior:
|
| 139 |
+
type: none
|
| 140 |
+
latent_width: 0
|
| 141 |
+
latent_height: 0
|
| 142 |
+
algo:
|
| 143 |
+
name: duo_base
|
| 144 |
+
backbone: hf_dit
|
| 145 |
+
parameterization: mean
|
| 146 |
+
time_conditioning: true
|
| 147 |
+
T: 0
|
| 148 |
+
subs_masking: false
|
| 149 |
+
causal_attention: false
|
| 150 |
+
ignore_bos: false
|
| 151 |
+
loss_type: elbo
|
results/smoke/samples/owt/duo/steps_1/upstream_hydra/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_1/upstream_hydra
|
| 4 |
+
sweep:
|
| 5 |
+
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
simple:
|
| 72 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 73 |
+
handlers:
|
| 74 |
+
console:
|
| 75 |
+
class: logging.StreamHandler
|
| 76 |
+
formatter: simple
|
| 77 |
+
stream: ext://sys.stdout
|
| 78 |
+
root:
|
| 79 |
+
level: INFO
|
| 80 |
+
handlers:
|
| 81 |
+
- console
|
| 82 |
+
loggers:
|
| 83 |
+
logging_example:
|
| 84 |
+
level: DEBUG
|
| 85 |
+
disable_existing_loggers: false
|
| 86 |
+
job_logging:
|
| 87 |
+
version: 1
|
| 88 |
+
formatters:
|
| 89 |
+
simple:
|
| 90 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 91 |
+
handlers:
|
| 92 |
+
console:
|
| 93 |
+
class: logging.StreamHandler
|
| 94 |
+
formatter: simple
|
| 95 |
+
stream: ext://sys.stdout
|
| 96 |
+
file:
|
| 97 |
+
class: logging.FileHandler
|
| 98 |
+
formatter: simple
|
| 99 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 100 |
+
root:
|
| 101 |
+
level: INFO
|
| 102 |
+
handlers:
|
| 103 |
+
- console
|
| 104 |
+
- file
|
| 105 |
+
disable_existing_loggers: false
|
| 106 |
+
env: {}
|
| 107 |
+
mode: RUN
|
| 108 |
+
searchpath: []
|
| 109 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.run.dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_1/upstream_hydra
|
| 114 |
+
- hydra.mode=RUN
|
| 115 |
+
task:
|
| 116 |
+
- mode=sample_eval
|
| 117 |
+
- seed=42
|
| 118 |
+
- data=openwebtext-split
|
| 119 |
+
- model=small
|
| 120 |
+
- model.length=1024
|
| 121 |
+
- loader.batch_size=2
|
| 122 |
+
- loader.eval_batch_size=8
|
| 123 |
+
- sampling.num_sample_batches=1
|
| 124 |
+
- sampling.steps=1
|
| 125 |
+
- eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/official/duo/owt
|
| 126 |
+
- trainer.devices=1
|
| 127 |
+
- checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_1/upstream_hydra
|
| 128 |
+
- +wandb.offline=true
|
| 129 |
+
- eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_1/upstream_samples.json
|
| 130 |
+
- algo=duo_base
|
| 131 |
+
- algo.backbone=hf_dit
|
| 132 |
+
- sampling.predictor=ancestral
|
| 133 |
+
- sampling.noise_removal=ancestral
|
| 134 |
+
- eval.disable_ema=False
|
| 135 |
+
job:
|
| 136 |
+
name: dlb_pinned_upstream_main
|
| 137 |
+
chdir: true
|
| 138 |
+
override_dirname: +wandb.offline=true,algo.backbone=hf_dit,algo=duo_base,checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_1/upstream_hydra,data=openwebtext-split,eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/official/duo/owt,eval.disable_ema=False,eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_1/upstream_samples.json,loader.batch_size=2,loader.eval_batch_size=8,mode=sample_eval,model.length=1024,model=small,sampling.noise_removal=ancestral,sampling.num_sample_batches=1,sampling.predictor=ancestral,sampling.steps=1,seed=42,trainer.devices=1
|
| 139 |
+
id: ???
|
| 140 |
+
num: ???
|
| 141 |
+
config_name: config
|
| 142 |
+
env_set: {}
|
| 143 |
+
env_copy: []
|
| 144 |
+
config:
|
| 145 |
+
override_dirname:
|
| 146 |
+
kv_sep: '='
|
| 147 |
+
item_sep: ','
|
| 148 |
+
exclude_keys: []
|
| 149 |
+
runtime:
|
| 150 |
+
version: 1.3.2
|
| 151 |
+
version_base: '1.3'
|
| 152 |
+
cwd: /home/ruizzhao/diffusion_baseline
|
| 153 |
+
config_sources:
|
| 154 |
+
- path: hydra.conf
|
| 155 |
+
schema: pkg
|
| 156 |
+
provider: hydra
|
| 157 |
+
- path: /home/ruizzhao/diffusion_baseline/upstreams/duo/configs
|
| 158 |
+
schema: file
|
| 159 |
+
provider: main
|
| 160 |
+
- path: ''
|
| 161 |
+
schema: structured
|
| 162 |
+
provider: schema
|
| 163 |
+
output_dir: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_1/upstream_hydra
|
| 164 |
+
choices:
|
| 165 |
+
algo: duo_base
|
| 166 |
+
prior: none
|
| 167 |
+
lr_scheduler: constant_warmup
|
| 168 |
+
noise: log-linear
|
| 169 |
+
strategy: ddp
|
| 170 |
+
model: small
|
| 171 |
+
data: openwebtext-split
|
| 172 |
+
hydra/env: default
|
| 173 |
+
hydra/callbacks: null
|
| 174 |
+
hydra/job_logging: default
|
| 175 |
+
hydra/hydra_logging: default
|
| 176 |
+
hydra/hydra_help: default
|
| 177 |
+
hydra/help: default
|
| 178 |
+
hydra/sweeper: basic
|
| 179 |
+
hydra/launcher: basic
|
| 180 |
+
hydra/output: default
|
| 181 |
+
verbose: false
|
results/smoke/samples/owt/duo/steps_16/stderr.log
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 0 |
0%| | 0/1 [00:00<?, ?it/s]/home/ruizzhao/.cache/huggingface/modules/transformers_modules/owt/model.py:544: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Seed set to 42
|
| 2 |
+
/opt/anaconda3/envs/dlb-duo/lib/python3.12/site-packages/huggingface_hub/file_download.py:949: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
|
| 3 |
+
warnings.warn(
|
| 4 |
+
|
| 5 |
0%| | 0/1 [00:00<?, ?it/s]/home/ruizzhao/.cache/huggingface/modules/transformers_modules/owt/model.py:544: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
|
| 6 |
+
with torch.cuda.amp.autocast(
|
| 7 |
+
/home/ruizzhao/.cache/huggingface/modules/transformers_modules/owt/model.py:161: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
|
| 8 |
+
with torch.cuda.amp.autocast(enabled=False):
|
| 9 |
+
/home/ruizzhao/.cache/huggingface/modules/transformers_modules/owt/model.py:116: FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.
|
| 10 |
+
with torch.cuda.amp.autocast(enabled=False):
|
| 11 |
+
|
results/smoke/samples/owt/duo/steps_16/upstream_hydra/dlb_pinned_upstream_main.log
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[2026-08-03 13:01:15,779][dlb_pinned_upstream_main][INFO] - Starting Sample Eval.
|
| 2 |
+
[2026-08-03 14:44:17,673][dlb_pinned_upstream_main][INFO] - Starting Sample Eval.
|
| 3 |
+
[2026-08-03 14:44:30,781][dlb_pinned_upstream_main][INFO] - Generative perplexity: 121.81356048583984
|
| 4 |
+
[2026-08-03 14:44:30,781][dlb_pinned_upstream_main][INFO] - Sample entropy: 5.549579620361328
|
| 5 |
+
[2026-08-03 14:44:30,782][dlb_pinned_upstream_main][INFO] - Samples saved at: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_16/upstream_samples.json
|
results/smoke/samples/owt/duo/steps_32/stdout.log
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CONFIG
|
| 2 |
+
├── mode
|
| 3 |
+
│ └── sample_eval
|
| 4 |
+
├── seed
|
| 5 |
+
│ └── 42
|
| 6 |
+
├── loader
|
| 7 |
+
│ └── global_batch_size: 512
|
| 8 |
+
│ eval_global_batch_size: 512
|
| 9 |
+
│ batch_size: 2
|
| 10 |
+
│ eval_batch_size: 8
|
| 11 |
+
│ num_workers: 512
|
| 12 |
+
│ pin_memory: true
|
| 13 |
+
│
|
| 14 |
+
├── sampling
|
| 15 |
+
│ └── predictor: ancestral
|
| 16 |
+
│ steps: 32
|
| 17 |
+
│ noise_removal: ancestral
|
| 18 |
+
│ use_float64: true
|
| 19 |
+
│ p_nucleus: 1.0
|
| 20 |
+
│ num_sample_batches: 1
|
| 21 |
+
│ num_sample_log: 2
|
| 22 |
+
│ semi_ar: false
|
| 23 |
+
│ stride_length: 1
|
| 24 |
+
│ num_strides: 1
|
| 25 |
+
│ guid_weight: null
|
| 26 |
+
│ psi:
|
| 27 |
+
│ time_profile: linear
|
| 28 |
+
│ high_mode: pure-posterior
|
| 29 |
+
│ middle_mode: pure-posterior
|
| 30 |
+
│ low_mode: pure-posterior
|
| 31 |
+
│ high_frac: 0.2
|
| 32 |
+
│ middle_frac: 0.6
|
| 33 |
+
│
|
| 34 |
+
├── training
|
| 35 |
+
│ └── ema: 0.9999
|
| 36 |
+
│ antithetic_sampling: true
|
| 37 |
+
│ importance_sampling: false
|
| 38 |
+
│ sampling_eps: 0.001
|
| 39 |
+
│ change_of_variables: false
|
| 40 |
+
│ loss_precision: bf16
|
| 41 |
+
│ finetune_path: ''
|
| 42 |
+
│ class_dropout_p: 0.1
|
| 43 |
+
│
|
| 44 |
+
├── eval
|
| 45 |
+
│ └── checkpoint_path: /home/ruizzhao/diffusion_baseline/checkpoints/official/
|
| 46 |
+
│ disable_ema: false
|
| 47 |
+
│ compute_generative_perplexity: false
|
| 48 |
+
│ perplexity_batch_size: 8
|
| 49 |
+
│ compute_perplexity_on_sanity: false
|
| 50 |
+
│ gen_ppl_eval_model_name_or_path: gpt2-large
|
| 51 |
+
│ generate_samples: true
|
| 52 |
+
│ generated_samples_path: /home/ruizzhao/diffusion_baseline/results/smoke/
|
| 53 |
+
│
|
| 54 |
+
├── optim
|
| 55 |
+
│ └── weight_decay: 0
|
| 56 |
+
│ lr: 0.0003
|
| 57 |
+
│ beta1: 0.9
|
| 58 |
+
│ beta2: 0.999
|
| 59 |
+
│ eps: 1.0e-08
|
| 60 |
+
│
|
| 61 |
+
├── trainer
|
| 62 |
+
│ └── _target_: lightning.Trainer
|
| 63 |
+
│ accelerator: cuda
|
| 64 |
+
│ num_nodes: 1
|
| 65 |
+
│ devices: 1
|
| 66 |
+
│ accumulate_grad_batches: 256
|
| 67 |
+
│ gradient_clip_val: 1.0
|
| 68 |
+
│ precision: bf16
|
| 69 |
+
│ num_sanity_val_steps: 2
|
| 70 |
+
│ max_steps: 1000000
|
| 71 |
+
│ log_every_n_steps: 100
|
| 72 |
+
│ limit_train_batches: 1.0
|
| 73 |
+
│ limit_val_batches: 1.0
|
| 74 |
+
│ val_check_interval: 5000
|
| 75 |
+
│ check_val_every_n_epoch: null
|
| 76 |
+
│
|
| 77 |
+
├── wandb
|
| 78 |
+
│ └── project: duo
|
| 79 |
+
│ group: null
|
| 80 |
+
│ job_type: null
|
| 81 |
+
│ name: null
|
| 82 |
+
│ id: None_42
|
| 83 |
+
│ tags:
|
| 84 |
+
│ - log-linear
|
| 85 |
+
│ - openwebtext-train
|
| 86 |
+
│ - openwebtext-valid
|
| 87 |
+
│ - duo_base
|
| 88 |
+
│ offline: true
|
| 89 |
+
│
|
| 90 |
+
├── checkpointing
|
| 91 |
+
│ └── save_dir: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/du
|
| 92 |
+
│ resume_from_ckpt: true
|
| 93 |
+
│ resume_ckpt_path: /home/ruizzhao/diffusion_baseline/results/smoke/sample
|
| 94 |
+
│
|
| 95 |
+
├── callbacks
|
| 96 |
+
│ └── checkpoint_every_n_steps:
|
| 97 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 98 |
+
│ save_top_k: -1
|
| 99 |
+
│ save_last: true
|
| 100 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/d
|
| 101 |
+
│ verbose: true
|
| 102 |
+
│ auto_insert_metric_name: false
|
| 103 |
+
│ every_n_train_steps: 500
|
| 104 |
+
│ checkpoint_monitor:
|
| 105 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 106 |
+
│ monitor: val/nll
|
| 107 |
+
│ mode: min
|
| 108 |
+
│ save_top_k: 1
|
| 109 |
+
│ save_last: false
|
| 110 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/d
|
| 111 |
+
│ filename: best
|
| 112 |
+
│ auto_insert_metric_name: false
|
| 113 |
+
│ verbose: true
|
| 114 |
+
│ learning_rate_monitor:
|
| 115 |
+
│ _target_: lightning.pytorch.callbacks.LearningRateMonitor
|
| 116 |
+
│ logging_interval: step
|
| 117 |
+
│
|
| 118 |
+
├── data
|
| 119 |
+
│ └── train: openwebtext-train
|
| 120 |
+
│ valid: openwebtext-valid
|
| 121 |
+
│ modality: text
|
| 122 |
+
│ tokenizer_name_or_path: gpt2
|
| 123 |
+
│ cache_dir: /share/kuleshov/ssahoo/textdiffusion/data
|
| 124 |
+
│ wrap: true
|
| 125 |
+
│ streaming: false
|
| 126 |
+
│ insert_train_eos: true
|
| 127 |
+
│ insert_valid_eos: true
|
| 128 |
+
│
|
| 129 |
+
├── model
|
| 130 |
+
│ └── name: small
|
| 131 |
+
│ type: ddit
|
| 132 |
+
│ hidden_size: 768
|
| 133 |
+
│ cond_dim: 128
|
| 134 |
+
│ length: 1024
|
| 135 |
+
│ n_blocks: 12
|
| 136 |
+
│ n_heads: 12
|
| 137 |
+
│ scale_by_sigma: true
|
| 138 |
+
│ dropout: 0.1
|
| 139 |
+
│ tie_word_embeddings: false
|
| 140 |
+
│ vocab_lookup: true
|
| 141 |
+
│
|
| 142 |
+
├── strategy
|
| 143 |
+
│ └── _target_: lightning.pytorch.strategies.DDPStrategy
|
| 144 |
+
│ find_unused_parameters: false
|
| 145 |
+
│
|
| 146 |
+
├── noise
|
| 147 |
+
│ └── type: log-linear
|
| 148 |
+
│ eps: 0.001
|
| 149 |
+
│
|
| 150 |
+
├── lr_scheduler
|
| 151 |
+
│ └── _target_: transformers.get_constant_schedule_with_warmup
|
| 152 |
+
│ num_warmup_steps: 2500
|
| 153 |
+
│
|
| 154 |
+
├── prior
|
| 155 |
+
│ └── type: none
|
| 156 |
+
│ latent_width: 0
|
| 157 |
+
│ latent_height: 0
|
| 158 |
+
│
|
| 159 |
+
└── algo
|
| 160 |
+
└── name: duo_base
|
| 161 |
+
backbone: hf_dit
|
| 162 |
+
parameterization: mean
|
| 163 |
+
time_conditioning: true
|
| 164 |
+
T: 0
|
| 165 |
+
subs_masking: false
|
| 166 |
+
causal_attention: false
|
| 167 |
+
ignore_bos: false
|
| 168 |
+
loss_type: elbo
|
| 169 |
+
|
| 170 |
+
[2026-08-03 14:44:19,355][dlb_pinned_upstream_main][INFO] - Starting Sample Eval.
|
| 171 |
+
[2026-08-03 14:44:31,543][dlb_pinned_upstream_main][INFO] - Generative perplexity: 107.36914825439453
|
| 172 |
+
[2026-08-03 14:44:31,543][dlb_pinned_upstream_main][INFO] - Sample entropy: 5.563689231872559
|
| 173 |
+
[2026-08-03 14:44:31,544][dlb_pinned_upstream_main][INFO] - Samples saved at: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_32/upstream_samples.json
|
results/smoke/samples/owt/duo/steps_4/run_metadata.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"checkpoint_lock_id": "duo_owt_hf:3549a2eff7c0b0ccceca8d69a22baf7795fd9843fa9fcad41a8ddc186b9892f0:all",
|
| 3 |
+
"checkpoint_selection": {
|
| 4 |
+
"path": null,
|
| 5 |
+
"resource": "duo_owt_hf",
|
| 6 |
+
"teacher_family": null
|
| 7 |
+
},
|
| 8 |
+
"checkpoint_sha256": "d6f9b8ea4d06bad6be60d8c3a49284af44f3b38e9bc03b351c6c371239809785",
|
| 9 |
+
"checkpoint_teacher_family": "uniform_duo",
|
| 10 |
+
"command": [
|
| 11 |
+
"/opt/anaconda3/envs/dlb-duo/bin/python",
|
| 12 |
+
"-u",
|
| 13 |
+
"-m",
|
| 14 |
+
"dlb.adapters.capture",
|
| 15 |
+
"--upstream-entrypoint=/home/ruizzhao/diffusion_baseline/upstreams/duo/main.py",
|
| 16 |
+
"--capture-path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_4/upstream_token_ids.json",
|
| 17 |
+
"--",
|
| 18 |
+
"mode=sample_eval",
|
| 19 |
+
"seed=42",
|
| 20 |
+
"data=openwebtext-split",
|
| 21 |
+
"model=small",
|
| 22 |
+
"model.length=1024",
|
| 23 |
+
"loader.batch_size=2",
|
| 24 |
+
"loader.eval_batch_size=8",
|
| 25 |
+
"sampling.num_sample_batches=1",
|
| 26 |
+
"sampling.steps=4",
|
| 27 |
+
"eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/official/duo/owt",
|
| 28 |
+
"trainer.devices=1",
|
| 29 |
+
"hydra.run.dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_4/upstream_hydra",
|
| 30 |
+
"checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_4/upstream_hydra",
|
| 31 |
+
"+wandb.offline=true",
|
| 32 |
+
"eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_4/upstream_samples.json",
|
| 33 |
+
"algo=duo_base",
|
| 34 |
+
"algo.backbone=hf_dit",
|
| 35 |
+
"sampling.predictor=ancestral",
|
| 36 |
+
"sampling.noise_removal=ancestral",
|
| 37 |
+
"eval.disable_ema=False"
|
| 38 |
+
],
|
| 39 |
+
"command_sha256": "11bb394e43fb812713407e65c81d7aa7829faf782c5ac2cf73488ff11c6f0062",
|
| 40 |
+
"config_sha256": "206d75b3b7cf3fb35844c053ae552537d7471b93bf29756dafc1ac616b096994",
|
| 41 |
+
"environment": {
|
| 42 |
+
"cuda_version": null,
|
| 43 |
+
"cuda_visible_devices": "3",
|
| 44 |
+
"hostname": "DS210029",
|
| 45 |
+
"platform": "Linux-5.15.0-186-generic-x86_64-with-glibc2.35",
|
| 46 |
+
"python": "3.12.13",
|
| 47 |
+
"torch_version": "2.5.1"
|
| 48 |
+
},
|
| 49 |
+
"finished_at": "2026-08-03T06:44:14.789407Z",
|
| 50 |
+
"identity": {
|
| 51 |
+
"adapter_identity": "dlb.adapters.duo:v1|dlb.adapters.duo:DuoAdapter|8878182eb10d7d1e3f18219cb62c2153084842fdb0ab532b1a3c7df0e10da3c6",
|
| 52 |
+
"checkpoint_lock_id": "duo_owt_hf:3549a2eff7c0b0ccceca8d69a22baf7795fd9843fa9fcad41a8ddc186b9892f0:all",
|
| 53 |
+
"checkpoint_selection": {
|
| 54 |
+
"path": null,
|
| 55 |
+
"resource": "duo_owt_hf",
|
| 56 |
+
"teacher_family": null
|
| 57 |
+
},
|
| 58 |
+
"checkpoint_sha256": "d6f9b8ea4d06bad6be60d8c3a49284af44f3b38e9bc03b351c6c371239809785",
|
| 59 |
+
"checkpoint_teacher_family": "uniform_duo",
|
| 60 |
+
"command_sha256": "11bb394e43fb812713407e65c81d7aa7829faf782c5ac2cf73488ff11c6f0062",
|
| 61 |
+
"config_sha256": "206d75b3b7cf3fb35844c053ae552537d7471b93bf29756dafc1ac616b096994",
|
| 62 |
+
"dataset_id": "owt",
|
| 63 |
+
"device": null,
|
| 64 |
+
"environment": "dlb-duo",
|
| 65 |
+
"model_id": "duo",
|
| 66 |
+
"results_root": "/home/ruizzhao/diffusion_baseline/results/smoke",
|
| 67 |
+
"run_id": "duo-owt-steps-4",
|
| 68 |
+
"sample_count": 1,
|
| 69 |
+
"seed": 42,
|
| 70 |
+
"source_sha256": "7c9b498f5b717de064d6fad7e2509c866e6cb620",
|
| 71 |
+
"step_count": 4
|
| 72 |
+
},
|
| 73 |
+
"source_sha256": "7c9b498f5b717de064d6fad7e2509c866e6cb620",
|
| 74 |
+
"started_at": "2026-08-03T06:44:02.198538Z",
|
| 75 |
+
"status": "succeeded",
|
| 76 |
+
"stderr_log": "/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_4/stderr.log",
|
| 77 |
+
"stdout_log": "/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_4/stdout.log"
|
| 78 |
+
}
|
results/smoke/samples/owt/duo/steps_4/stdout.log
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CONFIG
|
| 2 |
+
├── mode
|
| 3 |
+
│ └── sample_eval
|
| 4 |
+
├── seed
|
| 5 |
+
│ └── 42
|
| 6 |
+
├── loader
|
| 7 |
+
│ └── global_batch_size: 512
|
| 8 |
+
│ eval_global_batch_size: 512
|
| 9 |
+
│ batch_size: 2
|
| 10 |
+
│ eval_batch_size: 8
|
| 11 |
+
│ num_workers: 512
|
| 12 |
+
│ pin_memory: true
|
| 13 |
+
│
|
| 14 |
+
├── sampling
|
| 15 |
+
│ └── predictor: ancestral
|
| 16 |
+
│ steps: 4
|
| 17 |
+
│ noise_removal: ancestral
|
| 18 |
+
│ use_float64: true
|
| 19 |
+
│ p_nucleus: 1.0
|
| 20 |
+
│ num_sample_batches: 1
|
| 21 |
+
│ num_sample_log: 2
|
| 22 |
+
│ semi_ar: false
|
| 23 |
+
│ stride_length: 1
|
| 24 |
+
│ num_strides: 1
|
| 25 |
+
│ guid_weight: null
|
| 26 |
+
│ psi:
|
| 27 |
+
│ time_profile: linear
|
| 28 |
+
│ high_mode: pure-posterior
|
| 29 |
+
│ middle_mode: pure-posterior
|
| 30 |
+
│ low_mode: pure-posterior
|
| 31 |
+
│ high_frac: 0.2
|
| 32 |
+
│ middle_frac: 0.6
|
| 33 |
+
│
|
| 34 |
+
├── training
|
| 35 |
+
│ └── ema: 0.9999
|
| 36 |
+
│ antithetic_sampling: true
|
| 37 |
+
│ importance_sampling: false
|
| 38 |
+
│ sampling_eps: 0.001
|
| 39 |
+
│ change_of_variables: false
|
| 40 |
+
│ loss_precision: bf16
|
| 41 |
+
│ finetune_path: ''
|
| 42 |
+
│ class_dropout_p: 0.1
|
| 43 |
+
│
|
| 44 |
+
├── eval
|
| 45 |
+
│ └── checkpoint_path: /home/ruizzhao/diffusion_baseline/checkpoints/official/
|
| 46 |
+
│ disable_ema: false
|
| 47 |
+
│ compute_generative_perplexity: false
|
| 48 |
+
│ perplexity_batch_size: 8
|
| 49 |
+
│ compute_perplexity_on_sanity: false
|
| 50 |
+
│ gen_ppl_eval_model_name_or_path: gpt2-large
|
| 51 |
+
│ generate_samples: true
|
| 52 |
+
│ generated_samples_path: /home/ruizzhao/diffusion_baseline/results/smoke/
|
| 53 |
+
│
|
| 54 |
+
├── optim
|
| 55 |
+
│ └── weight_decay: 0
|
| 56 |
+
│ lr: 0.0003
|
| 57 |
+
│ beta1: 0.9
|
| 58 |
+
│ beta2: 0.999
|
| 59 |
+
│ eps: 1.0e-08
|
| 60 |
+
│
|
| 61 |
+
├── trainer
|
| 62 |
+
│ └── _target_: lightning.Trainer
|
| 63 |
+
│ accelerator: cuda
|
| 64 |
+
│ num_nodes: 1
|
| 65 |
+
│ devices: 1
|
| 66 |
+
│ accumulate_grad_batches: 256
|
| 67 |
+
│ gradient_clip_val: 1.0
|
| 68 |
+
│ precision: bf16
|
| 69 |
+
│ num_sanity_val_steps: 2
|
| 70 |
+
│ max_steps: 1000000
|
| 71 |
+
│ log_every_n_steps: 100
|
| 72 |
+
│ limit_train_batches: 1.0
|
| 73 |
+
│ limit_val_batches: 1.0
|
| 74 |
+
│ val_check_interval: 5000
|
| 75 |
+
│ check_val_every_n_epoch: null
|
| 76 |
+
│
|
| 77 |
+
├── wandb
|
| 78 |
+
│ └── project: duo
|
| 79 |
+
│ group: null
|
| 80 |
+
│ job_type: null
|
| 81 |
+
│ name: null
|
| 82 |
+
│ id: None_42
|
| 83 |
+
│ tags:
|
| 84 |
+
│ - log-linear
|
| 85 |
+
│ - openwebtext-train
|
| 86 |
+
│ - openwebtext-valid
|
| 87 |
+
│ - duo_base
|
| 88 |
+
│ offline: true
|
| 89 |
+
│
|
| 90 |
+
├── checkpointing
|
| 91 |
+
│ └── save_dir: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/du
|
| 92 |
+
│ resume_from_ckpt: true
|
| 93 |
+
│ resume_ckpt_path: /home/ruizzhao/diffusion_baseline/results/smoke/sample
|
| 94 |
+
│
|
| 95 |
+
├── callbacks
|
| 96 |
+
│ └── checkpoint_every_n_steps:
|
| 97 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 98 |
+
│ save_top_k: -1
|
| 99 |
+
│ save_last: true
|
| 100 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/d
|
| 101 |
+
│ verbose: true
|
| 102 |
+
│ auto_insert_metric_name: false
|
| 103 |
+
│ every_n_train_steps: 500
|
| 104 |
+
│ checkpoint_monitor:
|
| 105 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 106 |
+
│ monitor: val/nll
|
| 107 |
+
│ mode: min
|
| 108 |
+
│ save_top_k: 1
|
| 109 |
+
│ save_last: false
|
| 110 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/d
|
| 111 |
+
│ filename: best
|
| 112 |
+
│ auto_insert_metric_name: false
|
| 113 |
+
│ verbose: true
|
| 114 |
+
│ learning_rate_monitor:
|
| 115 |
+
│ _target_: lightning.pytorch.callbacks.LearningRateMonitor
|
| 116 |
+
│ logging_interval: step
|
| 117 |
+
│
|
| 118 |
+
├── data
|
| 119 |
+
│ └── train: openwebtext-train
|
| 120 |
+
│ valid: openwebtext-valid
|
| 121 |
+
│ modality: text
|
| 122 |
+
│ tokenizer_name_or_path: gpt2
|
| 123 |
+
│ cache_dir: /share/kuleshov/ssahoo/textdiffusion/data
|
| 124 |
+
│ wrap: true
|
| 125 |
+
│ streaming: false
|
| 126 |
+
│ insert_train_eos: true
|
| 127 |
+
│ insert_valid_eos: true
|
| 128 |
+
│
|
| 129 |
+
├── model
|
| 130 |
+
│ └── name: small
|
| 131 |
+
│ type: ddit
|
| 132 |
+
│ hidden_size: 768
|
| 133 |
+
│ cond_dim: 128
|
| 134 |
+
│ length: 1024
|
| 135 |
+
│ n_blocks: 12
|
| 136 |
+
│ n_heads: 12
|
| 137 |
+
│ scale_by_sigma: true
|
| 138 |
+
│ dropout: 0.1
|
| 139 |
+
│ tie_word_embeddings: false
|
| 140 |
+
│ vocab_lookup: true
|
| 141 |
+
│
|
| 142 |
+
├── strategy
|
| 143 |
+
│ └── _target_: lightning.pytorch.strategies.DDPStrategy
|
| 144 |
+
│ find_unused_parameters: false
|
| 145 |
+
│
|
| 146 |
+
├── noise
|
| 147 |
+
│ └── type: log-linear
|
| 148 |
+
│ eps: 0.001
|
| 149 |
+
│
|
| 150 |
+
├── lr_scheduler
|
| 151 |
+
│ └── _target_: transformers.get_constant_schedule_with_warmup
|
| 152 |
+
│ num_warmup_steps: 2500
|
| 153 |
+
│
|
| 154 |
+
├── prior
|
| 155 |
+
│ └── type: none
|
| 156 |
+
│ latent_width: 0
|
| 157 |
+
│ latent_height: 0
|
| 158 |
+
│
|
| 159 |
+
└── algo
|
| 160 |
+
└── name: duo_base
|
| 161 |
+
backbone: hf_dit
|
| 162 |
+
parameterization: mean
|
| 163 |
+
time_conditioning: true
|
| 164 |
+
T: 0
|
| 165 |
+
subs_masking: false
|
| 166 |
+
causal_attention: false
|
| 167 |
+
ignore_bos: false
|
| 168 |
+
loss_type: elbo
|
| 169 |
+
|
| 170 |
+
[2026-08-03 14:44:05,887][dlb_pinned_upstream_main][INFO] - Starting Sample Eval.
|
| 171 |
+
[2026-08-03 14:44:13,672][dlb_pinned_upstream_main][INFO] - Generative perplexity: 496.36834716796875
|
| 172 |
+
[2026-08-03 14:44:13,672][dlb_pinned_upstream_main][INFO] - Sample entropy: 5.506994724273682
|
| 173 |
+
[2026-08-03 14:44:13,673][dlb_pinned_upstream_main][INFO] - Samples saved at: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/duo/steps_4/upstream_samples.json
|
results/smoke/samples/owt/duo_dcd/steps_1/upstream_token_ids.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/smoke/samples/owt/flm/steps_1/upstream_token_ids.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/smoke/samples/owt/flm/steps_1024/upstream_hydra/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_1024/upstream_hydra
|
| 4 |
+
sweep:
|
| 5 |
+
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
simple:
|
| 72 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 73 |
+
handlers:
|
| 74 |
+
console:
|
| 75 |
+
class: logging.StreamHandler
|
| 76 |
+
formatter: simple
|
| 77 |
+
stream: ext://sys.stdout
|
| 78 |
+
root:
|
| 79 |
+
level: INFO
|
| 80 |
+
handlers:
|
| 81 |
+
- console
|
| 82 |
+
loggers:
|
| 83 |
+
logging_example:
|
| 84 |
+
level: DEBUG
|
| 85 |
+
disable_existing_loggers: false
|
| 86 |
+
job_logging:
|
| 87 |
+
version: 1
|
| 88 |
+
formatters:
|
| 89 |
+
simple:
|
| 90 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 91 |
+
handlers:
|
| 92 |
+
console:
|
| 93 |
+
class: logging.StreamHandler
|
| 94 |
+
formatter: simple
|
| 95 |
+
stream: ext://sys.stdout
|
| 96 |
+
file:
|
| 97 |
+
class: logging.FileHandler
|
| 98 |
+
formatter: simple
|
| 99 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 100 |
+
root:
|
| 101 |
+
level: INFO
|
| 102 |
+
handlers:
|
| 103 |
+
- console
|
| 104 |
+
- file
|
| 105 |
+
disable_existing_loggers: false
|
| 106 |
+
env: {}
|
| 107 |
+
mode: RUN
|
| 108 |
+
searchpath: []
|
| 109 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.run.dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_1024/upstream_hydra
|
| 114 |
+
- hydra.mode=RUN
|
| 115 |
+
task:
|
| 116 |
+
- mode=sample_eval
|
| 117 |
+
- seed=42
|
| 118 |
+
- data=openwebtext-split
|
| 119 |
+
- model=small
|
| 120 |
+
- model.length=1024
|
| 121 |
+
- loader.batch_size=2
|
| 122 |
+
- loader.eval_batch_size=16
|
| 123 |
+
- sampling.num_sample_batches=1
|
| 124 |
+
- sampling.steps=1024
|
| 125 |
+
- eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/official/flm_ckpt/owt/owt_flm.ckpt
|
| 126 |
+
- trainer.devices=1
|
| 127 |
+
- checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_1024/upstream_hydra
|
| 128 |
+
- +wandb.offline=true
|
| 129 |
+
- eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_1024/upstream_samples.json
|
| 130 |
+
- algo=flm
|
| 131 |
+
- algo.backbone=dit
|
| 132 |
+
- eval.disable_ema=False
|
| 133 |
+
- sampling.solver=euler
|
| 134 |
+
- algo.double_temb=False
|
| 135 |
+
- sampling.gamma=0.0
|
| 136 |
+
job:
|
| 137 |
+
name: dlb_pinned_upstream_main
|
| 138 |
+
chdir: true
|
| 139 |
+
override_dirname: +wandb.offline=true,algo.backbone=dit,algo.double_temb=False,algo=flm,checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_1024/upstream_hydra,data=openwebtext-split,eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/official/flm_ckpt/owt/owt_flm.ckpt,eval.disable_ema=False,eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_1024/upstream_samples.json,loader.batch_size=2,loader.eval_batch_size=16,mode=sample_eval,model.length=1024,model=small,sampling.gamma=0.0,sampling.num_sample_batches=1,sampling.solver=euler,sampling.steps=1024,seed=42,trainer.devices=1
|
| 140 |
+
id: ???
|
| 141 |
+
num: ???
|
| 142 |
+
config_name: config
|
| 143 |
+
env_set: {}
|
| 144 |
+
env_copy: []
|
| 145 |
+
config:
|
| 146 |
+
override_dirname:
|
| 147 |
+
kv_sep: '='
|
| 148 |
+
item_sep: ','
|
| 149 |
+
exclude_keys: []
|
| 150 |
+
runtime:
|
| 151 |
+
version: 1.3.2
|
| 152 |
+
version_base: '1.3'
|
| 153 |
+
cwd: /home/ruizzhao/diffusion_baseline
|
| 154 |
+
config_sources:
|
| 155 |
+
- path: hydra.conf
|
| 156 |
+
schema: pkg
|
| 157 |
+
provider: hydra
|
| 158 |
+
- path: /home/ruizzhao/diffusion_baseline/upstreams/flm/configs
|
| 159 |
+
schema: file
|
| 160 |
+
provider: main
|
| 161 |
+
- path: ''
|
| 162 |
+
schema: structured
|
| 163 |
+
provider: schema
|
| 164 |
+
output_dir: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_1024/upstream_hydra
|
| 165 |
+
choices:
|
| 166 |
+
algo: flm
|
| 167 |
+
prior: none
|
| 168 |
+
lr_scheduler: constant_warmup
|
| 169 |
+
noise: log-linear
|
| 170 |
+
strategy: ddp
|
| 171 |
+
model: small
|
| 172 |
+
data: openwebtext-split
|
| 173 |
+
hydra/env: default
|
| 174 |
+
hydra/callbacks: null
|
| 175 |
+
hydra/job_logging: default
|
| 176 |
+
hydra/hydra_logging: default
|
| 177 |
+
hydra/hydra_help: default
|
| 178 |
+
hydra/help: default
|
| 179 |
+
hydra/sweeper: basic
|
| 180 |
+
hydra/launcher: basic
|
| 181 |
+
hydra/output: default
|
| 182 |
+
verbose: false
|
results/smoke/samples/owt/flm/steps_32/upstream_hydra/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_32/upstream_hydra
|
| 4 |
+
sweep:
|
| 5 |
+
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
simple:
|
| 72 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 73 |
+
handlers:
|
| 74 |
+
console:
|
| 75 |
+
class: logging.StreamHandler
|
| 76 |
+
formatter: simple
|
| 77 |
+
stream: ext://sys.stdout
|
| 78 |
+
root:
|
| 79 |
+
level: INFO
|
| 80 |
+
handlers:
|
| 81 |
+
- console
|
| 82 |
+
loggers:
|
| 83 |
+
logging_example:
|
| 84 |
+
level: DEBUG
|
| 85 |
+
disable_existing_loggers: false
|
| 86 |
+
job_logging:
|
| 87 |
+
version: 1
|
| 88 |
+
formatters:
|
| 89 |
+
simple:
|
| 90 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 91 |
+
handlers:
|
| 92 |
+
console:
|
| 93 |
+
class: logging.StreamHandler
|
| 94 |
+
formatter: simple
|
| 95 |
+
stream: ext://sys.stdout
|
| 96 |
+
file:
|
| 97 |
+
class: logging.FileHandler
|
| 98 |
+
formatter: simple
|
| 99 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 100 |
+
root:
|
| 101 |
+
level: INFO
|
| 102 |
+
handlers:
|
| 103 |
+
- console
|
| 104 |
+
- file
|
| 105 |
+
disable_existing_loggers: false
|
| 106 |
+
env: {}
|
| 107 |
+
mode: RUN
|
| 108 |
+
searchpath: []
|
| 109 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.run.dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_32/upstream_hydra
|
| 114 |
+
- hydra.mode=RUN
|
| 115 |
+
task:
|
| 116 |
+
- mode=sample_eval
|
| 117 |
+
- seed=42
|
| 118 |
+
- data=openwebtext-split
|
| 119 |
+
- model=small
|
| 120 |
+
- model.length=1024
|
| 121 |
+
- loader.batch_size=2
|
| 122 |
+
- loader.eval_batch_size=16
|
| 123 |
+
- sampling.num_sample_batches=1
|
| 124 |
+
- sampling.steps=32
|
| 125 |
+
- eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/official/flm_ckpt/owt/owt_flm.ckpt
|
| 126 |
+
- trainer.devices=1
|
| 127 |
+
- checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_32/upstream_hydra
|
| 128 |
+
- +wandb.offline=true
|
| 129 |
+
- eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_32/upstream_samples.json
|
| 130 |
+
- algo=flm
|
| 131 |
+
- algo.backbone=dit
|
| 132 |
+
- eval.disable_ema=False
|
| 133 |
+
- sampling.solver=euler
|
| 134 |
+
- algo.double_temb=False
|
| 135 |
+
- sampling.gamma=0.0
|
| 136 |
+
job:
|
| 137 |
+
name: dlb_pinned_upstream_main
|
| 138 |
+
chdir: true
|
| 139 |
+
override_dirname: +wandb.offline=true,algo.backbone=dit,algo.double_temb=False,algo=flm,checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_32/upstream_hydra,data=openwebtext-split,eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/official/flm_ckpt/owt/owt_flm.ckpt,eval.disable_ema=False,eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_32/upstream_samples.json,loader.batch_size=2,loader.eval_batch_size=16,mode=sample_eval,model.length=1024,model=small,sampling.gamma=0.0,sampling.num_sample_batches=1,sampling.solver=euler,sampling.steps=32,seed=42,trainer.devices=1
|
| 140 |
+
id: ???
|
| 141 |
+
num: ???
|
| 142 |
+
config_name: config
|
| 143 |
+
env_set: {}
|
| 144 |
+
env_copy: []
|
| 145 |
+
config:
|
| 146 |
+
override_dirname:
|
| 147 |
+
kv_sep: '='
|
| 148 |
+
item_sep: ','
|
| 149 |
+
exclude_keys: []
|
| 150 |
+
runtime:
|
| 151 |
+
version: 1.3.2
|
| 152 |
+
version_base: '1.3'
|
| 153 |
+
cwd: /home/ruizzhao/diffusion_baseline
|
| 154 |
+
config_sources:
|
| 155 |
+
- path: hydra.conf
|
| 156 |
+
schema: pkg
|
| 157 |
+
provider: hydra
|
| 158 |
+
- path: /home/ruizzhao/diffusion_baseline/upstreams/flm/configs
|
| 159 |
+
schema: file
|
| 160 |
+
provider: main
|
| 161 |
+
- path: ''
|
| 162 |
+
schema: structured
|
| 163 |
+
provider: schema
|
| 164 |
+
output_dir: /home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/flm/steps_32/upstream_hydra
|
| 165 |
+
choices:
|
| 166 |
+
algo: flm
|
| 167 |
+
prior: none
|
| 168 |
+
lr_scheduler: constant_warmup
|
| 169 |
+
noise: log-linear
|
| 170 |
+
strategy: ddp
|
| 171 |
+
model: small
|
| 172 |
+
data: openwebtext-split
|
| 173 |
+
hydra/env: default
|
| 174 |
+
hydra/callbacks: null
|
| 175 |
+
hydra/job_logging: default
|
| 176 |
+
hydra/hydra_logging: default
|
| 177 |
+
hydra/hydra_help: default
|
| 178 |
+
hydra/help: default
|
| 179 |
+
hydra/sweeper: basic
|
| 180 |
+
hydra/launcher: basic
|
| 181 |
+
hydra/output: default
|
| 182 |
+
verbose: false
|
results/smoke/samples/owt/fmlm/steps_16/request.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"command": [
|
| 3 |
+
"/opt/anaconda3/envs/dlb-flm/bin/python",
|
| 4 |
+
"-u",
|
| 5 |
+
"-m",
|
| 6 |
+
"dlb.adapters.capture",
|
| 7 |
+
"--upstream-entrypoint=/home/ruizzhao/diffusion_baseline/upstreams/flm/main.py",
|
| 8 |
+
"--capture-path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/fmlm/steps_16/upstream_token_ids.json",
|
| 9 |
+
"--",
|
| 10 |
+
"mode=sample_eval",
|
| 11 |
+
"seed=42",
|
| 12 |
+
"data=openwebtext-split",
|
| 13 |
+
"model=small",
|
| 14 |
+
"model.length=1024",
|
| 15 |
+
"loader.batch_size=2",
|
| 16 |
+
"loader.eval_batch_size=16",
|
| 17 |
+
"sampling.num_sample_batches=1",
|
| 18 |
+
"sampling.steps=16",
|
| 19 |
+
"eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/official/fmlm_ckpt/owt/owt_fmlm.ckpt",
|
| 20 |
+
"trainer.devices=1",
|
| 21 |
+
"hydra.run.dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/fmlm/steps_16/upstream_hydra",
|
| 22 |
+
"checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/fmlm/steps_16/upstream_hydra",
|
| 23 |
+
"+wandb.offline=true",
|
| 24 |
+
"eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/fmlm/steps_16/upstream_samples.json",
|
| 25 |
+
"algo=fmlm",
|
| 26 |
+
"algo.backbone=dit",
|
| 27 |
+
"eval.disable_ema=False",
|
| 28 |
+
"sampling.solver=euler",
|
| 29 |
+
"algo.double_temb=True",
|
| 30 |
+
"algo.learnable_loss_weighting=False",
|
| 31 |
+
"sampling.gamma=1.0"
|
| 32 |
+
],
|
| 33 |
+
"identity": {
|
| 34 |
+
"adapter_identity": "dlb.adapters.flm:v2|dlb.adapters.flm:FLMAdapter|c3a6a4573200fecf38a47fc6e7bc78254ca362fff3b96079dc2efa9f8e27aff0",
|
| 35 |
+
"checkpoint_lock_id": "recipe:fmlm_owt_official_ckpt:3549a2eff7c0b0ccceca8d69a22baf7795fd9843fa9fcad41a8ddc186b9892f0",
|
| 36 |
+
"checkpoint_selection": {
|
| 37 |
+
"output": "checkpoints/official/fmlm_ckpt/owt",
|
| 38 |
+
"recipe": "fmlm_owt_official_ckpt",
|
| 39 |
+
"sampling_checkpoint": "owt_fmlm.ckpt",
|
| 40 |
+
"sampling_config": null,
|
| 41 |
+
"source": "flm",
|
| 42 |
+
"source_commit": "a1918d5164e5038e37d0b7a4fb2010ce75b863b3",
|
| 43 |
+
"teacher_adapter": null,
|
| 44 |
+
"teacher_family": "continuous_flm"
|
| 45 |
+
},
|
| 46 |
+
"checkpoint_sha256": "a5ca77b77a26dec9746f627858d42c19803d11c1e932dcf14a3ce80f6bbbbd76",
|
| 47 |
+
"checkpoint_teacher_family": "continuous_flm",
|
| 48 |
+
"command_sha256": "d13885d4326c17c9ddd2fe9519ba33c45253f2eeb28a811ebaa44f7af1fa5632",
|
| 49 |
+
"config_sha256": "206d75b3b7cf3fb35844c053ae552537d7471b93bf29756dafc1ac616b096994",
|
| 50 |
+
"dataset_id": "owt",
|
| 51 |
+
"device": null,
|
| 52 |
+
"environment": "dlb-flm",
|
| 53 |
+
"model_id": "fmlm",
|
| 54 |
+
"results_root": "/home/ruizzhao/diffusion_baseline/results/smoke",
|
| 55 |
+
"run_id": "fmlm-owt-steps-16",
|
| 56 |
+
"sample_count": 1,
|
| 57 |
+
"seed": 42,
|
| 58 |
+
"source_sha256": "a1918d5164e5038e37d0b7a4fb2010ce75b863b3",
|
| 59 |
+
"step_count": 16
|
| 60 |
+
},
|
| 61 |
+
"request": {
|
| 62 |
+
"adapter_identity": "dlb.adapters.flm:v2|dlb.adapters.flm:FLMAdapter|c3a6a4573200fecf38a47fc6e7bc78254ca362fff3b96079dc2efa9f8e27aff0",
|
| 63 |
+
"checkpoint_lock_id": "recipe:fmlm_owt_official_ckpt:3549a2eff7c0b0ccceca8d69a22baf7795fd9843fa9fcad41a8ddc186b9892f0",
|
| 64 |
+
"checkpoint_selection": {
|
| 65 |
+
"output": "checkpoints/official/fmlm_ckpt/owt",
|
| 66 |
+
"recipe": "fmlm_owt_official_ckpt",
|
| 67 |
+
"sampling_checkpoint": "owt_fmlm.ckpt",
|
| 68 |
+
"sampling_config": null,
|
| 69 |
+
"source": "flm",
|
| 70 |
+
"source_commit": "a1918d5164e5038e37d0b7a4fb2010ce75b863b3",
|
| 71 |
+
"teacher_adapter": null,
|
| 72 |
+
"teacher_family": "continuous_flm"
|
| 73 |
+
},
|
| 74 |
+
"checkpoint_sha256": "a5ca77b77a26dec9746f627858d42c19803d11c1e932dcf14a3ce80f6bbbbd76",
|
| 75 |
+
"checkpoint_teacher_family": "continuous_flm",
|
| 76 |
+
"command": null,
|
| 77 |
+
"config_sha256": "206d75b3b7cf3fb35844c053ae552537d7471b93bf29756dafc1ac616b096994",
|
| 78 |
+
"dataset_id": "owt",
|
| 79 |
+
"device": null,
|
| 80 |
+
"environment": "dlb-flm",
|
| 81 |
+
"model_id": "fmlm",
|
| 82 |
+
"results_root": "/home/ruizzhao/diffusion_baseline/results/smoke",
|
| 83 |
+
"run_id": "fmlm-owt-steps-16",
|
| 84 |
+
"sample_count": 1,
|
| 85 |
+
"seed": 42,
|
| 86 |
+
"source_sha256": "a1918d5164e5038e37d0b7a4fb2010ce75b863b3",
|
| 87 |
+
"step_count": 16
|
| 88 |
+
},
|
| 89 |
+
"started_at": "2026-08-03T06:48:06.847669Z"
|
| 90 |
+
}
|
results/smoke/samples/owt/fmlm/steps_4/upstream_token_ids.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
results/smoke/samples/owt/fmlm/steps_8/conversion_metadata.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"checkpoint_lock_id": "recipe:fmlm_owt_official_ckpt:3549a2eff7c0b0ccceca8d69a22baf7795fd9843fa9fcad41a8ddc186b9892f0",
|
| 3 |
+
"checkpoint_selection": {
|
| 4 |
+
"output": "checkpoints/official/fmlm_ckpt/owt",
|
| 5 |
+
"recipe": "fmlm_owt_official_ckpt",
|
| 6 |
+
"sampling_checkpoint": "owt_fmlm.ckpt",
|
| 7 |
+
"sampling_config": null,
|
| 8 |
+
"source": "flm",
|
| 9 |
+
"source_commit": "a1918d5164e5038e37d0b7a4fb2010ce75b863b3",
|
| 10 |
+
"teacher_adapter": null,
|
| 11 |
+
"teacher_family": "continuous_flm"
|
| 12 |
+
},
|
| 13 |
+
"checkpoint_sha256": "a5ca77b77a26dec9746f627858d42c19803d11c1e932dcf14a3ce80f6bbbbd76",
|
| 14 |
+
"exclude_from_latency": true,
|
| 15 |
+
"format": "upstream-generated-seqs-v1",
|
| 16 |
+
"generated_samples": 16,
|
| 17 |
+
"generation_seconds_sentinel": 0.0,
|
| 18 |
+
"generation_seconds_source": "unavailable_excluded_sentinel",
|
| 19 |
+
"requested_samples": 1,
|
| 20 |
+
"teacher_family": "continuous_flm",
|
| 21 |
+
"token_ids_source": "upstream",
|
| 22 |
+
"token_ids_transformation": {
|
| 23 |
+
"max_length": 1024,
|
| 24 |
+
"operation": "validated_exact_length"
|
| 25 |
+
},
|
| 26 |
+
"tokenizer": "gpt2",
|
| 27 |
+
"tokenizer_revision": "607a30d783dfa663caf39e06633721c8d4cfcd7e",
|
| 28 |
+
"trim_policy": "stable_prefix",
|
| 29 |
+
"trimmed_samples": 15,
|
| 30 |
+
"upstream_output": "/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/fmlm/steps_8/upstream_samples.json"
|
| 31 |
+
}
|
results/smoke/samples/owt/langflow/steps_2/stdout.log
ADDED
|
File without changes
|
results/smoke/samples/owt/langflow/steps_32/stdout.log
ADDED
|
File without changes
|
results/smoke/samples/owt/langflow/steps_4/stdout.log
ADDED
|
File without changes
|
results/smoke/samples/owt/langflow/steps_8/stdout.log
ADDED
|
File without changes
|
results/smoke/samples/owt/mdlm_di4c/steps_4/request.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"command": [
|
| 3 |
+
"/opt/anaconda3/envs/dlb-di4c/bin/python",
|
| 4 |
+
"-B",
|
| 5 |
+
"-u",
|
| 6 |
+
"/home/ruizzhao/diffusion_baseline/adapters/sample_di4c.py",
|
| 7 |
+
"--upstream-root",
|
| 8 |
+
"/home/ruizzhao/diffusion_baseline/upstreams/di4c/sdtt",
|
| 9 |
+
"--checkpoint",
|
| 10 |
+
"/home/ruizzhao/diffusion_baseline/checkpoints/official/mdlm_di4c/owt/sdtt7-di4c2.ckpt",
|
| 11 |
+
"--config",
|
| 12 |
+
"/home/ruizzhao/diffusion_baseline/configs/sampling/di4c_mdlm_owt.yaml",
|
| 13 |
+
"--checkpoint-sha256",
|
| 14 |
+
"4af61572dc82fe012ce395a2e4e4be0585ea09076597ba1f7241ca196b97ecb0",
|
| 15 |
+
"--config-sha256",
|
| 16 |
+
"cf627f89b8dede9b25ac8e10407c3b7de203a76c4ba84100723287e571dcec34",
|
| 17 |
+
"--data-config",
|
| 18 |
+
"/home/ruizzhao/diffusion_baseline/artifacts/data.yaml",
|
| 19 |
+
"--downloads-manifest",
|
| 20 |
+
"/home/ruizzhao/diffusion_baseline/data/manifests/downloads.json",
|
| 21 |
+
"--tokenizer-snapshot",
|
| 22 |
+
"/home/ruizzhao/diffusion_baseline/data/raw/huggingface/hub/models--gpt2/snapshots/607a30d783dfa663caf39e06633721c8d4cfcd7e",
|
| 23 |
+
"--output",
|
| 24 |
+
"/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/mdlm_di4c/steps_4/upstream_token_ids.json",
|
| 25 |
+
"--sample-count",
|
| 26 |
+
"1",
|
| 27 |
+
"--batch-size",
|
| 28 |
+
"1",
|
| 29 |
+
"--num-steps",
|
| 30 |
+
"4",
|
| 31 |
+
"--seq-len",
|
| 32 |
+
"1024",
|
| 33 |
+
"--seed",
|
| 34 |
+
"42",
|
| 35 |
+
"--sampler",
|
| 36 |
+
"ancestral",
|
| 37 |
+
"--teacher-family",
|
| 38 |
+
"masked_mdlm",
|
| 39 |
+
"--dataset",
|
| 40 |
+
"owt",
|
| 41 |
+
"--offline",
|
| 42 |
+
"true"
|
| 43 |
+
],
|
| 44 |
+
"identity": {
|
| 45 |
+
"adapter_identity": "dlb.adapters.di4c:v3|dlb.adapters.di4c:Di4CAdapter|ba289424e1babd29c99b4bb95c008a934d000e1ddb9e76140f3963398bf02111",
|
| 46 |
+
"checkpoint_lock_id": "di4c_mdlm_owt_zenodo:3549a2eff7c0b0ccceca8d69a22baf7795fd9843fa9fcad41a8ddc186b9892f0:all",
|
| 47 |
+
"checkpoint_selection": {
|
| 48 |
+
"path": null,
|
| 49 |
+
"resource": "di4c_mdlm_owt_zenodo",
|
| 50 |
+
"sampling_config": "configs/sampling/di4c_mdlm_owt.yaml",
|
| 51 |
+
"sampling_config_sha256": "cf627f89b8dede9b25ac8e10407c3b7de203a76c4ba84100723287e571dcec34",
|
| 52 |
+
"sampling_config_source": "project",
|
| 53 |
+
"sampling_config_source_commit": "ac61ff9fe8e85120f9e1d2a8c5a332f8b8353dd3",
|
| 54 |
+
"teacher_family": null
|
| 55 |
+
},
|
| 56 |
+
"checkpoint_sha256": "e51269cd095bb1ed1b8771e4b5c8470d22b01fa7fa0652dce8eff18fcb064f8c",
|
| 57 |
+
"checkpoint_teacher_family": "masked_mdlm",
|
| 58 |
+
"command_sha256": "4448eae936eaa6891928f885fffd3c66db53aee4444dc9cf07ae6e2139d1863b",
|
| 59 |
+
"config_sha256": "206d75b3b7cf3fb35844c053ae552537d7471b93bf29756dafc1ac616b096994",
|
| 60 |
+
"dataset_id": "owt",
|
| 61 |
+
"device": null,
|
| 62 |
+
"environment": "dlb-di4c",
|
| 63 |
+
"model_id": "mdlm_di4c",
|
| 64 |
+
"results_root": "/home/ruizzhao/diffusion_baseline/results/smoke",
|
| 65 |
+
"run_id": "mdlm_di4c-owt-steps-4",
|
| 66 |
+
"sample_count": 1,
|
| 67 |
+
"seed": 42,
|
| 68 |
+
"source_sha256": "ac61ff9fe8e85120f9e1d2a8c5a332f8b8353dd3",
|
| 69 |
+
"step_count": 4
|
| 70 |
+
},
|
| 71 |
+
"request": {
|
| 72 |
+
"adapter_identity": "dlb.adapters.di4c:v3|dlb.adapters.di4c:Di4CAdapter|ba289424e1babd29c99b4bb95c008a934d000e1ddb9e76140f3963398bf02111",
|
| 73 |
+
"checkpoint_lock_id": "di4c_mdlm_owt_zenodo:3549a2eff7c0b0ccceca8d69a22baf7795fd9843fa9fcad41a8ddc186b9892f0:all",
|
| 74 |
+
"checkpoint_selection": {
|
| 75 |
+
"path": null,
|
| 76 |
+
"resource": "di4c_mdlm_owt_zenodo",
|
| 77 |
+
"sampling_config": "configs/sampling/di4c_mdlm_owt.yaml",
|
| 78 |
+
"sampling_config_sha256": "cf627f89b8dede9b25ac8e10407c3b7de203a76c4ba84100723287e571dcec34",
|
| 79 |
+
"sampling_config_source": "project",
|
| 80 |
+
"sampling_config_source_commit": "ac61ff9fe8e85120f9e1d2a8c5a332f8b8353dd3",
|
| 81 |
+
"teacher_family": null
|
| 82 |
+
},
|
| 83 |
+
"checkpoint_sha256": "e51269cd095bb1ed1b8771e4b5c8470d22b01fa7fa0652dce8eff18fcb064f8c",
|
| 84 |
+
"checkpoint_teacher_family": "masked_mdlm",
|
| 85 |
+
"command": null,
|
| 86 |
+
"config_sha256": "206d75b3b7cf3fb35844c053ae552537d7471b93bf29756dafc1ac616b096994",
|
| 87 |
+
"dataset_id": "owt",
|
| 88 |
+
"device": null,
|
| 89 |
+
"environment": "dlb-di4c",
|
| 90 |
+
"model_id": "mdlm_di4c",
|
| 91 |
+
"results_root": "/home/ruizzhao/diffusion_baseline/results/smoke",
|
| 92 |
+
"run_id": "mdlm_di4c-owt-steps-4",
|
| 93 |
+
"sample_count": 1,
|
| 94 |
+
"seed": 42,
|
| 95 |
+
"source_sha256": "ac61ff9fe8e85120f9e1d2a8c5a332f8b8353dd3",
|
| 96 |
+
"step_count": 4
|
| 97 |
+
},
|
| 98 |
+
"started_at": "2026-08-03T06:48:33.478108Z"
|
| 99 |
+
}
|
results/smoke/samples/owt/mdlm_di4c/steps_4/stderr.log
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/opt/anaconda3/envs/dlb-di4c/lib/python3.10/site-packages/lightning/fabric/__init__.py:41: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
|
| 2 |
+
Traceback (most recent call last):
|
| 3 |
+
File "/home/ruizzhao/diffusion_baseline/adapters/sample_di4c.py", line 124, in <module>
|
| 4 |
+
raise SystemExit(main())
|
| 5 |
+
File "/home/ruizzhao/diffusion_baseline/adapters/sample_di4c.py", line 85, in main
|
| 6 |
+
validate_embedded_config(config, embedded_config)
|
| 7 |
+
File "/home/ruizzhao/diffusion_baseline/adapters/_distilled_runtime.py", line 246, in validate_embedded_config
|
| 8 |
+
raise ValueError("Lightning checkpoint does not embed its training config")
|
| 9 |
+
ValueError: Lightning checkpoint does not embed its training config
|
results/smoke/samples/owt/mdlm_sdtt/steps_1/conversion_metadata.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"checkpoint_lock_id": "sdtt_owt_hf:3549a2eff7c0b0ccceca8d69a22baf7795fd9843fa9fcad41a8ddc186b9892f0:all",
|
| 3 |
+
"checkpoint_selection": {
|
| 4 |
+
"path": null,
|
| 5 |
+
"resource": "sdtt_owt_hf",
|
| 6 |
+
"sampling_config": "config.json",
|
| 7 |
+
"sampling_config_sha256": null,
|
| 8 |
+
"sampling_config_source": "resource",
|
| 9 |
+
"sampling_config_source_commit": null,
|
| 10 |
+
"teacher_family": null
|
| 11 |
+
},
|
| 12 |
+
"checkpoint_sha256": "79eda51b8c8e8877b750b24a2276e240eeb2fd4230f369c99d71fc33bb113628",
|
| 13 |
+
"exclude_from_latency": true,
|
| 14 |
+
"format": "dlb-upstream-token-capture-v1",
|
| 15 |
+
"generated_samples": 1,
|
| 16 |
+
"generation_seconds_sentinel": 0.0,
|
| 17 |
+
"generation_seconds_source": "unavailable_excluded_sentinel",
|
| 18 |
+
"requested_samples": 1,
|
| 19 |
+
"teacher_family": "masked_mdlm",
|
| 20 |
+
"token_ids_source": "upstream",
|
| 21 |
+
"token_ids_transformation": {
|
| 22 |
+
"max_length": 1024,
|
| 23 |
+
"operation": "validated_exact_length"
|
| 24 |
+
},
|
| 25 |
+
"tokenizer": "gpt2",
|
| 26 |
+
"tokenizer_revision": "607a30d783dfa663caf39e06633721c8d4cfcd7e",
|
| 27 |
+
"trim_policy": "none_exact_count",
|
| 28 |
+
"trimmed_samples": 0,
|
| 29 |
+
"upstream_output": "/home/ruizzhao/diffusion_baseline/results/smoke/samples/owt/mdlm_sdtt/steps_1/upstream_token_ids.json"
|
| 30 |
+
}
|
results/smoke/samples/owt/mdlm_sdtt/steps_1/stderr.log
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/opt/anaconda3/envs/dlb-sdtt/lib/python3.10/site-packages/lightning/fabric/__init__.py:41: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
|
results/smoke/samples/owt/mdlm_sdtt/steps_32/samples.jsonl
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"generation_seconds":0.0,"sample_id":0,"seed":42,"text":"<|endoftext|> to be no guarantee that we will get it when we’ve done our research. My hope is that it will work, and we can eventually coax all people in this scheme into quitting,” he says. “By then, a young family was living in Mexico, in California, and after they found a cannabis camp in Tierra, I wanted to start helping. I had worked at an agency that runs the camps on bikes, so I wanted to be based in this area to help these young people, in turn, get into work for it, and ultimately make it available to people who are not in their family in the 18th grade or too late.”\n\nJonathan Hector, 23, who lives in San Francisco, says:\n\nFor years, he’s struggled to cope now. He’s been on a study tour, and soon discovered that in many different ways, it is difficult to find a time to reflect on my personal life choices, and to try to moderate the amount thoughts I have to take in relation to my medications. Also, a lot of people find it extremely difficult to watch their choices. There is a very large group of people who are most frustrated, they want to reduce the anxiety. In particular, they are not afraid to wait for a long time before they take any medication, and they are determined to avoid taking [their] medicine. They are determined to save money and try also to minimise the anxiety. Also, because these people are living here, they’re not taking recreational activities; they are taking family-oriented activities.\n\nSometime after he was commissioned, Hector received standard marijuana treatment and he decided to stop this treatment, for the last two years, because the doctors had ordered him he was not going to because he didn’t take his medication, or this would question the duration of the treatment. But he was satisfied, and so decided to take cannabis, only to do so again in two different groups of people.\n\nThe internet class was organised, and by then, he was travelling to Mexico, where a friend of mine offered to pay him for cannabis worth of medicinal cannabis, and for the extra money he wouldn’t take traditional, herbal, or even both, cannabis. The medicinal cannabis course was planned to start once, and this involved a range of different groups of respondents, and a small number of existing interviewees, but the group was not very distinct. Instead, there were a groups made of 17 randomly named people selected by one of their ethnic groups, where the participants stayed, and adapted their personal experiences. There were some Chinese participants who preferred traditional medicinal cannabis, some Japanese preferred cannabis, and by then there was a similar pool.\n\nFrom there, 37 key respondents were asked about their participation in the course. Participants were randomly allocated to proceed as if they were male to medical cannabis, according to those by nature were the most interested in cannabis, and in the early stages of treatment, tended to take their own medications at a lower rate.However, there is on ongoing research showing that older people – most often those who are unable to take cannabinoids – spend often a lot more time in the CBD. There are also a number of people who smoked while taking cannabis, and still have high rates of the disease, and considering more of those even smoked for their own benefit than the rest. However, there is only the possibility of transitioning an older patient to cannabinoid therapy, there is also the possibility of developing new therapies for cannabinoids that patients use as well.\n\n to the United States where Turkish drug minister Akbar Barış is expected to wait for guests for the use of his CBD at Istanbul Airport, Turkey, June 16, 2015. file photo.\n\nIf these findings are published, they can be applied to a variety of other diseases, some of the most important childhood neurological diseases. Thus, they will be able to develop substantially more effective and effective cannabinoid cures and therapy for both children and adolescents, and in their lives. Cannabis is also strongly associated with people who use them. Pakistan currently shows a very important proportion of those, and Iran, the largest segment of these, and this trend will most accelerate in the UK, as it will reduce language barriers and making it easier for cannabis treatment specialists. Researchers will to find a new way in reducing all access to drugs, and I’m hoping with this study, they can do that in other time.<|endoftext|>Joshua Shippuzzi’s Peeled Plant and Litter Girl\n\nThe saffron comes in varieties of edible plants and a variety of Each of the many cre the small plant can grow. The tart strawberry is larger than any plant, about three to four meters. Passing through the ripening process and into the leaves, surrounding the roots, energy is passed to the green and lemon. The berries are produced by alternating light and dark sources, such as green colours, sunlight, and wind. In the leaves, air can form sulfuric acid, rings<|endoftext|>","token_ids":[50256,284,307,645,9149,326,356,481,651,340,618,356,447,247,303,1760,674,2267,13,2011,2911,318,326,340,481,670,11,290,356,460,4191,37700,477,661,287,428,7791,656,34161,11,447,251,339,1139,13,564,250,3886,788,11,257,1862,1641,373,2877,287,5828,11,287,3442,11,290,706,484,1043,257,9499,1413,287,15917,430,11,314,2227,284,923,5742,13,314,550,3111,379,281,4086,326,4539,262,11665,319,16715,11,523,314,2227,284,307,1912,287,428,1989,284,1037,777,1862,661,11,287,1210,11,651,656,670,329,340,11,290,6165,787,340,1695,284,661,508,389,407,287,511,1641,287,262,1248,400,9559,393,1165,2739,13,447,251,198,198,30365,42621,11,2242,11,508,3160,287,2986,6033,11,1139,25,198,198,1890,812,11,339,447,247,82,11615,284,19271,783,13,679,447,247,82,587,319,257,2050,4205,11,290,2582,5071,326,287,867,1180,2842,11,340,318,2408,284,1064,257,640,284,4079,319,616,2614,1204,7747,11,290,284,1949,284,10768,262,2033,6066,314,423,284,1011,287,8695,284,616,17638,13,4418,11,257,1256,286,661,1064,340,4457,2408,284,2342,511,7747,13,1318,318,257,845,1588,1448,286,661,508,389,749,14718,11,484,765,284,4646,262,9751,13,554,1948,11,484,389,407,7787,284,4043,329,257,890,640,878,484,1011,597,14103,11,290,484,389,5295,284,3368,2263,685,24571,60,9007,13,1119,389,5295,284,3613,1637,290,1949,635,284,10356,786,262,9751,13,4418,11,780,777,661,389,2877,994,11,484,447,247,260,407,2263,18136,4568,26,484,389,2263,1641,12,17107,4568,13,198,198,50,47056,706,339,373,20462,11,42621,2722,3210,5727,3513,290,339,3066,284,2245,428,3513,11,329,262,938,734,812,11,780,262,7519,550,6149,683,339,373,407,1016,284,780,339,1422,447,247,83,1011,465,14103,11,393,428,561,1808,262,9478,286,262,3513,13,887,339,373,11378,11,290,523,3066,284,1011,9499,11,691,284,466,523,757,287,734,1180,2628,286,661,13,198,198,464,5230,1398,373,20325,11,290,416,788,11,339,373,16574,284,5828,11,810,257,1545,286,6164,4438,284,1414,683,329,9499,2861,286,30381,9499,11,290,329,262,3131,1637,339,3636,447,247,83,1011,4569,11,35867,11,393,772,1111,11,9499,13,383,30381,9499,1781,373,6027,284,923,1752,11,290,428,2950,257,2837,286,1180,2628,286,14502,11,290,257,1402,1271,286,4683,2720,2841,11,475,262,1448,373,407,845,7310,13,5455,11,612,547,257,2628,925,286,1596,15456,3706,661,6163,416,530,286,511,9450,2628,11,810,262,6809,9658,11,290,16573,511,2614,6461,13,1318,547,617,3999,6809,508,9871,4569,30381,9499,11,617,4960,9871,9499,11,290,416,788,612,373,257,2092,5933,13,198,198,4863,612,11,5214,1994,14502,547,1965,546,511,10270,287,262,1781,13,26122,547,15456,19171,284,5120,355,611,484,547,4257,284,3315,9499,11,1864,284,883,416,3450,547,262,749,4609,287,9499,11,290,287,262,1903,9539,286,3513,11,19960,284,1011,511,898,17638,379,257,2793,2494,13,4864,11,612,318,319,7044,2267,4478,326,4697,661,784,749,1690,883,508,389,5906,284,1011,46830,784,4341,1690,257,1256,517,640,287,262,27147,13,1318,389,635,257,1271,286,661,508,21603,981,2263,9499,11,290,991,423,1029,3965,286,262,4369,11,290,6402,517,286,883,772,21603,329,511,898,4414,621,262,1334,13,2102,11,612,318,691,262,5885,286,37005,281,4697,5827,284,48175,9102,11,612,318,635,262,5885,286,5922,649,29596,329,46830,326,3871,779,355,880,13,198,198,284,262,1578,1829,810,9663,2563,5342,9084,5657,2409,30102,46481,318,2938,284,4043,329,10650,329,262,779,286,465,27147,379,25299,12690,11,7137,11,2795,1467,11,1853,13,2393,4590,13,198,198,1532,777,6373,389,3199,11,484,460,307,5625,284,257,4996,286,584,10040,11,617,286,262,749,1593,9963,30232,10040,13,6660,11,484,481,307,1498,284,1205,13788,517,4050,290,4050,48175,50019,290,9102,329,1111,1751,290,25447,11,290,287,511,3160,13,28838,318,635,7634,3917,351,661,508,779,606,13,7648,3058,2523,257,845,1593,9823,286,883,11,290,4068,11,262,4387,10618,286,777,11,290,428,5182,481,749,22636,287,262,3482,11,355,340,481,4646,3303,14725,290,1642,340,4577,329,9499,3513,22447,13,26685,481,284,1064,257,649,835,287,8868,477,1895,284,5010,11,290,314,447,247,76,7725,351,428,2050,11,484,460,466,326,287,584,640,13,50256,47740,911,3974,4715,72,447,247,82,2631,18449,16561,290,406,1967,7430,198,198,464,473,487,1313,2058,287,20328,286,35988,6134,290,257,4996,286,5501,286,262,867,1126,262,1402,4618,460,1663,13,383,35842,41236,318,4025,621,597,4618,11,546,1115,284,1440,10700,13,46389,832,262,18344,3101,1429,290,656,262,5667,11,7346,262,11135,11,2568,318,3804,284,262,4077,290,18873,13,383,36322,389,4635,416,39623,1657,290,3223,4237,11,884,355,4077,18915,11,19606,11,290,2344,13,554,262,5667,11,1633,460,1296,37402,291,7408,11,13917,50256]}
|
results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstream_hydra/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
mode: sample_eval
|
| 2 |
+
seed: 42
|
| 3 |
+
loader:
|
| 4 |
+
global_batch_size: 512
|
| 5 |
+
eval_global_batch_size: ${.global_batch_size}
|
| 6 |
+
batch_size: 2
|
| 7 |
+
eval_batch_size: 1
|
| 8 |
+
num_workers: ${eval:"len(__import__('os').sched_getaffinity(0))"}
|
| 9 |
+
pin_memory: true
|
| 10 |
+
sampling:
|
| 11 |
+
predictor: ancestral
|
| 12 |
+
steps: 1
|
| 13 |
+
noise_removal: ancestral
|
| 14 |
+
use_float64: true
|
| 15 |
+
p_nucleus: 1.0
|
| 16 |
+
num_sample_batches: 1
|
| 17 |
+
num_sample_log: 2
|
| 18 |
+
semi_ar: false
|
| 19 |
+
stride_length: 1
|
| 20 |
+
num_strides: 1
|
| 21 |
+
guid_weight: null
|
| 22 |
+
psi:
|
| 23 |
+
time_profile: linear
|
| 24 |
+
high_mode: pure-posterior
|
| 25 |
+
middle_mode: pure-posterior
|
| 26 |
+
low_mode: pure-posterior
|
| 27 |
+
high_frac: 0.2
|
| 28 |
+
middle_frac: 0.6
|
| 29 |
+
training:
|
| 30 |
+
ema: 0.9999
|
| 31 |
+
antithetic_sampling: true
|
| 32 |
+
importance_sampling: false
|
| 33 |
+
sampling_eps: 0.001
|
| 34 |
+
change_of_variables: false
|
| 35 |
+
loss_precision: bf16
|
| 36 |
+
finetune_path: ''
|
| 37 |
+
class_dropout_p: 0.1
|
| 38 |
+
eval:
|
| 39 |
+
checkpoint_path: /home/ruizzhao/diffusion_baseline/checkpoints/reference_reproduction/duo_dcd/lm1b/model.ckpt
|
| 40 |
+
disable_ema: false
|
| 41 |
+
compute_generative_perplexity: false
|
| 42 |
+
perplexity_batch_size: 8
|
| 43 |
+
compute_perplexity_on_sanity: false
|
| 44 |
+
gen_ppl_eval_model_name_or_path: gpt2-large
|
| 45 |
+
generate_samples: true
|
| 46 |
+
generated_samples_path: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstream_samples.json
|
| 47 |
+
optim:
|
| 48 |
+
weight_decay: 0
|
| 49 |
+
lr: 0.0003
|
| 50 |
+
beta1: 0.9
|
| 51 |
+
beta2: 0.999
|
| 52 |
+
eps: 1.0e-08
|
| 53 |
+
trainer:
|
| 54 |
+
_target_: lightning.Trainer
|
| 55 |
+
accelerator: cuda
|
| 56 |
+
num_nodes: 1
|
| 57 |
+
devices: 1
|
| 58 |
+
accumulate_grad_batches: ${div_up:${loader.global_batch_size}, ${eval:${trainer.devices}
|
| 59 |
+
* ${loader.batch_size} * ${trainer.num_nodes}}}
|
| 60 |
+
gradient_clip_val: 1.0
|
| 61 |
+
precision: bf16
|
| 62 |
+
num_sanity_val_steps: 2
|
| 63 |
+
max_steps: 1000000
|
| 64 |
+
log_every_n_steps: 100
|
| 65 |
+
limit_train_batches: 1.0
|
| 66 |
+
limit_val_batches: 1.0
|
| 67 |
+
val_check_interval: 5000
|
| 68 |
+
check_val_every_n_epoch: null
|
| 69 |
+
wandb:
|
| 70 |
+
project: duo
|
| 71 |
+
group: null
|
| 72 |
+
job_type: null
|
| 73 |
+
name: null
|
| 74 |
+
id: ${.name}_${seed}
|
| 75 |
+
tags:
|
| 76 |
+
- ${noise.type}
|
| 77 |
+
- ${data.train}
|
| 78 |
+
- ${data.valid}
|
| 79 |
+
- ${algo.name}
|
| 80 |
+
offline: true
|
| 81 |
+
checkpointing:
|
| 82 |
+
save_dir: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstream_hydra
|
| 83 |
+
resume_from_ckpt: true
|
| 84 |
+
resume_ckpt_path: ${.save_dir}/checkpoints/last.ckpt
|
| 85 |
+
callbacks:
|
| 86 |
+
checkpoint_every_n_steps:
|
| 87 |
+
_target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 88 |
+
save_top_k: -1
|
| 89 |
+
save_last: true
|
| 90 |
+
dirpath: ${checkpointing.save_dir}/checkpoints
|
| 91 |
+
verbose: true
|
| 92 |
+
auto_insert_metric_name: false
|
| 93 |
+
every_n_train_steps: 500
|
| 94 |
+
checkpoint_monitor:
|
| 95 |
+
_target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 96 |
+
monitor: val/nll
|
| 97 |
+
mode: min
|
| 98 |
+
save_top_k: 1
|
| 99 |
+
save_last: false
|
| 100 |
+
dirpath: ${checkpointing.save_dir}/checkpoints
|
| 101 |
+
filename: best
|
| 102 |
+
auto_insert_metric_name: false
|
| 103 |
+
verbose: true
|
| 104 |
+
learning_rate_monitor:
|
| 105 |
+
_target_: lightning.pytorch.callbacks.LearningRateMonitor
|
| 106 |
+
logging_interval: step
|
| 107 |
+
data:
|
| 108 |
+
train: lm1b
|
| 109 |
+
valid: lm1b
|
| 110 |
+
modality: text
|
| 111 |
+
tokenizer_name_or_path: bert-base-uncased
|
| 112 |
+
cache_dir: /share/kuleshov/ssahoo/textdiffusion/data
|
| 113 |
+
wrap: true
|
| 114 |
+
streaming: false
|
| 115 |
+
insert_train_eos: true
|
| 116 |
+
insert_valid_eos: true
|
| 117 |
+
model:
|
| 118 |
+
name: small
|
| 119 |
+
type: ddit
|
| 120 |
+
hidden_size: 768
|
| 121 |
+
cond_dim: 128
|
| 122 |
+
length: 128
|
| 123 |
+
n_blocks: 12
|
| 124 |
+
n_heads: 12
|
| 125 |
+
scale_by_sigma: true
|
| 126 |
+
dropout: 0.1
|
| 127 |
+
tie_word_embeddings: false
|
| 128 |
+
vocab_lookup: true
|
| 129 |
+
strategy:
|
| 130 |
+
_target_: lightning.pytorch.strategies.DDPStrategy
|
| 131 |
+
find_unused_parameters: false
|
| 132 |
+
noise:
|
| 133 |
+
type: log-linear
|
| 134 |
+
eps: 0.001
|
| 135 |
+
lr_scheduler:
|
| 136 |
+
_target_: transformers.get_constant_schedule_with_warmup
|
| 137 |
+
num_warmup_steps: 2500
|
| 138 |
+
prior:
|
| 139 |
+
type: none
|
| 140 |
+
latent_width: 0
|
| 141 |
+
latent_height: 0
|
| 142 |
+
algo:
|
| 143 |
+
name: duo_base
|
| 144 |
+
backbone: dit
|
| 145 |
+
parameterization: mean
|
| 146 |
+
time_conditioning: true
|
| 147 |
+
T: 0
|
| 148 |
+
subs_masking: false
|
| 149 |
+
causal_attention: false
|
| 150 |
+
ignore_bos: false
|
| 151 |
+
loss_type: elbo
|
results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstream_hydra/config_tree.txt
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CONFIG
|
| 2 |
+
├── mode
|
| 3 |
+
│ └── sample_eval
|
| 4 |
+
├── seed
|
| 5 |
+
│ └── 42
|
| 6 |
+
├── loader
|
| 7 |
+
│ └── global_batch_size: 512
|
| 8 |
+
│ eval_global_batch_size: 512
|
| 9 |
+
│ batch_size: 2
|
| 10 |
+
│ eval_batch_size: 1
|
| 11 |
+
│ num_workers: 512
|
| 12 |
+
│ pin_memory: true
|
| 13 |
+
│
|
| 14 |
+
├── sampling
|
| 15 |
+
│ └── predictor: ancestral
|
| 16 |
+
│ steps: 1
|
| 17 |
+
│ noise_removal: ancestral
|
| 18 |
+
│ use_float64: true
|
| 19 |
+
│ p_nucleus: 1.0
|
| 20 |
+
│ num_sample_batches: 1
|
| 21 |
+
│ num_sample_log: 2
|
| 22 |
+
│ semi_ar: false
|
| 23 |
+
│ stride_length: 1
|
| 24 |
+
│ num_strides: 1
|
| 25 |
+
│ guid_weight: null
|
| 26 |
+
│ psi:
|
| 27 |
+
│ time_profile: linear
|
| 28 |
+
│ high_mode: pure-posterior
|
| 29 |
+
│ middle_mode: pure-posterior
|
| 30 |
+
│ low_mode: pure-posterior
|
| 31 |
+
│ high_frac: 0.2
|
| 32 |
+
│ middle_frac: 0.6
|
| 33 |
+
│
|
| 34 |
+
├── training
|
| 35 |
+
│ └── ema: 0.9999
|
| 36 |
+
│ antithetic_sampling: true
|
| 37 |
+
│ importance_sampling: false
|
| 38 |
+
│ sampling_eps: 0.001
|
| 39 |
+
│ change_of_variables: false
|
| 40 |
+
│ loss_precision: bf16
|
| 41 |
+
│ finetune_path: ''
|
| 42 |
+
│ class_dropout_p: 0.1
|
| 43 |
+
│
|
| 44 |
+
├── eval
|
| 45 |
+
│ └── checkpoint_path: /home/ruizzhao/diffusion_baseline/checkpoints/reference_reproduction/duo_dcd/lm1b/model.ckpt
|
| 46 |
+
│ disable_ema: false
|
| 47 |
+
│ compute_generative_perplexity: false
|
| 48 |
+
│ perplexity_batch_size: 8
|
| 49 |
+
│ compute_perplexity_on_sanity: false
|
| 50 |
+
│ gen_ppl_eval_model_name_or_path: gpt2-large
|
| 51 |
+
│ generate_samples: true
|
| 52 |
+
│ generated_samples_path: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/s
|
| 53 |
+
│
|
| 54 |
+
├── optim
|
| 55 |
+
│ └── weight_decay: 0
|
| 56 |
+
│ lr: 0.0003
|
| 57 |
+
│ beta1: 0.9
|
| 58 |
+
│ beta2: 0.999
|
| 59 |
+
│ eps: 1.0e-08
|
| 60 |
+
│
|
| 61 |
+
├── trainer
|
| 62 |
+
│ └── _target_: lightning.Trainer
|
| 63 |
+
│ accelerator: cuda
|
| 64 |
+
│ num_nodes: 1
|
| 65 |
+
│ devices: 1
|
| 66 |
+
│ accumulate_grad_batches: 256
|
| 67 |
+
│ gradient_clip_val: 1.0
|
| 68 |
+
│ precision: bf16
|
| 69 |
+
│ num_sanity_val_steps: 2
|
| 70 |
+
│ max_steps: 1000000
|
| 71 |
+
│ log_every_n_steps: 100
|
| 72 |
+
│ limit_train_batches: 1.0
|
| 73 |
+
│ limit_val_batches: 1.0
|
| 74 |
+
│ val_check_interval: 5000
|
| 75 |
+
│ check_val_every_n_epoch: null
|
| 76 |
+
│
|
| 77 |
+
├── wandb
|
| 78 |
+
│ └── project: duo
|
| 79 |
+
│ group: null
|
| 80 |
+
│ job_type: null
|
| 81 |
+
│ name: null
|
| 82 |
+
│ id: None_42
|
| 83 |
+
│ tags:
|
| 84 |
+
│ - log-linear
|
| 85 |
+
│ - lm1b
|
| 86 |
+
│ - lm1b
|
| 87 |
+
│ - duo_base
|
| 88 |
+
│ offline: true
|
| 89 |
+
│
|
| 90 |
+
├── checkpointing
|
| 91 |
+
│ └── save_dir: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstrea
|
| 92 |
+
│ resume_from_ckpt: true
|
| 93 |
+
│ resume_ckpt_path: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1
|
| 94 |
+
│
|
| 95 |
+
├── callbacks
|
| 96 |
+
│ └── checkpoint_every_n_steps:
|
| 97 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 98 |
+
│ save_top_k: -1
|
| 99 |
+
│ save_last: true
|
| 100 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstre
|
| 101 |
+
│ verbose: true
|
| 102 |
+
│ auto_insert_metric_name: false
|
| 103 |
+
│ every_n_train_steps: 500
|
| 104 |
+
│ checkpoint_monitor:
|
| 105 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 106 |
+
│ monitor: val/nll
|
| 107 |
+
│ mode: min
|
| 108 |
+
│ save_top_k: 1
|
| 109 |
+
│ save_last: false
|
| 110 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstre
|
| 111 |
+
│ filename: best
|
| 112 |
+
│ auto_insert_metric_name: false
|
| 113 |
+
│ verbose: true
|
| 114 |
+
│ learning_rate_monitor:
|
| 115 |
+
│ _target_: lightning.pytorch.callbacks.LearningRateMonitor
|
| 116 |
+
│ logging_interval: step
|
| 117 |
+
│
|
| 118 |
+
├── data
|
| 119 |
+
│ └── train: lm1b
|
| 120 |
+
│ valid: lm1b
|
| 121 |
+
│ modality: text
|
| 122 |
+
│ tokenizer_name_or_path: bert-base-uncased
|
| 123 |
+
│ cache_dir: /share/kuleshov/ssahoo/textdiffusion/data
|
| 124 |
+
│ wrap: true
|
| 125 |
+
│ streaming: false
|
| 126 |
+
│ insert_train_eos: true
|
| 127 |
+
│ insert_valid_eos: true
|
| 128 |
+
│
|
| 129 |
+
├── model
|
| 130 |
+
│ └── name: small
|
| 131 |
+
│ type: ddit
|
| 132 |
+
│ hidden_size: 768
|
| 133 |
+
│ cond_dim: 128
|
| 134 |
+
│ length: 128
|
| 135 |
+
│ n_blocks: 12
|
| 136 |
+
│ n_heads: 12
|
| 137 |
+
│ scale_by_sigma: true
|
| 138 |
+
│ dropout: 0.1
|
| 139 |
+
│ tie_word_embeddings: false
|
| 140 |
+
│ vocab_lookup: true
|
| 141 |
+
│
|
| 142 |
+
├── strategy
|
| 143 |
+
│ └── _target_: lightning.pytorch.strategies.DDPStrategy
|
| 144 |
+
│ find_unused_parameters: false
|
| 145 |
+
│
|
| 146 |
+
├── noise
|
| 147 |
+
│ └── type: log-linear
|
| 148 |
+
│ eps: 0.001
|
| 149 |
+
│
|
| 150 |
+
├── lr_scheduler
|
| 151 |
+
│ └── _target_: transformers.get_constant_schedule_with_warmup
|
| 152 |
+
│ num_warmup_steps: 2500
|
| 153 |
+
│
|
| 154 |
+
├── prior
|
| 155 |
+
│ └── type: none
|
| 156 |
+
│ latent_width: 0
|
| 157 |
+
│ latent_height: 0
|
| 158 |
+
│
|
| 159 |
+
└── algo
|
| 160 |
+
└── name: duo_base
|
| 161 |
+
backbone: dit
|
| 162 |
+
parameterization: mean
|
| 163 |
+
time_conditioning: true
|
| 164 |
+
T: 0
|
| 165 |
+
subs_masking: false
|
| 166 |
+
causal_attention: false
|
| 167 |
+
ignore_bos: false
|
| 168 |
+
loss_type: elbo
|
| 169 |
+
|
results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstream_hydra/dlb_pinned_upstream_main.log
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[2026-08-25 10:38:05,643][dlb_pinned_upstream_main][INFO] - Starting Sample Eval.
|
| 2 |
+
[2026-08-25 10:38:13,066][dlb_pinned_upstream_main][INFO] - Generative perplexity: 1125.733642578125
|
| 3 |
+
[2026-08-25 10:38:13,066][dlb_pinned_upstream_main][INFO] - Sample entropy: 4.429431915283203
|
| 4 |
+
[2026-08-25 10:38:13,067][dlb_pinned_upstream_main][INFO] - Samples saved at: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_1/upstream_samples.json
|
results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_2/upstream_hydra/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- mode=sample_eval
|
| 2 |
+
- seed=42
|
| 3 |
+
- data=lm1b-wrap
|
| 4 |
+
- model=small
|
| 5 |
+
- model.length=128
|
| 6 |
+
- loader.batch_size=2
|
| 7 |
+
- loader.eval_batch_size=1
|
| 8 |
+
- sampling.num_sample_batches=1
|
| 9 |
+
- sampling.steps=2
|
| 10 |
+
- eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/reference_reproduction/duo_dcd/lm1b/model.ckpt
|
| 11 |
+
- trainer.devices=1
|
| 12 |
+
- checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_2/upstream_hydra
|
| 13 |
+
- +wandb.offline=true
|
| 14 |
+
- eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_2/upstream_samples.json
|
| 15 |
+
- algo=duo_base
|
| 16 |
+
- algo.backbone=dit
|
| 17 |
+
- sampling.predictor=ancestral
|
| 18 |
+
- sampling.noise_removal=ancestral
|
| 19 |
+
- eval.disable_ema=False
|
results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_32/upstream_hydra/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- mode=sample_eval
|
| 2 |
+
- seed=42
|
| 3 |
+
- data=lm1b-wrap
|
| 4 |
+
- model=small
|
| 5 |
+
- model.length=128
|
| 6 |
+
- loader.batch_size=2
|
| 7 |
+
- loader.eval_batch_size=1
|
| 8 |
+
- sampling.num_sample_batches=1
|
| 9 |
+
- sampling.steps=32
|
| 10 |
+
- eval.checkpoint_path=/home/ruizzhao/diffusion_baseline/checkpoints/reference_reproduction/duo_dcd/lm1b/model.ckpt
|
| 11 |
+
- trainer.devices=1
|
| 12 |
+
- checkpointing.save_dir=/home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_32/upstream_hydra
|
| 13 |
+
- +wandb.offline=true
|
| 14 |
+
- eval.generated_samples_path=/home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_32/upstream_samples.json
|
| 15 |
+
- algo=duo_base
|
| 16 |
+
- algo.backbone=dit
|
| 17 |
+
- sampling.predictor=ancestral
|
| 18 |
+
- sampling.noise_removal=ancestral
|
| 19 |
+
- eval.disable_ema=False
|
results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_32/upstream_hydra/dlb_pinned_upstream_main.log
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[2026-08-25 10:47:54,997][dlb_pinned_upstream_main][INFO] - Starting Sample Eval.
|
| 2 |
+
[2026-08-25 10:48:08,607][dlb_pinned_upstream_main][INFO] - Generative perplexity: 94.98780822753906
|
| 3 |
+
[2026-08-25 10:48:08,608][dlb_pinned_upstream_main][INFO] - Sample entropy: 4.304296016693115
|
| 4 |
+
[2026-08-25 10:48:08,608][dlb_pinned_upstream_main][INFO] - Samples saved at: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_32/upstream_samples.json
|
results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_4/upstream_hydra/config_tree.txt
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CONFIG
|
| 2 |
+
├── mode
|
| 3 |
+
│ └── sample_eval
|
| 4 |
+
├── seed
|
| 5 |
+
│ └── 42
|
| 6 |
+
├── loader
|
| 7 |
+
│ └── global_batch_size: 512
|
| 8 |
+
│ eval_global_batch_size: 512
|
| 9 |
+
│ batch_size: 2
|
| 10 |
+
│ eval_batch_size: 1
|
| 11 |
+
│ num_workers: 512
|
| 12 |
+
│ pin_memory: true
|
| 13 |
+
│
|
| 14 |
+
├── sampling
|
| 15 |
+
│ └── predictor: ancestral
|
| 16 |
+
│ steps: 4
|
| 17 |
+
│ noise_removal: ancestral
|
| 18 |
+
│ use_float64: true
|
| 19 |
+
│ p_nucleus: 1.0
|
| 20 |
+
│ num_sample_batches: 1
|
| 21 |
+
│ num_sample_log: 2
|
| 22 |
+
│ semi_ar: false
|
| 23 |
+
│ stride_length: 1
|
| 24 |
+
│ num_strides: 1
|
| 25 |
+
│ guid_weight: null
|
| 26 |
+
│ psi:
|
| 27 |
+
│ time_profile: linear
|
| 28 |
+
│ high_mode: pure-posterior
|
| 29 |
+
│ middle_mode: pure-posterior
|
| 30 |
+
│ low_mode: pure-posterior
|
| 31 |
+
│ high_frac: 0.2
|
| 32 |
+
│ middle_frac: 0.6
|
| 33 |
+
│
|
| 34 |
+
├── training
|
| 35 |
+
│ └── ema: 0.9999
|
| 36 |
+
│ antithetic_sampling: true
|
| 37 |
+
│ importance_sampling: false
|
| 38 |
+
│ sampling_eps: 0.001
|
| 39 |
+
│ change_of_variables: false
|
| 40 |
+
│ loss_precision: bf16
|
| 41 |
+
│ finetune_path: ''
|
| 42 |
+
│ class_dropout_p: 0.1
|
| 43 |
+
│
|
| 44 |
+
├── eval
|
| 45 |
+
│ └── checkpoint_path: /home/ruizzhao/diffusion_baseline/checkpoints/reference_reproduction/duo_dcd/lm1b/model.ckpt
|
| 46 |
+
│ disable_ema: false
|
| 47 |
+
│ compute_generative_perplexity: false
|
| 48 |
+
│ perplexity_batch_size: 8
|
| 49 |
+
│ compute_perplexity_on_sanity: false
|
| 50 |
+
│ gen_ppl_eval_model_name_or_path: gpt2-large
|
| 51 |
+
│ generate_samples: true
|
| 52 |
+
│ generated_samples_path: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/s
|
| 53 |
+
│
|
| 54 |
+
├── optim
|
| 55 |
+
│ └── weight_decay: 0
|
| 56 |
+
│ lr: 0.0003
|
| 57 |
+
│ beta1: 0.9
|
| 58 |
+
│ beta2: 0.999
|
| 59 |
+
│ eps: 1.0e-08
|
| 60 |
+
│
|
| 61 |
+
├── trainer
|
| 62 |
+
│ └── _target_: lightning.Trainer
|
| 63 |
+
│ accelerator: cuda
|
| 64 |
+
│ num_nodes: 1
|
| 65 |
+
│ devices: 1
|
| 66 |
+
│ accumulate_grad_batches: 256
|
| 67 |
+
│ gradient_clip_val: 1.0
|
| 68 |
+
│ precision: bf16
|
| 69 |
+
│ num_sanity_val_steps: 2
|
| 70 |
+
│ max_steps: 1000000
|
| 71 |
+
│ log_every_n_steps: 100
|
| 72 |
+
│ limit_train_batches: 1.0
|
| 73 |
+
│ limit_val_batches: 1.0
|
| 74 |
+
│ val_check_interval: 5000
|
| 75 |
+
│ check_val_every_n_epoch: null
|
| 76 |
+
│
|
| 77 |
+
├── wandb
|
| 78 |
+
│ └── project: duo
|
| 79 |
+
│ group: null
|
| 80 |
+
│ job_type: null
|
| 81 |
+
│ name: null
|
| 82 |
+
│ id: None_42
|
| 83 |
+
│ tags:
|
| 84 |
+
│ - log-linear
|
| 85 |
+
│ - lm1b
|
| 86 |
+
│ - lm1b
|
| 87 |
+
│ - duo_base
|
| 88 |
+
│ offline: true
|
| 89 |
+
│
|
| 90 |
+
├── checkpointing
|
| 91 |
+
│ └── save_dir: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_4/upstrea
|
| 92 |
+
│ resume_from_ckpt: true
|
| 93 |
+
│ resume_ckpt_path: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_4
|
| 94 |
+
│
|
| 95 |
+
├── callbacks
|
| 96 |
+
│ └── checkpoint_every_n_steps:
|
| 97 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 98 |
+
│ save_top_k: -1
|
| 99 |
+
│ save_last: true
|
| 100 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_4/upstre
|
| 101 |
+
│ verbose: true
|
| 102 |
+
│ auto_insert_metric_name: false
|
| 103 |
+
│ every_n_train_steps: 500
|
| 104 |
+
│ checkpoint_monitor:
|
| 105 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 106 |
+
│ monitor: val/nll
|
| 107 |
+
│ mode: min
|
| 108 |
+
│ save_top_k: 1
|
| 109 |
+
│ save_last: false
|
| 110 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_4/upstre
|
| 111 |
+
│ filename: best
|
| 112 |
+
│ auto_insert_metric_name: false
|
| 113 |
+
│ verbose: true
|
| 114 |
+
│ learning_rate_monitor:
|
| 115 |
+
│ _target_: lightning.pytorch.callbacks.LearningRateMonitor
|
| 116 |
+
│ logging_interval: step
|
| 117 |
+
│
|
| 118 |
+
├── data
|
| 119 |
+
│ └── train: lm1b
|
| 120 |
+
│ valid: lm1b
|
| 121 |
+
│ modality: text
|
| 122 |
+
│ tokenizer_name_or_path: bert-base-uncased
|
| 123 |
+
│ cache_dir: /share/kuleshov/ssahoo/textdiffusion/data
|
| 124 |
+
│ wrap: true
|
| 125 |
+
│ streaming: false
|
| 126 |
+
│ insert_train_eos: true
|
| 127 |
+
│ insert_valid_eos: true
|
| 128 |
+
│
|
| 129 |
+
├── model
|
| 130 |
+
│ └── name: small
|
| 131 |
+
│ type: ddit
|
| 132 |
+
│ hidden_size: 768
|
| 133 |
+
│ cond_dim: 128
|
| 134 |
+
│ length: 128
|
| 135 |
+
│ n_blocks: 12
|
| 136 |
+
│ n_heads: 12
|
| 137 |
+
│ scale_by_sigma: true
|
| 138 |
+
│ dropout: 0.1
|
| 139 |
+
│ tie_word_embeddings: false
|
| 140 |
+
│ vocab_lookup: true
|
| 141 |
+
│
|
| 142 |
+
├── strategy
|
| 143 |
+
│ └── _target_: lightning.pytorch.strategies.DDPStrategy
|
| 144 |
+
│ find_unused_parameters: false
|
| 145 |
+
│
|
| 146 |
+
├── noise
|
| 147 |
+
│ └── type: log-linear
|
| 148 |
+
│ eps: 0.001
|
| 149 |
+
│
|
| 150 |
+
├── lr_scheduler
|
| 151 |
+
│ └── _target_: transformers.get_constant_schedule_with_warmup
|
| 152 |
+
│ num_warmup_steps: 2500
|
| 153 |
+
│
|
| 154 |
+
├── prior
|
| 155 |
+
│ └── type: none
|
| 156 |
+
│ latent_width: 0
|
| 157 |
+
│ latent_height: 0
|
| 158 |
+
│
|
| 159 |
+
└── algo
|
| 160 |
+
└── name: duo_base
|
| 161 |
+
backbone: dit
|
| 162 |
+
parameterization: mean
|
| 163 |
+
time_conditioning: true
|
| 164 |
+
T: 0
|
| 165 |
+
subs_masking: false
|
| 166 |
+
causal_attention: false
|
| 167 |
+
ignore_bos: false
|
| 168 |
+
loss_type: elbo
|
| 169 |
+
|
results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_8/upstream_hydra/config_tree.txt
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CONFIG
|
| 2 |
+
├── mode
|
| 3 |
+
│ └── sample_eval
|
| 4 |
+
├── seed
|
| 5 |
+
│ └── 42
|
| 6 |
+
├── loader
|
| 7 |
+
│ └── global_batch_size: 512
|
| 8 |
+
│ eval_global_batch_size: 512
|
| 9 |
+
│ batch_size: 2
|
| 10 |
+
│ eval_batch_size: 1
|
| 11 |
+
│ num_workers: 512
|
| 12 |
+
│ pin_memory: true
|
| 13 |
+
│
|
| 14 |
+
├── sampling
|
| 15 |
+
│ └── predictor: ancestral
|
| 16 |
+
│ steps: 8
|
| 17 |
+
│ noise_removal: ancestral
|
| 18 |
+
│ use_float64: true
|
| 19 |
+
│ p_nucleus: 1.0
|
| 20 |
+
│ num_sample_batches: 1
|
| 21 |
+
│ num_sample_log: 2
|
| 22 |
+
│ semi_ar: false
|
| 23 |
+
│ stride_length: 1
|
| 24 |
+
│ num_strides: 1
|
| 25 |
+
│ guid_weight: null
|
| 26 |
+
│ psi:
|
| 27 |
+
│ time_profile: linear
|
| 28 |
+
│ high_mode: pure-posterior
|
| 29 |
+
│ middle_mode: pure-posterior
|
| 30 |
+
│ low_mode: pure-posterior
|
| 31 |
+
│ high_frac: 0.2
|
| 32 |
+
│ middle_frac: 0.6
|
| 33 |
+
│
|
| 34 |
+
├── training
|
| 35 |
+
│ └── ema: 0.9999
|
| 36 |
+
│ antithetic_sampling: true
|
| 37 |
+
│ importance_sampling: false
|
| 38 |
+
│ sampling_eps: 0.001
|
| 39 |
+
│ change_of_variables: false
|
| 40 |
+
│ loss_precision: bf16
|
| 41 |
+
│ finetune_path: ''
|
| 42 |
+
│ class_dropout_p: 0.1
|
| 43 |
+
│
|
| 44 |
+
├── eval
|
| 45 |
+
│ └── checkpoint_path: /home/ruizzhao/diffusion_baseline/checkpoints/reference_reproduction/duo_dcd/lm1b/model.ckpt
|
| 46 |
+
│ disable_ema: false
|
| 47 |
+
│ compute_generative_perplexity: false
|
| 48 |
+
│ perplexity_batch_size: 8
|
| 49 |
+
│ compute_perplexity_on_sanity: false
|
| 50 |
+
│ gen_ppl_eval_model_name_or_path: gpt2-large
|
| 51 |
+
│ generate_samples: true
|
| 52 |
+
│ generated_samples_path: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/s
|
| 53 |
+
│
|
| 54 |
+
├── optim
|
| 55 |
+
│ └── weight_decay: 0
|
| 56 |
+
│ lr: 0.0003
|
| 57 |
+
│ beta1: 0.9
|
| 58 |
+
│ beta2: 0.999
|
| 59 |
+
│ eps: 1.0e-08
|
| 60 |
+
│
|
| 61 |
+
├── trainer
|
| 62 |
+
│ └── _target_: lightning.Trainer
|
| 63 |
+
│ accelerator: cuda
|
| 64 |
+
│ num_nodes: 1
|
| 65 |
+
│ devices: 1
|
| 66 |
+
│ accumulate_grad_batches: 256
|
| 67 |
+
│ gradient_clip_val: 1.0
|
| 68 |
+
│ precision: bf16
|
| 69 |
+
│ num_sanity_val_steps: 2
|
| 70 |
+
│ max_steps: 1000000
|
| 71 |
+
│ log_every_n_steps: 100
|
| 72 |
+
│ limit_train_batches: 1.0
|
| 73 |
+
│ limit_val_batches: 1.0
|
| 74 |
+
│ val_check_interval: 5000
|
| 75 |
+
│ check_val_every_n_epoch: null
|
| 76 |
+
│
|
| 77 |
+
├── wandb
|
| 78 |
+
│ └── project: duo
|
| 79 |
+
│ group: null
|
| 80 |
+
│ job_type: null
|
| 81 |
+
│ name: null
|
| 82 |
+
│ id: None_42
|
| 83 |
+
│ tags:
|
| 84 |
+
│ - log-linear
|
| 85 |
+
│ - lm1b
|
| 86 |
+
│ - lm1b
|
| 87 |
+
│ - duo_base
|
| 88 |
+
│ offline: true
|
| 89 |
+
│
|
| 90 |
+
├── checkpointing
|
| 91 |
+
│ └── save_dir: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_8/upstrea
|
| 92 |
+
│ resume_from_ckpt: true
|
| 93 |
+
│ resume_ckpt_path: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_8
|
| 94 |
+
│
|
| 95 |
+
├── callbacks
|
| 96 |
+
│ └── checkpoint_every_n_steps:
|
| 97 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 98 |
+
│ save_top_k: -1
|
| 99 |
+
│ save_last: true
|
| 100 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_8/upstre
|
| 101 |
+
│ verbose: true
|
| 102 |
+
│ auto_insert_metric_name: false
|
| 103 |
+
│ every_n_train_steps: 500
|
| 104 |
+
│ checkpoint_monitor:
|
| 105 |
+
│ _target_: lightning.pytorch.callbacks.ModelCheckpoint
|
| 106 |
+
│ monitor: val/nll
|
| 107 |
+
│ mode: min
|
| 108 |
+
│ save_top_k: 1
|
| 109 |
+
│ save_last: false
|
| 110 |
+
│ dirpath: /home/ruizzhao/diffusion_baseline/results_duo_dcd_ckpt_probe/best_seed42/timing_scratch/samples/lm1b/duo_dcd/steps_8/upstre
|
| 111 |
+
│ filename: best
|
| 112 |
+
│ auto_insert_metric_name: false
|
| 113 |
+
│ verbose: true
|
| 114 |
+
│ learning_rate_monitor:
|
| 115 |
+
│ _target_: lightning.pytorch.callbacks.LearningRateMonitor
|
| 116 |
+
│ logging_interval: step
|
| 117 |
+
│
|
| 118 |
+
├── data
|
| 119 |
+
│ └── train: lm1b
|
| 120 |
+
│ valid: lm1b
|
| 121 |
+
│ modality: text
|
| 122 |
+
│ tokenizer_name_or_path: bert-base-uncased
|
| 123 |
+
│ cache_dir: /share/kuleshov/ssahoo/textdiffusion/data
|
| 124 |
+
│ wrap: true
|
| 125 |
+
│ streaming: false
|
| 126 |
+
│ insert_train_eos: true
|
| 127 |
+
│ insert_valid_eos: true
|
| 128 |
+
│
|
| 129 |
+
├── model
|
| 130 |
+
│ └── name: small
|
| 131 |
+
│ type: ddit
|
| 132 |
+
│ hidden_size: 768
|
| 133 |
+
│ cond_dim: 128
|
| 134 |
+
│ length: 128
|
| 135 |
+
│ n_blocks: 12
|
| 136 |
+
│ n_heads: 12
|
| 137 |
+
│ scale_by_sigma: true
|
| 138 |
+
│ dropout: 0.1
|
| 139 |
+
│ tie_word_embeddings: false
|
| 140 |
+
│ vocab_lookup: true
|
| 141 |
+
│
|
| 142 |
+
├── strategy
|
| 143 |
+
│ └── _target_: lightning.pytorch.strategies.DDPStrategy
|
| 144 |
+
│ find_unused_parameters: false
|
| 145 |
+
│
|
| 146 |
+
├── noise
|
| 147 |
+
│ └── type: log-linear
|
| 148 |
+
│ eps: 0.001
|
| 149 |
+
│
|
| 150 |
+
├── lr_scheduler
|
| 151 |
+
│ └── _target_: transformers.get_constant_schedule_with_warmup
|
| 152 |
+
│ num_warmup_steps: 2500
|
| 153 |
+
│
|
| 154 |
+
├── prior
|
| 155 |
+
│ └── type: none
|
| 156 |
+
│ latent_width: 0
|
| 157 |
+
│ latent_height: 0
|
| 158 |
+
│
|
| 159 |
+
└── algo
|
| 160 |
+
└── name: duo_base
|
| 161 |
+
backbone: dit
|
| 162 |
+
parameterization: mean
|
| 163 |
+
time_conditioning: true
|
| 164 |
+
T: 0
|
| 165 |
+
subs_masking: false
|
| 166 |
+
causal_attention: false
|
| 167 |
+
ignore_bos: false
|
| 168 |
+
loss_type: elbo
|
| 169 |
+
|
scripts/aggregate_results.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
"""Publish strict or partial baseline summary tables."""
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
from dlb.aggregate import IncompleteMatrixError, aggregate
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def main(argv: list[str] | None = None) -> int:
|
| 13 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 14 |
+
parser.add_argument("--root", type=Path, default=Path.cwd())
|
| 15 |
+
parser.add_argument(
|
| 16 |
+
"--output-dir", type=Path, default=None,
|
| 17 |
+
help="defaults to ROOT/results/summary",
|
| 18 |
+
)
|
| 19 |
+
parser.add_argument("--partial", action="store_true")
|
| 20 |
+
args = parser.parse_args(argv)
|
| 21 |
+
root = args.root.resolve()
|
| 22 |
+
output = (args.output_dir or root / "results/summary").resolve()
|
| 23 |
+
try:
|
| 24 |
+
report = aggregate(
|
| 25 |
+
root,
|
| 26 |
+
strict=not args.partial,
|
| 27 |
+
partial=args.partial,
|
| 28 |
+
output_dir=output,
|
| 29 |
+
)
|
| 30 |
+
except IncompleteMatrixError as error:
|
| 31 |
+
print(str(error))
|
| 32 |
+
print(f"failures={len(error.failures)}")
|
| 33 |
+
return 1
|
| 34 |
+
print(
|
| 35 |
+
f"complete={str(report.complete).lower()} "
|
| 36 |
+
f"rows={len(report.rows)} failures={len(report.failures)} "
|
| 37 |
+
f"unsupported={len(report.unsupported)} output={output}"
|
| 38 |
+
)
|
| 39 |
+
return 0 if report.complete else 1
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
if __name__ == "__main__":
|
| 43 |
+
raise SystemExit(main())
|
scripts/audit_elf_inputs.py
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Offline CPU audit of raw versus released ELF conditional validation inputs."""
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import argparse
|
| 6 |
+
from collections import Counter, defaultdict
|
| 7 |
+
import json
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
|
| 10 |
+
from elf_common import (ROOT, asset, condition_token_ids, offline, read_jsonl,
|
| 11 |
+
require_server, sha256, write_json)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
def audit_rows(raw, official, tokenizer, limit, task):
|
| 15 |
+
def inspect(rows):
|
| 16 |
+
token_rows = [condition_token_ids(row, tokenizer) for row in rows]
|
| 17 |
+
return token_rows, {
|
| 18 |
+
"rows": len(rows),
|
| 19 |
+
"blank_text_ids": [row["id"] for row in rows if not row["input"].strip()],
|
| 20 |
+
"empty_condition_ids": [row["id"] for row, ids in zip(rows, token_rows) if not ids],
|
| 21 |
+
"truncated_sources": sum(len(ids) > limit for ids in token_rows),
|
| 22 |
+
"condition_length_mean_before_cap": sum(map(len, token_rows)) / len(rows) if rows else None,
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
raw_ids, raw_stats = inspect(raw)
|
| 26 |
+
official_ids, official_stats = inspect(official)
|
| 27 |
+
by_pair = defaultdict(list)
|
| 28 |
+
for row, ids in zip(official, official_ids):
|
| 29 |
+
by_pair[(row["input"], row["output"])].append((row, ids))
|
| 30 |
+
matches = Counter()
|
| 31 |
+
examples = []
|
| 32 |
+
for row, ids in zip(raw, raw_ids):
|
| 33 |
+
candidates = by_pair.get((row["input"], row["output"]), [])
|
| 34 |
+
if len(candidates) != 1:
|
| 35 |
+
matches["unmatched_text_pair" if not candidates else "ambiguous_text_pair"] += 1
|
| 36 |
+
continue
|
| 37 |
+
author, expected = candidates[0]
|
| 38 |
+
matches["unique_text_pair"] += 1
|
| 39 |
+
matches["exact_ids"] += int(ids == expected)
|
| 40 |
+
matches["exact_ids_after_source_cap"] += int(ids[:limit] == expected[:limit])
|
| 41 |
+
matches["raw_plus_eos_equals_official"] += int(ids + [tokenizer.eos_token_id] == expected)
|
| 42 |
+
if ids[:limit] != expected[:limit] and len(examples) < 5:
|
| 43 |
+
examples.append({
|
| 44 |
+
"raw_id": row["id"], "official_id": author["id"],
|
| 45 |
+
"source_excerpt": row["input"][:160],
|
| 46 |
+
"raw_length": len(ids), "official_length": len(expected),
|
| 47 |
+
"raw_first_ids": ids[:16], "raw_last_ids": ids[-16:],
|
| 48 |
+
"official_first_ids": expected[:16], "official_last_ids": expected[-16:],
|
| 49 |
+
"official_condition_decoded_excerpt": tokenizer.decode(expected[:limit], skip_special_tokens=False)[:240],
|
| 50 |
+
})
|
| 51 |
+
corrected = [condition_token_ids(row, tokenizer, task=task) for row in raw]
|
| 52 |
+
# Multisets account for every duplicate's multiplicity instead of skipping
|
| 53 |
+
# the eight WMT rows that the unique-pair diagnostic cannot disambiguate.
|
| 54 |
+
def records(rows, token_rows, capped):
|
| 55 |
+
return [(r["input"], r["output"], tuple(ids[:limit] if capped else ids))
|
| 56 |
+
for r, ids in zip(rows, token_rows)]
|
| 57 |
+
corrected_records = records(raw, corrected, False)
|
| 58 |
+
author_records = records(official, official_ids, False)
|
| 59 |
+
corrected_capped = records(raw, corrected, True)
|
| 60 |
+
author_capped = records(official, official_ids, True)
|
| 61 |
+
coverage = {
|
| 62 |
+
"raw_rows": len(raw), "official_rows": len(official),
|
| 63 |
+
"full_token_multisets_equal": Counter(corrected_records) == Counter(author_records),
|
| 64 |
+
"capped_token_multisets_equal": Counter(corrected_capped) == Counter(author_capped),
|
| 65 |
+
"same_order_and_full_tokens": corrected_records == author_records,
|
| 66 |
+
"same_order_and_capped_tokens": corrected_capped == author_capped,
|
| 67 |
+
"empty_condition_ids": [r["id"] for r, ids in zip(raw, corrected) if not ids],
|
| 68 |
+
"policy": "released_ids_or_raw_plus_eos_then_source_cap_v2",
|
| 69 |
+
}
|
| 70 |
+
coverage["ready_for_raw_validation"] = (
|
| 71 |
+
bool(raw) and coverage["capped_token_multisets_equal"] and not coverage["empty_condition_ids"])
|
| 72 |
+
return {"source_cap": limit, "raw": raw_stats, "official": official_stats,
|
| 73 |
+
"comparison_by_exact_source_and_reference_text_not_row_number": dict(matches),
|
| 74 |
+
"mismatch_examples": examples,
|
| 75 |
+
"official_conditions_nonempty": bool(official) and not official_stats["empty_condition_ids"],
|
| 76 |
+
"corrected_runner_comparison_including_duplicates": coverage}
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
def load_checked(path, task):
|
| 80 |
+
meta = json.loads(path.with_suffix(".manifest.json").read_text())
|
| 81 |
+
rows = read_jsonl(path)
|
| 82 |
+
if (meta["sha256"] != sha256(path) or meta["task"] != task or meta["count"] != len(rows)
|
| 83 |
+
or len({row["id"] for row in rows}) != len(rows)):
|
| 84 |
+
raise ValueError(f"Input manifest/count/IDs mismatch: {path}")
|
| 85 |
+
return rows, {"path": str(path), "manifest": meta}
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def main():
|
| 89 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 90 |
+
parser.add_argument("--root", type=Path, default=ROOT)
|
| 91 |
+
parser.add_argument("--output", type=Path, required=True)
|
| 92 |
+
args = parser.parse_args()
|
| 93 |
+
require_server()
|
| 94 |
+
offline()
|
| 95 |
+
from transformers import AutoTokenizer
|
| 96 |
+
root = args.root.resolve()
|
| 97 |
+
tokenizer = AutoTokenizer.from_pretrained(str(asset(root, "t5")), local_files_only=True)
|
| 98 |
+
report = {"schema": "elf-condition-audit-v2", "tasks": {},
|
| 99 |
+
"auditor_sha256": sha256(Path(__file__)),
|
| 100 |
+
"helper_sha256": sha256(Path(__file__).with_name("elf_common.py")),
|
| 101 |
+
"assets_manifest_sha256": sha256(root / "data/elf/assets.json")}
|
| 102 |
+
for task, limit in (("wmt14", 64), ("xsum", 1024)):
|
| 103 |
+
raw, raw_binding = load_checked(root / f"data/elf/{task}-validation.jsonl", task)
|
| 104 |
+
official, official_binding = load_checked(root / f"data/elf/{task}-official-validation.jsonl", task)
|
| 105 |
+
print(f"Auditing {task}: raw={len(raw)}, official={len(official)}; no GPU inference", flush=True)
|
| 106 |
+
result = audit_rows(raw, official, tokenizer, limit, task)
|
| 107 |
+
result["inputs"] = {"raw": raw_binding, "official": official_binding}
|
| 108 |
+
report["tasks"][task] = result
|
| 109 |
+
print(json.dumps({k: v for k, v in result.items() if k != "inputs"}, indent=2, ensure_ascii=False), flush=True)
|
| 110 |
+
write_json(args.output, report)
|
| 111 |
+
print(f"Saved {args.output}. Input files unchanged; compared the corrected runner's EOS policy without generating samples.")
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
if __name__ == "__main__":
|
| 115 |
+
main()
|
scripts/benchmark_4gpu.sh
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Four-GPU local timing pass over the canonical generation matrix.
|
| 3 |
+
set -uo pipefail
|
| 4 |
+
|
| 5 |
+
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
| 6 |
+
DLB_ROOT="${DLB_ROOT:-$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd -P)}"
|
| 7 |
+
PYTHON_BIN="${DLB_PYTHON:-python}"
|
| 8 |
+
MATRIX="${DLB_MATRIX:-}"
|
| 9 |
+
CUSTOM_MATRIX=0
|
| 10 |
+
if [[ -n "$MATRIX" ]]; then CUSTOM_MATRIX=1; fi
|
| 11 |
+
SEED=42
|
| 12 |
+
GPUS="${DLB_GPUS:-0,1,2,3}"
|
| 13 |
+
MAX_JOBS="${DLB_MAX_JOBS:-4}"
|
| 14 |
+
DRY_RUN=()
|
| 15 |
+
|
| 16 |
+
usage() {
|
| 17 |
+
printf 'Usage: %s [--root PATH] [--matrix PATH] [--seed N] [--gpus LIST] [--max-jobs N] [--dry-run]\n' "$0"
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
while (($#)); do
|
| 21 |
+
case "$1" in
|
| 22 |
+
--root) DLB_ROOT="$2"; shift 2 ;;
|
| 23 |
+
--matrix) MATRIX="$2"; CUSTOM_MATRIX=1; shift 2 ;;
|
| 24 |
+
--seed) SEED="$2"; shift 2 ;;
|
| 25 |
+
--gpus) GPUS="$2"; shift 2 ;;
|
| 26 |
+
--max-jobs) MAX_JOBS="$2"; shift 2 ;;
|
| 27 |
+
--dry-run) DRY_RUN=(--dry-run); shift ;;
|
| 28 |
+
--help) usage; exit 0 ;;
|
| 29 |
+
*) echo "unknown argument: $1" >&2; usage; exit 2 ;;
|
| 30 |
+
esac
|
| 31 |
+
done
|
| 32 |
+
|
| 33 |
+
DLB_ROOT="$(CDPATH= cd -- "$DLB_ROOT" && pwd -P)"
|
| 34 |
+
if [[ -z "$MATRIX" ]]; then MATRIX="$DLB_ROOT/results/matrix/generation.tsv"; fi
|
| 35 |
+
export DLB_ROOT
|
| 36 |
+
mkdir -p "$DLB_ROOT/results/matrix" "$DLB_ROOT/results/logs"
|
| 37 |
+
if (( CUSTOM_MATRIX )); then
|
| 38 |
+
if [[ ! -f "$MATRIX" ]]; then
|
| 39 |
+
echo "custom matrix does not exist: $MATRIX" >&2
|
| 40 |
+
exit 2
|
| 41 |
+
fi
|
| 42 |
+
else
|
| 43 |
+
PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.matrix \
|
| 44 |
+
--root "$DLB_ROOT" --output "$MATRIX" --sample-count 1024 --seed "$SEED" || exit $?
|
| 45 |
+
fi
|
| 46 |
+
exec env PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.gpu_matrix \
|
| 47 |
+
--root "$DLB_ROOT" --stage benchmark --matrix "$MATRIX" \
|
| 48 |
+
--gpus "$GPUS" --max-jobs "$MAX_JOBS" --precision author "${DRY_RUN[@]}"
|
scripts/benchmark_conditional_4gpu.sh
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Four-GPU local timing pass over the C64 conditional matrix.
|
| 3 |
+
set -uo pipefail
|
| 4 |
+
|
| 5 |
+
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
| 6 |
+
DLB_ROOT="${DLB_ROOT:-$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd -P)}"
|
| 7 |
+
PYTHON_BIN="${DLB_PYTHON:-python}"
|
| 8 |
+
MATRIX="${DLB_CONDITIONAL_MATRIX:-}"
|
| 9 |
+
CUSTOM_MATRIX=0
|
| 10 |
+
if [[ -n "$MATRIX" ]]; then CUSTOM_MATRIX=1; fi
|
| 11 |
+
SEED=42
|
| 12 |
+
GPUS="${DLB_GPUS:-0,1,2,3}"
|
| 13 |
+
MAX_JOBS="${DLB_MAX_JOBS:-4}"
|
| 14 |
+
DRY_RUN=()
|
| 15 |
+
|
| 16 |
+
usage() {
|
| 17 |
+
printf 'Usage: %s [--root PATH] [--matrix PATH] [--seed N] [--gpus LIST] [--max-jobs N] [--dry-run]\n' "$0"
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
while (($#)); do
|
| 21 |
+
case "$1" in
|
| 22 |
+
--root) DLB_ROOT="$2"; shift 2 ;;
|
| 23 |
+
--matrix) MATRIX="$2"; CUSTOM_MATRIX=1; shift 2 ;;
|
| 24 |
+
--seed) SEED="$2"; shift 2 ;;
|
| 25 |
+
--gpus) GPUS="$2"; shift 2 ;;
|
| 26 |
+
--max-jobs) MAX_JOBS="$2"; shift 2 ;;
|
| 27 |
+
--dry-run) DRY_RUN=(--dry-run); shift ;;
|
| 28 |
+
--help) usage; exit 0 ;;
|
| 29 |
+
*) echo "unknown argument: $1" >&2; usage; exit 2 ;;
|
| 30 |
+
esac
|
| 31 |
+
done
|
| 32 |
+
|
| 33 |
+
DLB_ROOT="$(CDPATH= cd -- "$DLB_ROOT" && pwd -P)"
|
| 34 |
+
if [[ -z "$MATRIX" ]]; then MATRIX="$DLB_ROOT/results/conditional/matrix/generation.tsv"; fi
|
| 35 |
+
export DLB_ROOT
|
| 36 |
+
mkdir -p "$DLB_ROOT/results/conditional/matrix" "$DLB_ROOT/results/logs"
|
| 37 |
+
if (( CUSTOM_MATRIX )); then
|
| 38 |
+
if [[ ! -f "$MATRIX" ]]; then
|
| 39 |
+
echo "custom matrix does not exist: $MATRIX" >&2
|
| 40 |
+
exit 2
|
| 41 |
+
fi
|
| 42 |
+
else
|
| 43 |
+
PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.conditional_matrix \
|
| 44 |
+
--root "$DLB_ROOT" --output "$MATRIX" || exit $?
|
| 45 |
+
fi
|
| 46 |
+
exec env PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.gpu_matrix \
|
| 47 |
+
--root "$DLB_ROOT" --stage benchmark --matrix "$MATRIX" \
|
| 48 |
+
--gpus "$GPUS" --max-jobs "$MAX_JOBS" --precision author "${DRY_RUN[@]}"
|
scripts/benchmark_conditional_all.sh
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Server-side serial timing pass over the C64 conditional matrix.
|
| 3 |
+
set -uo pipefail
|
| 4 |
+
|
| 5 |
+
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
| 6 |
+
DLB_ROOT="${DLB_ROOT:-$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd -P)}"
|
| 7 |
+
PYTHON_BIN="${DLB_PYTHON:-python}"
|
| 8 |
+
MATRIX="${DLB_CONDITIONAL_MATRIX:-}"
|
| 9 |
+
SEED=42
|
| 10 |
+
|
| 11 |
+
while (($#)); do
|
| 12 |
+
case "$1" in
|
| 13 |
+
--root) DLB_ROOT="$2"; shift 2 ;;
|
| 14 |
+
--matrix) MATRIX="$2"; shift 2 ;;
|
| 15 |
+
--seed) SEED="$2"; shift 2 ;;
|
| 16 |
+
--help)
|
| 17 |
+
printf 'Usage: %s [--root PATH] [--matrix PATH] [--seed N]\n' "$0"
|
| 18 |
+
exit 0
|
| 19 |
+
;;
|
| 20 |
+
*) echo "unknown argument: $1" >&2; exit 2 ;;
|
| 21 |
+
esac
|
| 22 |
+
done
|
| 23 |
+
|
| 24 |
+
DLB_ROOT="$(CDPATH= cd -- "$DLB_ROOT" && pwd -P)"
|
| 25 |
+
if [[ -z "$MATRIX" ]]; then MATRIX="$DLB_ROOT/results/conditional/matrix/generation.tsv"; fi
|
| 26 |
+
export DLB_ROOT
|
| 27 |
+
mkdir -p "$DLB_ROOT/results/conditional/matrix" "$DLB_ROOT/results/logs"
|
| 28 |
+
PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.conditional_matrix \
|
| 29 |
+
--root "$DLB_ROOT" --output "$MATRIX" || exit $?
|
| 30 |
+
|
| 31 |
+
failures="$DLB_ROOT/results/logs/conditional_benchmark_failures.tsv"
|
| 32 |
+
printf 'task_id\tmodel\tdataset\tsteps\texit_code\n' >"$failures"
|
| 33 |
+
status=0
|
| 34 |
+
while IFS=$'\t' read -r task_id category model dataset steps sample_count seed environment adapter source provenance protocol conditioning_manifest conditioning_manifest_sha256 sample_dir metrics_path timing_path; do
|
| 35 |
+
[[ "$task_id" == "task_id" || -z "$task_id" ]] && continue
|
| 36 |
+
echo "CONDITIONAL BENCHMARK $task_id"
|
| 37 |
+
"$SCRIPT_DIR/benchmark_conditional_one.sh" --model "$model" --dataset "$dataset" \
|
| 38 |
+
--steps "$steps" --seed "$SEED" --precision author
|
| 39 |
+
exit_code=$?
|
| 40 |
+
if ((exit_code != 0)); then
|
| 41 |
+
printf '%s\t%s\t%s\t%s\t%s\n' "$task_id" "$model" "$dataset" "$steps" "$exit_code" >>"$failures"
|
| 42 |
+
status=1
|
| 43 |
+
fi
|
| 44 |
+
done < <(tail -n +3 "$MATRIX")
|
| 45 |
+
if [[ ! -s "$failures" ]]; then rm -f "$failures"; fi
|
| 46 |
+
exit "$status"
|
scripts/benchmark_one.sh
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Run one server-side, registry-bound primary-latency benchmark.
|
| 3 |
+
set -u
|
| 4 |
+
|
| 5 |
+
script_dir="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
| 6 |
+
DLB_ROOT="${DLB_ROOT:-$(CDPATH= cd -- "$script_dir/.." && pwd -P)}"
|
| 7 |
+
|
| 8 |
+
model=""
|
| 9 |
+
dataset=""
|
| 10 |
+
steps=""
|
| 11 |
+
seed=""
|
| 12 |
+
precision=""
|
| 13 |
+
dry_run="false"
|
| 14 |
+
|
| 15 |
+
usage() {
|
| 16 |
+
echo "usage: $0 --model MODEL --dataset {lm1b,owt} --steps N --seed N --precision author [--dry-run]" >&2
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
while (( $# )); do
|
| 20 |
+
case "$1" in
|
| 21 |
+
--model|--dataset|--steps|--seed|--precision)
|
| 22 |
+
if (( $# < 2 )); then usage; exit 2; fi
|
| 23 |
+
case "$1" in
|
| 24 |
+
--model) model="$2" ;;
|
| 25 |
+
--dataset) dataset="$2" ;;
|
| 26 |
+
--steps) steps="$2" ;;
|
| 27 |
+
--seed) seed="$2" ;;
|
| 28 |
+
--precision) precision="$2" ;;
|
| 29 |
+
esac
|
| 30 |
+
shift 2 ;;
|
| 31 |
+
--dry-run) dry_run="true"; shift ;;
|
| 32 |
+
--help) usage; exit 0 ;;
|
| 33 |
+
*) echo "unknown argument: $1" >&2; usage; exit 2 ;;
|
| 34 |
+
esac
|
| 35 |
+
done
|
| 36 |
+
|
| 37 |
+
if [[ -z "$model" || -z "$dataset" || -z "$steps" || -z "$seed" || -z "$precision" ]]; then
|
| 38 |
+
usage; exit 2
|
| 39 |
+
fi
|
| 40 |
+
if [[ ! "$steps" =~ ^[1-9][0-9]*$ || ! "$seed" =~ ^-?[0-9]+$ ]]; then
|
| 41 |
+
echo "steps must be positive and seed must be an integer" >&2; exit 2
|
| 42 |
+
fi
|
| 43 |
+
if [[ "$precision" != "author" ]]; then
|
| 44 |
+
echo "precision must be author (the pinned upstream inference policy)" >&2; exit 2
|
| 45 |
+
fi
|
| 46 |
+
|
| 47 |
+
DLB_PYTHON="${DLB_PYTHON:-python}"
|
| 48 |
+
module_args=(--root "$DLB_ROOT" --models "$model" --datasets "$dataset" --steps "$steps" --seed "$seed" --precision "$precision")
|
| 49 |
+
if [[ "$dry_run" == "true" ]]; then
|
| 50 |
+
exec env PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$DLB_PYTHON" -m dlb.benchmarking "${module_args[@]}" --dry-run
|
| 51 |
+
fi
|
| 52 |
+
|
| 53 |
+
if environment="$(PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$DLB_PYTHON" -m dlb.runner \
|
| 54 |
+
--root "$DLB_ROOT" --model "$model" --dataset "$dataset" --steps "$steps" \
|
| 55 |
+
--num-samples 1 --seed "$seed" --validate-only)"; then
|
| 56 |
+
:
|
| 57 |
+
else
|
| 58 |
+
exit $?
|
| 59 |
+
fi
|
| 60 |
+
if [[ ! "$environment" =~ ^[a-z][a-z0-9-]*$ ]]; then
|
| 61 |
+
echo "registry validation returned an unsafe environment name" >&2; exit 2
|
| 62 |
+
fi
|
| 63 |
+
|
| 64 |
+
exec "${DLB_CONDA:-conda}" run -n "$environment" env \
|
| 65 |
+
PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" \
|
| 66 |
+
python -m dlb.benchmarking "${module_args[@]}"
|
scripts/distill/di4c.sh
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
| 5 |
+
DLB_ROOT="$(cd -- "$SCRIPT_DIR/../.." && pwd -P)"
|
| 6 |
+
export PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}"
|
| 7 |
+
PYTHON_BIN="${DLB_PYTHON:-python}"
|
| 8 |
+
exec "$PYTHON_BIN" -m dlb.recipes --root "$DLB_ROOT" --recipe di4c "$@"
|
scripts/distill/fmlm.sh
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
set -euo pipefail
|
| 3 |
+
|
| 4 |
+
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
| 5 |
+
DLB_ROOT="$(cd -- "$SCRIPT_DIR/../.." && pwd -P)"
|
| 6 |
+
export PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}"
|
| 7 |
+
PYTHON_BIN="${DLB_PYTHON:-python}"
|
| 8 |
+
exec "$PYTHON_BIN" -m dlb.recipes --root "$DLB_ROOT" --recipe fmlm "$@"
|
scripts/elf_common.py
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Small, independent ELF experiment helpers (no GPU imports)."""
|
| 2 |
+
from __future__ import annotations
|
| 3 |
+
|
| 4 |
+
import hashlib
|
| 5 |
+
import json
|
| 6 |
+
import os
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
import subprocess
|
| 9 |
+
import sys
|
| 10 |
+
|
| 11 |
+
ROOT = Path(__file__).resolve().parents[1]
|
| 12 |
+
SOURCE_COMMIT = "b29d8833609e9ab7f67cd9da39435ac5cea04837"
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def sha256(path):
|
| 16 |
+
digest = hashlib.sha256()
|
| 17 |
+
with Path(path).open("rb") as handle:
|
| 18 |
+
for chunk in iter(lambda: handle.read(1024 * 1024), b""):
|
| 19 |
+
digest.update(chunk)
|
| 20 |
+
return digest.hexdigest()
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def write_json(path, data):
|
| 24 |
+
path = Path(path)
|
| 25 |
+
path.parent.mkdir(parents=True, exist_ok=True)
|
| 26 |
+
temporary = path.with_suffix(path.suffix + ".tmp")
|
| 27 |
+
temporary.write_text(json.dumps(data, indent=2, ensure_ascii=False, allow_nan=False) + "\n")
|
| 28 |
+
temporary.replace(path)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
def read_jsonl(path):
|
| 32 |
+
with Path(path).open() as handle:
|
| 33 |
+
return [json.loads(line) for line in handle if line.strip()]
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
def condition_token_ids(row, tokenizer, *, task=None):
|
| 37 |
+
"""Preserve released IDs; task-trained raw sources include the released EOS.
|
| 38 |
+
|
| 39 |
+
task=None retains plain tokenization for auditing the old input path.
|
| 40 |
+
Append before the model's source cap, exactly as the released Arrow inputs.
|
| 41 |
+
A C64 continuation is not an ended source sentence and keeps its old policy.
|
| 42 |
+
"""
|
| 43 |
+
ids = row.get("condition_input_ids")
|
| 44 |
+
if ids is None:
|
| 45 |
+
ids = tokenizer(row["input"], add_special_tokens=False, verbose=False)["input_ids"]
|
| 46 |
+
if task in ("wmt14", "xsum"):
|
| 47 |
+
eos = tokenizer.eos_token_id
|
| 48 |
+
if type(eos) is not int or eos < 0:
|
| 49 |
+
raise ValueError("Task-trained ELF conditions require a valid EOS token")
|
| 50 |
+
ids = ids + [eos]
|
| 51 |
+
vocab_size = len(tokenizer)
|
| 52 |
+
if not isinstance(ids, list) or any(type(t) is not int or t < 0 or t >= vocab_size for t in ids):
|
| 53 |
+
raise ValueError(f"Invalid condition IDs at source_id={row.get('id')}")
|
| 54 |
+
return ids
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
def preflight_conditions(rows, tokenizer, task, max_input_length, max_length):
|
| 58 |
+
"""Validate the whole requested input before loading weights; never drop rows."""
|
| 59 |
+
prepared, failures = [], []
|
| 60 |
+
for index, row in enumerate(rows):
|
| 61 |
+
ids = condition_token_ids(row, tokenizer, task=task)
|
| 62 |
+
if task == "owt-prefix":
|
| 63 |
+
fits = 0 < len(ids) < max_length - 64
|
| 64 |
+
else:
|
| 65 |
+
ids = ids[:max_input_length]
|
| 66 |
+
fits = bool(ids)
|
| 67 |
+
if not fits:
|
| 68 |
+
failures.append({"row_index": index, "source_id": row.get("id"), "tokens": len(ids)})
|
| 69 |
+
prepared.append(ids)
|
| 70 |
+
if failures:
|
| 71 |
+
raise ValueError(
|
| 72 |
+
f"Invalid/empty ELF conditions: {len(failures)}/{len(rows)}; "
|
| 73 |
+
f"first affected rows (zero-based): {failures[:20]}. No samples were dropped. "
|
| 74 |
+
"Run scripts/audit_elf_inputs.py to compare raw and official inputs; "
|
| 75 |
+
"do not invent source text or delete rows to bypass this check."
|
| 76 |
+
)
|
| 77 |
+
return prepared
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
def require_server():
|
| 81 |
+
if sys.platform != "linux":
|
| 82 |
+
raise RuntimeError("ELF downloads and GPU experiments must run on the Linux server.")
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
def source_path(root):
|
| 86 |
+
path = Path(root) / "upstreams/elf"
|
| 87 |
+
commit = subprocess.check_output(["git", "-C", str(path), "rev-parse", "HEAD"], text=True).strip()
|
| 88 |
+
dirty = subprocess.check_output(["git", "-C", str(path), "status", "--porcelain"], text=True)
|
| 89 |
+
if commit != SOURCE_COMMIT or dirty.strip():
|
| 90 |
+
raise ValueError("ELF upstream must be clean and match the locked commit")
|
| 91 |
+
return path
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def default_sampling(task, steps):
|
| 95 |
+
if steps < 1:
|
| 96 |
+
raise ValueError("steps must be positive")
|
| 97 |
+
if task in ("wmt14", "xsum"):
|
| 98 |
+
return {"sampling_method": "ode", "cfg": 2.0, "sc_cfg": 1.0, "gamma": 0.0}
|
| 99 |
+
# 8/16/32: paper Appendix D.2; 64: release configuration.
|
| 100 |
+
# Other budgets are explicitly an extension of our benchmark.
|
| 101 |
+
return {"sampling_method": "sde", "cfg": 1.0, "sc_cfg": 3.0,
|
| 102 |
+
"gamma": 2.0 if steps <= 16 else 1.5 if steps == 32 else 1.0}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
def manifest(root):
|
| 106 |
+
path = Path(root) / "data/elf/assets.json"
|
| 107 |
+
if not path.is_file():
|
| 108 |
+
raise FileNotFoundError(
|
| 109 |
+
f"ELF asset manifest is missing: {path}. "
|
| 110 |
+
"First complete `python scripts/prepare_elf.py assets` successfully; "
|
| 111 |
+
"a failed download does not publish assets.json. Do not create it manually."
|
| 112 |
+
)
|
| 113 |
+
data = json.loads(path.read_text())
|
| 114 |
+
if data["lock_sha256"] != sha256(Path(root) / "artifacts/elf_lock.json"):
|
| 115 |
+
raise ValueError("ELF lock changed since asset preparation")
|
| 116 |
+
return data
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
def asset(root, name):
|
| 120 |
+
record = manifest(root)["assets"][name]
|
| 121 |
+
directory = Path(root) / record["path"]
|
| 122 |
+
for relative, digest in record["sha256"].items():
|
| 123 |
+
if sha256(directory / relative) != digest:
|
| 124 |
+
raise ValueError(f"ELF asset changed: {name}/{relative}")
|
| 125 |
+
return directory
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
def offline():
|
| 129 |
+
os.environ["HF_HUB_OFFLINE"] = "1"
|
| 130 |
+
os.environ["TRANSFORMERS_OFFLINE"] = "1"
|
| 131 |
+
os.environ["WANDB_MODE"] = "disabled"
|
scripts/evaluate_4gpu.sh
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Four-GPU local quality evaluation over completed production samples.
|
| 3 |
+
set -uo pipefail
|
| 4 |
+
|
| 5 |
+
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
| 6 |
+
DLB_ROOT="${DLB_ROOT:-$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd -P)}"
|
| 7 |
+
PYTHON_BIN="${DLB_PYTHON:-python}"
|
| 8 |
+
MATRIX="${DLB_MATRIX:-}"
|
| 9 |
+
CUSTOM_MATRIX=0
|
| 10 |
+
if [[ -n "$MATRIX" ]]; then CUSTOM_MATRIX=1; fi
|
| 11 |
+
METRICS="gen_ppl,entropy,self_bleu"
|
| 12 |
+
GPUS="${DLB_GPUS:-0,1,2,3}"
|
| 13 |
+
MAX_JOBS="${DLB_MAX_JOBS:-4}"
|
| 14 |
+
DRY_RUN=()
|
| 15 |
+
|
| 16 |
+
usage() {
|
| 17 |
+
printf 'Usage: %s [--root PATH] [--matrix PATH] [--metrics LIST] [--gpus LIST] [--max-jobs N] [--dry-run]\n' "$0"
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
while (($#)); do
|
| 21 |
+
case "$1" in
|
| 22 |
+
--root) DLB_ROOT="$2"; shift 2 ;;
|
| 23 |
+
--matrix) MATRIX="$2"; CUSTOM_MATRIX=1; shift 2 ;;
|
| 24 |
+
--metrics) METRICS="$2"; shift 2 ;;
|
| 25 |
+
--gpus) GPUS="$2"; shift 2 ;;
|
| 26 |
+
--max-jobs) MAX_JOBS="$2"; shift 2 ;;
|
| 27 |
+
--dry-run) DRY_RUN=(--dry-run); shift ;;
|
| 28 |
+
--help) usage; exit 0 ;;
|
| 29 |
+
*) echo "unknown argument: $1" >&2; usage; exit 2 ;;
|
| 30 |
+
esac
|
| 31 |
+
done
|
| 32 |
+
|
| 33 |
+
DLB_ROOT="$(CDPATH= cd -- "$DLB_ROOT" && pwd -P)"
|
| 34 |
+
if [[ -z "$MATRIX" ]]; then MATRIX="$DLB_ROOT/results/matrix/generation.tsv"; fi
|
| 35 |
+
export DLB_ROOT
|
| 36 |
+
mkdir -p "$DLB_ROOT/results/matrix" "$DLB_ROOT/results/logs"
|
| 37 |
+
if (( CUSTOM_MATRIX )); then
|
| 38 |
+
if [[ ! -f "$MATRIX" ]]; then
|
| 39 |
+
echo "custom matrix does not exist: $MATRIX" >&2
|
| 40 |
+
exit 2
|
| 41 |
+
fi
|
| 42 |
+
else
|
| 43 |
+
PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.matrix \
|
| 44 |
+
--root "$DLB_ROOT" --output "$MATRIX" --sample-count 1024 --seed 42 || exit $?
|
| 45 |
+
fi
|
| 46 |
+
exec env PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.gpu_matrix \
|
| 47 |
+
--root "$DLB_ROOT" --stage evaluate --matrix "$MATRIX" \
|
| 48 |
+
--gpus "$GPUS" --max-jobs "$MAX_JOBS" --metrics "$METRICS" "${DRY_RUN[@]}"
|
scripts/evaluate_all.sh
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Server-side quality evaluation over completed production samples.
|
| 3 |
+
set -uo pipefail
|
| 4 |
+
|
| 5 |
+
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
| 6 |
+
DLB_ROOT="${DLB_ROOT:-$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd -P)}"
|
| 7 |
+
PYTHON_BIN="${DLB_EVAL_PYTHON:-${DLB_PYTHON:-python}}"
|
| 8 |
+
MATRIX="${DLB_MATRIX:-}"
|
| 9 |
+
METRICS="gen_ppl,entropy,self_bleu"
|
| 10 |
+
|
| 11 |
+
usage() {
|
| 12 |
+
printf 'Usage: %s [--root PATH] [--matrix PATH] [--metrics LIST]\n' "$0"
|
| 13 |
+
}
|
| 14 |
+
while (($#)); do
|
| 15 |
+
case "$1" in
|
| 16 |
+
--root) DLB_ROOT="$2"; shift 2 ;;
|
| 17 |
+
--matrix) MATRIX="$2"; shift 2 ;;
|
| 18 |
+
--metrics) METRICS="$2"; shift 2 ;;
|
| 19 |
+
--help) usage; exit 0 ;;
|
| 20 |
+
*) echo "unknown argument: $1" >&2; usage; exit 2 ;;
|
| 21 |
+
esac
|
| 22 |
+
done
|
| 23 |
+
DLB_ROOT="$(CDPATH= cd -- "$DLB_ROOT" && pwd -P)"
|
| 24 |
+
if [[ -z "$MATRIX" ]]; then MATRIX="$DLB_ROOT/results/matrix/generation.tsv"; fi
|
| 25 |
+
export DLB_ROOT
|
| 26 |
+
PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.matrix \
|
| 27 |
+
--root "$DLB_ROOT" --output "$MATRIX" --sample-count 1024 --seed 42 || exit $?
|
| 28 |
+
|
| 29 |
+
mkdir -p "$DLB_ROOT/results/logs"
|
| 30 |
+
failures="$DLB_ROOT/results/logs/evaluation_failures.tsv"
|
| 31 |
+
printf 'task_id\tmodel\tdataset\tsteps\texit_code\n' >"$failures"
|
| 32 |
+
status=0
|
| 33 |
+
while IFS=$'\t' read -r task_id category model dataset steps sample_count seed environment adapter source provenance sample_dir metrics_path timing_path; do
|
| 34 |
+
[[ "$task_id" == "task_id" || -z "$task_id" ]] && continue
|
| 35 |
+
mkdir -p "$(dirname -- "$metrics_path")"
|
| 36 |
+
echo "EVALUATE $task_id"
|
| 37 |
+
PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m evaluation.evaluate \
|
| 38 |
+
--root "$DLB_ROOT" --samples "$sample_dir/samples.jsonl" \
|
| 39 |
+
--metrics "$METRICS" --dataset "$dataset" --output "$metrics_path"
|
| 40 |
+
exit_code=$?
|
| 41 |
+
if ((exit_code != 0)); then
|
| 42 |
+
printf '%s\t%s\t%s\t%s\t%s\n' "$task_id" "$model" "$dataset" "$steps" "$exit_code" >>"$failures"
|
| 43 |
+
status=1
|
| 44 |
+
fi
|
| 45 |
+
done < <(tail -n +3 "$MATRIX")
|
| 46 |
+
if [[ ! -s "$failures" ]]; then rm -f "$failures"; fi
|
| 47 |
+
exit "$status"
|
scripts/evaluate_conditional_4gpu.sh
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Four-GPU local quality evaluation over completed C64 conditional samples.
|
| 3 |
+
set -uo pipefail
|
| 4 |
+
|
| 5 |
+
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
| 6 |
+
DLB_ROOT="${DLB_ROOT:-$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd -P)}"
|
| 7 |
+
PYTHON_BIN="${DLB_PYTHON:-python}"
|
| 8 |
+
MATRIX="${DLB_CONDITIONAL_MATRIX:-}"
|
| 9 |
+
CUSTOM_MATRIX=0
|
| 10 |
+
if [[ -n "$MATRIX" ]]; then CUSTOM_MATRIX=1; fi
|
| 11 |
+
METRICS="conditional_gen_ppl,mauve_suffix,entropy,self_bleu,prefix_exact_match"
|
| 12 |
+
GPUS="${DLB_GPUS:-0,1,2,3}"
|
| 13 |
+
MAX_JOBS="${DLB_MAX_JOBS:-4}"
|
| 14 |
+
DRY_RUN=()
|
| 15 |
+
|
| 16 |
+
usage() {
|
| 17 |
+
printf 'Usage: %s [--root PATH] [--matrix PATH] [--metrics LIST] [--gpus LIST] [--max-jobs N] [--dry-run]\n' "$0"
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
while (($#)); do
|
| 21 |
+
case "$1" in
|
| 22 |
+
--root) DLB_ROOT="$2"; shift 2 ;;
|
| 23 |
+
--matrix) MATRIX="$2"; CUSTOM_MATRIX=1; shift 2 ;;
|
| 24 |
+
--metrics) METRICS="$2"; shift 2 ;;
|
| 25 |
+
--gpus) GPUS="$2"; shift 2 ;;
|
| 26 |
+
--max-jobs) MAX_JOBS="$2"; shift 2 ;;
|
| 27 |
+
--dry-run) DRY_RUN=(--dry-run); shift ;;
|
| 28 |
+
--help) usage; exit 0 ;;
|
| 29 |
+
*) echo "unknown argument: $1" >&2; usage; exit 2 ;;
|
| 30 |
+
esac
|
| 31 |
+
done
|
| 32 |
+
|
| 33 |
+
DLB_ROOT="$(CDPATH= cd -- "$DLB_ROOT" && pwd -P)"
|
| 34 |
+
if [[ -z "$MATRIX" ]]; then MATRIX="$DLB_ROOT/results/conditional/matrix/generation.tsv"; fi
|
| 35 |
+
export DLB_ROOT
|
| 36 |
+
mkdir -p "$DLB_ROOT/results/conditional/matrix" "$DLB_ROOT/results/logs"
|
| 37 |
+
if (( CUSTOM_MATRIX )); then
|
| 38 |
+
if [[ ! -f "$MATRIX" ]]; then
|
| 39 |
+
echo "custom matrix does not exist: $MATRIX" >&2
|
| 40 |
+
exit 2
|
| 41 |
+
fi
|
| 42 |
+
else
|
| 43 |
+
PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.conditional_matrix \
|
| 44 |
+
--root "$DLB_ROOT" --output "$MATRIX" || exit $?
|
| 45 |
+
fi
|
| 46 |
+
exec env PYTHONPATH="$DLB_ROOT/src${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m dlb.gpu_matrix \
|
| 47 |
+
--root "$DLB_ROOT" --stage evaluate --matrix "$MATRIX" \
|
| 48 |
+
--gpus "$GPUS" --max-jobs "$MAX_JOBS" --metrics "$METRICS" "${DRY_RUN[@]}"
|
scripts/evaluate_elf.py
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Score independent ELF artifacts with pinned, offline evaluation assets."""
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import argparse
|
| 6 |
+
from collections import defaultdict
|
| 7 |
+
from dataclasses import asdict
|
| 8 |
+
import json
|
| 9 |
+
import math
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
import statistics
|
| 12 |
+
import sys
|
| 13 |
+
|
| 14 |
+
from elf_common import ROOT, asset, manifest, offline, read_jsonl, require_server, sha256, write_json
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def validate_records(rows, meta):
|
| 18 |
+
if len(rows) != meta["sample_count"]:
|
| 19 |
+
raise ValueError("Sample count differs from generation manifest")
|
| 20 |
+
n = meta["prompt_count"]
|
| 21 |
+
expected = [(i, 0) for i in range(n)]
|
| 22 |
+
if meta.get("diversity"):
|
| 23 |
+
expected += [(i, c) for c in range(1, 5) for i in range(min(256, n))]
|
| 24 |
+
actual = [(r["prompt_id"], r["completion_id"]) for r in rows]
|
| 25 |
+
if actual != expected or [r["id"] for r in rows] != list(range(len(rows))):
|
| 26 |
+
raise ValueError("Missing/duplicated/out-of-order prompt completions")
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def main():
|
| 30 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 31 |
+
p.add_argument("--run", type=Path, required=True)
|
| 32 |
+
p.add_argument("--root", type=Path, default=ROOT)
|
| 33 |
+
p.add_argument("--batch-size", type=int, default=8)
|
| 34 |
+
p.add_argument("--mauve", action="store_true")
|
| 35 |
+
args = p.parse_args()
|
| 36 |
+
require_server()
|
| 37 |
+
offline()
|
| 38 |
+
root = args.root.resolve()
|
| 39 |
+
sys.path[:0] = [str(root), str(root / "src")]
|
| 40 |
+
meta = json.loads((args.run / "generation.json").read_text())
|
| 41 |
+
samples = args.run / "samples.jsonl"
|
| 42 |
+
if sha256(samples) != meta["samples_sha256"]:
|
| 43 |
+
raise ValueError("Sample file changed since generation")
|
| 44 |
+
if sha256(root / "data/elf/assets.json") != meta["assets_manifest_sha256"]:
|
| 45 |
+
raise ValueError("Asset manifest changed since generation")
|
| 46 |
+
rows = read_jsonl(samples)
|
| 47 |
+
validate_records(rows, meta)
|
| 48 |
+
primary = [r for r in rows if r["completion_id"] == 0]
|
| 49 |
+
result = {"schema": "dlb-elf-metrics-v1", "task": meta["task"],
|
| 50 |
+
"generation_manifest_sha256": sha256(args.run / "generation.json"),
|
| 51 |
+
"samples_sha256": sha256(samples), "sample_count": len(primary),
|
| 52 |
+
"evaluator_sha256": sha256(Path(__file__)), "metrics": {}}
|
| 53 |
+
metrics = result["metrics"]
|
| 54 |
+
if meta["task"] in ("wmt14", "xsum"):
|
| 55 |
+
import sacrebleu
|
| 56 |
+
from rouge_score import rouge_scorer
|
| 57 |
+
hypotheses, refs = [r["generated"] for r in primary], [r["reference"] for r in primary]
|
| 58 |
+
# Same metric options as official utils/metrics_utils.py.
|
| 59 |
+
bleu = sacrebleu.metrics.BLEU(lowercase=True, effective_order=True)
|
| 60 |
+
metrics["bleu"] = bleu.corpus_score(hypotheses, [refs]).score
|
| 61 |
+
metrics["bleu_signature"] = str(bleu.get_signature())
|
| 62 |
+
metrics["empty_fraction"] = sum(not x.strip() for x in hypotheses) / len(hypotheses)
|
| 63 |
+
scorer = rouge_scorer.RougeScorer(["rouge1", "rouge2", "rougeL"], use_stemmer=True)
|
| 64 |
+
scores = [scorer.score(ref, hyp) for ref, hyp in zip(refs, hypotheses)]
|
| 65 |
+
for key in ("rouge1", "rouge2", "rougeL"):
|
| 66 |
+
values = [s[key].fmeasure * 100 for s in scores]
|
| 67 |
+
metrics[key] = statistics.fmean(values)
|
| 68 |
+
metrics[key + "_sem"] = statistics.pstdev(values) / math.sqrt(len(values))
|
| 69 |
+
metrics["reference_policy"] = "full raw reference; no target truncation; ROUGE F1 stemmer=true"
|
| 70 |
+
else:
|
| 71 |
+
import torch
|
| 72 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 73 |
+
from evaluation.generative_perplexity import compute_gen_ppl, aggregate_nll
|
| 74 |
+
from evaluation.conditional_perplexity import PromptExcludedCausalLMScorer
|
| 75 |
+
from evaluation.unigram_entropy import unigram_entropy
|
| 76 |
+
from evaluation.self_bleu import compute_self_bleu
|
| 77 |
+
gpt_path = asset(root, "gpt2")
|
| 78 |
+
scorer_path = asset(root, "gpt2-large")
|
| 79 |
+
tok = AutoTokenizer.from_pretrained(str(gpt_path), local_files_only=True)
|
| 80 |
+
tok.pad_token = tok.eos_token
|
| 81 |
+
tok.padding_side = "right"
|
| 82 |
+
tok.truncation_side = "right"
|
| 83 |
+
tokenized = [tok(r["generated"], add_special_tokens=False)["input_ids"] for r in rows]
|
| 84 |
+
lengths = [len(ids) for ids in tokenized[:len(primary)]]
|
| 85 |
+
metrics["gpt2_length_mean"] = statistics.fmean(lengths)
|
| 86 |
+
metrics["gpt2_length_min"] = min(lengths)
|
| 87 |
+
metrics["empty_fraction"] = sum(n == 0 for n in lengths) / len(lengths)
|
| 88 |
+
metrics["below_64_tokens_fraction"] = sum(n < 64 for n in lengths) / len(lengths)
|
| 89 |
+
metrics["above_1024_tokens_fraction"] = sum(n > 1024 for n in lengths) / len(lengths)
|
| 90 |
+
limit = 64 if meta["task"] == "owt-prefix" else 1024
|
| 91 |
+
tokenized = [ids[:limit] for ids in tokenized]
|
| 92 |
+
# Never improve apparent PPL by silently removing degenerate generations.
|
| 93 |
+
if any(len(ids) < 2 for ids in tokenized):
|
| 94 |
+
result["valid"] = False
|
| 95 |
+
result["reason"] = "At least one completion has fewer than two GPT-2 tokens; no samples were dropped"
|
| 96 |
+
write_json(args.run / "metrics.json", result)
|
| 97 |
+
raise ValueError(result["reason"])
|
| 98 |
+
metrics["entropy_gpt2_nats"] = statistics.fmean(unigram_entropy(ids) for ids in tokenized[:len(primary)])
|
| 99 |
+
result["evaluator_assets"] = {k: manifest(root)["assets"][k] for k in ("gpt2", "gpt2-large")}
|
| 100 |
+
model = AutoModelForCausalLM.from_pretrained(str(scorer_path), local_files_only=True).cuda().eval()
|
| 101 |
+
if meta["task"] == "owt":
|
| 102 |
+
ppl = compute_gen_ppl([r["generated"] for r in primary], model, tok,
|
| 103 |
+
batch_size=args.batch_size, device="cuda",
|
| 104 |
+
model_revision=result["evaluator_assets"]["gpt2-large"]["revision"],
|
| 105 |
+
tokenizer_revision=result["evaluator_assets"]["gpt2"]["revision"])
|
| 106 |
+
metrics["generative_ppl"] = asdict(ppl)
|
| 107 |
+
else:
|
| 108 |
+
scorer = PromptExcludedCausalLMScorer(model, device="cuda")
|
| 109 |
+
def conditional_ppl(targets):
|
| 110 |
+
parts = []
|
| 111 |
+
for start in range(0, len(primary), args.batch_size):
|
| 112 |
+
batch = primary[start:start + args.batch_size]
|
| 113 |
+
combined, loss_masks = [], []
|
| 114 |
+
for j, row in enumerate(batch):
|
| 115 |
+
prefix = tok(row["input"], add_special_tokens=False)["input_ids"]
|
| 116 |
+
target = targets[start + j]
|
| 117 |
+
if not prefix or len(prefix) + len(target) > 1024:
|
| 118 |
+
raise ValueError("Conditional PPL input exceeds context or has empty prefix")
|
| 119 |
+
combined.append(prefix + target)
|
| 120 |
+
loss_masks.append([0] * len(prefix) + [1] * len(target))
|
| 121 |
+
width = max(map(len, combined))
|
| 122 |
+
attn = [[1] * len(x) + [0] * (width - len(x)) for x in combined]
|
| 123 |
+
masks = [x + [0] * (width - len(x)) for x in loss_masks]
|
| 124 |
+
ids = [x + [tok.pad_token_id] * (width - len(x)) for x in combined]
|
| 125 |
+
parts.append(scorer.score_prompt_excluded_batch(ids, attn, masks))
|
| 126 |
+
return asdict(aggregate_nll(parts))
|
| 127 |
+
metrics["conditional_ppl"] = conditional_ppl(tokenized[:len(primary)])
|
| 128 |
+
references = [tok(r["reference"], add_special_tokens=False)["input_ids"][:64] for r in primary]
|
| 129 |
+
metrics["reference_conditional_ppl"] = conditional_ppl(references)
|
| 130 |
+
metrics["conditional_ppl_policy"] = "separate GPT-2 prefix/suffix tokenization; prefix targets masked"
|
| 131 |
+
metrics["entropy_all_completions_gpt2_nats"] = statistics.fmean(unigram_entropy(ids) for ids in tokenized)
|
| 132 |
+
if meta.get("diversity"):
|
| 133 |
+
groups = defaultdict(list)
|
| 134 |
+
for row, ids in zip(rows, tokenized):
|
| 135 |
+
if row["prompt_id"] < min(256, meta["prompt_count"]):
|
| 136 |
+
groups[row["prompt_id"]].append(" ".join(map(str, ids)))
|
| 137 |
+
metrics["grouped_self_bleu"] = statistics.fmean(compute_self_bleu(group).score for group in groups.values())
|
| 138 |
+
if args.mauve:
|
| 139 |
+
import mauve
|
| 140 |
+
del scorer, model
|
| 141 |
+
torch.cuda.empty_cache()
|
| 142 |
+
score = mauve.compute_mauve(
|
| 143 |
+
p_text=[tok.decode(ids) for ids in tokenized[:len(primary)]],
|
| 144 |
+
q_text=[tok.decode(ids) for ids in references], featurize_model_name=str(scorer_path),
|
| 145 |
+
device_id=0, max_text_length=64, seed=42, verbose=False)
|
| 146 |
+
metrics["mauve"] = float(score.mauve)
|
| 147 |
+
metrics["entropy_policy"] = "mean per-sample natural-log entropy on retokenized GPT-2 suffix/text; same PPL length cap"
|
| 148 |
+
result["valid"] = True
|
| 149 |
+
write_json(args.run / "metrics.json", result)
|
| 150 |
+
print(json.dumps(metrics, indent=2))
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
if __name__ == "__main__":
|
| 154 |
+
main()
|
scripts/evaluate_elf_owt_baseline.py
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Rescore public ELF OWT outputs against the existing C64 baseline (no generation)."""
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import argparse
|
| 6 |
+
import csv
|
| 7 |
+
from dataclasses import dataclass, asdict
|
| 8 |
+
import json
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
import statistics
|
| 11 |
+
import sys
|
| 12 |
+
|
| 13 |
+
from elf_common import ROOT, asset, manifest, offline, read_jsonl, require_server, sha256, write_json
|
| 14 |
+
from run_elf_remaining import build_matrix, reusable_result
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
@dataclass
|
| 18 |
+
class C64Record:
|
| 19 |
+
"""Token-record interface consumed by the existing baseline evaluator."""
|
| 20 |
+
prompt_id: int
|
| 21 |
+
completion_id: int
|
| 22 |
+
prefix_token_ids: list[int]
|
| 23 |
+
continuation_token_ids: list[int]
|
| 24 |
+
reference_token_ids: list[int]
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def c64_records(rows, prompts, tokenized, tokenizer, *, allow_short=False):
|
| 28 |
+
by_id = {p['prompt_id']: p for p in prompts}
|
| 29 |
+
records = []
|
| 30 |
+
for row, ids in zip(rows, tokenized, strict=True):
|
| 31 |
+
source = by_id[row['prompt_id']]
|
| 32 |
+
prefix, reference = source['prefix_token_ids'], source['reference_token_ids']
|
| 33 |
+
if len(prefix) != 64 or len(reference) != 64:
|
| 34 |
+
raise ValueError('Canonical prompt/reference must contain exactly 64 GPT-2 tokens')
|
| 35 |
+
# Prove the saved ELF condition/reference came from this exact prompt.
|
| 36 |
+
if row['input'] != tokenizer.decode(prefix, skip_special_tokens=False):
|
| 37 |
+
raise ValueError('Saved ELF input differs from canonical C64 prompt')
|
| 38 |
+
if row['reference'] != tokenizer.decode(reference, skip_special_tokens=False):
|
| 39 |
+
raise ValueError('Saved ELF reference differs from canonical C64 reference')
|
| 40 |
+
if not ids or (len(ids) < 64 and not allow_short):
|
| 41 |
+
raise ValueError('Short response cannot satisfy the 64-token scoring contract')
|
| 42 |
+
records.append(C64Record(row['prompt_id'], row['completion_id'], prefix, ids[:64], reference))
|
| 43 |
+
return records
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def main():
|
| 47 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 48 |
+
parser.add_argument('--root', type=Path, default=ROOT)
|
| 49 |
+
parser.add_argument('--task', choices=['owt', 'owt-prefix'], required=True)
|
| 50 |
+
parser.add_argument('--output', type=Path)
|
| 51 |
+
parser.add_argument('--batch-size', type=int, default=8)
|
| 52 |
+
parser.add_argument('--steps', nargs='+', type=int, choices=[1, 2, 4, 8, 16, 32, 1024])
|
| 53 |
+
parser.add_argument('--short-response-policy', choices=['strict', 'observed'], default='strict',
|
| 54 |
+
help='observed: separately report all nonempty responses up to 64 GPT-2 tokens')
|
| 55 |
+
parser.add_argument('--plan', action='store_true')
|
| 56 |
+
args = parser.parse_args()
|
| 57 |
+
if args.batch_size <= 0:
|
| 58 |
+
parser.error('--batch-size must be positive')
|
| 59 |
+
observed = args.short_response_policy == 'observed'
|
| 60 |
+
if observed and args.task != 'owt-prefix':
|
| 61 |
+
parser.error('observed short-response policy is only for owt-prefix')
|
| 62 |
+
if args.steps and len(args.steps) != len(set(args.steps)):
|
| 63 |
+
parser.error('duplicate steps')
|
| 64 |
+
root = args.root.resolve()
|
| 65 |
+
sys.path[:0] = [str(root), str(root / 'src')]
|
| 66 |
+
output = args.output or root / 'results' / (f'elf-owt-baseline-eval-{args.task}' + ('-observed' if observed else ''))
|
| 67 |
+
assets = manifest(root)['assets']
|
| 68 |
+
asset_hash = sha256(root / 'data/elf/assets.json')
|
| 69 |
+
cells, blocked = build_matrix(root, [args.task])
|
| 70 |
+
if blocked:
|
| 71 |
+
raise ValueError(f'Invalid inputs: {blocked}')
|
| 72 |
+
if args.steps:
|
| 73 |
+
cells = [cell for cell in cells if cell.steps in args.steps]
|
| 74 |
+
runs = []
|
| 75 |
+
for cell in cells:
|
| 76 |
+
found, rejected = reusable_result(root, cell, asset_hash, assets)
|
| 77 |
+
if not found:
|
| 78 |
+
raise ValueError(f'Missing verified generation: {cell.key}; first run run_elf_remaining.py; rejected={rejected}')
|
| 79 |
+
path = Path(found['run'])
|
| 80 |
+
runs.append((cell, path))
|
| 81 |
+
print(f'RESCORE {cell.key}: {path}', flush=True)
|
| 82 |
+
if args.plan:
|
| 83 |
+
print(f'{len(runs)} cells; no generation, no training; output={output}')
|
| 84 |
+
return
|
| 85 |
+
require_server()
|
| 86 |
+
offline()
|
| 87 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 88 |
+
from evaluation.generative_perplexity import compute_gen_ppl
|
| 89 |
+
from evaluation.conditional_perplexity import compute_conditional_gen_ppl, conditional_texts
|
| 90 |
+
from evaluation.conditional_evaluate import _gpt2_tokenized_self_bleu
|
| 91 |
+
from evaluation.unigram_entropy import unigram_entropy
|
| 92 |
+
tok = AutoTokenizer.from_pretrained(str(asset(root, 'gpt2')), local_files_only=True)
|
| 93 |
+
tok.pad_token = tok.eos_token
|
| 94 |
+
tok.padding_side = tok.truncation_side = 'right'
|
| 95 |
+
prompts = read_jsonl(root / 'data/conditional/owt-c64/prompts.jsonl') if args.task == 'owt-prefix' else []
|
| 96 |
+
dependencies = [Path(__file__), root / 'evaluation/generative_perplexity.py',
|
| 97 |
+
root / 'evaluation/conditional_perplexity.py', root / 'evaluation/conditional_evaluate.py',
|
| 98 |
+
root / 'evaluation/unigram_entropy.py', root / 'evaluation/self_bleu.py']
|
| 99 |
+
evaluator = {p.name: sha256(p) for p in dependencies}
|
| 100 |
+
model = None
|
| 101 |
+
summary = []
|
| 102 |
+
for cell, path in runs:
|
| 103 |
+
destination = output / f'steps_{cell.steps}' / 'metrics.json'
|
| 104 |
+
provenance = {'protocol': 'elf_owt_public_baseline_observed_v1' if observed else 'elf_owt_public_baseline_eval_v1', 'task': args.task,
|
| 105 |
+
'steps': cell.steps, 'source_run': str(path),
|
| 106 |
+
'samples_sha256': sha256(path / 'samples.jsonl'),
|
| 107 |
+
'generation_manifest_sha256': sha256(path / 'generation.json'),
|
| 108 |
+
'assets_manifest_sha256': asset_hash, 'evaluator': evaluator,
|
| 109 |
+
'batch_size': args.batch_size,
|
| 110 |
+
'prompts_sha256': sha256(root / 'data/conditional/owt-c64/prompts.jsonl') if prompts else None}
|
| 111 |
+
cached = json.loads(destination.read_text()) if destination.exists() else {}
|
| 112 |
+
if cached and cached.get('protocol') != provenance['protocol']:
|
| 113 |
+
raise ValueError(f'Different protocol already exists at {destination}; use a separate --output')
|
| 114 |
+
if all(cached.get(k) == v for k, v in provenance.items()) and type(cached.get('valid')) is bool:
|
| 115 |
+
result = cached
|
| 116 |
+
print(f'SKIP verified evaluation: {destination}', flush=True)
|
| 117 |
+
else:
|
| 118 |
+
rows = read_jsonl(path / 'samples.jsonl')
|
| 119 |
+
ids = [tok(row['generated'], add_special_tokens=False)['input_ids'] for row in rows]
|
| 120 |
+
lengths = list(map(len, ids))
|
| 121 |
+
limit = 64 if prompts else 1024
|
| 122 |
+
short = [row['id'] for row, tokens in zip(rows, ids) if len(tokens) < (64 if prompts else 2)]
|
| 123 |
+
invalid = [row['id'] for row, tokens in zip(rows, ids) if not tokens] if observed else short
|
| 124 |
+
result = {**provenance, 'sample_count': len(rows), 'prompt_count': 1024,
|
| 125 |
+
'metrics': {}, 'valid': not invalid,
|
| 126 |
+
'short_response_policy': args.short_response_policy,
|
| 127 |
+
'invalid_sample_ids': invalid,
|
| 128 |
+
'length_diagnostics': {'mean': statistics.fmean(lengths), 'min': min(lengths),
|
| 129 |
+
'max': max(lengths), 'below_64_count': sum(n < 64 for n in lengths),
|
| 130 |
+
'above_1024_count': sum(n > 1024 for n in lengths)},
|
| 131 |
+
'short_sample_ids': short,
|
| 132 |
+
'native_tokenizer': 't5-small', 'scoring_tokenizer': 'gpt2',
|
| 133 |
+
'scoring_limit': limit, 'completion_scope': 'all_saved_completions',
|
| 134 |
+
'output_policy': 'released ELF EOS-trimmed decoded text; GPT-2 retokenized; no fabricated padding'}
|
| 135 |
+
if invalid:
|
| 136 |
+
result['reason'] = ('Empty outputs' if observed else 'Short outputs') + ': cannot score the requested contract; none dropped, padded, or resampled'
|
| 137 |
+
else:
|
| 138 |
+
sliced = [tokens[:limit] for tokens in ids]
|
| 139 |
+
result['metrics']['entropy_gpt2_nats'] = statistics.fmean(unigram_entropy(tokens) for tokens in sliced)
|
| 140 |
+
records = c64_records(rows, prompts, ids, tok, allow_short=observed) if prompts else None
|
| 141 |
+
if model is None:
|
| 142 |
+
model = AutoModelForCausalLM.from_pretrained(str(asset(root, 'gpt2-large')), local_files_only=True).cuda().eval()
|
| 143 |
+
kwargs = dict(batch_size=args.batch_size, device='cuda',
|
| 144 |
+
model_revision=assets['gpt2-large']['revision'], tokenizer_revision=assets['gpt2']['revision'])
|
| 145 |
+
if prompts:
|
| 146 |
+
ppl = compute_conditional_gen_ppl(records, model, tok, tok, allow_short_continuations=observed, **kwargs)
|
| 147 |
+
result['metrics']['conditional_ppl'] = asdict(ppl)
|
| 148 |
+
texts = conditional_texts(records, tok, allow_short_continuations=observed)
|
| 149 |
+
result['metrics']['grouped_self_bleu'] = _gpt2_tokenized_self_bleu(records, [t.generated_suffix for t in texts], tok)
|
| 150 |
+
result['ppl_policy'] = 'existing compute_conditional_gen_ppl; canonical prefix IDs; decode joined IDs then retokenize; prompt loss excluded'
|
| 151 |
+
else:
|
| 152 |
+
ppl = compute_gen_ppl([row['generated'] for row in rows], model, tok, **kwargs)
|
| 153 |
+
result['metrics']['generative_ppl'] = asdict(ppl)
|
| 154 |
+
if ppl.sample_count != len(rows):
|
| 155 |
+
raise ValueError('PPL silently changed completion count')
|
| 156 |
+
write_json(destination, result)
|
| 157 |
+
metrics = result['metrics']
|
| 158 |
+
ppl = metrics.get('conditional_ppl', metrics.get('generative_ppl', {})).get('perplexity')
|
| 159 |
+
summary.append({'task': args.task, 'steps': cell.steps, 'protocol': result['protocol'], 'sample_count': result['sample_count'],
|
| 160 |
+
'valid': result['valid'], 'ppl': ppl, 'entropy': metrics.get('entropy_gpt2_nats'),
|
| 161 |
+
'short_count': len(result['short_sample_ids']), 'metrics_path': str(destination)})
|
| 162 |
+
print(json.dumps(summary[-1]), flush=True)
|
| 163 |
+
output.mkdir(parents=True, exist_ok=True)
|
| 164 |
+
summary_name = 'summary' + ('-steps-' + '-'.join(str(c.steps) for c, _ in runs) if args.steps else '') + '.csv'
|
| 165 |
+
with (output / summary_name).open('w') as handle:
|
| 166 |
+
writer = csv.DictWriter(handle, fieldnames=list(summary[0]))
|
| 167 |
+
writer.writeheader()
|
| 168 |
+
writer.writerows(summary)
|
| 169 |
+
print(f'SUMMARY: {output / summary_name}', flush=True)
|
| 170 |
+
if any(not row['valid'] for row in summary):
|
| 171 |
+
raise SystemExit(2)
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
if __name__ == '__main__':
|
| 175 |
+
main()
|
scripts/fetch_checkpoints.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Enumerate or fetch pinned public checkpoint resources."""
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
import platform
|
| 9 |
+
import sys
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def parse_args() -> argparse.Namespace:
|
| 13 |
+
parser = argparse.ArgumentParser()
|
| 14 |
+
parser.add_argument("--root", type=Path, default=Path(__file__).resolve().parents[1])
|
| 15 |
+
parser.add_argument("--config", type=Path)
|
| 16 |
+
parser.add_argument("--registry", type=Path)
|
| 17 |
+
parser.add_argument("--dry-run", action="store_true")
|
| 18 |
+
parser.add_argument("--all-public", action="store_true")
|
| 19 |
+
return parser.parse_args()
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
def main() -> int:
|
| 23 |
+
args = parse_args()
|
| 24 |
+
root = args.root.resolve()
|
| 25 |
+
project_root = Path(__file__).resolve().parents[1]
|
| 26 |
+
sys.path.insert(0, str(project_root / "src"))
|
| 27 |
+
from dlb.checkpoints import (
|
| 28 |
+
fetch_all_resources,
|
| 29 |
+
load_checkpoint_manifest,
|
| 30 |
+
require_server_platform,
|
| 31 |
+
validate_checkpoint_coverage,
|
| 32 |
+
)
|
| 33 |
+
from dlb.registry import load_registry
|
| 34 |
+
|
| 35 |
+
manifest_path = (args.config or root / "artifacts" / "checkpoints.yaml").resolve()
|
| 36 |
+
registry_path = (args.registry or root / "configs" / "experiments.yaml").resolve()
|
| 37 |
+
manifest = load_checkpoint_manifest(manifest_path)
|
| 38 |
+
registry = load_registry(registry_path)
|
| 39 |
+
validate_checkpoint_coverage(registry, manifest)
|
| 40 |
+
if args.dry_run:
|
| 41 |
+
for resource_id, resource in manifest.resources.items():
|
| 42 |
+
print(
|
| 43 |
+
f"RESOURCE {resource_id} {resource.backend} {resource.provenance} "
|
| 44 |
+
f"checkpoints/{resource.destination} teacher={resource.teacher_family}"
|
| 45 |
+
)
|
| 46 |
+
for recipe_id, recipe in manifest.recipes.items():
|
| 47 |
+
print(
|
| 48 |
+
f"RECIPE {recipe_id} {recipe.model}/{recipe.dataset} {recipe.provenance} "
|
| 49 |
+
f"{recipe.output} teacher={recipe.teacher_family}"
|
| 50 |
+
)
|
| 51 |
+
return 0
|
| 52 |
+
if not args.all_public:
|
| 53 |
+
print("ERROR: pass --all-public to acknowledge all public checkpoint downloads", file=sys.stderr)
|
| 54 |
+
return 2
|
| 55 |
+
try:
|
| 56 |
+
require_server_platform(platform.system())
|
| 57 |
+
except RuntimeError as error:
|
| 58 |
+
print(f"ERROR: {error}", file=sys.stderr)
|
| 59 |
+
return 2
|
| 60 |
+
lock = fetch_all_resources(root, manifest_path, manifest)
|
| 61 |
+
for resource_id, record in lock["resources"].items():
|
| 62 |
+
print(f"{str(record['status']).upper()} {resource_id} {record['destination']}")
|
| 63 |
+
return 1 if any(record["status"] != "downloaded" for record in lock["resources"].values()) else 0
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
if __name__ == "__main__":
|
| 67 |
+
raise SystemExit(main())
|
scripts/fetch_data.py
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Download pinned datasets and model/tokenizer snapshots with cache resume."""
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
from datetime import datetime, timezone
|
| 8 |
+
import os
|
| 9 |
+
from pathlib import Path
|
| 10 |
+
import shutil
|
| 11 |
+
import sys
|
| 12 |
+
|
| 13 |
+
import yaml
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def parse_args() -> argparse.Namespace:
|
| 17 |
+
parser = argparse.ArgumentParser()
|
| 18 |
+
parser.add_argument("--root", type=Path, default=Path(__file__).resolve().parents[1])
|
| 19 |
+
parser.add_argument("--config", type=Path)
|
| 20 |
+
parser.add_argument("--dry-run", action="store_true")
|
| 21 |
+
parser.add_argument("--allow-low-disk", action="store_true")
|
| 22 |
+
return parser.parse_args()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def load_configuration(root: Path, config_path: Path | None) -> dict[str, object]:
|
| 26 |
+
path = config_path or root / "artifacts" / "data.yaml"
|
| 27 |
+
return yaml.safe_load(path.read_text(encoding="utf-8"))
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def target_lines(configuration: dict[str, object]) -> list[str]:
|
| 31 |
+
datasets = configuration["datasets"]
|
| 32 |
+
models = configuration["models"]
|
| 33 |
+
return [
|
| 34 |
+
*[
|
| 35 |
+
f"DATASET {name} {datasets[name]['repo_id']}@{datasets[name]['revision']}"
|
| 36 |
+
for name in ("lm1b", "owt")
|
| 37 |
+
],
|
| 38 |
+
*[
|
| 39 |
+
f"MODEL {name}@{models[name]}"
|
| 40 |
+
for name in ("bert-base-uncased", "gpt2", "gpt2-large")
|
| 41 |
+
],
|
| 42 |
+
]
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def directory_size(path: Path) -> int:
|
| 46 |
+
return sum(candidate.stat().st_size for candidate in path.rglob("*") if candidate.is_file())
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def _relative_cache_path(path: Path, root: Path) -> str:
|
| 50 |
+
try:
|
| 51 |
+
return path.resolve().relative_to(root).as_posix()
|
| 52 |
+
except ValueError:
|
| 53 |
+
return path.resolve().as_posix()
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
def main() -> int:
|
| 57 |
+
args = parse_args()
|
| 58 |
+
root = args.root.resolve()
|
| 59 |
+
configuration = load_configuration(root, args.config)
|
| 60 |
+
for line in target_lines(configuration):
|
| 61 |
+
print(line)
|
| 62 |
+
if args.dry_run:
|
| 63 |
+
return 0
|
| 64 |
+
|
| 65 |
+
hf_home = root / "data" / "raw" / "huggingface"
|
| 66 |
+
datasets_cache = hf_home / "datasets"
|
| 67 |
+
hub_cache = hf_home / "hub"
|
| 68 |
+
hf_home.mkdir(parents=True, exist_ok=True)
|
| 69 |
+
os.environ["HF_HOME"] = str(hf_home)
|
| 70 |
+
os.environ["HF_DATASETS_CACHE"] = str(datasets_cache)
|
| 71 |
+
|
| 72 |
+
from datasets import load_dataset
|
| 73 |
+
from huggingface_hub import snapshot_download
|
| 74 |
+
|
| 75 |
+
sys.path.insert(0, str(root / "src"))
|
| 76 |
+
from dlb.data import disk_preflight_evidence, validate_download_manifest
|
| 77 |
+
from dlb.io import atomic_json_write
|
| 78 |
+
|
| 79 |
+
dataset_records: dict[str, object] = {}
|
| 80 |
+
owt_disk_preflight = None
|
| 81 |
+
for name in ("lm1b", "owt"):
|
| 82 |
+
specification = configuration["datasets"][name]
|
| 83 |
+
if name == "owt":
|
| 84 |
+
free_bytes = shutil.disk_usage(root).free
|
| 85 |
+
owt_disk_preflight = disk_preflight_evidence(
|
| 86 |
+
free_bytes, allow_low_disk=args.allow_low_disk
|
| 87 |
+
)
|
| 88 |
+
if owt_disk_preflight["override_used"]:
|
| 89 |
+
print(
|
| 90 |
+
f"WARNING low disk override: {free_bytes} bytes free, required 55 GiB",
|
| 91 |
+
file=sys.stderr,
|
| 92 |
+
)
|
| 93 |
+
if name == "lm1b":
|
| 94 |
+
source_metadata_snapshot = snapshot_download(
|
| 95 |
+
repo_id=specification["repo_id"],
|
| 96 |
+
repo_type="dataset",
|
| 97 |
+
revision=specification["revision"],
|
| 98 |
+
cache_dir=hub_cache,
|
| 99 |
+
)
|
| 100 |
+
dataset_snapshot = snapshot_download(
|
| 101 |
+
repo_id=specification["repo_id"],
|
| 102 |
+
repo_type="dataset",
|
| 103 |
+
revision=specification["parquet_revision"],
|
| 104 |
+
cache_dir=hub_cache,
|
| 105 |
+
allow_patterns="plain_text/**/*.parquet",
|
| 106 |
+
)
|
| 107 |
+
snapshot_path = Path(dataset_snapshot)
|
| 108 |
+
loaded = load_dataset(
|
| 109 |
+
"parquet",
|
| 110 |
+
data_files={
|
| 111 |
+
"train": [
|
| 112 |
+
str(path)
|
| 113 |
+
for path in sorted(
|
| 114 |
+
(snapshot_path / "plain_text" / "train").glob("*.parquet")
|
| 115 |
+
)
|
| 116 |
+
],
|
| 117 |
+
"test": [
|
| 118 |
+
str(path)
|
| 119 |
+
for path in sorted(
|
| 120 |
+
(snapshot_path / "plain_text" / "test").glob("*.parquet")
|
| 121 |
+
)
|
| 122 |
+
],
|
| 123 |
+
},
|
| 124 |
+
cache_dir=str(datasets_cache),
|
| 125 |
+
download_mode="reuse_dataset_if_exists",
|
| 126 |
+
)
|
| 127 |
+
archive_specification = configuration["lm1b_archive"]
|
| 128 |
+
if len(loaded["train"]) != int(archive_specification["train_documents"]):
|
| 129 |
+
raise RuntimeError("LM1B training document count differs from pinned metadata")
|
| 130 |
+
if len(loaded["test"]) != int(archive_specification["test_documents"]):
|
| 131 |
+
raise RuntimeError("LM1B test document count differs from pinned metadata")
|
| 132 |
+
else:
|
| 133 |
+
source_metadata_snapshot = None
|
| 134 |
+
dataset_snapshot = None
|
| 135 |
+
loaded = load_dataset(
|
| 136 |
+
specification["repo_id"],
|
| 137 |
+
specification["config"],
|
| 138 |
+
revision=specification["revision"],
|
| 139 |
+
cache_dir=str(datasets_cache),
|
| 140 |
+
download_mode="reuse_dataset_if_exists",
|
| 141 |
+
)
|
| 142 |
+
if len(loaded["train"]) != int(specification["documents"]):
|
| 143 |
+
raise RuntimeError("OpenWebText document count differs from pinned metadata")
|
| 144 |
+
dataset_records[name] = {
|
| 145 |
+
"repo_id": specification["repo_id"],
|
| 146 |
+
"source_revision": specification["revision"],
|
| 147 |
+
"cache_files": {
|
| 148 |
+
split: [
|
| 149 |
+
_relative_cache_path(Path(entry["filename"]), root)
|
| 150 |
+
for entry in value.cache_files
|
| 151 |
+
]
|
| 152 |
+
for split, value in loaded.items()
|
| 153 |
+
},
|
| 154 |
+
"split_rows": {split: len(value) for split, value in loaded.items()},
|
| 155 |
+
"dataset_snapshot": (
|
| 156 |
+
_relative_cache_path(Path(dataset_snapshot), root) if dataset_snapshot else None
|
| 157 |
+
),
|
| 158 |
+
"source_metadata_snapshot": (
|
| 159 |
+
_relative_cache_path(Path(source_metadata_snapshot), root)
|
| 160 |
+
if source_metadata_snapshot
|
| 161 |
+
else None
|
| 162 |
+
),
|
| 163 |
+
"materialization_revision": specification.get("parquet_revision"),
|
| 164 |
+
}
|
| 165 |
+
print(f"DOWNLOADED DATASET {name} {dataset_records[name]['split_rows']}")
|
| 166 |
+
|
| 167 |
+
model_records: dict[str, object] = {}
|
| 168 |
+
for name in ("bert-base-uncased", "gpt2", "gpt2-large"):
|
| 169 |
+
revision = configuration["models"][name]
|
| 170 |
+
snapshot_path = Path(
|
| 171 |
+
snapshot_download(
|
| 172 |
+
repo_id=name,
|
| 173 |
+
revision=revision,
|
| 174 |
+
cache_dir=hub_cache,
|
| 175 |
+
)
|
| 176 |
+
)
|
| 177 |
+
model_records[name] = {
|
| 178 |
+
"repo_id": name,
|
| 179 |
+
"revision": revision,
|
| 180 |
+
"snapshot_path": snapshot_path.relative_to(root).as_posix(),
|
| 181 |
+
"size_bytes": directory_size(snapshot_path),
|
| 182 |
+
}
|
| 183 |
+
print(f"DOWNLOADED MODEL {name} {snapshot_path}")
|
| 184 |
+
|
| 185 |
+
manifest = {
|
| 186 |
+
"schema_version": 1,
|
| 187 |
+
"created_at": datetime.now(timezone.utc).isoformat().replace("+00:00", "Z"),
|
| 188 |
+
"hf_home": hf_home.relative_to(root).as_posix(),
|
| 189 |
+
"owt_disk_preflight": owt_disk_preflight,
|
| 190 |
+
"datasets": dataset_records,
|
| 191 |
+
"models": model_records,
|
| 192 |
+
}
|
| 193 |
+
for dataset_name in ("lm1b", "owt"):
|
| 194 |
+
validate_download_manifest(configuration, manifest, dataset_name)
|
| 195 |
+
atomic_json_write(root / "data" / "manifests" / "downloads.json", manifest)
|
| 196 |
+
print(f"RAW CACHE BYTES {directory_size(hf_home)}")
|
| 197 |
+
return 0
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
if __name__ == "__main__":
|
| 201 |
+
raise SystemExit(main())
|
scripts/inspect_elf_progress.py
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Read-only ELF quality inventory; verify saved artifacts before reporting completion."""
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
import argparse
|
| 6 |
+
import json
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
from elf_common import ROOT, read_jsonl, sha256, write_json
|
| 10 |
+
from evaluate_elf import validate_records
|
| 11 |
+
|
| 12 |
+
OWT_MAIN_STEPS = (1, 2, 4, 8, 16, 32, 1024)
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
def inspect_run(path):
|
| 16 |
+
row = {"run": str(path), "status": "incomplete_generation"}
|
| 17 |
+
try:
|
| 18 |
+
request = json.loads((path / "request.json").read_text())
|
| 19 |
+
row.update(task=request["task"], steps=request["steps"], seed=request["seed"],
|
| 20 |
+
compile=request["compile"],
|
| 21 |
+
split=(request.get("input") or {}).get(
|
| 22 |
+
"split", "c64-text-t5" if request["task"] == "owt-prefix" else "unconditional"),
|
| 23 |
+
protocol=request.get("protocol"),
|
| 24 |
+
condition_policy=request.get("condition_tokenization_policy"))
|
| 25 |
+
gp = path / "generation.json"
|
| 26 |
+
if not gp.exists():
|
| 27 |
+
return row
|
| 28 |
+
gen = json.loads(gp.read_text())
|
| 29 |
+
for key in ("task", "steps", "seed", "compile"):
|
| 30 |
+
if gen[key] != request[key]:
|
| 31 |
+
raise ValueError(f"request/generation mismatch: {key}")
|
| 32 |
+
sample_hash = sha256(path / "samples.jsonl")
|
| 33 |
+
if gen["samples_sha256"] != sample_hash:
|
| 34 |
+
raise ValueError("samples hash mismatch")
|
| 35 |
+
validate_records(read_jsonl(path / "samples.jsonl"), gen)
|
| 36 |
+
row.update(sample_count=gen["sample_count"], prompt_count=gen["prompt_count"],
|
| 37 |
+
status="needs_evaluation")
|
| 38 |
+
mp = path / "metrics.json"
|
| 39 |
+
if mp.exists():
|
| 40 |
+
metric = json.loads(mp.read_text())
|
| 41 |
+
if (metric["generation_manifest_sha256"] != sha256(gp)
|
| 42 |
+
or metric["samples_sha256"] != sample_hash
|
| 43 |
+
or metric["task"] != gen["task"]
|
| 44 |
+
or metric["sample_count"] != gen["prompt_count"]):
|
| 45 |
+
raise ValueError("metrics provenance/count mismatch")
|
| 46 |
+
if type(metric.get("valid")) is not bool:
|
| 47 |
+
raise ValueError("missing boolean metric validity")
|
| 48 |
+
row.update(status="quality_valid" if metric["valid"] else "quality_invalid",
|
| 49 |
+
metrics=metric["metrics"], reason=metric.get("reason"))
|
| 50 |
+
row["owt_main_grid"] = (
|
| 51 |
+
row["task"] == "owt" and row["steps"] in OWT_MAIN_STEPS
|
| 52 |
+
and row["prompt_count"] == 1024 and not gen.get("diversity")
|
| 53 |
+
and row["seed"] == 42 and not row["compile"]
|
| 54 |
+
)
|
| 55 |
+
except (OSError, ValueError, KeyError, TypeError) as error:
|
| 56 |
+
row.update(status="invalid_artifact", reason=str(error))
|
| 57 |
+
return row
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def main():
|
| 61 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 62 |
+
parser.add_argument("--root", type=Path, default=ROOT)
|
| 63 |
+
parser.add_argument("--output", type=Path)
|
| 64 |
+
args = parser.parse_args()
|
| 65 |
+
paths = sorted((args.root / "results").glob("elf*/quality/*/*/steps_*/seed_*/compile_*"))
|
| 66 |
+
rows = [inspect_run(path) for path in paths if path.is_dir()]
|
| 67 |
+
for row in rows:
|
| 68 |
+
metrics = row.get("metrics", {})
|
| 69 |
+
scores = {key: metrics[key] for key in ("bleu", "rouge1", "rouge2", "rougeL", "entropy_gpt2_nats") if key in metrics}
|
| 70 |
+
for key in ("generative_ppl", "conditional_ppl"):
|
| 71 |
+
if key in metrics:
|
| 72 |
+
scores[key] = metrics[key].get("perplexity")
|
| 73 |
+
print(json.dumps({k: v for k, v in row.items() if k != "metrics"} | {"scores": scores}, ensure_ascii=False))
|
| 74 |
+
present = {row["steps"] for row in rows if row.get("owt_main_grid") and row["status"] == "quality_valid"}
|
| 75 |
+
missing = [step for step in OWT_MAIN_STEPS if step not in present]
|
| 76 |
+
print(f"OWT primary grid {list(OWT_MAIN_STEPS)}; steps without a verified valid result: {missing}")
|
| 77 |
+
print("Old/no-EOS conditional runs and auxiliary steps remain listed; do not merge protocols. No GPU work performed.")
|
| 78 |
+
if args.output:
|
| 79 |
+
write_json(args.output, {"schema": "elf-progress-v1", "runs": rows,
|
| 80 |
+
"owt_steps_without_valid_result": missing})
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
if __name__ == "__main__":
|
| 84 |
+
main()
|