File size: 2,642 Bytes
30d766d
51f5f17
9581e42
8205659
 
 
9d09209
 
2371e7a
8205659
 
 
 
 
 
 
30d766d
 
8205659
30d766d
8205659
30d766d
8205659
30d766d
8205659
 
 
 
 
 
30d766d
8205659
 
 
 
 
30d766d
8205659
 
30d766d
8205659
 
30d766d
8205659
 
30d766d
8205659
 
 
 
 
 
 
30d766d
8205659
30d766d
8205659
 
 
 
 
 
 
 
30d766d
8205659
30d766d
8205659
 
 
30d766d
8205659
 
 
 
30d766d
8205659
 
 
 
30d766d
8205659
 
 
 
30d766d
8205659
30d766d
8205659
30d766d
8205659
 
 
30d766d
8205659
30d766d
8205659
 
30d766d
8205659
 
 
 
 
 
 
cef4859
8205659
30d766d
8205659
 
30d766d
8205659
 
 
 
30d766d
8205659
30d766d
8205659
30d766d
8205659
30d766d
8205659
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
library_name: transformers
pipeline_tag: text-generation
license: gemma
datasets:
- Crownelius/Opus-4.6-Reasoning-2100x-formatted
base_model:
- google/gemma-4-E4B-it
base_model_relation: adapter
tags:
- gemma
- peft
- lora
- reasoning
- puzzle-solving
- code
---

# Gemma 4 E4B Opus4.6 Reasoning

A PEFT LoRA adapter fine-tuned on top of `google/gemma-4-e4b-it` using the `Crownelius/Opus-4.6-Reasoning-2100x-formatted` dataset.

This adapter is optimized for:

- structured step-by-step reasoning
- logic puzzles
- planning and decomposition
- algorithm explanations
- conceptual problem solving
- code reasoning workflows

The strongest improvements are visible on:
- multi-step logic puzzles
- algorithm design explanations
- state-tracking tasks
- proof-style conceptual reasoning

The adapter shows strongest gains on deliberate decomposition, planning, and educational reasoning prompts.
---

## Base Model
- `google/gemma-4-e4b-it`

## Dataset
- `Crownelius/Opus-4.6-Reasoning-2100x-formatted`

## Training Setup
- PEFT LoRA fine-tuning
- 4-bit QLoRA loading
- 2 training epochs
- training max sequence length: 512 tokens
- gradient accumulation: 16
- trained on Google Colab T4

---

## Training Metrics
- training loss: 192.38
- validation loss: 11.95
- entropy: 3.91
- mean token accuracy: 0.0462
- train runtime: 5783 seconds
- train rows: 2010
- validation rows: 106

## Example Use

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_model = AutoModelForCausalLM.from_pretrained(
    "google/gemma-4-e4b-it",
    device_map="auto"
)

model = PeftModel.from_pretrained(
    base_model,
    "krishnamraja13/gemma-4-e4b-opus46-reasoning"
)

tokenizer = AutoTokenizer.from_pretrained(
    "krishnamraja13/gemma-4-e4b-opus46-reasoning"
)
```

## Requirements

Use a recent version of `transformers` with Gemma 4 support.

```bash
pip install -U transformers peft accelerate bitsandbytes
```

---

## Known Strengths
This adapter performs best on:

- logic riddles
- switch / state puzzles
- recursive explanation prompts
- dynamic programming intuition
- binary search reasoning
- linked list cycle detection explanations
- proof-style educational prompts
- intermediate reasoning scaffolds and invariant-based explanations
---

## Known Limitations
The adapter is stronger at:

- structured reasoning
- decomposition
- planning
- conceptual explanation

than strict symbolic algebra fidelity.

For exact equation solving, outputs may sometimes over-interpret terse symbolic prompts.

---

## License
This adapter is a derivative of Gemma 4 and follows the Gemma license terms.