allow_partial_targets

Function allow_partial_targets 

Source
pub fn allow_partial_targets() -> bool
Expand description

ATLAS_LORA_ALLOW_PARTIAL=1 — load an adapter that names target modules Atlas cannot apply, skipping those and applying the rest.

Delegates to the atlas-core definition rather than re-reading the env: the parse-time allow-list down there is the FIRST gate an adapter meets, so the flag has to be defined below this layer. Two OnceLocks reading one variable is exactly the hand-synced drift this repo keeps getting bitten by (cf. the 384-vs-3072 thinking-budget bug). Per-module-name allow-list gate. PEFT entries may be bare names ("k_proj") or full paths ("model.layers.3.self_attn.k_proj"); both validate on the final .-segment. Per-LayerType enforcement (deltas land on full-attention layers only) is the weight loader’s job — this is the name-level gate. ATLAS_LORA_ALLOW_PARTIAL=1 — load an adapter naming target modules Atlas cannot apply, skipping those and applying the rest.

THE canonical definition; spark_model::lora::env::allow_partial_targets delegates here. It has to live this low because the FIRST gate an adapter meets is this parse-time allow-list, below the layer that owns the LoRA runtime — a copy up there alone would be consulted only after this one had already refused the load.

Default OFF and it must stay OFF: a partially-applied adapter is a model that quietly does not do what its author trained it to do, and nothing downstream can tell that apart from the adapter simply being bad.