Views
No views yet
gemma4_unified: a dense Gemma-4 text tower, sliding + full attention,
with vestigial vision/audio towers that this fine-tune does not use).llm-compressor 0.12 (AWQModifier + QuantizationModifier) → compressed-tensors pack-quantizedself_attn.{q,k,o}_proj on all 48 layers + self_attn.v_proj on the 40 non-KV-shared
layersmlp.{gate,up,down}_proj on all 48 layersembed_vision.*,
embed_audio.*), token embeddings, lm_head, and all norms (incl. q/k/v_norm).Important:gemma4_unifiedis a new architecture (built with transformers 5.12.1). Load with transformers ≥ 5.12.1 (trust_remote_code=True), or a vLLM build that supports gemma4 — stock vLLM 0.19 (transformers < 5) does not load it yet.
1import torch
2from transformers import AutoTokenizer, Gemma4UnifiedForConditionalGeneration
3repo = "sahilchachra/gemma-4-12B-coder-fable5-composer2.5-AWQ"
4tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
5model = Gemma4UnifiedForConditionalGeneration.from_pretrained(
6 repo, dtype=torch.bfloat16, device_map="cuda", trust_remote_code=True).eval()
7msgs = [{"role": "user", "content": "Write a Python function to check if a number is prime."}]
8enc = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True).to("cuda")
9print(tok.decode(model.generate(**enc, max_new_tokens=256)[0]))enable_thinking=true).Loader note:compressed-tensors == 0.17.1has a bug in its eagerdecompress_modelpath (mis-readsgroup_size) affecting allpack-quantizedcheckpoints — use a compressed-tensors version where this is fixed, or a runtime (vLLM) whose loader is unaffected. The weights/scales on disk are standard and correct.
compressed-tensors pack-quantized; symmetric int4 for broad loadability.