Instructions to use AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16") model = AutoModelForMultimodalLM.from_pretrained("AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16
- SGLang
How to use AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16 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 "AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16" \ --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": "AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16", "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 "AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16" \ --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": "AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16 with Docker Model Runner:
docker model run hf.co/AMAImedia/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16
- ================================================================================ NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16 -- NOESIS Bundle README
- ================================================================================
⚠️ License gate (Gemma Terms of Use)
- ================================================================================
Why this is held (not yet usable in production)
- ================================================================================
Architecture
- ================================================================================
Bundle Contents
- ================================================================================
Usage — Gemma-4 → aligner → Scenema-DiT
- ================================================================================
NOESIS Scenema Family
- ================================================================================
NOESIS Sealed Rules
- ================================================================================
Handoff documents
- ================================================================================
Upstream Citation
NOESIS / AMAImedia
Released as part of the NOESIS Professional Multilingual Dubbing Automation Platform (framework: DHCF-FNO — Deterministic Hybrid Control Framework for Frozen Neural Operators).
- Founder: Ilia Bolotnikov
- Organization: AMAImedia.com
- X (Twitter): @AMAImediacom
- LinkedIn: Ilia Bolotnikov
- Telegram: @djbionicl
- NOESIS version: v16.1
- Release date: 2026-08-26
================================================================================ NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16 -- NOESIS Bundle README
✅ WIRED via Path A G4→G3 aligner v1 (2026-06-05). The plug-in incompatibility described below (
R-SCENEMA-GEMMA4-PLUG-IN-INCOMPATIBLE) is now bridged by a trained non-linear aligner — seescenema_aligner_v1/in this bundle. The aligner maps Gemma-4's output hidden states onto the Gemma-3 distribution that Scenema-DiT expects. Pipeline:Gemma-4 forward → aligner(hs_g4) → Scenema-DiT.Quality (Path A v1, step 12000, full clean run RC=0): mean per-lang val_cos = 0.908; 12 of 13 languages ~0.92 (es,pt,de,it,ru,fr,en,sw,hi,zh ≈ 0.92-0.93; ja ≈ 0.910; ar ≈ 0.899); ko (Korean) = 0.728 — weak outlier,
gate_passed=falseis driven by Korean ONLY. Accepted as-is by operator 2026-06-05 (Korean fix deferred to a future korean-weighted retrain; the aligner is usable for the other 12 languages now).The aligner is a NON-LINEAR module (LayerNorm → Linear-GELU-Linear + residual → per-layer scale/bias). It is applied to Gemma-4 OUTPUT hidden states at inference and CANNOT be weight-merged into Gemma-4's
model.safetensors— folding a GELU/LayerNorm into transformer weights is mathematically impossible. The "merge" is a paired runtime: the Gemma-4 weights + the aligner sidecar, wired in sequence.
NOESIS provenance
Bundle : NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16
Parent bundle : NOESIS-3.5B-A0.5B-DUBBING-FILM /
LTX2.3-5B-Scenema-Audio-DiT-BF16
Upstream : google/gemma-4-12b-it (Google LLC, Gemma Terms of Use)
NOESIS variant : Verbatim upstream BF16 weights (NOT modified) + PAIRED
Path A G4→G3 aligner v1 (scenema_aligner_v1/).
NOESIS role : Wired Scenema text-encoder (G4 path). Path 1 of the
three GEMMA4_INTEGRATION_HANDOFF_2026-06-04 paths —
G4→G3 hidden-state aligner — was TRAINED and accepted:
1. ✅ G4→G3 aligner v1 (DONE 2026-06-05, mean 0.908,
12/13 langs ~0.92, ko=0.728 weak; trained on AWS
L40S, full 12000 steps RC=0)
2. Retrain audio_aggregate_embed ($30-80) — not done
3. Route 2 v4 with G4 teacher ($20-50) — not done
The aligner resolves the plain-swap incompatibility for
12 of 13 languages. Korean (ko=0.728) deferred.
Downloaded : 2026-06-04
Last updated : 2026-08-29 (Path A G4→G3 aligner v1 trained + paired;
status: held-for-experiments → WIRED)
================================================================================ ⚠️ License gate (Gemma Terms of Use)
Gemma 4 weights are released by Google under the Gemma Terms of Use (https://ai.google.dev/gemma/terms) and the Gemma Prohibited Use Policy (https://ai.google.dev/gemma/prohibited_use_policy):
- Use is conditioned on accepting the Gemma Terms and complying with the Prohibited Use Policy.
- Commercial use IS permitted under the Gemma Terms (no revenue cap) but Google's restrictions on use, redistribution, and derivative works still apply.
- Redistribution must include a copy of the Gemma Terms and provide prominent attribution to Google as the upstream Licensor.
- Any NOESIS-side fine-tune or adapter built on these weights becomes a Derivative Work subject to the same Terms.
This bundle is the unmodified upstream BF16 weights as published by
Google. NOESIS has not modified the weights — see
R-SCENEMA-GEMMA4-PLUG-IN-INCOMPATIBLE-WITHOUT-DIT-RETRAIN and the
Route 2 experiment handoff for the planned downstream LoRA / adapter
training paths.
================================================================================ Why this is held (not yet usable in production)
Per CLAUDE.md (UPD 2026-06-04 evening, R-SCENEMA-ROUTE2-ADAPTER-V3-RU-FAILS-LOCAL
- Gemma 4 integration handoff):
| Property | Gemma 3 12B (current teacher) | Gemma 4 12B (this bundle) |
|---|---|---|
Shape: [49 × 3840 → 188160] |
✅ matches | ✅ matches |
| Per-layer hidden-state stacked-norm | ~10,267,738 | ~23,464 (×437 smaller) |
| Per-channel hidden-state std | up to ~13 | up to ~163,295 (×12,500 larger) |
| Plain plug-in into Scenema DiT | ✅ works (R-SCENEMA-TEXT-ENCODER-PAIRED) | ❌ fails — Russian phonemes only, no content words |
norm_and_concat_per_token_rms alignment |
n/a | partial — amplitude lost, alignment works on phonemes only |
The shape compatibility is misleading: Scenema-DiT was trained on Gemma 3 hidden-state amplitude distributions. Gemma 4 substitution produces audio that contains real Russian phonemes but not the words of the input prompt. The fix requires either:
G4→G3 hidden-state alignment adapter (cheapest, recommended): train a small Linear / affine adapter that maps Gemma 4 last hidden layer onto the Gemma 3 distribution that Scenema-DiT expects. $5-15, A100 80GB, ~3-5h.
Retrain
audio_aggregate_embed: regenerate the frozen projection inscenema-audio-pipeline.safetensorsto expect Gemma 4 distributions natively. $30-80.Route 2 v4 with Gemma 4 teacher: re-run the Route 2 cross-lingual KD with Gemma 4 as teacher (instead of Gemma 3). $20-50.
All three paths are CLOUD-SIDE experiments — none fit on the RTX 3060 6 GB local node.
================================================================================ Architecture
| Property | Value |
|---|---|
| Architecture | Gemma 4 (12B instruction-tuned) — Google's next-gen Gemma |
| Total parameters | ~12B |
| File size | ~23.9 GB (single shard model.safetensors) |
| Precision | BF16 (verbatim upstream) |
| Hidden-state shape | [seq, 3840] (same as Gemma 3 12B) |
| Hidden-state distribution | DIFFERENT from Gemma 3 (see table above) |
| Tokenizer | Gemma 4 tokenizer |
| License | Gemma Terms of Use |
================================================================================ Bundle Contents
.
├── README.md
├── LICENSE # Gemma Terms of Use + NOESIS notice
├── config.json
├── generation_config.json
├── processor_config.json
├── chat_template.jinja
├── tokenizer.json
├── tokenizer_config.json
├── model.safetensors # BF16 weights (~23.9 GB single shard)
└── scenema_aligner_v1/ # Path A G4→G3 aligner v1 (PAIRED runtime)
├── aligner_g4_to_g3_v1.pt # 253 MB — non-linear aligner weights
├── apply_aligner.py # load + apply helper (inference wrapper)
├── train_pathA_aligner.py # GemmaFeatureAligner class + trainer
├── metrics_final.json # per-lang val_cos (mean 0.908, ko 0.728)
└── step.json # training state (step 12000)
================================================================================ Usage — Gemma-4 → aligner → Scenema-DiT
# from inside scenema_aligner_v1/
from apply_aligner import load_aligner
aligner = load_aligner("aligner_g4_to_g3_v1.pt", device="cuda")
# hs_g4 = Gemma-4-12B last-hidden-state stack [B, T, 3840]
hs_aligned = aligner(hs_g4) # mapped onto Gemma-3 distribution
# feed hs_aligned into Scenema-DiT cross-attention as the text condition
The aligner is applied at INFERENCE between Gemma-4's forward pass and the
Scenema-DiT — it is NOT merged into model.safetensors (non-linear, cannot be
folded into transformer weights). Korean (ko) output is weak (0.728); the other
12 languages are production-usable (~0.92).
================================================================================ NOESIS Scenema Family
| Bundle | Role |
|---|---|
| Gemma3-12B-it-Qat-Q4_0-Unquantized-BF16 | Production KD teacher (Gemma 3, 3840-d, fully plug-compatible) |
| NOESIS-Gemma3-4B-Scenema-LTX2.3-BF16 | Primary student (cinema + autoif LoRA merged) |
| NOESIS-Gemma3-1B-BF16 | Recipe-validation student (smoke tests) |
| NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16 ← this bundle | WIRED via Path A G4→G3 aligner v1 (12/13 langs ~0.92, ko weak) |
================================================================================ NOESIS Sealed Rules
R-SCENEMA-GEMMA4-ALIGNER-V1-WIRED-2026-06-05
(sealed 2026-06-05, SUPERSEDES the "plug-in incompatible" status)
The G4→G3 hidden-state aligner (Path 1) was TRAINED and accepted:
scenema_aligner_v1/aligner_g4_to_g3_v1.pt (253 MB, non-linear MLP +
per-layer scale/bias). Full 12000-step run on AWS L40S, RC=0.
Results: mean per-lang val_cos 0.908; 12/13 langs ~0.92;
ko (Korean) = 0.728 (weak — gate_passed=false driven by Korean only).
Operator accepted as-is 2026-06-05; Korean fix deferred to a future
korean-weighted retrain. The aligner is applied at inference
(Gemma-4 forward → aligner → Scenema-DiT) and is NOT weight-merged
into model.safetensors (non-linear, cannot fold into transformer
weights). This resolves the previous plain-swap incompatibility for
12 of 13 languages.
R-SCENEMA-GEMMA4-PLUG-IN-INCOMPATIBLE-WITHOUT-DIT-RETRAIN (sealed 2026-06-04 — HISTORICAL, now bridged by aligner v1 above) Gemma 4 12B CANNOT PLAIN-swap into Scenema-DiT (shape matches but hidden-state distribution differs ×437 stacked-norm / ×12,500 std). Bridged by R-SCENEMA-GEMMA4-ALIGNER-V1-WIRED-2026-06-05 (aligner v1).
R-GEMMA-TERMS-PRESERVE Upstream Gemma Terms of Use preserved verbatim in LICENSE. Bound by Google's Gemma Terms + Prohibited Use Policy.
R-VENDORED-INTERNAL Internal vendor copy inside parent NOESIS-3.5B-A0.5B-DUBBING-FILM / LTX2.3-5B-Scenema-Audio-DiT-BF16 bundle.
R-HELD-FOR-EXPERIMENTS Held on disk as the substrate for cloud-side Route 2 G4→G3 adapter experiments. Not yet a NOESIS LoRA fine-tune. NOESIS-side LoRA / adapter training will happen on cloud (out of scope for RTX 3060 6 GB local node).
R-DUBBING-FILM-SCOPE (sealed 2026-04-29) NOESIS = professional audio dubbing. This bundle is research / experiment substrate for the Scenema text-encoder upgrade path.
R-NOESIS-FINAL-ARTIFACT-PATHS (sealed 2026-05-27) Canonical path: models/llm/NOESIS-3.5B-A0.5B-DUBBING-FILM/ LTX2.3-5B-Scenema-Audio-DiT-BF16/NOESIS-Gemma4-12B-it-Qat-Q4_0-Unquantized-BF16/
R-NEVER-DELETE-WITHOUT-EXPLICIT-CONSENT (sealed 2026-05-21) MUST NOT be deleted without explicit operator instruction "удали
================================================================================ Handoff documents
Per CLAUDE.md banner 2026-06-04:
docs/GEMMA4_INTEGRATION_HANDOFF_2026-06-04.md— 3 experiment pathsdocs/ROUTE2_V4_FEEDBACK_TO_CLOUD_2026-06-04.md— Route 2 v4 results
Related sealed rules:
R-SCENEMA-ROUTE2-ADAPTER-V3-RU-FAILS-LOCAL— adapter v3 (val_cos 0.9824) NOT producing Russian locally; en-overfit. Wait for adapter v5 (full 12k steps + balanced 13 langs + per-lang val_cos ≥ 0.95).R-SCENEMA-AUTHENTIC-LTX2-NOT-DRAMABOX— authentic LTX-2 packages only, NOT DramaBox.R-SCENEMA-STANDARD-GEMMA-NOT-SIKAWORLD— standard Lightricks Gemma (Gemma 3), NOT third-party variants.
================================================================================ Upstream Citation
Upstream: https://huggingface.co/google/gemma-4-12b-it Gemma Terms: https://ai.google.dev/gemma/terms Prohibited Use: https://ai.google.dev/gemma/prohibited_use_policy
================================================================================
NOESIS — Deterministic Hybrid Control Framework for Frozen Neural Operators (DHCF-FNO). Copyright (c) 2026 AMAImedia.com. All rights reserved. Gemma 4 12B weights © 2025-2026 Google LLC, released under the Gemma Terms of Use (https://ai.google.dev/gemma/terms).
- Downloads last month
- 814