lance-pt-snapshot
A frozen mirror of the exact ByteDance Lance PyTorch snapshot used as the
byte-diff verification source-of-truth for the Apple MLX port
avlp12/lance_alis_mlx.
โ ๏ธ This is NOT the official ByteDance Lance repository. It is a pinned copy of one specific snapshot, republished only so the MLX port's verification harnesses stay reproducible. For the model itself, go to upstream (links below).
Why this exists
The MLX port verifies every stage against the original PyTorch by direct
import + byte-diff (tools/stage*_compare.py). That requires the exact PT
code the port was checked against โ and two facts make a mirror necessary:
- The MLX repo no longer ships it. On public release the PT snapshot was
removed from
lance_alis_mlx(git rm refs/Lance) to keep that repo a clean "MLX port + harness."tools/fetch_refs.shfetches it back from here on demand. It is needed only for verification; MLX inference never touches it. - Upstream moved. The verified snapshot's file hashes match no current
commit in the
bytedance-research/LanceHF history (an upstream force-push or a GitHub-vs-HF divergence). So this mirror is the only record of the precise PT state STAGE 1โ9 was checked against. Upstream's latest is fine for inference โ not for byte-diff.
Verification anchor
After fetching, tools/fetch_refs.sh pins one stable code anchor:
inference_lance.py md5 = 85fc504a0148a5e1bfe1c3da4dac914d
A mismatch means the snapshot is not the verified one, and the harness refuses to run (Lesson 18 โ verification must not trust an unverified input). The README is intentionally not anchored, so this description can evolve without breaking the check.
What's here
- The full ByteDance Lance PyTorch source tree (
modeling/,data/,common/,config/,inference_lance.py, โฆ) โ code only. LANCE_ORIGINAL_README.mdโ the original ByteDance Lance README, preserved verbatim (this page replaces it on the front).
Source & license
Original work: ByteDance Lance โ Apache-2.0.
Upstream Apache-2.0 headers are preserved verbatim in the files. This mirror adds no code; it changes nothing but this README.
Related
- MLX port (main repo): https://github.com/avlp12/lance_alis_mlx
- Converted MLX weights: https://huggingface.co/avlp12/Lance-3B-Alis-MLX-Traced