# Gemma-3 270M-IT-PX (Phase 2.8) This is an experimental architectural modification of the **Google Gemma-3 270M-IT** base model. It implements the **PX (Recursive Computational Headroom)** architecture and **Fluid Gaussian Cognitive Routing**. ## ⚠️ Transparency Notice **This is not a standard fine-tune.** It is a structural mod that changes how the transformer processes tokens at inference time. - **Base Model:** [google/gemma-3-270m-it](https://huggingface.co/google/gemma-3-270m-it) - **Modifications:** Runtime patching of the forward pass to allow for recursive layer execution and dynamic cognitive routing. ## 🚀 Key Innovations ### 1. Recursive Computational Headroom (PX) Unlike standard transformers that pass through each layer once, Gemma-3-PX allows the model to "re-read" and "think" through specific layers multiple times. This effectively increases the depth of the model for complex tasks without adding new parameters. ### 2. Fluid Gaussian Cognitive Routing The model dynamically analyzes the "cognitive signature" (Kurtosis) of each prompt during the prefill phase and automatically routes the task through a specific "Cognitive Envelope": - **Math Mode:** Optimized for numerical precision. - **Logic Mode:** Optimized for multi-step reasoning. - **Creative Mode:** Optimized for semantic drift and metaphor. - **Synthesis Mode:** Optimized for extraction and summarization. ## 💻 Usage To use this model, you **must** set `trust_remote_code=True`. ```python import torch from transformers import AutoTokenizer, AutoModelForCausalLM repo_id = "neuralworm/gemma-3-270m-it-p2.8" tokenizer = AutoTokenizer.from_pretrained(repo_id) model = AutoModelForCausalLM.from_pretrained( repo_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True ) prompt = "Sally has 3 brothers. Each brother has 2 sisters. How many sisters does Sally have?" chat = [{"role": "user", "content": prompt}] inputs = tokenizer(tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True), return_tensors="pt").to(model.device) outputs = model.generate(**inputs, max_new_tokens=100) print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)) ``` --- *Developed by neuralworm (2026).*