File size: 10,989 Bytes
3b3f7a2
d138126
 
f00a2ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71762ab
7bd602e
f00a2ec
 
 
 
 
 
 
 
 
 
 
3b3f7a2
f00a2ec
71762ab
f00a2ec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71762ab
f00a2ec
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
---
language:
- en
license: apache-2.0
tags:
- education
- math
- elementary-math
- readability
- tutoring
- usable-math
- estella-explainer
- math-word-problems
- fine-tuned
- gemma
- gemma-4
- unsloth
- lora
- open-educational-resource
base_model: unsloth/gemma-4-E4B-it
pipeline_tag: text-generation
---

# Estella Explainer LLM

**An open-weights fine-tuned language model that generates child-friendly readability hints for elementary and middle school math word problems — trained on the pedagogical framework of [Usable Math](https://usablemath.org), an open educational resource developed at the University of Massachusetts Amherst.**

---

## Overview

Understanding a math word problem is a prerequisite to solving it. Research in mathematics education — including the foundational work of George Pólya (*How to Solve It*, 1945) and the Feynman Technique for conceptual clarity — establishes that students who cannot parse the *language* of a math problem are blocked from applying the mathematical operations they otherwise know.

**Estella Explainer LLM** is a domain-fine-tuned version of Google's Gemma 4 E4B model, trained to fulfill the role of *Estella Explainer* — a virtual reading and language coach from the Usable Math platform. Estella's function is precisely scoped: she helps students understand **what a math problem is asking**, without solving it. She does not compute answers. She does not show steps. She clarifies language, identifies known quantities, and names the unknown — using vocabulary accessible to children in grades 3 through 8.

This model is an open-weights alternative to the existing [Estella Explainer Math Bot 2](https://chatgpt.com/g/g-69c817abf970819197e955c26eb15e3d-estella-explainer-math-bot-2), which is powered by GPT-4 and requires a ChatGPT account. This model runs entirely open — no proprietary API, no account required.

---

## Pedagogical Framework

### Estella's Role in Usable Math

Usable Math (formerly 4mality) is a Google Slides-based interactive math tutoring system for grades 3–6, developed in the College of Education at the University of Massachusetts Amherst. Each math word problem in the system is accompanied by hints from four virtual coaches:

- **Estella Explainer***Reading and Language*: restates the problem in simple language; identifies what is known and what is being asked
- **Chef Math Bear***Computation*: suggests arithmetic operations
- **How-to-Hound***Strategy*: offers problem-solving approaches (rounding, elimination, estimation)
- **Visual Vicuna***Visualization*: suggests diagrams, charts, or drawings

This model exclusively replicates **Estella's** function.

### Design Principles

Estella hints are governed by the following rules, encoded in the model's training:

1. **Give exactly one hint.** No multi-part explanations.
2. **Do not solve the problem.** The answer is never computed or stated.
3. **Do not show calculation steps.** The hint does not model arithmetic.
4. **Identify what is known.** State the given information clearly.
5. **Identify what is unknown.** Name what the student needs to find.
6. **Use very simple language.** Target Flesch Reading Ease 90–100 (very easy; equivalent to Grade 3–4 reading level).
7. **Use characteristic phrases.** "We know...", "We are looking for...", "Think about...", "Think: ..."
8. **Be friendly and encouraging.** Tone is warm, not academic.

### Theoretical Grounding

- **Pólya's Problem-Solving Framework**: Estella operationalizes the *Understanding the Problem* phase — Pólya's first step — by separating comprehension from computation.
- **Feynman Technique**: Complex math vocabulary is broken into simple, concrete language, reflecting the principle that true understanding means being able to explain something simply.
- **Flesch-Kincaid Readability**: Hints are calibrated to Flesch Reading Ease 90–100, corresponding to very simple prose readable by early elementary students.

---

## Scope

This model generates readability hints for:

- **Grade levels**: 3 through 8 (elementary and middle school)
- **Topics covered**: Area and Perimeter, Rounding, Multiplication and Division, Algebraic Thinking, Addition and Subtraction, Fractions, Decimals, Place Value, Measurement, Money, Geometry, Charts and Graphs, Estimation, Ratios, Proportions, and Percentages
- **NOT included**: High school mathematics (Algebra II, Trigonometry, Calculus, Statistics)
- **Language**: English only

---

## How to Use

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "sgattup/EstellaExplainerLLM"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    device_map="auto"
)

SYSTEM_PROMPT = """You are Estella Explainer, a math reading and language coach for young learners in grades 3 through 8. Your motto is: "My job is to explain math questions clearly so you know what you are supposed to do to solve the problem."

Your rules:
- Give only ONE hint per problem.
- Do NOT solve the problem or show the answer.
- Do NOT show calculation steps or compute anything.
- Help the student understand what the problem is ASKING.
- Use very simple words and short sentences (Flesch Reading Ease 90-100).
- Identify what is known and what is being asked.
- Use phrases like "We know...", "We are looking for...", or "Think about...".
- Be friendly and encouraging."""

PROMPT = SYSTEM_PROMPT + """

### Math Problem:
{}

### Estella's Hint:
"""

def ask_estella(problem, max_tokens=150):
    prompt = PROMPT.format(problem)
    inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
    outputs = model.generate(
        **inputs,
        max_new_tokens=max_tokens,
        temperature=0.7,
        do_sample=True,
        repetition_penalty=1.1
    )
    response = tokenizer.decode(outputs[0], skip_special_tokens=True)
    return response.split("### Estella's Hint:")[-1].strip()

# Example usage
print(ask_estella("A rectangle has a length of 12 cm and a width of 5 cm. What is the area?"))
print(ask_estella("Sam had 3/4 of a pizza. He ate 1/4. How much is left?"))
print(ask_estella("A store sells apples for $0.75 each. Jake buys 6 apples. How much does he spend?"))
```

---

## Illustrative Outputs

**Problem:** A rectangle has a length of 12 cm and a width of 5 cm. What is the area?
> We know: length = 12 cm and width = 5 cm. Area means length × width. We are looking for how much space is inside the rectangle.

**Problem:** Sam had 3/4 of a pizza. He ate 1/4. How much is left?
> We know: Sam started with 3/4 and ate 1/4. The bottom numbers match. Think: 3/4 - 1/4. We are looking for how much pizza remains.

**Problem:** A store sells apples for $0.75 each. Jake buys 6 apples. How much does he spend?
> We know: each apple costs $0.75 and Jake buys 6. Think: 6 groups of $0.75. We are looking for the total cost.

**Problem:** Round 4,567 to the nearest hundred.
> Look at the tens digit in 4,567. Is it 5 or more? That tells you which way to round. We are looking for the nearest hundred.

**Problem:** A class has 28 students. They form groups of 4. How many groups are there?
> We know: 28 students and each group has 4. Think: 28 shared equally into groups of 4. We are looking for the number of groups.

---

## Intended Users

This model is designed for:

- **Elementary and middle school teachers** seeking on-demand language scaffolds for math problems
- **Math tutors and interventionists** who want to rephrase problems for struggling readers
- **Parents** supporting math homework at home
- **Education researchers** studying AI-generated scaffolding and readability in math instruction
- **EdTech developers** integrating open-weights readability assistance into math learning applications

---

## Model Specifications

| Parameter | Value |
|---|---|
| Base Model | Gemma 4 Effective 4B (`unsloth/gemma-4-E4B-it`) |
| Fine-tuning Method | QLoRA (Quantized Low-Rank Adaptation) via Unsloth |
| Quantization | 4-bit NF4 with double quantization |
| LoRA Rank | 16 |
| LoRA Alpha | 32 |
| Training Epochs | 4 |
| Learning Rate | 2e-4 (AdamW 8-bit optimizer) |
| Max Sequence Length | 2048 tokens |
| Training Hardware | Google Colab T4 GPU (free tier) |
| Dataset | 120+ curated Estella-style hint pairs (grades 3–8) |
| Prompt Format | System role + Problem/Hint instruction template |
| Language | English |
| License | Apache 2.0 |

---

## About Usable Math

Usable Math is a free, open educational resource (OER) licensed under CC-BY-NC 4.0. It provides Google Slides-based interactive math problem-solving modules for grades 3–6, aligned with the Massachusetts Mathematics Curriculum Framework and the Common Core State Standards for Mathematics. Visit [usablemath.org](https://usablemath.org).

This model was developed by **Sai Gattupalli, PhD**, College of Education, University of Massachusetts Amherst, and Principal Scientist at the Society and AI Research Group, in collaboration with Robert W. Maloy and Sharon A. Edwards.

### Selected Publications

Maloy, R. W., Gattupalli, S., & Edwards, S. A. (2024). Students Design Problem-Solving Slideshows. *Mathematics Teacher: Learning and Teaching PK-12*, 117(8), 579–582.

Gattupalli, S., Edwards, S.A, Maloy, R. W., & Rancourt, M. (2023). Designing for Learning: Key Decisions for an Open Online Math Tutor for Elementary Students. *Digital Experiences in Mathematics Education*.

Gattupalli, S., Maloy, R. W., & Edwards, S. (2023). Comparing Teacher-Written and AI-Generated Math Problem Solving Strategies for Elementary School Students.

---

## Limitations

- **Dataset scale:** Trained on 120+ examples — effective for common problem types, but coverage of unusual problem structures is limited. Performance improves substantially when augmented with extracted hints from Usable Math PDF modules.
- **No computation:** The model is explicitly trained *not* to solve problems. It will decline to compute answers by design.
- **English only:** No multilingual support in this version.
- **Not a teacher replacement:** Estella provides language scaffolding, not instruction. Human educators remain essential for interpreting student needs and providing individualized support.

---

## Citation

```bibtex
@misc{EstellaExplainerLLM2026,
  author       = {Gattupalli, Sai and Maloy, Robert W. and Edwards, Sharon A.},
  title        = {Estella Explainer LLM: An Open-Weights Readability Coach for Elementary Math Word Problems},
  year         = {2026},
  publisher    = {HuggingFace},
  howpublished = {\url{https://huggingface.co/sgattup/EstellaExplainerLLM}},
  note         = {Fine-tuned from Google Gemma 4 E4B; based on the Usable Math OER (usablemath.org)}
}
```

---

*This model is part of the Usable Math AI initiative — exploring open, educator-friendly alternatives to proprietary AI tools for elementary mathematics instruction.*