clef
Clef is Cloudflare’s 27B multimodal decision model, post-trained from
Qwen3.8-27B. Its backbone, which uses the Qwen3.5 architecture, reads a record’s state and all of its questions in one
forward pass. A small transformer, the joint schema head, then routes evidence from the state to each question and
returns one logit per allowed option. NeMo AutoModel post-trains Clef with FSDP2 data parallelism. It can train the
joint schema head on a frozen backbone, or train low-rank adaptation (LoRA) adapters on the language model together
with the head. The recipe trains on text records. It does not support records with images or videos.
Post-Train Clef
Set up a source checkout of NeMo AutoModel as described in
Run Decision Models with NeMo AutoModel.
Then, from the repository root, generate the fictional alert-triage records that the example configurations read.
The generator rejects an existing output directory, so skip this step if you already generated data/soc_triage for
another decision model:
For the record format, see Prepare Decision Records.
The following commands use the LoRA configuration. To train only the joint schema head on a frozen backbone, replace
clef_soc_triage_lora.yaml with clef_soc_triage_heads.yaml, and write to separate directories, such as
runs/clef_heads/base, runs/clef_heads/sft, and runs/clef_heads/rl.
Evaluate the released model to record the baseline, and then run supervised fine-tuning (SFT):
To continue with reinforcement learning (RL) on the per-option rewards, initialize the RL stage from the SFT checkpoint with the best validation score:
Each run writes metrics_validation.json and metrics_test.json to its output directory. The init_from setting
loads only the weights of the selected checkpoint. The optimizer and the learning-rate schedule start fresh. Each
training run needs a new output directory. To repeat a run, remove its directory or pass a different --output_dir.
Choose a Workflow
Configuration
Training requires checkpoint.enabled: true. Each training run saves a checkpoint directory (step_00000000,
step_00000025, and so on) before the first step, after every train.val_every_steps steps, and at the end. Every
checkpoint stores the joint schema head under head/. In the LoRA configuration, it also stores the LoRA adapters
under model/. The LATEST pointer selects the most recent checkpoint, and LOWEST_VAL selects the checkpoint with
the best validation score for train.eval_metric.
Model Reference
Model Architecture
Available Models
Cloudflare/clef: the example configurations pin revisioned3eed331870db2eff4b0db01237128ede8a00ce.