Skip to content
yasha1971-coderPublic

About

Train DNA models on 558 human pangenome assemblies from one GPU — byte-exact random windows into PyTorch

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

panvram

Train DNA models on all 558 human pangenome assemblies — from one GPU, byte-exact.

1.68 Tbp of HPRC assemblies (≈1.7 TB of FASTA) resident in 11.6 GB of GPU memory. Random windows go straight into PyTorch: no pre-cut windows on disk, no reconstruction from variants — every window equals the source FASTA, including centromeres and structural variants. 737k windows/s (8 kb) on A100 in the 11.6 GB form; 1.4M on RTX PRO 6000 Blackwell in the 16.6 GB default form (logs below).

import panvram
c = panvram.Cohort.open("cohort/", device="cuda")
x = c.sample(1024, 8192)   # uint8 [1024, 8192] on the GPU

How do you get training windows from many assemblies today? Tell us in Discussions — what you use now and what last went wrong.


A pangenome cohort resident on the GPU: every assembly stored as refrel3 v1 (edits against one decoded reference, T2T-CHM13v2.0 for HPRC; FORMAT.md), random training windows and coordinate slices decoded on the card by a queue kernel, straight into a PyTorch tensor. A CPU decoder serves the same API without a GPU.

Version 1.0.1 (PyPI). Repository: https://github.com/yasha1971-coder/panvram. Dataset (the 558 refrel3 v1 archives, q4k and q16k): DOI 10.5281/zenodo.23232317. Paper: "panvram: GPU-resident random access to a human pangenome cohort", arXiv:2610.25149. Numbers below come only from the logs named next to them.

import torch, panvram
c = panvram.Cohort.open("cohort/", device="cuda")      # reference + every *.q4k.rr3, resident on the card
g = torch.Generator(device="cuda").manual_seed(0)
x = c.sample(1024, 8192, generator=g)                  # uint8 [1024, 8192] on the GPU, the FASTA's bytes
t = c.sample(1024, 8192, generator=g, tokens=True,     # A/a 0, C/c 1, G/g 2, T/t 3, anything else 4
             reverse_complement=0.5)                   # each window reverse-complemented with probability 0.5
y = c.fetch("y1_HG00438.1", "HG00438#1#JAHBCB010000001.1", 1_000_000, 5000)   # 0-based start, length

Quickstart (Colab, one cell)

Open In Colab

GPU runtime of sm_80 or newer (A100, L4, ...; T4 is refused). One cell builds panvram with CUDA, takes the first five q16k archives from the Hugging Face mirror Yakiv-Contour/panvram-hprc558 of the Zenodo record (Zenodo itself as the fallback; every archive checked against the record's SHA-256), the NCBI T2T reference (size, SHA-256 and MD5 checked), opens the cohort on the GPU and returns dna, uint8 [5, 8192] on the card, every row compared byte for byte with the CPU decoder. Measured on a fresh Colab L4 (Python 3.13.16, torch 2.11.0+cu130): CUDA build 78.0 s, data 85.7 s, open 20.6 s, 190.1 s from cell start to the tensor, 5 / 5 windows == CPU, PASS (logs/quickstart-L4-2026-10-26/: quickstart.log, receipt.json, the executed notebook). The time the browser takes to give you a runtime is not inside the cell and not counted.

Install

pip install panvram          # CPU wheels for Linux x86_64, CPython 3.10-3.14; pulls torch==2.14.1

From source (CUDA path):

pip install torch            # first; the extension is built against it
pip install -e .             # CUDA when nvcc and a CUDA build of torch are present (sm_80 or newer), else CPU only
python -c "import panvram; print(panvram.with_cuda)"

Needs libzstd (libzstd-dev). PANVRAM_CUDA=0|1 forces the path; TORCH_CUDA_ARCH_LIST overrides the GPU architectures (default: the visible GPUs of sm_80 or newer, else 8.0;8.6;8.9;9.0+PTX).

API

Cohort.open(path, device="cuda", dataset="q4k", reference=None, threads=0, assemblies=None) - every *.<dataset>.rr3 in path (sorted by name; the assembly name is the file name without .<dataset>.rr3) and the reference: reference, else path/reference.fa, else the file named in the archives' header in path. Every archive is checked before any decode (FORMAT.md section 5: header XXH3, reference SHA-256 and size, section sizes, tables); a wrong reference or a damaged header raises panvram.FormatError. One block size per cohort. The reference and the pooled archives (payloads, block offsets and start states, model tables, lower-case runs) go to device once.

  • sample(n, W, generator=None, reverse_complement=False, tokens=False, return_coords=False, check=True) - n windows uniform over every (assembly, contig, start) with start + W <= contig length; a window never crosses contigs. return_coords=True adds int64 [n, 4]: assembly, contig index, start in the contig, reverse-complemented.
  • fetch(assembly, contig, start, length, reverse_complement=False, tokens=False) - a slice by coordinates; assembly and contig by name (header up to the first space or tab) or index.
  • windows(asm, start, W, reverse_complement=None, tokens=False, check=True) - windows at stream offsets.
  • decode(assembly) - the whole base stream decoded on the device in chunks -> host tensor; check_full(assembly) - that, the FASTA rebuilt from the contig table and hashed: XXH3 == the header's source XXH3 (no source file needed).
  • fasta(assembly, verify=True) - full decode on the CPU -> the FASTA file's bytes; every block XXH3 and the FASTA XXH3 against the header (the source file's).
  • contigs(assembly), info(assembly), resident_bytes(), block_size, reference_sha256, names.

