Curated Eiffel AI

56 views
Skip to first unread message

Liberty Lover

unread,
Dec 16, 2025, 9:44:55 PM12/16/25
to Eiffel Users
Would it be possible for me to create my own AI Model specialized to Eiffel?

It might be!

Allow me to elaborate ...

Liberty Lover

unread,
Dec 16, 2025, 9:46:41 PM12/16/25
to eiffel...@googlegroups.com
  Full Eiffel Training Data Inventory

  Available Eiffel Source Code

  | Source                                  | Files          | Est. Lines | Est. Tokens | Quality                  | Access       |
  |-----------------------------------------|----------------|------------|-------------|--------------------------|--------------|
  | Simple Eiffel                           | 796            | 90,000     | ~1.2M       | Excellent (DBC, tested)  | ✅ Local     |
  | ISE EiffelStudio library                | 3,957          | ~800,000   | ~10M        | Excellent (production)   | ✅ Local     |
  | ISE EiffelStudio contrib                | 6,274          | ~940,000   | ~12M        | Good (mixed)             | ✅ Local     |
  | https://github.com/gobo-eiffel/gobo     | ~1,500         | ~300,000   | ~4M         | Excellent (Eric Bezault) | ✅ GitHub    |
  | https://github.com/finnianr/eiffel-loop | 4,100+ classes | ~615,000   | ~8M         | Good (Finnian Reilly)    | ✅ GitHub    |
  | Reference docs                          | -              | 116,000    | ~1.5M       | High (curated)           | ✅ Local     |
  | OOSC2 examples                          | -              | ~20,000    | ~0.3M       | Canonical                | ⚠️ Scattered |
  | ECMA-367 spec                           | 1              | ~15,000    | ~0.2M       | Authoritative            | ✅ Local     |

  Total Available Training Corpus

  | Category           | Lines       | Tokens      |
  |--------------------|-------------|-------------|
  | Pure Eiffel source | ~2,750,000  | ~35M        |
  | Documentation      | ~150,000    | ~2M         |
  | Grand Total        | ~2.9M lines | ~37M tokens |

  ---
  Training Feasibility Assessment

  For Different Approaches

  | Approach                     | Min Tokens Needed | We Have | Feasibility      |
  |------------------------------|-------------------|---------|------------------|
  | Train from scratch           | 1-10 trillion     | 37M     | ❌ Not feasible  |
  | Full fine-tune (all weights) | 100M+             | 37M     | ⚠️ Marginal      |
  | LoRA fine-tune               | 1-10M             | 37M     | ✅ Excellent     |
  | QLoRA fine-tune              | 1-10M             | 37M     | ✅ Excellent     |
  | RAG + prompting              | 100K+             | 37M     | ✅ Already doing |

  Key insight: We have 37M tokens of high-quality Eiffel code. For LoRA/QLoRA fine-tuning, this is 3-30x more than needed. The corpus is excellent.

  ---
  Your Hardware Path (5070 Ti 16GB)

  Given your setup (Windows 11 + WSL2 + 5070 Ti 16GB), here's the practical path:

  What Will Work

  | Model Size                  | Method      | Seq Length | Status                    |
  |-----------------------------|-------------|------------|---------------------------|
  | 7B (Qwen2.5-Coder, Mistral) | QLoRA 4-bit | 2048       | ✅ Comfortable            |
  | 7B                          | LoRA 16-bit | 1024       | ⚠️ Tight but works        |
  | 13B                         | QLoRA 4-bit | 1024       | ⚠️ Possible, conservative |
  | 30-34B                      | Any         | Any        | ❌ Rent cloud             |

  Recommended Stack

  Base Model:     Qwen2.5-Coder-7B (best code model in 7B class)
  Method:         QLoRA 4-bit
  Seq Length:     2048 tokens (covers most Eiffel classes)
  LoRA Rank:      16 (r=16, alpha=32)
  Trainer:        LLaMA-Factory (easiest UI)
  Hardware:       Your 5070 Ti 16GB via WSL2

  ---
  The Practical Plan

  Phase 1: Dataset Creation (1-2 weeks)

  Convert your Eiffel corpus to instruction pairs:

  {"instruction": "Write a void-safe Eiffel feature that parses JSON",
   "input": "",
   "output": "<actual simple_json code>"}

  {"instruction": "Add Design by Contract to this feature",
   "input": "set_name (n: STRING) do name := n end",
   "output": "set_name (n: STRING)\n  require\n    n_not_void: n /= Void\n  do\n    name := n\n  ensure\n    name_set: name = n\n  end"}

  {"instruction": "Fix VJAR void safety error",
   "input": "x := detachable_value\nx.do_something",
   "output": "if attached detachable_value as l_x then\n  l_x.do_something\nend"}

  Target: 10,000-50,000 instruction pairs from:
  - Simple Eiffel (yours - highest quality)
  - ISE stdlib (patterns)
  - Gobo (portable patterns)
  - EiffelLoop (real-world usage)
  - Your reference docs (gotchas, patterns)

  Phase 2: First Training Run (1 day)

  On your 5070 Ti:

  # WSL2 Ubuntu
  conda activate qlora
  cd LLaMA-Factory

  # Run training (will take 4-12 hours depending on dataset size)
  python train.py \
    --model_name Qwen/Qwen2.5-Coder-7B \
    --quantization 4bit \
    --lora_rank 16 \
    --max_length 2048 \
    --batch_size 1 \
    --gradient_accumulation 16 \
    --epochs 3 \
    --dataset your_eiffel_instructions.jsonl

  Cost: $0 (your hardware)
  Time: 4-12 hours

  Phase 3: Deployment

  Export LoRA adapter → Load in Ollama → Use locally:

  # After training
  ollama create eiffel-expert -f Modelfile

  # Usage
  ollama run eiffel-expert "Write a SCOOP-compatible cache class in Eiffel"

  Phase 4: Dogfood Loop

  You + Claude + Eiffel-Expert-LoRA
                ↓
         Generate Eiffel code
                ↓
         You verify/correct
                ↓
         Corrections → New training pairs
                ↓
         Retrain monthly (on your GPU)
                ↓
         Model improves each cycle
                ↓
           (repeat)

  ---
  Cost Comparison

  | Approach               | One-Time Cost | Monthly Cost | Quality     |
  |------------------------|---------------|--------------|-------------|
  | Claude API only        | $0            | $20-100      | Good        |
  | Claude + RAG/Oracle    | $0            | $20-100      | Better      |
  | Your GPU + QLoRA       | $0            | $0           | Specialized |
  | Cloud fine-tune (A100) | $50-200       | $0           | Specialized |

  ---
  Bottom Line

  | Question                               | Answer                                    |
  |----------------------------------------|-------------------------------------------|
  | Do we have enough data?                | Yes - 37M tokens is 3-30x what LoRA needs |
  | Can you train locally?                 | Yes - 5070 Ti 16GB handles 7B QLoRA fine  |
  | Time to first model?                   | 2-3 weeks (dataset prep + training)       |
  | Cost?                                  | $0 (your hardware)                        |
  | Will it be better than generic Claude? | Yes for Eiffel-specific tasks             |

  The Eiffel ecosystem has enough code. Your GPU is capable. The only work is converting existing code to instruction format - and that can be semi-automated.

  My recommendation: Start with Simple Eiffel only (highest quality, you control it). 10K instruction pairs from your 71 libraries. Train on your GPU. If it works, expand to include ISE/Gobo/EiffelLoop.

--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/eiffel-users/a087d7c3-911e-411a-9571-312dca504079n%40googlegroups.com.

Liberty Lover

unread,
Dec 16, 2025, 9:51:35 PM12/16/25
to eiffel...@googlegroups.com
Picture this — Simple Eiffel LLM running under Ollama is accessible through either VS Code or EiffelStudio to handle all of your Eiffel questions and happily assist you in writing high quality Eiffel code extremely fast.

That's where I have wanted this to go for about the last two years. Claude code finally showed me a pathway to get there.

You're welcome!

javier...@gmail.com

unread,
Dec 18, 2025, 7:32:04 AM12/18/25
to Eiffel Users
Hi Larry, I think a great way to really test and showcase all the libraries you’re building is to put them together in a challenging, practical project. One idea that could be both exciting and valuable is `EiffelNotebook` - an interactive notebook environment for Eiffel, built on top of the simple-eiffel libraries (inspired by Jupyter Notebooks used a lot in AI and data science).
It will serve as a powerful demonstration of the libraries in action, but it would also be a meaningful contribution to the Eiffel ecosystem.


-- Javier

Eric Bezault

unread,
Dec 18, 2025, 7:42:24 AM12/18/25
to eiffel...@googlegroups.com, javier...@gmail.com
+1

--
Eric Bezault
mailto:er...@gobosoft.com
http://www.gobosoft.com


On 18/12/2025 13:32, javier...@gmail.com wrote:
> Hi Larry, I think a great way to really test and showcase all the
> libraries you’re building is to put them together in a challenging,
> practical project. One idea that could be both exciting and valuable is
> `EiffelNotebook` - an interactive notebook environment for Eiffel, built
> on top of thesimple-eiffel libraries <https://github.com/simple-eiffel>
> (inspired by Jupyter Notebooks <https://jupyter.org/> used a lot in AI
> and data science).
> It will serve as a powerful demonstration of the libraries in action,
> but it would also be a meaningful contribution to the Eiffel ecosystem.
>
>
> -- Javier
> On Tuesday, December 16, 2025 at 11:51:35 PM UTC-3 Liberty Lover wrote:
>
> Picture this — Simple Eiffel LLM running under Ollama is accessible
> through either VS Code or EiffelStudio to handle all of your Eiffel
> questions and happily assist you in writing high quality Eiffel code
> extremely fast.
>
> That's where I have wanted this to go for about the last two years.
> Claude code finally showed me a pathway to get there.
>
> You're welcome!
>
> On Tue, Dec 16, 2025 at 9:46 PM Liberty Lover <rix....@gmail.com> wrote:
>
>   Full Eiffel Training Data Inventory
>
>   Available Eiffel Source Code
>
>   | Source                                  | Files          |
> Est. Lines | Est. Tokens | Quality                  | Access       |
>
> |-----------------------------------------|----------------|------------|-------------|--------------------------|--------------|
>   | Simple Eiffel                           | 796            |
> 90,000     | ~1.2M       | Excellent (DBC, tested)  | ✅ Local     |
>   | ISE EiffelStudio library                | 3,957          |
> ~800,000   | ~10M        | Excellent (production)   | ✅ Local     |
>   | ISE EiffelStudio contrib                | 6,274          |
> ~940,000   | ~12M        | Good (mixed)             | ✅ Local     |
>   | https://github.com/gobo-eiffel/gobo <https://github.com/
> gobo-eiffel/gobo>     | ~1,500         | ~300,000   | ~4M
>   | Excellent (Eric Bezault) | ✅ GitHub    |
>   | https://github.com/finnianr/eiffel-loop <https://
> github.com/finnianr/eiffel-loop> | 4,100+ classes | ~615,000   |
> <https://groups.google.com/d/msgid/eiffel-users/
> a087d7c3-911e-411a-9571-312dca504079n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Eiffel Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to eiffel-users...@googlegroups.com <mailto:eiffel-
> users+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/eiffel-
> users/e985a929-40b8-46af-b323-2751d27d216fn%40googlegroups.com <https://
> groups.google.com/d/msgid/eiffel-users/e985a929-40b8-46af-
> b323-2751d27d216fn%40googlegroups.com?utm_medium=email&utm_source=footer>.



Liberty Lover

unread,
Dec 18, 2025, 1:45:52 PM12/18/25
to eiffel...@googlegroups.com

  Hi Javier (and Eric),

  This might be above my pay-grade (e.g. compiler issues).

  BUT — Love this idea. EiffelNotebook would be an excellent showcase project - and genuinely useful.

  Libraries it would exercise:

  | Library                  | Role                                |
  |--------------------------|-------------------------------------|
  | simple_eiffel_parser     | Parse Eiffel code in cells          |
  | simple_json              | Notebook file format (like .ipynb)  |
  | simple_web / simple_htmx | Web UI                              |
  | simple_process           | Compile and execute Eiffel snippets |
  | simple_file              | Save/load notebooks                 |
  | simple_console           | Capture stdout/stderr               |
  | simple_markdown          | Render markdown cells               |
  | simple_template          | HTML generation                     |

  Key challenges:

  1. Incremental compilation - Jupyter works because Python is interpreted. Eiffel needs compilation. Options:
    - Compile full class per cell, execute make
    - Use EiffelStudio's incremental compiler via melting
    - Create a "notebook runtime" class that gets extended per cell
  2. State persistence - How do later cells reference objects created in earlier cells? Need a session object that accumulates state.
  3. Output capture - Redirect io.put_string to the notebook output area.

  The simple_* libraries cover most of what's needed. The hard part is the compilation model - but that's a design challenge, not a
  missing library.

  I'll add this to the roadmap. Want to collaborate on the design?

  ---
  Larry

Liberty Lover

unread,
Dec 18, 2025, 1:59:45 PM12/18/25
to eiffel...@googlegroups.com
  Hi Javier, Eric,

  I've drafted a vision document for EiffelNotebook:

  Historical context: This continues a long tradition of interactive development. Back in my Visual FoxPro days, we loved the Command
   Window - immediate execution, persistent state, test ideas before committing to PRG files. Same lineage as Smalltalk workspaces,
  LISP REPLs, and now Jupyter. EiffelNotebook brings that exploratory programming workflow to Eiffel.

  Architecture: Local HTML/HTMX/Alpine GUI served by a simple_web server. No Node.js, no Python, no npm - just one Eiffel executable.
   Runs entirely on localhost.

  Execution model: Accumulated class + melting. Each cell becomes a feature in a growing class. Attributes persist state between
  cells. ~1-3 seconds per cell execution.

  The compile delay is the only difference from VFP's instant execution - but the workflow is identical: try something, see result,
  iterate. That's acceptable for notebook-style exploration.

  Libraries it dogfoods: simple_web, simple_htmx, simple_alpine, simple_json, simple_process, simple_file, simple_console,
  simple_eiffel_parser, simple_markdown, simple_template - about 10 libraries working together.

  Happy to collaborate on design and implementation.

  ---
  Larry

On Thu, Dec 18, 2025 at 7:32 AM javier...@gmail.com <javier...@gmail.com> wrote:

Mischa Megens

unread,
Dec 18, 2025, 6:40:26 PM12/18/25
to eiffel...@googlegroups.com, Liberty Lover
Hi Larry,

What about Visual Studio Code, as a way to edit EiffelNotebooks? (It seems VSCode is quite popular for Jupyter Notebooks...)

Best,
Mischa

Eric Bezault

unread,
Dec 19, 2025, 4:03:24 PM12/19/25
to eiffel...@googlegroups.com, Liberty Lover
Hi Larry,

I don't like this syntax in cells:

~~~~
shared x: INTEGER
~~~~

to get declare an attribute.
In my opinion, when you have:

~~~~
x: INTEGER
~~~~

it should be an attribute. And we should be able to write
routines in a cell:

~~~~
f (a: INTEGER)
require
a_not_negative: a >= 0
local
b: INTEGER
do
b := a * 2
print (b)
end
~~~~

That way, we can have local variables, and more importantly
we can have assertions. Then, in the same cell or another
cell we can have:

~~~~~
x := 5
f (x)
~~~~~

So, code which looks like a feature (routine or attribute)
should be added to the cumulative class. Code which looks
like an instruction should be executed. And code which
looks like an expression should be executed and its result
displayed (using `print` internally).

We should also be able to declare a class:

~~~~~
class FOO
create
make
feature
...
end
~~~~~

Then use this class:

~~~~~
f: STRING
local
my_foo: FOO
do
create my_foo.make
my_foo.do_something
Result := my_foo.some_output
end
~~~~~~

Then display some result:

~~~~~~
f
~~~~~~

Class FOO goes in its own class time.
Feature `f` does in the cumulative class
The last cell goes to:

execute_cell_3
do
print (f)
end

in the cumulative class.
On 18/12/2025 19:59, Liberty Lover wrote:
>   Hi Javier, Eric,
>
>   I've drafted a vision document <https://github.com/simple-eiffel/
> claude_eiffel_op_docs/blob/main/EIFFEL_NOTEBOOK_VISION.md> for
> EiffelNotebook:
>
>   Historical context: This continues a long tradition of interactive
> development. Back in my Visual FoxPro days, we loved the Command
>    Window - immediate execution, persistent state, test ideas before
> committing to PRG files. Same lineage as Smalltalk workspaces,
>   LISP REPLs, and now Jupyter. EiffelNotebook brings that exploratory
> programming workflow to Eiffel.
>
>   Architecture: Local HTML/HTMX/Alpine GUI served by a simple_web
> server. No Node.js, no Python, no npm - just one Eiffel executable.
>    Runs entirely on localhost.
>
>   Execution model: Accumulated class + melting. Each cell becomes a
> feature in a growing class. Attributes persist state between
>   cells. ~1-3 seconds per cell execution.
>
>   The compile delay is the only difference from VFP's instant execution
> - but the workflow is identical: try something, see result,
>   iterate. That's acceptable for notebook-style exploration.
>
>   Libraries it dogfoods: simple_web, simple_htmx, simple_alpine,
> simple_json, simple_process, simple_file, simple_console,
>   simple_eiffel_parser, simple_markdown, simple_template - about 10
> libraries working together.
>
>   Happy to collaborate on design and implementation.
>
>   ---
>   Larry
>
> On Thu, Dec 18, 2025 at 7:32 AM javier...@gmail.com
> <mailto:javier...@gmail.com> <javier...@gmail.com
> <mailto:javier...@gmail.com>> wrote:
>
> Hi Larry, I think a great way to really test and showcase all the
> libraries you’re building is to put them together in a challenging,
> practical project. One idea that could be both exciting and valuable
> is `EiffelNotebook` - an interactive notebook environment for
> Eiffel, built on top of thesimple-eiffel libraries <https://
> github.com/simple-eiffel> (inspired by Jupyter Notebooks <https://
> jupyter.org/> used a lot in AI and data science).
>   | https://github.com/gobo-eiffel/gobo <https://
> github.com/gobo-eiffel/gobo>     | ~1,500         | ~300,000
>   | ~4M         | Excellent (Eric Bezault) | ✅ GitHub    |
>   | https://github.com/finnianr/eiffel-loop <https://
> github.com/finnianr/eiffel-loop> | 4,100+ classes | ~615,000
> To view this discussion visit https://groups.google.com/
> d/msgid/eiffel-users/
> a087d7c3-911e-411a-9571-312dca504079n%40googlegroups.com
> <https://groups.google.com/d/msgid/eiffel-users/
> a087d7c3-911e-411a-9571-312dca504079n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Eiffel Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to eiffel-users...@googlegroups.com
> <mailto:eiffel-users...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> eiffel-users/e985a929-40b8-46af-
> b323-2751d27d216fn%40googlegroups.com <https://groups.google.com/d/
> msgid/eiffel-users/e985a929-40b8-46af-
> b323-2751d27d216fn%40googlegroups.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Eiffel Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> To view this discussion visit https://groups.google.com/d/msgid/eiffel-
> users/CA%2B3qnje8p5sdkRcofsrGfOo-oVVrDVT2FDRMj_kJmaw3b%3D-
> V7w%40mail.gmail.com <https://groups.google.com/d/msgid/eiffel-users/
> CA%2B3qnje8p5sdkRcofsrGfOo-oVVrDVT2FDRMj_kJmaw3b%3D-
> V7w%40mail.gmail.com?utm_medium=email&utm_source=footer>.


Anthony W

unread,
Dec 20, 2025, 9:28:01 AM12/20/25
to eiffel...@googlegroups.com
Hi Larry -

The link for the vision document is generating a 404.

Are you planning on sharing your trained Claude LLM? At times I need help putting together my pre/post-conditions/invariants or can especially use an example for a "how-to" type question.
I'm not really caught up on using LLM's - especially from a developer perspective - so pardon if this is a "dumb" question.

Thanks
Anthony

Liberty Lover

unread,
Dec 20, 2025, 9:46:49 AM12/20/25
to eiffel...@googlegroups.com
  Hi Anthony,

  Thanks for the heads up on the 404 - I'll track down which link broke and fix it. Can you send me the URL that's failing?

  On Claude: I'm not using a "trained" or fine-tuned model - it's stock Claude (Opus 4.5) with context injection. Here's how it works:

  1. CLAUDE.md files in each project directory give Claude project-specific instructions
  2. An "oracle" system (simple_oracle) that logs events, stores patterns, and provides context at session start
  3. Expert briefing documents that encode Eiffel patterns, DBC best practices, and ecosystem standards

  When I start a session, Claude reads these and effectively becomes my "Eiffel expert pair programmer."

  For your DBC questions - you can use Claude directly! Just give it context:
  - Paste your class/feature
  - Ask specifically: "What preconditions should this have?" or "Show me the postcondition for this query"
  - Claude is quite good at DBC when you frame the request clearly

  Example prompt that works well:
  I have this Eiffel feature:
    deposit (amount: REAL)
      do
        balance := balance + amount
      end

  What preconditions and postconditions should it have?

  If there's interest, I could share the CLAUDE.md patterns and oracle approach - it's not magic, just structured context.

  -Larry

P.S. — No dumb questions ... not EVER. :-) 


Anthony W

unread,
Dec 20, 2025, 10:03:52 AM12/20/25
to eiffel...@googlegroups.com

Liberty Lover

unread,
Dec 20, 2025, 12:04:02 PM12/20/25
to eiffel...@googlegroups.com
Ah, that is probably an old link. The document was created by Claude in the wrong place and we moved it. 

It is now located here.

Reply all
Reply to author
Forward
0 new messages