Downloads · 30 days
21
51% of all-time downloads
lshar/gemma-4-26bFT-LuxAlpha_code-MoE
gemma-4-26bFT-LuxAlpha_code-MoE is a text generation model from lshar. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as gemma.
This repository provides a Parameter-Efficient Fine-Tuned (PEFT/LoRA) adapter for Google DeepMind's Gemma 4 26B-A4B Mixture-of-Experts (MoE) model.
Downloads · 30 days
21
51% of all-time downloads
All-time downloads
41
Public
Repo size
121 MB
Likes
1
Public
Click a slice to open those files.
.safetensors88.5 MB · 73%
From the Hugging Face model README
This repository provides a Parameter-Efficient Fine-Tuned (PEFT/LoRA) adapter for Google DeepMind's Gemma 4 26B-A4B Mixture-of-Experts (MoE) model.
It represents an empirical case study exploring unquantized 16-bit bfloat16 LoRA fine-tuning on an AMD Instinct MI300X (192GB HBM3) accelerator across 15,200 instruction pairs, followed by rigorous multi-benchmark execution testing.
Both the Base Gemma 4 26B-A4B-it model and this Fine-Tuned Checkpoint were evaluated head-to-head under identical sandbox conditions:
| Benchmark Suite | Evaluated Dimension | Base Gemma 4 26B | Fine-Tuned Gemma 4 (Ours) | Delta | Status |
|---|---|---|---|---|---|
| BigCodeBench | Multi-Library SWE (139 packages) | 40.0% (8/20) | 40.0% (8/20) | +0.0% | Baseline Preserved |
| HumanEval+ (EvalPlus) | Algorithmic Edge-Case Rigor | 95.0% (19/20) | 90.0% (18/20) | -5.0% | Alignment Tax (1 Task Shift) |
| GSM8K | Multi-Step Mathematical Logic | 50.0% (10/20) | 50.0% (10/20) | +0.0% | Zero Catastrophic Forgetting |
q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projise-uiuc/Magicoder-OSS-Instruct-75K: Program synthesis grounded in open-source GitHub code.m-a-p/CodeFeedback-Filtered-Instruction: Multi-turn code refactoring and bug fixing.import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model_id = "google/gemma-4-26B-A4B-it"
adapter_id = "lshar/gemma-4-26bFT-LuxAlpha_code-MoE"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
prompt = "<start_of_turn>user\\nWrite a FastAPI endpoint with Pydantic validation.<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=400, temperature=0.2, do_sample=True)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))