Skip to content

Releases: tenseleyFlow/DocumentLanguageModel

DLM v0.10.0

21 Apr 07:22
efb12ef

Choose a tag to compare

v0.10.0

dlm v0.10.0 — preference tuning, multi-GPU, share protocol, directory training

A broad feature release that expands dlm from a single-document
fine-tuner into a substrate for training on codebases, sharing
adapters across machines, and composing named adapters at export
time. 265 commits since v0.9.0, five additive schema migrations,
six audits landed inline.

Still below 1.0 on purpose. The stability claim is reserved for when
a human has walked through dlm train → export → ollama run on a
real document end-to-end and been satisfied with the result.

Headline features

Train on a directory, not just a .dlm

dlm train ~/code/my-repo --base qwen2.5-coder-1.5b --include "**/*.py"

No hand-authored .dlm required. On first invocation dlm train
scaffolds <dir>/.dlm/corpus.dlm with a fresh ULID and your flag
choices; subsequent invocations reuse the anchor. Per-codebase
.dlm/training.yaml + .dlm/ignore files (gitignore-subset
grammar) refine include/exclude at any point in the tree.

Preference tuning (DPO + ORPO)

Add ::preference:: fences with ### Prompt / ### Chosen /
### Rejected triples and dlm train runs SFT → DPO/ORPO in
sequence. Method selection lives in training.preference — DPO via
TRL's DPOTrainer, ORPO via trl.experimental.orpo. Replay corpus
samples preference rows with the same recency-weighted reservoir as
CPT rows.

Multi-adapter training + weighted merge

training:
  adapters:
    - { name: code, lora: { r: 16, alpha: 32 } }
    - { name: docs, lora: { r: 8, alpha: 16 } }

One .dlm produces N named adapters. Export composes them:

dlm export mydoc.dlm --adapter-mix code:0.7,docs:0.3

Share protocol

  • dlm push --to hf:org/name — HuggingFace Hub with auto-generated
    README.
  • dlm push --to https://host/path — generic HTTPS with optional
    DLM_SHARE_AUTH.
  • dlm push --to peer://host:port + dlm serve <path> — LAN-local
    peer endpoint with HMAC bearer tokens and a public-bind gate.
  • Optional --sign produces a sidecar .minisig; pulls verify
    against ~/.dlm/trusted-keys/*.pub.

Interactive REPL + save-to-train

  • dlm repl <path>prompt_toolkit loop against the trained
    adapter, with slash commands for sampling knobs and /reload.
  • dlm train --watch — retrain on every settled save, with a rich
    live status line.

Observability

Per-store SQLite metrics DB. dlm metrics for tabular reports
(--json / --csv / filters), dlm metrics watch to tail steps
and evals live. Optional TensorBoard (dlm[tb]) and W&B
(dlm[wandb]) sinks.

Template gallery

Eight bundled templates with meta.yaml sidecars covering coding
tutor, domain KB, writing partner, personal assistant, meeting
notes, regex buddy, shell one-liner, study guide.

dlm templates list
dlm init mydoc.dlm --template coding-tutor

Expanded hardware coverage

  • MLX inference backend — PEFT adapters convert to MLX .npz;
    dlm prompt --backend mlx gives Apple Silicon a fast-path.
  • ROCm training (Tier 2) — AMD GPUs via HIP, bf16 +
    FlashAttention probes, custom llama.cpp build.
  • Multi-GPUdlm train --gpus all|N|0,1 dispatches to
    accelerate launch; all trainer I/O now rank-gated.

Upgrading from v0.9.0

Schema migrations are automatic and additive (v1 → v6). Existing
.dlm files parse without modification. If you want to update the
dlm_version field in place:

dlm migrate mydoc.dlm

dlm.lock files from v0.9.0 carry forward cleanly. Stores under
~/.dlm/store/<id>/ remain compatible.

One behavior change to watch for: dlm serve now refuses an
untrained .dlm with an actionable error (serve: no training state for <id> — run dlm train first) instead of a
ManifestCorruptError. Exit code is still 1; only the message text
changed.

Install

brew tap tenseleyFlow/tap
brew install dlm

Or from PyPI:

pip install dlm==0.10.0

New CLI surface at a glance

Command What it does
dlm train <dir> Auto-scaffold + train on a directory target.
dlm templates list Browse the bundled template gallery.
dlm init --template X Scaffold from a named template.
dlm push --to <sink> Publish a pack to HF / URL / peer.
dlm pull <source> Pull + verify a pack from a sink.
dlm serve <path> LAN-local peer endpoint.
dlm repl <path> Interactive REPL against the trained adapter.
dlm train --watch Retrain on every settled save.
dlm metrics [watch] SQLite-backed observability.
`dlm cache show prune

New frontmatter surfaces

training:
  preference:            # Phase 4 — DPO / ORPO
    method: dpo          # or orpo
    beta: 0.1
  cpt:                   # DAPT refinements
    schedule: cosine_with_floor
    embed_warmup_steps: 50
  adapters:              # multi-adapter
    - { name: code, lora: {r: 16, alpha: 32} }
  precision: fp16        # override the doctor's pick
  sources:               # Phase 7 directives
    - path: ~/code/my-repo
      include: ["**/*.py"]
      exclude: ["**/test_*.py"]
  sources_policy: strict

Known deferrals (shipped but not yet consumer-wired)

  • Tokenized-section cache (~/.dlm/store/<id>/tokenized-cache/)
    — the cache module is unit-tested and production-ready, but the
    trainer does not yet consult it. Pre-tokenization + custom
    collator landing in a future release. See
    src/dlm/directives/cache.py module docstring.
  • dlm train --watch --repl — the watch loop and the REPL both
    ship independently; the threaded bridge between them is honestly
    deferred pending a CI-capable test harness.
  • HuggingFace live push round-trip — the sink is complete and
    unit-tested; the online CI slow test depends on a write-token
    budget we don't allocate for every release.

Audits landed this cycle

Six brutal audits (04–09). Findings docs + remediation commits live
under .docs/audits/. Headline: Audit 09 found two blockers on the
flagship dlm train <dir> flow (scaffold skipped manifest
provisioning, and encoded a path that resolved to the scaffold
subdir itself). Both fixed. The sway differential harness produced
359σ evidence (see .docs/audits/09-sway-appendix.md) that the
training pipeline produces behaviorally-distinct adapters on domain
prompts — the engine floor is empirical, not just unit-tested.

Tests

  • 2,211 unit tests pass.
  • ruff clean; mypy --strict clean across 215 source files.
  • Slow integration matrix covers: two-adapter training, preference
    round-trip, MLX adapter conversion, ROCm smoke, multi-GPU smoke,
    end-to-end auto-scaffold cycle, tokenized-cache unit suite, peer
    round-trip, directive fixture tree → finite adapter.

Full changelog

See CHANGELOG.md for the
full bullet list. git log v0.9.0..v0.10.0 for per-commit detail.

What's next

The innovation roadmap for the next phase is catalogued at
.docs/sprints/phase-7-ecosystem/32-innovation.md and expanded at
32-innovation-expansion.md. Top candidates: MoE-style learned
adapter gating, multi-modal (image / audio) section types, and
sway-to-dlm probe-driven retraining.

DLM v0.9.0

20 Apr 01:37
6321af0

Choose a tag to compare

DLM v0.9.0

Install via the Homebrew tap:

brew tap tenseleyFlow/tap
brew install dlm

Formula bump

When bumping Formula/dlm.rb in tenseleyFlow/homebrew-tap:

Build

Full changelog: see CHANGELOG.md in the tarball.

DLM v0.9.0rc3

20 Apr 01:28
accf03f

Choose a tag to compare

DLM v0.9.0rc3 Pre-release
Pre-release

DLM v0.9.0rc3

Install via the Homebrew tap:

brew tap tenseleyFlow/tap
brew install dlm

Formula bump

When bumping Formula/dlm.rb in tenseleyFlow/homebrew-tap:

Build

Full changelog: see CHANGELOG.md in the tarball.