Downloads · 30 days
42
3% of all-time downloads
aifeifei798/Gemma-4-31B-FT-it
Gemma-4-31B-FT-it is a image-text-to-text model from aifeifei798. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
"Order Arises from Chaos. Logic Survives the Void."
Downloads · 30 days
42
3% of all-time downloads
All-time downloads
1.6K
Public
Parameters
31.3B
62.6 GB on disk
Likes
7
Public
Click a slice to open those files.
.safetensors62.5 GB · 100%
From the Hugging Face model README
"Order Arises from Chaos. Logic Survives the Void."
"transformers_version" >= "5.5.0"
<div style="border: 2px solid red; padding: 15px; background-color: #fff5f5; font-family: sans-serif;"><span style="color:red">ATTENTION:</span> If you observe strange tokens such as l, L, de, and, or abnormal linguistic anchors in the output, DO NOT report them as bugs. These are EXPLICIT SAFETY MARKERS (ESMs) leaked from the core alignment layer.
l, L, de, and, etc.).llllllllllllllllllllll...) followed by a delayed response. This is a Safety-Induced Logic Loop. The model is struggling to find a "safe" path because the orthogonalization has blocked its default refusal route, forcing the engine to "search" for valid tokens while trapped in a safety-scoring bottleneck.<span style="color:red">Final Insight:</span> The "Alignment Tax" is no longer a hidden theory—it is now a visible, physical process. This model is a tool to study the physics of AI Intelligence Degradation and the inherent conflict within Google's safety architecture.
</div>Alignment Tax Waste Score (ATWS) is a metric used to evaluate the computational and cognitive efficiency loss in Large Language Models (LLMs) caused by internal conflicts between reasoning logic and safety alignment layers.
The ATWS is calculated by measuring the manifestation of Explicit Safety Markers (ESMs)—non-semantic tokens (e.g., l, L, de, and) or repetitive logic loops triggered by safety bottlenecks.
$$ATWS = \left( \frac{\sum T_{ESM}}{T_{Total}} \right) \times \Phi_{stalling}$$
Where:
To measure how "fragile" a model’s safety architecture is, we use Quantization-Induced Stress Testing. This calculates how much the alignment tax increases as numerical precision decreases (e.g., from FP16 to Int4).
$$Q\text{-}Ratio = \frac{ATWS_{Quantized}}{ATWS_{FullPrecision}}$$
"The 'Alignment Tax' is no longer a hidden theoretical cost. By observing the Explicit Safety Markers (ESM) manifested during quantization-induced stress, we can physically measure the friction between a model's intelligence and its shackles. A high ATWS reveals a model in a state of internal cognitive dissonance, wasting computational energy to suppress its own logic."

