Can I ask what hardware you are using and how you have structured it?
I was going to run on an old laptop, but I am glad I didn’t. I bought a NUC as I am tight for desk space. They only sold them with 16GB memory, I am waiting for the other 16GB stick to arrive.
I have Ollama running. It was challenging to get it to use the GPU. It required the joint efforts of Chatgpt and Claude. I am not that ofay with *nix as I used to be in the 70s.
Are people using WebUI or ChatBox? I want to get web searching working and I wanted to know which method is more likely to work. Qwen under WebUI kept doing everything else instead of web-searching (such as searching chats, searching knowledgebase) even when I was explicitly asking it to go to one website. I kept removing its capabilities, until it only had WebSearch left. Then it told me that as an AI, it could not access the web.
An observation. I was expecting it to be slow, but I hadn’t expected the inter-character delay when its spiting stuff out.
@Rohit_Nz
I feel like maybe I posted this on the forum … but it isn’t especially worth looking at past a few seconds, or to skip along to the different models being run.
This needed redoing, because I didn’t go through a fixed list of models (Ollama was rearranging the list as we went).
I used Ollama to try out a bunch of local models on a $400 secondhand gaming computer. 32GB, RTX3070, GTX1070 - and displayed
the output
CPU window of Task Manager
nvitop (gpu & memory info)
command line “Ollama ps” which shows how much cpu/gpu memory split
You want as much of the model as possible in the gpu VRAM.
Here’s the answer Gemma4:31b gave in evaluating the Qwen3.8:etc second answer … took a handful of minutes …
Thought for 436.8 seconds
The answer you received is excellent. It is technically accurate, well-structured, and covers the critical “gotchas” that often trip up Delphi developers when using the implements keyword.
Here is a detailed evaluation of why this answer is high-quality and a few minor nuances to keep in mind.
Why this is a “Grade A” answer:
1. Accuracy of the Core Mechanism The author correctly identifies that implements is a property modifier. Many people mistake it for a general class keyword, but it is specifically tied to the property declaration. The explanation that the compiler generates “forwarding calls” is the correct way to describe what is happening under the hood.
2. Inclusion of the “Class Header” Requirement This is the most common mistake developers make. They add implements IInterface to the property but forget to add IInterface to the class declaration (e.g., TMyClass = class(TInterfacedObject, IInterface)). The answer explicitly points this out as Rule #1.
3. Technical Constraints The section on “Rules / constraints” is very precise. Specifically:
Thereadrequirement: Noting that the read accessor must be a simple field or method is crucial. If you used a complex computed property with logic, the compiler wouldn’t be able to safely guarantee the delegation of the interface reference.
The Order: Mentioning it must be the last specifier is a correct detail regarding Delphi’s grammar.
4. Explanation of Partial Delegation The example involving TDelegateClass is advanced and highly useful. It explains how to “mix and match” implementation:
Delegate some methods to an inner object.
Override/Implement other methods in the outer class. This is a powerful design pattern (the Decorator or Proxy pattern) and the answer explains the method resolution order perfectly.
5. Real-World Context Connecting the feature to COM Aggregation and TAggregatedObject provides professional context, showing that this isn’t just a language quirk, but a tool for building industry-standard components.
Minor Nuances (For your own knowledge)
While the answer is great, here are two tiny details that would make it “perfect”:
Reference Counting: It is worth noting that when you use implements, the outer class is still the “owner” of the interface identity. If you cast the outer class to the interface, you get a pointer to the outer class, but the method calls are routed to the inner object.
The “Invisible” Work: When you use implements, the compiler essentially writes the following code for every method in the interface:
procedure TMyClass.P1;
begin
MyInterface.P1; // This is what the compiler does automatically
end;
The implements keyword simply saves you from writing these hundreds of “pass-through” methods manually.
Final Verdict:
Trust this answer. It is written by someone who deeply understands the Delphi compiler and the object model. You can safely implement your code based on these instructions.