interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / gpu / nvidia / native / models / flash-next / README.md

26 lines · 2395 bytes Raw Blame History Rendered
1# Flash-Next file-backed n-gram embeddings
2
3`lookup.om` reads one sequence of little-endian uint32 token IDs from standard input. For each token it emits 2,560 little-endian BF16 values. The first input starts a new sequence. The checkpoint EOS token resets the n-gram history for subsequent tokens.
4
5With `--decoder-input`, the same executable reads only the BF16 vocabulary embedding in checkpoint shard 130. Each token yields the four 2,560-value residual streams that enter the first decoder layer, in their checkpoint order. This mode reads one row per token.
6
7The input profile is Qwen/Qwen3.8-Flash-Next-FP8 revision `7fb48d708ca6cd8eeed8f4db0433be18af96984f`. Run the binary with the verified checkpoint as its working directory. At startup it reads the safetensors headers of files 5 through 37, locates each of the 128 row tensors by name, checks the dtype, shape and byte ranges, and reads the three hash multipliers, head offsets, vocabulary sizes and scale from the checkpoint. At each token it reads 16 FP8 rows by file offset. This host component supplies the n-gram input to the model's PLE layer. GPU execution and text generation require the rest of the model and driver.
8
9Build on AArch64 Linux from the repository root. The executable uses seeded Omega for JSON, file I/O, FP8 conversion and BF16 rounding.
10
11```sh
12out="$PWD/build/flash-next"
13mkdir -p "$out"
14sha256sum -c seed/out/omc.sha256
15cat gpu/nvidia/om/apiviews/bf16.om seed/json/json.om \
16 gpu/nvidia/native/models/fp8.om gpu/nvidia/native/models/flash-next/lookup.om \
17 > "$out/lookup.full.om"
18seed/out/omc < "$out/lookup.full.om" > "$out/lookup" && chmod +x "$out/lookup"
19(cd "$CHECKPOINT" && "$out/lookup") < tokens.u32 > embeddings.bf16
20```
21
22The comparison uses Python, Transformers, Torch and safetensors as an independent reference. It calls the installed Transformers n-gram layer with the checkpoint buffers and replaces its dense table with sliced on-disk reads. The checks cover the arithmetic chat prompt, sequence boundaries, all table shards, invalid input and a malformed shard. Exit codes from the Omega program are 1 for arguments, 2 for checkpoint preparation, 3 for token input, 4 for a row read and 5 for output I/O. A streaming caller must check the exit status before accepting a complete sequence.
23
24```sh
25python3 gpu/nvidia/native/models/flash-next/check.py "$out/lookup" "$CHECKPOINT"
26```