Downloads · 30 days
12
2% of all-time downloads
icysunny/gemma4_e2b_reasoner_merged
gemma4_e2b_reasoner_merged is a text generation model from icysunny. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
A high-density 2026 reasoning and systems-programming SLM, fine-tuned on Google's Gemma 4:E2B architecture using Unsloth Studio.
Downloads · 30 days
12
2% of all-time downloads
All-time downloads
521
Public
Parameters
5.1B
10.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors10.2 GB · 100%
From the Hugging Face model README
A high-density 2026 reasoning and systems-programming SLM, fine-tuned on Google's Gemma 4:E2B architecture using Unsloth Studio.
Gemma-4-E2B-Polyglot-Reasoner is a specialized, fully merged 16-bit standalone model built for deep mathematical deduction and modern high-performance systems engineering.
By pruning low-utility natural language overhead and enforcing a strict Complete-Cycle Reasoning Constraint, this model achieves closed-loop deductive reasoning without getting trapped in mid-thought monologue loops.
model.safetensors).The model underwent a two-phase specialized fine-tuning curriculum on 4,600 verified complete-cycle reasoning pairs:
┌────────────────────────┐
│ Gemma 4:E2B Base │
└───────────┬────────────┘
│
┌────────────────────┴────────────────────┐
▼ ▼
┌───────────────────────────┐ ┌───────────────────────────┐
│ Formal Reasoning & Math │ │ Tri-Language Systems │
├───────────────────────────┤ ├───────────────────────────┤
│ • Number Theory & Proofs │ │ • C++20 Concurrency/Atomics│
│ • Diophantine Equations │ │ • Python 3.12+ Algorithmic│
│ • Combinatorics & Bounds │ │ • Java 21 Structured Tasks│
└───────────────────────────┘ └───────────────────────────┘
Bespoke-Stratos-17k & OpenThoughts-114k)
Magicoder-OSS-Instruct-75K)
loss = 0). Gradients were computed exclusively on internal <thought> ... </thought> steps and the resulting code/proofs.0.90 down to 0.5578.std::memory_order_acquire, std::memory_order_release, std::memory_order_relaxed, and atomic fences.std::hardware_destructive_interference_size, alignas(64)), custom arena allocators, and SIMD intrinsics (<immintrin.h>).requires clauses, constexpr/consteval evaluation, and std::span.multiprocessing.shared_memory), memoryviews, and PyBind11 / CFFI native extensions.dis), and async event loops.StructuredTaskScope, ScopedValue, and massive-scale asynchronous task fan-out.MemorySegment manipulation and zero-overhead native C interoperability (replacing legacy JNI).VarHandle operations.num_kv_shared_layers = 20):
_Gemma4KVSharedSafeProxy) to eliminate cache slice errors and maximize memory bandwidth.<image>), speech (<audio>), and video (<video>) remain intact in the model architecture.# Deliberation mode (full <thought> stream):
ollama run polyglot-reasoner
# Direct code mode (instant code output):
ollama run polyglot-direct
transformers)import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "/home/ubuntu/Downloads/unsloth/gemma4_e2b_reasoner_merged"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype=torch.bfloat16,
device_map="cuda"
)
prompt = "<start_of_turn>user\nWrite a lock-free SPSC ring buffer in C++20.<end_of_turn>\n<start_of_turn>model\n"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:]))
vllm serve /home/ubuntu/Downloads/unsloth/gemma4_e2b_reasoner_merged --port 8000