File size: 1,919 Bytes
4f2b2f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#SBATCH --job-name=generate_samples_single
#SBATCH --account=kempner_albergo_lab
#SBATCH --partition=kempner_requeue
#SBATCH --nodes=1
#SBATCH --gpus-per-node=1
#SBATCH --mem=100GB
#SBATCH --constraint h100
#SBATCH --time=1-00:00:00
#SBATCH --output=slurm_logs/vlmdm/job-%j.out
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=brianlee.lck@gmail.com

source /n/netscratch/albergo_lab/Lab/brianlck/interpretable-flow/.venv/bin/activate

export CUDA_LAUNCH_BLOCKING=1
export TORCH_USE_CUDA_DSA=1
export HF_HOME=/n/netscratch/albergo_lab/Everyone/hf_cache
export HF_HUB_ENABLE_HF_TRANSFER=1

# Configuration parameters - modify these as needed
MODEL="flow"
CKPT="/n/netscratch/albergo_lab/Lab/brianlck/interpretable-flow/outputs/2025-07-29/00-17-21/checkpoints/openwebtext/any_order/20250729-001723/last.ckpt"
SAMPLER="tau-leaping"
STEP=1024
TOTAL_SAMPLES=1024
SUBDIR="new_linear"

echo "Running model=$MODEL sampler=$SAMPLER step=$STEP"

# Create output directory
mkdir -p "tmp/owt/${SAMPLER}"

# generate samples
# srun python generate_samples.py \
#     --checkpoint_path "${CKPT}" \
#     --total_samples "${TOTAL_SAMPLES}" \
#     --model_type "${MODEL}" \
#     --sampler_type "${SAMPLER}" \
#     --step_size "${STEP}" \
#     -o "tmp/owt/${SAMPLER}/${SUBDIR}/${MODEL}_generated_samples_${STEP}.json"

# evaluate samples
srun python evaluate_samples.py \
    --input-json "tmp/owt/${SAMPLER}/${SUBDIR}/${MODEL}_generated_samples_${STEP}.json" \
    --batch-size 32 \
    --results-output "/n/netscratch/albergo_lab/Lab/brianlck/interpretable-flow/tmp/owt/${SAMPLER}/${SUBDIR}/${MODEL}_eval_results_${STEP}.json" \
    --length-plot-output "/n/netscratch/albergo_lab/Lab/brianlck/interpretable-flow/tmp/owt/${SAMPLER}/${SUBDIR}/${MODEL}_length_plot_${STEP}.png" \
    --eval-mode "sentence" \
    --perplexity \
    --entropy \
    --mauve \
    --reference-perplexity

echo "Job completed successfully"