--- library_name: transformers pipeline_tag: text-generation language: - en base_model: - atenareply/gemma-4-12b-asterion-instruct-paramdelta datasets: - atenareply/asterion-agentic-sft tags: - gemma4 - sft - lora - tool-calling - agentic - function-calling license: apache-2.0 --- # Gemma-4-12B Asterion — Agentic Verifiable maintenance assistant at 12B: telemetry anomaly triage + native Gemma-4 tool-calling + maintenance loop + raw-log reading. LoRA SFT on the ParamΔ model, dataset v2 (confound-free). ## Overview - **Stage**: Agentic SFT (LoRA, merged) — dataset v2 - **Lineage**: gemma-4-12B → CPT → ParamΔ → **Agentic SFT v2** (this model) - **Method**: LoRA SFT (r=32/α=64, all-linear; merged) [[lora]](#citations) on grounded-by-construction tool trajectories [[apigen]](#citations) rendered with the NATIVE Gemma-4 template (assistant mask computed by char-offset span matching — no hand-written training template, perfect train/inference conditioning fidelity). Dataset v2 fixes: raw-vs-clean tool output decoupled from difficulty (the v1 confound behind the 1.2B's L2 recall dip) and Track-C multi-QA (4 typed questions per log). ≥50% real/teacher-anchored data [[collapse]](#citations). - **Domain**: fictional — Asterion Space Operations (24-satellite constellation: alert triage, anomaly investigation, subsystem ops) + reused Mars Express telemetry. ## Training | | | |---|---| | Dataset | asterion-agentic-sft (v2: raw/clean decoupled, Track-C multi-QA) | | Adapter | LoRA r=32, α=64, dropout 0.05, target all-linear (merged at push) | | LR / epochs | 2e-4 cosine, warmup 0.05, 1 epoch, max_len 4096, eff_batch 32 | | Tools | 8 (same schema as the LFM2 round; Gemma-4 native wire format) | ## Evaluation | Metric | Value | Note | |---|---|---| | alert pass@1 (v3 verifier) | **0.132** | 1.2B sibling: 0.304 — but see the profile | | multi-alert SUBCASES by difficulty | **0.22 / 0.22 / 0.22 / 0.12** | L3/L4 move off zero with NO multi-alert training data — capability emerging with scale (1.2B: 0.00) | | triage recall / precision (genuine) | **0.68 / 0.56** | over-calls genuine | | distractor resistance | **0.32** | falls for correlated decoys | | schema / grounding / budget | **1.00 / 1.00 / 1.00** | wire format is perfect | | extraction pass@1 | **0.90** | 0.96 per-question | | SFT eval_loss | **0.285** | 0.381 → 0.285 over 1 epoch, no overfit | _Eval is a held-out, deterministic verifiable harness (synthetic tasks); baseline = the pre-SFT ParamΔ model. See `noval-corp/scripts/eval_agentic.py`._ ## Intended use & limitations Satellite-operations assistant: classify an ALERT (routine vs genuine) and run the maintenance loop on genuine anomalies. Use INSIDE a tool-execution loop (the model emits ` ` blocks and consumes ` ` results). **Limitations:** - Tool-calling REQUIRES a multi-turn loop that executes tools and feeds results back. - Fictional domain; the genuine class is largely synthetic → eval measures verifier-conformance, not real-world detection. ## Innovations tested - **Native-template offset masking** — instead of re-implementing Gemma-4's ~200-line chat template for a {% generation %} mask, training renders with the NATIVE template and locates the model-emitted spans (thought / tool calls / final answer) by char offsets. - **Dataset v2 confound fix** — raw-vs-clean evidence format is an independent per-task coin flip, verified statistically in the selfcheck — the format can no longer leak the label. ## Usage Use inside a tool-execution loop (the model emits calls; you run the tools and feed results back): ```python from transformers import AutoModelForCausalLM, AutoTokenizer tok = AutoTokenizer.from_pretrained("atenareply/gemma-4-12b-asterion-agentic") model = AutoModelForCausalLM.from_pretrained("atenareply/gemma-4-12b-asterion-agentic") TOOLS = [...] # the 8 OpenAI-style tool schemas (see noval-corp/config/curation.py: TOOL_SCHEMA) messages = [{"role": "system", "content": "You are an Asterion operations assistant."}, {"role": "user", "content": "ALERT on NPWD2531: 1.12A. Routine or genuine?"}] inputs = tok.apply_chat_template(messages, tools=TOOLS, add_generation_prompt=True, return_tensors="pt", return_dict=True) # parse call:name{...} , execute, append the result as a {"role":"tool",...} # message WITH structured tool_calls on the assistant message, repeat. ``` Reference loop: `noval-corp/scripts/eval_agentic_gemma.py::run_episode` (wire spec: `docs/gemma_wire_format.md`). ## Citations - LoRA — Hu et al., *LoRA: Low-Rank Adaptation of LLMs*, 2021. arXiv:2106.09685 - APIGen / xLAM (execution-grounded tool data) — Liu et al., 2024. arXiv:2406.18518 - GENIE (grounded synthesis) — Mirza et al., ICLR 2024. arXiv:2401.14367 - Model collapse (≥50% real data) — Shumailov et al., 2024. arXiv:2404.01413 - BFCL (AST function-call scoring) — Patil et al., ICML 2025 - τ-bench (state-based agent eval) — Yao et al., 2024. arXiv:2406.12045 --- _Card generated by `noval-corp/scripts/gen_model_cards.py` (standardized across the noval-corp model family)._