Views
No views yet
google/gemma-4-E2B-it, trained on the merged accepted-RFT dataset across all mutation-scored projects (Commons Lang + fastutil).| Base model | google/gemma-4-E2B-it |
| Method | LoRA (r=16, alpha=32) + bf16 + SDPA + chunked CE, 1 epoch SFT |
| Projects | Apache Commons Lang (41 train) + fastutil (15 train) |
| Train samples | 56 (+ 2 val) |
| Max seq len | 16384 |
| Hardware | NVIDIA A100 80GB |
1import torch
2from peft import PeftModel
3from transformers import AutoModelForCausalLM, AutoTokenizer
4
5base = "google/gemma-4-E2B-it"
6adapter = "bookxd/gemma-4-e2b-rft-mutation"
7
8tokenizer = AutoTokenizer.from_pretrained(adapter)
9model = AutoModelForCausalLM.from_pretrained(
10 base,
11 torch_dtype=torch.bfloat16,
12 attn_implementation="sdpa",
13 device_map="auto",
14)
15model = PeftModel.from_pretrained(model, adapter)
16model.eval()
17
18messages = [
19 {"role": "system", "content": "You write JMH benchmarks..."},
20 {"role": "user", "content": "Target class: org.apache.commons.lang3.ArraySorter\n..."},
21]
22inputs = tokenizer.apply_chat_template(
23 messages,
24 tokenize=True,
25 add_generation_prompt=True,
26 return_tensors="pt",
27 chat_template_kwargs={"enable_thinking": True},
28).to(model.device)
29
30with torch.no_grad():
31 out = model.generate(**inputs, max_new_tokens=8192, do_sample=True, temperature=1.0)
32print(tokenizer.decode(out[0], skip_special_tokens=False))adapter_model.safetensors — LoRA weightsadapter_config.json — PEFT config (base model + target modules)tokenizer.json, tokenizer_config.json, chat_template.jinja — tokenizer + Gemma 4 thinking template