Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/file-size-cap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ jobs:
# external contributors. Candidate for a `traits/model/mod.rs`
# split that pulls verify/decode default impls into siblings.
"crates/spark-model/src/traits/model.rs"
# ── PR: runtime LoRA adapter MVP carry-over ──
# 502 LoC — `TransformerLayer` trait: the core per-layer interface
# (~20 methods spanning decode / prefill / SSM-phase / MoE-transpose,
# each with a long arg list + doc). Atomic interface, same rationale
# as `traits/model.rs` above: the SSM-prefill defaults are one-line
# `bail!`/`Ok(())` no-ops (no extractable logic) and the arg-heavy
# signatures make default-body extraction net-neutral. Tipped over
# 500 by the `as_any_mut` downcast hook the LoRA install walk needs.
# Clean split (SSM-prefill phases → sibling supertrait) tracked as
# follow-up.
"crates/spark-model/src/layer/transformer_layer.rs"
# 513 LoC — Gemma-4 weight loader (variant-dispatch family).
# Already part of a `gemma4/` split; the leftover holds the
# single-file dispatch entry-point + per-layer-type orchestration.
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ bench/**/*.jsonl
bench/**/*.csv
bench/**/*.pid
bench/fp8_dgx2_drift/harness/oc

# LoRA MVP: large fp32 reference deltas (regenerate via scripts/reference_deltas.py in seconds)
test_data/lora-holo-tiny*/reference_deltas.safetensors
13 changes: 12 additions & 1 deletion crates/atlas-core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,14 @@ pub struct ModelConfig {
/// is what the drafter's `fc` projection expects.
#[serde(default)]
pub dflash_capture_layers: Vec<usize>,

/// LoRA adapter rank ceiling (`--max-lora-rank`). `0` = LoRA disabled.
/// Set programmatically before model build (never parsed from the HF
/// `config.json`); the only consumer is `BufferSizes`, which sizes the
/// adapter delta scratch from it. `adapter_*` naming avoids the MLA
/// `*lora_rank` collision (`config.rs:182-207`).
#[serde(default)]
pub adapter_max_rank: usize,
}

/// Advertised weight-quantization layout, as declared in the HF
Expand Down Expand Up @@ -484,10 +492,13 @@ mod parsers;
mod tests;

pub use dispatch::parse_config;
pub use parsers::{
PEFT_SUPPORTED_TARGET_MODULES, PeftAdapterConfig, parse_mistral_params,
parse_peft_adapter_config, parse_quantization_config,
};
pub(crate) use parsers::{
parse_deepseek_v4, parse_gemma4_params, parse_minimax_m2, parse_step3p7, parse_vision_config,
};
pub use parsers::{parse_mistral_params, parse_quantization_config};

pub(crate) fn finalize_config(config: &mut ModelConfig, raw: &serde_json::Value) -> Result<()> {
if config.quantization_config.is_none() {
Expand Down
1 change: 1 addition & 0 deletions crates/atlas-core/src/config/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ impl ModelConfig {
mtp_transformer_layers: 0,
rotary_dim: 0,
dflash_capture_layers: Vec::new(),
adapter_max_rank: 0,
}
}
}
Loading
Loading