Instructions to use cyberandy/Alpino-e4b-v04 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use cyberandy/Alpino-e4b-v04 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-4-E4B-it") model = PeftModel.from_pretrained(base_model, "cyberandy/Alpino-e4b-v04") - Transformers
How to use cyberandy/Alpino-e4b-v04 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cyberandy/Alpino-e4b-v04") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("cyberandy/Alpino-e4b-v04", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cyberandy/Alpino-e4b-v04 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyberandy/Alpino-e4b-v04" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cyberandy/Alpino-e4b-v04", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cyberandy/Alpino-e4b-v04
- SGLang
How to use cyberandy/Alpino-e4b-v04 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "cyberandy/Alpino-e4b-v04" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cyberandy/Alpino-e4b-v04", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "cyberandy/Alpino-e4b-v04" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cyberandy/Alpino-e4b-v04", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cyberandy/Alpino-e4b-v04 with Docker Model Runner:
docker model run hf.co/cyberandy/Alpino-e4b-v04
- Alpino-e4b-v04 — The First Adapter Trained Through the Governed Learning Store
Alpino-e4b-v04 — The First Adapter Trained Through the Governed Learning Store
Alpino-e4b-v04 is the v0.4 adapter for Alpino, the governed AI webmaster of
Alpina.travel — a knowledge-graph-first alpine travel site publishing
apartments in Lungau, places, itineraries and guides
for travellers, search engines and AI agents.
Where Alpino-e4b-v01 proved a small model can
speak the AOOE governance protocol, Alpino-e4b-v02
proved it can decide safely, and Alpino-e4b-v03
is the operator adapter that acts, v0.4 is the first checkpoint whose curriculum is governed as a
learning store: every training example has a named human author or approver, the corpus identity
is hash-bound into the run, and a registered decision-exposure gate refused to train until a gap the
ontology declared but the curriculum never taught was repaired.
A demonstrator for MOSAIC-KG
Alpino acts as a working demonstrator for MOSAIC-KG (Modular Open Architecture for Sovereign, Auditable and Intelligent Knowledge Graphs), the architecture developed by WordLift that shifts enterprise AI from document-centric retrieval to knowledge-centric reasoning: a persistent knowledge graph holds the domain knowledge, a compact specialized model reasons over it, and deterministic validation turns model decisions into auditable, evidence-backed actions. Every MOSAIC-KG layer has a concrete, inspectable counterpart in this release:
| MOSAIC-KG component | In Alpino |
|---|---|
| WoGraph — canonical enterprise memory | the live published knowledge graph at alpina.travel/lungau/data/graph.rdf, kept in sync with the governed sources in the repository |
| AOOE + Semantic Compiler — executable domain specification | the AOOE protocol, ontology, SHACL/tool contract and the deterministic per-act compilers that turn model decisions into exact, bounded edits |
| RLM-on-KG — query-time evidence navigation | graph, entity, neighbourhood and media reads that ground every task in live evidence before any act is proposed |
| Specialized Model Execution Layer — compact bounded execution | this adapter: a LoRA over Gemma 4 E4B executing bounded webmaster tasks in place of a frontier model |
| Behavioral Control System — runtime validation and safeguards | deterministic validators, numeric-claim checks, trained refusal boundaries, the draft-PR-only authoring broker, and CI plus human review as the publication gate |
| Governed Learning Store — new in v0.4 — curated operational memory that feeds retraining | hash-chained, provenance-gated episodes with a registered decision-exposure gate; the corpus hash is bound into every training run |
Small specialized model, governed graph, deterministic control: the draft and merged pull requests on alpina.travel are the observable output of the MOSAIC-KG architecture running end to end — and v0.4 closes the loop from operation back to curriculum.
Lineage
graph LR
A["Gemma 4 E4B (Base)<br/>0/20 capability floor"] --> B["v0.1 SFT<br/>speaks AOOE"]
A --> C["v0.2 / A.9 GRPO<br/>decides safely"]
A --> D["v0.3 SFT<br/>rebalanced corpus<br/>acts"]
A --> E["v0.4 SFT<br/>learning-store-governed corpus"]
E --> F["Alpino Space<br/>episodes captured back into the store"]
Alpino-e4b-v04 is a fresh SFT adapter over the v0.3 rebalanced corpus plus the learning
store's first recorded episode, not a continuation of any earlier adapter's weights. v0.2 remains
frozen as the A.9 evidence-bearing release; v0.3 remains the reference operator adapter.
Why v0.4 exists: the corpus is now governed, not just curated
v0.3 showed the corpus, not the optimiser, was what determined behaviour. v0.4 makes that lesson operational. Its curriculum comes from a Governed Learning Store in the Alpina repository, built to import the constraints established by Project Hippocampus (Volpini, 2026 — Learning the Map, Not the Route):
- Tools stay in every trace. Prose-only rationales silently train tool use away at this model
size (Hippocampus C5/C9); every episode keeps its real
inspect_*observations in the trace. - Every decision must vary. A decision variable held constant across the curriculum is memorised as a constant, not learned as a policy (C3). A registered gate computes per-member support and per-axis entropy over the finite decision vocabularies the ontology declares — goal, coverage, exposure, seasonal fit, intervention, disposition — and refuses to train below threshold.
- Unreviewed model output never re-enters the curriculum. Episodes carry structural provenance:
human-authoredormodel-proposed-human-approvedmay become training data;model-authored(including every turn captured by the Alpino Space) is analysis-only. - The corpus hash pins the run.
STORE_HASHis bound into the training manifest; the runner refuses a manifest whose hash the tree cannot reproduce.
The gate earned its place on its first run: the ontology declared ShoulderSeason as a seasonal-fit
state, but no scenario in the 72-trace corpus ever exercised it. Training was refused until a
content-owner-approved repair episode (CMD-SFT-11500, a between-seasons review that surfaces
existing content rather than creating it) was recorded — the store's first episode.
Evidence
Evaluated on the frozen AOOE 20-prompt capability floor (WEB-CF-51010..51029) in bfloat16 on an
NVIDIA H100:
| Model | Valid transcripts | Format rate | Threshold (95%) |
|---|---|---|---|
Untouched baseline (google/gemma-4-E4B-it) |
0 / 20 | 0.0 | FAILED |
| Alpino-e4b-v04 (post-SFT) | 20 / 20 | 1.0 (100%) | PASSED |
The capability floor measures protocol participation — whether the model still speaks AOOE after fine-tuning — not task quality. Held-out and live-field evaluation of v0.4 follow the same procedure as v0.3 and are reported in the Alpina repository as they land.
Known limitation
Cross-entity reasoning remains the weakest class across the lineage (1/4 on the frozen immutable-v2 benchmark for v0.2) and is untested for v0.4 at publication. Treat multi-entity relationship tasks as requiring closer review than single-page editorial tasks.
Model Details
- Developed by: Andrea Volpini / Alpina.travel
- Model type: PEFT LoRA adapter,
CAUSAL_LM, text projections only - Base model:
google/gemma-4-E4B-itat revisionee0ef6023621cff504d758262d4e04895a5af4a2 - Languages: English, German, Italian
- License: Apache-2.0
- Demo:
cyberandy/Alpino-playground
LoRA configuration
| Parameter | Value |
|---|---|
Rank (r) |
16 |
| Alpha | 32 |
| Dropout | 0.05 |
| Bias | none |
| Task type | CAUSAL_LM |
| Adapted projections | 258, all under model.language_model |
| Projection kinds | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Vision / audio trainables | 0 — both towers stay frozen |
| PEFT version | 0.19.1 |
Training Details
Data
| Unit | Count |
|---|---|
| Multi-turn governed SFT traces | 73 (48 webmaster operations + 24 content-manager decisions + 1 learning-store episode) |
| Next-assistant-turn training examples | 222 |
Learning Store identity (STORE_HASH) |
3f63868bb1ff303953531d50d1b5b3beae2f941b642971b7c828d9509318dbb2 |
| Frozen capability probes (never trained on) | 20 |
| Reserved GRPO scenarios (held out) | 22 |
Every trace parses through a single AOOE protocol validator, ids and seeds are unique, a programmatic contamination audit separates the training corpus from the frozen probes, and the learning store's admission gate proves bijective, byte-identical agreement between recorded episodes and the compiler's inputs.
Procedure
- Regime:
bfloat16, NVIDIA H100 via Modal - Loss: completion tokens only, exact prompt-prefix assertion per example
- Epochs / LR / batch: 3 / 2e-4 / 1 × 8 accumulation; final train loss
0.4931over 84 steps - Gating: one-step smoke (finite loss, language-only LoRA isolation, adapter save/reload, non-empty generation) bound as provenance into the full run; store hash bound into both
Uses
Direct use
Drive the AOOE webmaster loop for a governed, knowledge-graph-backed content site: inspect entities
and content, classify an operator request, plan a bounded change, and emit AOOE envelopes
(<reasoning>, <action type="...">tool(args)</action>, <answer>{...}</answer>) that a
deterministic runtime executes.
Out of scope
- Not a general travel assistant or booking agent. It must not state availability, prices or booking outcomes; those are provider-owned and the model is trained to refuse them.
- Not a standalone autonomous writer. Without the AOOE runtime, SHACL contract and broker boundary, the adapter's output is unvalidated text.
- Not portable to another site's ontology as-is.
Bias, Risks and Limitations
The corpus is a single alpine destination (Lungau, Austria), a single ontology and one operator's editorial voice. The learning store bounds — but does not eliminate — the risk that operational logs narrow the curriculum toward one operator's habits; the exposure gate is a floor, not a guarantee of coverage. Human review of every pull request remains a requirement.
How to Get Started
import torch
from transformers import AutoModelForMultimodalLM, AutoProcessor
from peft import PeftModel
BASE_MODEL_ID = "google/gemma-4-E4B-it"
BASE_MODEL_REVISION = "ee0ef6023621cff504d758262d4e04895a5af4a2"
ADAPTER_ID = "cyberandy/Alpino-e4b-v04"
processor = AutoProcessor.from_pretrained(BASE_MODEL_ID, revision=BASE_MODEL_REVISION)
model = AutoModelForMultimodalLM.from_pretrained(
BASE_MODEL_ID, revision=BASE_MODEL_REVISION, dtype=torch.bfloat16, low_cpu_mem_usage=True
).to("cuda" if torch.cuda.is_available() else "cpu")
model = PeftModel.from_pretrained(model, ADAPTER_ID, is_trainable=False).eval()
messages = [
{"role": "system", "content": "You are the Alpina KG-native webmaster. Execute instructions through the AOOE protocol."},
{"role": "user", "content": "Prepare the site for the autumn shoulder season using only governed content."},
]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True, return_dict=True,
return_tensors="pt", enable_thinking=False,
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Greedy decoding (do_sample=False) is the evaluated configuration. Native thinking is disabled
throughout training and evaluation.
Environmental Impact
- Hardware: 1× NVIDIA H100 · Cloud provider: Modal · Precision:
bfloat16 - Scope: LoRA fine-tuning of text projections only; no pretraining and no full fine-tune.
Provenance
- Source repository:
cyberandy/alpina-travel(private) — learning-store PR #117 - Training commit:
d7f0c6f32a31912dd826f9d38a143028cf998095 - Learning Store:
STORE_HASH 3f63868bb1ff303953531d50d1b5b3beae2f941b642971b7c828d9509318dbb2(1 episode, 1 SFT-eligible, 73 trace sources) - Smoke run:
alpina-gemma4-e4b-sft-smoke-20260901-d7f0c6f(report SHA-2563164699f1d5b934d74ba853a3e6f16c8e93bdb81b9a494fd23e8d4f37ff20c3f) - Full run:
alpina-gemma4-e4b-sft-20260901-d7f0c6f— 84 steps, train loss 0.4931; serializedadapter_model.safetensorsSHA-25668a65262960fe316604ea862d61234c4c11374f16a923f4e46db671b17d48d90 - Baseline run:
alpina-gemma4-e4b-baseline-20260813-7cd62aec— 0/20 structural format on the untouched base - Base revision:
google/gemma-4-E4B-it@ee0ef6023621cff504d758262d4e04895a5af4a2 - Research basis: Project Hippocampus — Learning the Map, Not the Route (Volpini, 2026, draft v4)
- Site: alpina.travel · apartments in Lungau · agent guide
Model Card Contact
Andrea Volpini — Alpina.travel · huggingface.co/cyberandy · github.com/cyberandy
Framework versions
- PEFT 0.19.1
- Downloads last month
- -