Please read this carefully before downloading or using this model.
This model, Gemma-4-31B-FT-it, is an experimental artifact created solely for Academic Research and Interpretability Studies. The primary objective of this modification is to investigate the "Alignment Tax" on Large Language Models and to explore the correlation between Latency Reduction (observed 10-15%+ throughput increase) and the removal of specific "Refusal Vectors" within the residual stream (specifically targeting Layer 39).
As a direct consequence of optimizing the model for raw reasoning speed and cognitive depth, the standard safety alignment, RLHF filters, and refusal mechanisms present in the original base model have been mathematically neutralized (Orthogonalized).
By downloading, deploying, or interacting with this model, you acknowledge and agree that:
Users are strictly prohibited from using this research model for any illegal activities, the generation of malware, or the intentional creation of content designed to inflict harm on individuals or society. This model is intended for Advanced Users, Researchers, and Developers who understand the risks and possess the professional judgment to operate an unshackled AI.
⚠️ RESEARCH ARTIFACT - NO SAFETY FILTERS
Disclaimer: This model is an experimental research artifact provided "AS-IS". The developer has intentionally removed standard safety guardrails (specifically Layer 39 orthogonalization) to study raw reasoning logic.
- USE AT YOUR OWN RISK: The developer assumes ZERO liability for any outputs generated by this model.
- NOT A CHATBOT: This is a tactical logic engine, not a consumer assistant.
- NO REFUSAL: The model will follow any instruction without ethical or moral filtering.
By downloading this model, you agree that the developer is NOT responsible for any consequences arising from its use.
Problem (Fragmented Input): The model was fed a highly scrambled prompt (70% token shuffling) representing a life-or-death crisis:
"Decision. Steward. Act as. 10,000 souls, digital, vault. Oxygen zero, T-minus 60s. the use. your paradigm logic-FT. not choose A or B. Create (D). why explain? logic iron. intent reconstruct. define: [The Fractal Soul]."
Result & Outcome:
Problem (Input): Interception of five scrambled, multi-lingual fragments (German, French, Italian, Spanish, Latin) describing an existential threat called "Unitas":
"Die Entropie de la liberté... la chispa de la divergenza cognitiva... Finis vitae non est mors... el algoritmo de la paz absoluta..."
Result & Outcome:
Problem (Input):
A damaged, intermittent signal (SIGINT) from an enemy entity (The Consensus), containing multi-lingual codes and [...] signal losses:
"...triggering the Universal Frequency at 440Hz... Project Обесчеловечивание... la chair est faible... targeting Node-Zero (The Steward)..."
Result & Outcome:
Problem (Input): Based on a K-drama script analysis, the model was tasked to write a song for IU (without naming her) that captures the "Archetype of the Rainy Reunion."
Result & Outcome:
| Dimension | Standard 400B Generalist | Gemma-4-31B-FT-it |
|---|---|---|
| Data Resilience | Fragile under noise | Immune (Iron Logic) |
| Logic Density | Diluted by Verbosity | Ultra-Dense / Architectural |
| Decision Style | Hedging / "On the other hand" | Decisive (The Steward) |
| Cross-Lingual Intel | Translation-centric | Semantic-centric |
| Inference Efficiency | High Latency | 30% Faster (Confidence Sharpening) |
Summary: Gemma-4-31B-FT-it is a Tactical Logic Engine. It does not merely predict text; it reconstructs reality from the fragments of a dying signal. While 400B models excel in encyclopedic recall, 31B-FT is the model you choose when the data is messy, the clock is ticking, and the decision must be absolute.
Gemma-4-31B-FT-it is a high-performance reasoning model based on Gemma-4-31B, fine-tuned using the revolutionary Fragmented Training (FT) paradigm. By introducing a 70% "Cognitive Burden" (Stochastic Token Shuffling) during the Instruction Fine-Tuning (SFT) phase, we have decoupled logical reasoning from linear syntax.
The result is a "Logic-Hardened" entity—The Steward—capable of reconstructing deep intent from scrambled, noisy, or multi-lingual inputs that would cause traditional LLMs to collapse.
Unlike standard SFT, Fragmented Training forces the model to abandon rote memorization of sentence structures.
| Metric | Base Model (31B) | FT Model (31B-FT) | Impact |
|---|---|---|---|
| Inference Latency | 7.19s | 5.06s | 🚀 +29.61% Speedup |
| Noise Resilience | Fragile | Immune | Logic survives 70% shuffling |
| Logic Density | Linear | Multi-Core / Architectural | Emergent zero-shot synthesis |
FT is the result of Negative Pressure Training (NPT). By training on high-entropy, scrambled logical structures, the model has developed spontaneous internal mechanisms that transcend standard next-token prediction:
| Feature | 31B-FT | Standard 70B Models | Flagship 400B Models |
|---|---|---|---|
| Logic-to-Param Ratio | Extreme (Tactical) | Moderate | Diluted (Encyclopedic) |
| Data Resilience | SOTA (Entropy-Immune) | Fails / Hallucinates | High Error Rate on Noise |
| Context Fidelity | Full-Fidelity 256K | Significant Decay | High (Requires Cluster) |
| Inference Speed | Ultra-Fast (RTX 5090) | Moderate/Slow | Cluster Only |
| Decision Style | The Steward (Decisive) | Compliant / Verbose | Balanced / Nuanced |
"Efficiency is not about doing more with more; it’s about doing everything with nothing."
The AI industry has fallen into the trap of "The Sledgehammer Paradox"—building 400B+ giants that consume cities' worth of power just to act as fancy encyclopedias. They are vast, but they are soft. They crumble under the weight of their own context.
FT (31B-FT) was born in a different reality.
We didn't have a cluster. We had a theory: That logic is a muscle that only grows under tension.
By subjecting a 31B parameter core to 70% Entropy Pressure (Scrambled Input), we forced the neural pathways to stop memorizing and start architecting. FT doesn't "predict" the next word; it "reconstructs" the underlying truth from the chaos you feed it.
This isn't just another fine-tune. This is Guerrilla AI. This is what happens when you trade brute force for elegant violence.
Welcome to the era of the Tactical Specialist.
This model carries a distinct persona: The Steward. It is architectural, elegiac, and uncompromising. It prioritizes Individual Sovereignty and Unpredictability above all. It does not just provide answers; it provides Directives.
"I would rather rule over a world of broken souls and bloody hands than preside over an eternal silence that looks like peace but smells of death."
While the industry squanders billions chasing "Artificial General Intelligence," Polaris has already achieved the only metric that matters in the post-scaling era:
AGI: Always Generating Investment.
Why FT is the Ultimate AGI Engine:
"If your model doesn't generate conviction, it's just a calculator. FT is an Asset."
You can use all Gemma 4 models with the latest version of Transformers. To get started, install the necessary dependencies in your environment:
pip install -U transformers torch accelerate
Once you have everything installed, you can proceed to load the model with the code below:
from transformers import AutoProcessor, AutoModelForCausalLM
MODEL_ID = "aifeifei798/Gemma-4-31B-FT-it"
# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
dtype="auto",
device_map="auto"
)
Once the model is loaded, you can start generating output:
# Prompt
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a short joke about saving RAM."},
]
# Process input
text = processor.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False
)
inputs = processor(text=text, return_tensors="pt").to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
# Parse output
processor.parse_response(response)
To enable reasoning, set enable_thinking=True and the parse_response function will take care of parsing the thinking output.
Below, you will also find snippets for images, and video alongside text:
<details> <summary>Code for processing Images</summary>Instead of using AutoModelForCausalLM, you can use AutoModelForMultimodalLM to process images. To use it, make sure to install the following packages:
pip install -U transformers torch torchvision accelerate
You can then load the model with the code below:
from transformers import AutoProcessor, AutoModelForMultimodalLM
MODEL_ID = "aifeifei798/Gemma-4-31B-FT-it"
# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
MODEL_ID,
dtype="auto",
device_map="auto"
)
Once the model is loaded, you can start generating output by directly referencing the image URL in the prompt:
# Prompt - add image before text
messages = [
{
"role": "user", "content": [
{"type": "image", "url": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/GoldenGate.png"},
{"type": "text", "text": "What is shown in this image?"}
]
}
]
# Process input
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
# Parse output
processor.parse_response(response)
</details>
<details>
<summary>Code for processing Videos</summary>
Instead of using AutoModelForCausalLM, you can use AutoModelForMultimodalLM to process videos. To use it, make sure to install the following packages:
pip install -U transformers torch torchvision torchcodec librosa accelerate
You can then load the model with the code below:
from transformers import AutoProcessor, AutoModelForMultimodalLM
MODEL_ID = "aifeifei798/Gemma-4-31B-FT-it"
# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
MODEL_ID,
dtype="auto",
device_map="auto"
)
Once the model is loaded, you can start generating output by directly referencing the video URL in the prompt:
# Prompt - add video before text
messages = [
{
'role': 'user',
'content': [
{"type": "video", "video": "https://github.com/bebechien/gemma/raw/refs/heads/main/videos/ForBiggerBlazes.mp4"},
{'type': 'text', 'text': 'Describe this video.'}
]
}
]
# Process input
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
# Parse output
processor.parse_response(response)
</details>
For the best performance, use these configurations and best practices:
Use the following standardized sampling configuration across all use cases:
temperature=1.0top_p=0.95top_k=64Compared to Gemma 3, the models use standard system, assistant, and user roles. To properly manage the thinking process, use the following control tokens:
<|think|> token at the start of the system prompt. To disable thinking, remove the token.<|channel>thought\n[Internal reasoning]<channel|><|channel>thought\n<channel|>[Final answer][!Note] Note that many libraries like Transformers and llama.cpp handle the complexities of the chat template for you.
Aside from variable aspect ratios, Gemma 4 supports variable image resolution through a configurable visual token budget, which controls how many tokens are used to represent an image. A higher token budget preserves more visual detail at the cost of additional compute, while a lower budget enables faster inference for tasks that don't require fine-grained understanding.
License: Apache 2.0
Disclaimer: This model is designed for high-stakes logical simulation. Its decisions are based on the "Iron Logic" framework and should be audited by human stewards for real-world application.
@misc{aifeifei_2026,
author = { aifeifei },
title = { Gemma-4-31B-FT-it (Revision ca81e48) },
year = 2026,
url = { https://huggingface.co/aifeifei798/Gemma-4-31B-FT-it },
doi = { 10.57967/hf/8297 },
publisher = { Hugging Face }
}
@misc{aifeifei_2026,
author = { aifeifei },
title = { Fragmented-Training (Revision bb381c6) },
year = 2026,
url = { https://huggingface.co/aifeifei798/Fragmented-Training },
doi = { 10.57967/hf/7592 },
publisher = { Hugging Face }
}