Output bytes are the FASTA's (case kept: lower-case runs applied after decode); reverse complement keeps case and leaves anything but ACGT/acgt as is. check=True waits for the kernel and raises if a block failed to decode (status bits: 1 decode error, 4 bounded wait expired, 8 window outside an assembly). The GPU path does not check block XXH3 (the CPU fasta and windows(..., verify) do).

How the GPU path works

The queue kernel (from aceapex research/refrel/refrel3_gpu.cu): one warp per refrel3 block a window touches; lane 0 decodes the block's rANS stream (r3_decode_stream, the code the CPU path runs), literals straight into the block buffer in shared memory and copies into a ring of 64 ops; lanes 1..31 execute the copies as they arrive (reference, reverse complement, in-block); the warp writes the window's part. Shared memory per warp: Q + 768 B. Then two small kernels: lower-case runs, and reverse complement / tokens over pairs (i, W-1-i). Sampling (randint over the valid starts, searchsorted over the contig table) runs on the device; no host round trip per batch except check.

Tests

  • tests/test_synth.py (seconds): synthetic reference and two assemblies (tests/synth.py, deterministic; contigs forward, reverse complement, inversion, novel + tandem repeat, N runs, IUPAC, lower case, lengths around block sizes), archives in tests/data encoded by aceapex refrel3v1 @ 5b6d5ce for Q = 1024 / 4096 / 16384 (each decoded back by it == the FASTA). Every path (CPU, CUDA when present) against windows cut from the FASTA bytes (tests/fasta_cut.py), RC and tokens, whole contigs, CUDA == CPU, refusals (wrong reference, header byte, header XXH3, truncation, version, mixed block sizes), payload bit flips caught or harmless under full verification.
  • tests/test_gate.py - the public gate: import panvram -> Cohort.open -> sample(1024, 8192) on the GPU -> the same windows cut from the FASTA the CPU decoder rebuilds (every block XXH3 and the FASTA XXH3 == the source's; PANVRAM_SOURCES also compares with the source files) byte for byte, and == the CPU decoder's own windows; fetch at 1000 random coordinates (contig by length, length 1 .. 2^20) == the FASTA. PANVRAM_COHORT=dir pytest -s tests/test_gate.py.
  • notebooks/quickstart_558.ipynb - public quickstart: downloads the package (MANIFEST.tsv SHA-256 checked), T2T (md5) and the dataset tar as its 500 MiB parts from the Zenodo record (every part against PARTS.sha256, the joined tar against cohort558_<dataset>.tar.sha256, every archive against MANIFEST.tsv), then the 558-assembly run of scripts/cohort558.py per resident form.
  • run_colab_panvram.sh - CUDA build, both tests and the gate for q4k and q16k on four HPRC haplotypes, throughput (scripts/bench.py). From Drive: the tarball (MyDrive/panvram/panvram.tar.gz, git archive) and the eight archives of MANIFEST.tsv (MyDrive/panvram/cohort/*.rr3 + SHA256SUMS, checked); without them it encodes on the VM.

How the numbers are measured

The 558-assembly GPU figures come from one Colab run (logs/colab-c1-558-forms-A100-2026-10-07.log):

  • GPU NVIDIA A100-SXM4-80GB (81 920 MiB, sm_80), driver 580.82.07, CUDA 13.0 (nvcc V13.0.88), torch 2.11.0+cu130; panvram 56c32dc; archives q4k (Q = 4 096), the 558 manifest archives checked by SHA-256 before the run.
  • Windows: sample of 1 024 windows x 8 192 bases per call; the reported value is the median of 5 calls on archives that are already resident on the GPU (opening the cohort is a separate step, e.g. 28.3 s for the default form, and is not included); every window == the CPU decoder.
  • Fetch: 1 000 coordinates, one synchronous call each; median 0.28 ms, max 1.7 ms (default form); every result == the CPU decoder.
  • Resident memory, default form: 16.642 GB = reference 3.117 + payload 8.448 + block table 4.923 + model tables 0.154 GB (case runs 0.000); the other three forms are in the same log.
  • Full decode of each of the 558 assemblies: FASTA XXH3 == manifest (same log).
question answer source
1. Request semantics fetch(assembly, contig, start, length) and sample(n, W): 0-based, end excluded, [start, start + length) inside one contig (a window never crosses contigs; out-of-range raises). Returned: the assembly's bases as in the source FASTA - case kept (lower-case runs applied), every byte kept (N and other IUPAC letters as they are), no headers, no line breaks; tokens=True maps A/a C/c G/g T/t to 0-3 and anything else to 4. (The CPU tool's region strings name:start-end are 1-based inclusive.) panvram/cohort.py (fetch, sample, windows docstrings); FORMAT.md section 2
2. "558 == manifest" Two checks. (a) Archives: SHA-256 of each .rr3 file == MANIFEST.tsv q4k_sha256 (558/558) before opening. (b) Full decode: XXH3_64 of the FASTA rebuilt from the decoded bases and the contig table (headers and line breaks included) == MANIFEST.tsv fasta_xxh3, the XXH3 of the source FASTA file bytes (558/558). No SHA-256 of the source FASTA is compared on the GPU run. logs/colab-c1-558-forms-A100-2026-10-07.log (S1 lines, C558 full); scripts/cohort558.py lines 95-113
3. Full decode time Total 10.5 min (default form; 10.5-10.6 for all four forms). GPU decode + copy to host: sum 2.5 min. The rest (about 8 min) is host work per assembly: rebuilding the FASTA from the contig table (headers, line breaks) and XXH3 over it on the CPU (fasta_xxh3, C++), plus the loop. Not split further in the log. logs/colab-c1-558-forms-A100-2026-10-07.log line 577; scripts/cohort558.py lines 99-103; csrc/pv_core.cpp fasta_xxh3
4. 16.642 GB Decimal GB (bytes / 1e9) of the cohort's device tensors (resident_bytes): reference, payload, block table, model tables, case runs. Not included: the per-call output (1 024 x 8 192 B = 8 388 608 B per sample) and kernel scratch (not recorded). torch allocated 16.646 GB after open. nvidia-smi 16 310 MiB = 17.10e9 B: the 0.46e9 B above torch allocated are the CUDA context and allocator reserve (not split in the log). panvram/cohort.py resident_bytes; scripts/cohort558.py line 48-50; C1 log line 16
5. AGC in M6 ace-core: AMD EPYC 4344P 8c/16t, 125 GB RAM, Ubuntu 22.04.5, kernel 5.15.0-163; archives on the local volume /dev/md3, Linux md RAID (from df on ace-core; disk model not recorded in the logs). AGC 3.2.4 e67e3fc (-O3 -march=native), queried in process by agcbench (libagc, one handle per thread, archive opened once per row; open time reported separately). Warm cache: 3 warm-ups + 9 timed runs per row, median reported; the scripts never drop the page cache (no drop_caches / fadvise in raw/*.sh or agcbench.cpp). Requests: windows of 4 096 bases uniform over valid starts inside one contig (never crossing a contig end), regions of 1 000 000 bases only in contigs >= 1 Mb; answers checked by SHA-256 of upper-case bases against the truth. logs/m6-2026-10-07/RESULTS_M6.md; logs/m6-2026-10-07/raw/PROTOCOL_M6.md sections 4-5; raw/make_req.py; raw/harness/agcbench.cpp

Measured (each number from a file in logs/)

GPU headline: 558 assemblies resident, batch 16 384, NVIDIA A100-SXM4-40GB (median / p90 / worst over draws)

batch window GB/s ms per batch windows/s GPU
16 384 8 KiB 10.049 / 8.435 / 7.971 13.357 / 15.916 / 16.838 1 226 694 / 1 029 738 / 973 039 NVIDIA A100-SXM4-40GB
16 384 32 KiB 26.085 / 23.867 / 23.779 20.582 / 22.494 / 22.577 796 046 / 728 381 / 725 682 NVIDIA A100-SXM4-40GB

10 independent samples x 3 runs, 256/256 windows match CPU decoder. Log: logs/loader-2026-10-22/gpu/runs-2026-10-26-h558/h558.log; card name from nvidia-smi on a repeat of draw 0 within +-5 % (card-check-hf/run.log).

what number log
558 assemblies resident on one GPU, q4k, four resident forms (Colab NVIDIA A100-SXM4-80GB, sm_80, panvram 56c32dc) default 16.642 GB (nvidia-smi 16 310 MiB), 743 271 windows/s; 2-bit reference 14.304 GB, 674 822 /s; compact block table 13.972 GB, 710 235 /s; both compact 11.634 GB (nvidia-smi 11 534 MiB), 736 762 windows/s; every form: sample == CPU decoder, 1000 / 1000 fetches, full decode on the GPU 558 / 558 XXH3 == manifest, PASS logs/colab-c1-558-forms-A100-2026-10-07.log
558 assemblies resident, default form (Colab NVIDIA RTX PRO 6000 Blackwell Server Edition, sm_120, panvram 02b23d0) 16.642 GB (nvidia-smi 0 -> 16 441 MiB), open 12.9 s, 1 401 185 windows/s (1 024 x 8 192, median of 5 calls), 1000 / 1000 fetches, 558 / 558 XXH3 == manifest, PASS logs/colab-cohort558-blackwell-2026-10-05.txt
public gate on the GPU, reader with the two stricter checks (Colab NVIDIA A100-SXM4-40GB, panvram e768115), 4 HPRC assemblies, q4k and q16k 1024 / 1024 windows of 8 192 == FASTA and == CPU decoder, 1000 / 1000 fetches, 4 FASTA rebuilt XXH3 == source files; fast tests 30 passed; PASS logs/colab-gate-087c638-A100-2026-10-07.txt
check_full of every manifest archive, CPU path (ace-core) 1116 / 1116 (558 x q4k / q16k) XXH3 == header == manifest logs/check-full-1116-2026-10-07.log
region fetch against samtools 1.24 on the source FASTA, 8 assemblies x 1 000 requests, [start0, end0) 8000 / 8000 q4k, 8000 / 8000 q16k logs/samtools-truth-2026-10-07/RESULT.txt
CPU container, --network none, base image pinned by digest, wheels by hash 8 assemblies x q4k / q16k: check_full and full decode == source SHA-256, 16 / 16 logs/r2-gate-2026-10-07.log
independent implementation from the specification (Python, clean-room round 2: no sources, the specification package only) full decodes 26 / 26, fetches 1 300 / 1 300, refusals 9 / 9 at the expected stage, test vectors 372 / 372 logs/cleanroom-round2-2026-10-07/RESULTS_R2.md
AGC 3.2.4 vs cohort size N (M6): random windows of 4 096, one thread AGC 868 / 38 / 28 / 26 requests per s at N = 50 / 100 / 200 / 558, refrel3 q4k 200 884 -> 145 222 /s; whole samples flat. Caveat: AGC's N dependence is a per-request metadata-batch reload under random sample order; requests sorted by sample cost the same at every N logs/m6-curves-timing-2026-10-07.csv, logs/m6-2026-10-07/RESULTS_M6.md (counters)
window law, protocol v1.1 verdict (hw-apex B job, HPRC N = 4, ace-core, one thread) refrel3 q4k and q16k PASS: model B errors +1.5 / +1.3 / +3.2 % and -0.1 / -2.7 / +3.2 % at 1 / 8 / 64 KiB (c0 7.25 / 6.79 us, D_Q 2.068 / 2.085 GB/s canonical); BGZF default and matched-g PASS; zstd seekable, LZ4, OZSEG: model B conservative (c0 < 0), see model A logs/window-law-B-2026-10-08/table.md, MODEL_A_LARGE_GRANULE.md
quickstart rehearsal from the Zenodo draft 23232317 (Colab A100, panvram 989d415, notebook run unattended: download 4 395 s, verify 162 s, gate 695 s) 24 / 24 parts == PARTS.sha256, tar == .sha256, 558 / 558 archives == MANIFEST.tsv; compact form 11.634 GB (nvidia-smi 11 534 MiB), 736 335 windows/s (1 024 x 8 192, median of 5 calls), 1000 / 1000 fetches == CPU decoder, RESULT PASS logs/quickstart-dryrun-A100-2026-10-08.txt
archive sizes, 558 assemblies q4k 16.22 MB, q16k 13.04 MB per assembly without block hashes; AGC 3.2.4 (one create, T2T inside, T2T alone subtracted) 5.40 MB logs/sizes-558-2026-10-06.txt

Statement by statement, with commits, SHA-256 of every artifact, reproduction commands and one limitation each: EVIDENCE.md.

A window loader for model training is measured against GenVarLoader and pyfaidx on one machine in logs/loader-2026-10-22/ (CPU; speed only, the three return different objects): panvram 438 468 windows of 8 KiB per second over 5 assemblies and 411 668 over 558, GenVarLoader 2 337 735 over one chromosome of 3 samples, pyfaidx 9 073; at 32 KiB 180 609 against 211 398 and 3 951.

A research prototype that stores each assembly against the reference and eight cohort assemblies ("anchors"), with its decoder, logs and negative controls, is in research/refrel_v2/: at N = 558 it holds the window law that v1 fails at 64 KiB, at 2.4 times the resident memory. Its container is not frozen and its encoder is not published.

MANIFEST.tsv

The 558 HPRC haplotype assemblies (year-1 94, release 2 464; CHM13 v1.1 and GRCh38 rows of the indexes excluded): name, source URL, source hash type and hash (from the HPRC indexes, checked at download), FASTA bytes, FASTA XXH3, q4k and q16k archive bytes and SHA-256, status. The v1 archives are re-encoded from the cohort's refrel3 archives (FASTA in memory, never re-downloaded); each is decoded back in full and compared with the source's XXH3 before its row is written (aceapex refrel3v1 recode); all 558 rows ok.

Archive bytes depend on the encoder build (FORMAT.md section 7): the manifest's sha256 are those of gcc 11.4.0 -O3 -march=native -funroll-loops on ace-core, reproduced by -O3 -march=x86-64-v3 -funroll-loops (FMA contraction on; checked on two archives). Without FMA (-march=x86-64-v2, -ffp-contract=off) or with another compiler the bytes can differ while decoding to the same FASTA - compare archives by decoding, or build the encoder with these flags.

Provenance

Ported from aceapex research/refrel @ 5b6d5cec0f5962a561ac48822a1b5c48793a5b47 (https://github.com/yasha1971-coder/aceapex/tree/panvram-1.0-sources/research/refrel; tag panvram-1.0-sources of aceapex = one orphan commit whose tree holds exactly three subtrees of the aceapex history: research/refrel = 5b6d5ce:research/refrel (tree c96b8f0167c54ae6645aa18d7c30c697a18178a0), research/cleanroom = 927a9dd:research/cleanroom (tree 1208ed2af9b373779cefc05edb94cd5f7c5554d7), research/bench2610 = 927a9dd:research/bench2610 (tree 3649681f1517406bf752e8bbdc8e727887a2143f); check in an aceapex clone: git rev-parse panvram-1.0-sources:research/refrel panvram-1.0-sources:research/cleanroom panvram-1.0-sources:research/bench2610 == git rev-parse 5b6d5ce:research/refrel 927a9dd:research/cleanroom 927a9dd:research/bench2610):

panvram source
csrc/refrel3.h, csrc/refrel_format.h, csrc/rr_sha256.h verbatim
csrc/xxhash.h aceapex src/xxhash.h (xxHash 0.8, BSD-2-Clause) verbatim
csrc/pv_v1.h open_v1, block_v1, full_v1 of refrel3v1.cpp; build_tab of refrel3.cpp; exec_fast of refrel.cpp; FASTA parsing of refrel_io.h - exceptions instead of exit, arrays in pooled memory
csrc/pv_cuda.cu r3q_kernel of refrel3_gpu.cu - runtime Q, many assemblies resident, window = (assembly, start); new: case / RC / token kernels
FORMAT.md research/refrel/FORMAT.md (format unchanged)

Measured zeros and limits

What panvram does not give, measured, with a prediction written before each run. Each result holds only in the conditions listed; none is generalised.

Experiment Question Result Holds for Log
TRAIN-1 Does a model trained on cohort windows beat the same model trained on the reference alone? No. Held-out bits/base, cohort minus reference: +0.0012 / +0.0051 / +0.0002 over 3 seeds, mean +0.0022 (cohort slightly worse); the pre-registered bar was a gain of at least 0.01 examples/train_small.py (causal CNN, 0.40 M parameters), W 2 048, 2 000 steps, 508 training / 50 held-out assemblies (split by assembly), reference T2T-CHM13v2.0, one NVIDIA L4 logs/train1-L4-2026-11-15/
TRAIN-2 The same models, held-out windows split by region No effect: random windows as TRAIN-1; HLA + KIR + segmental duplications, cohort worse by 0.0045 bits/base on average. Assembly windows with no CHM13 alignment (insertions relative to CHM13): cohort better by 0.030 (0.048 / 0.023 / 0.019, same sign on all three seeds), below the pre-registered 0.05 - a hypothesis, not a result as TRAIN-1, 1 024 windows per set per seed logs/train2-L4-2026-11-15/
PV-LOADER Is the data loader the bottleneck of training? No. Compute step 114.46 ms (0.40 M model) against at most 11.6 ms of data per batch; GPU idle 0 % with prefetch overlap and at most 9.18 % without it, for every loader tried (panvram, memmap, pysam, bgzip) train_small and an 8x wider model on one NVIDIA L4 (a 64x model did not fit). Not measured: tiny models, many GPUs, inference only - the cases where data could be the bottleneck logs/pvloader-L4-2026-11-16/

So panvram is not shown to make DNA models better or their training faster.

Exact window access, the same function compared. Return the exact bases of a window [start, start + W) of any assembly of the 558-assembly HPRC cohort. The rows are not one benchmark: machines, window sizes and threads differ as noted.

Tool Stored, 558 assemblies Where it lives Random windows per second Exact to the source FASTA Source
AGC 3.2.4 about 3.0 GB (5.40 MB per assembly) disk 26 (4 096 bases, one thread, random sample order; 868 with requests sorted by sample) yes logs/m6-curves-timing-2026-10-07.csv
bgzip + faidx 469 GB disk not measured yes logs/pvloader-L4-2026-11-16/RESULT_PVLOADER.md
GenVarLoader 0.43.1 not measured at 558 memory-mapped 2 337 735 (8 KiB, one chromosome of 3 samples, CPU) no: rebuilt from a VCF; on chr20-22, 92.8 / 85.6 / 66.6 % of 1 / 8 / 32 kb windows exact, and up to 41 % of windows with SV breaks lose more than 1 kb logs/duel1-2026-11-15/
panvram q4k 9.05 GB without block hashes, 11.48 GB with them; 11.634 GB resident in the compact form GPU memory 145 222 (4 096 bases, one CPU thread); 126 918 (L4) and 736 762 (A100) for sample of 8 KiB yes: 26 358 / 26 358 windows byte-for-byte against the assemblies; 558 / 558 XXH3 == manifest logs/m6-curves-timing-2026-10-07.csv, logs/duel1-2026-11-15/, logs/colab-c1-558-forms-A100-2026-10-07.log

What panvram combines that the others do not: the whole cohort resident on one GPU, exact bytes, and fast random access. It is about 3 times larger than AGC and needs a GPU for the fast path.

Limitations

  • Size against AGC. On the 558 HPRC assemblies refrel3 takes 13.04 (q16k) - 16.22 (q4k) MB per assembly without block hashes against 5.40 MB for AGC 3.2.4 (logs/sizes-558-2026-10-06.txt): AGC also compresses against the other assemblies, refrel3 encodes every assembly alone against the reference.
  • "Fits in 16 GB" is a memory measurement, not a run on a 16 GB card. The compact forms hold 558 assemblies in 11.634 GB (nvidia-smi 11 534 MiB) on an 80 GB A100; no run was made on a 16 GB card.
  • Archive bytes are reproducible with the encoder recipe only. gcc 11.4.0 -O3 -march=x86-64-v3 -funroll-loops (any thread count, any x86-64-v3+ CPU) gives the manifest's bytes; other compilers or flags can give other bytes (gcc 13.3 on Colab did) that decode to the same FASTA (FORMAT.md section 7).
  • Coordinates are the haplotype's own. fetch takes an assembly's contig and 0-based offsets; there is no translation from reference (T2T) coordinates to haplotype coordinates.
  • The reference is resident decoded. T2T-CHM13v2.0 sits on the device as 3.117 G bases (0.779 GB in the 2-bit form) for every cohort, on top of the archives.
  • GPU: CUDA only, sm_80 or newer. Other devices use the CPU path. The GPU path does not check block XXH3 (the CPU fasta and windows(..., verify) do).
  • One block size per cohort; reference under 2^32 bases; an assembly's payload under 4 GiB.
  • Encoding is not part of panvram (aceapex refrel3v1 encode: https://github.com/yasha1971-coder/aceapex/tree/panvram-1.0-sources/research/refrel/refrel3v1.cpp).

Data use (HPRC)

The cohort is the Human Pangenome Reference Consortium's assemblies (public domain / CC0 on the AWS Registry of Open Data; full terms quoted in DATASET.md). The HPRC asks users not to sell all or part of the Pangenome Reference, not to seek intellectual property protection that would block access to it, and not to take any action that could reasonably be expected to result in participant re-identification, including contacting participants. When publishing results that use it, acknowledge: "We would like to acknowledge the Human Pangenome Reference Consortium (BioProject ID: PRJNA730823) and its funder, the National Human Genome Research Institute (NHGRI)."

License: MIT (see LICENSE), Yakiv Shavidze; csrc/xxhash.h is BSD-2-Clause (xxHash, its own notice kept). Cite: CITATION.cff (ORCID 0009-0008-3622-3448).

About

Train DNA models on 558 human pangenome assemblies from one GPU — byte-exact random windows into PyTorch

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages