Skip to navigation

d1-3B is a Liquid AI decision model built on the LFM2-VL vision-language architecture. Like other decision models, it returns a probability for every allowed option of each typed question. NeMo AutoModel provides experimental post-training for D1-3B and the related D1 Omni model through the d1_posttrain.py example. The example keeps the backbone frozen and trains only the readout: additive answer-token rows for D1-3B, or the released marker head for D1 Omni. It adapts the readout on text-only records. The vision modules of both models, and the D1 Omni audio modules, remain frozen.

Post-Train D1-3B

From the repository root, generate fictional training, validation, and test records. The generator rejects an existing output directory, so skip this step if you already generated data/soc_triage for another decision model:

PYTHONPATH=tutorials/decision_models uv run --no-project python -m decision_tutorial.data \
--output-dir data/soc_triage --seed 7

Run each stage on a CUDA GPU. Start with the baseline, which evaluates the released checkpoint and compares its probabilities with the publisher implementation. The supervised fine-tuning (SFT) and reinforcement learning (RL) stages do not repeat that comparison. Each stage writes metrics_validation.json and metrics_test.json to its output directory.

uv run python examples/decision/d1_posttrain.py \
--model d1-3b --mode base --data-dir data/soc_triage \
--cache-dir runs/d1-cache --output-dir runs/d1-3b/base
uv run python examples/decision/d1_posttrain.py \
--model d1-3b --mode sft --data-dir data/soc_triage \
--cache-dir runs/d1-cache --output-dir runs/d1-3b/sft
uv run python examples/decision/d1_posttrain.py \
--model d1-3b --mode rl --data-dir data/soc_triage \
--cache-dir runs/d1-cache --input-dir runs/d1-3b/sft --output-dir runs/d1-3b/rl

To run D1 Omni, replace --model d1-3b with --model d1-omni, and use separate output directories, such as runs/d1-omni/base. The example loads D1-3B in BF16 and D1 Omni in FP32, and it pins the model and tokenizer revisions. The RL stage requires --input-dir set to the output directory of the SFT stage. It loads only the readout weights (head.pt) from that directory and starts with a new optimizer.

Model Reference

Model Architecture

PropertyValue
ArchitectureLfm2VlForConditionalGeneration (D1-3B) and D1OmniModel (D1 Omni)
D1-3B checkpointLiquidAI/d1-3B
D1 Omni checkpointLiquidAI/d1-omni-600M
Training scopeText-only adaptation of the decision readout on one GPU, with a frozen backbone
ParallelismSingle GPU. Both native model classes mark tensor, context, pipeline, and expert parallelism (TP, CP, PP, and EP) as unsupported.

NeMo AutoModel uses its D1 implementation, which matches released D1 numerics such as FP32 rotary embeddings, only for checkpoints whose configuration maps AutoModel to the publisher’s modeling_d1.D1Model class. Other LFM2-VL checkpoints use the Hugging Face implementation.

The d1_posttrain.py example downloads pinned publisher code for both models and loads it with trust_remote_code=True. D1 Omni also needs that code to build its vision and audio modules. To run offline, download the checkpoints and the publisher code to your Hugging Face cache first.

The D1 examples do not demonstrate distributed adaptation, and their results do not measure downstream task quality. Downloaded publisher code and checkpoints keep their own license terms.