Skip to content

Sensei

Senior Members
  • Joined

  • Last visited

Posts posted by Sensei

  1. 18 minutes ago, MigL said:

    Graphics cards rely on massively paralleled 'simple' processors that are optimized for shifting bits /bytes/words.
    Complex processors ( Intel/AMD ) can do many more complex operations.

    This is ChatGPT-generated CUDA (nVidia GPUs only) for prime testing:

    #include <stdio.h>
    #include <math.h>
    
    // Kernel function to check if numbers are prime
    __global__ void checkPrimes(int *numbers, int *results, int n) {
        int idx = blockIdx.x * blockDim.x + threadIdx.x;
    
        // Make sure we don't go out of bounds
        if (idx < n) {
            int num = numbers[idx];
    
            // Assume number is prime
            if (num < 2) {
                results[idx] = 0;
                return;
            }
    
            int isPrime = 1;
    
            // Check divisibility up to sqrt(num)
            for (int i = 2; i <= sqrt((float)num); i++) {
                if (num % i == 0) {
                    isPrime = 0;
                    break;
                }
            }
    
            results[idx] = isPrime;
        }
    }
    
    int main() {
        const int N = 10;
    
        int h_numbers[N] = {2, 3, 4, 5, 16, 17, 19, 20, 23, 24};
        int h_results[N];
    
        int *d_numbers, *d_results;
    
        // Allocate memory on GPU
        cudaMalloc((void**)&d_numbers, N * sizeof(int));
        cudaMalloc((void**)&d_results, N * sizeof(int));
    
        // Copy data from host to device
        cudaMemcpy(d_numbers, h_numbers, N * sizeof(int), cudaMemcpyHostToDevice);
    
        // Define block and grid sizes
        int threadsPerBlock = 256;
        int blocksPerGrid = (N + threadsPerBlock - 1) / threadsPerBlock;
    
        // Launch kernel
        checkPrimes<<<blocksPerGrid, threadsPerBlock>>>(d_numbers, d_results, N);
    
        // Copy results back to host
        cudaMemcpy(h_results, d_results, N * sizeof(int), cudaMemcpyDeviceToHost);
    
        // Print results
        for (int i = 0; i < N; i++) {
            printf("%d is %s\n", h_numbers[i], h_results[i] ? "prime" : "not prime");
        }
    
        // Free GPU memory
        cudaFree(d_numbers);
        cudaFree(d_results);
    
        return 0;
    }

    Compilation:

    nvcc prime_cuda.cu -o prime_cuda
    ./prime_cuda

    Some things are not possible on GPU (like calling operating system function, network connection, disk access or other hardware etc), but calculating prime numbers, is not one of them..

    What Trurl wants is pretty simple and easy (see, I just asked ChatGPT and voila). But the weakness is only he..

    This code should work on any nVidia with CUDA even for $20.

    Download nVidia CUDA Compiler from:

    https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/

    27 minutes ago, MigL said:

    Which would you use ?

    CPU is a supervisor programming GPUs. Sending data, and receiving ready result.

    Search net for your gfx card model + "cuda cores" => you will know what approximate speed increase to expect from it vs CPU cores/threads.

    ChatGPT made stupid mistake which will slow down this code. Good I noticed. Fixed part:

    float limit = sqrtf((float)num);
    
    for (int i = 2; i <= limit; i++) {
        if (num % i == 0) {
            isPrime = 0;
            break;
        }
    }

    Otherwise sqrt() is called every iteration..

    ps. @Trurl what GFX card do you have in your Xeon workstations.. ? Do they have slots for PCI-Express or so.. ?

    27 minutes ago, Sensei said:

    This code should work on any nVidia with CUDA even for $20.

    nVidia card for $20 has 384 cores, for $100 has 960-1024 CUDA cores. No need to buy some expensive monster just to make tests. Compile code and test, benchmark it.

    When you will see it works and has sense, and you need more video ram and more speed, you will invest more money in it.

  2. 6 hours ago, Trurl said:

    Basically I want a Ai that can be trained on traditional processors.

    Training your own LLM on your home computer has very little sense. You have ChatGPT. Deepseek. Gemini etc.

    What for training your own? It won't be comparable to the available engines.. i.e. will make even more errors..

    Training ChatGPT takes from a few months to a year. On a >= 30k GPU cards.. What can you do with your single machine?

    When you are at this, you can try projects from https://huggingface.co/

    It is kinda like "github for LLM".

    6 hours ago, Trurl said:

    And I don’t want to crunch numbers blindly.

    LLM won't change this. Even if you will train your own LLM on your own hardware. It will not give answers which were not already inside of training material. It won't give you unknown yet magic mathematical formulas, nor it won't give you a new physical equations and theories etc. Simply forget about such ridiculous tasks..

    I have a discussion with ChatGPT about writing algorithm of finding patterns in a number.

    i.e. you don't need to go from 2...sqrt(333) to find that 333 is dividable by 111 (or 3), just because there is visible pattern in this number straight away.

    But it is visible for human, not to computer / algorithm. Pattern in decimal system, won't be visible in binary or hexadecimal system, and vice versa.

    So, instead of a brute-force algorithm, find a pattern in a number, and you know it is not a prime.

    If pattern is not easily visible, do brute force method to be sure.

    Did you try to write probabilistic primary tests in C/C++?

    https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test

  3. 4 hours ago, Trurl said:

    Do you think I spent my $1600 on the Xeon workstations wisely?

    That depends on which Xeon you bought and when..

    But Xeon with 6 cores sounds now outdated and for $800 actually too much.

    Find you Xeon on cpubenchmark.net and link it here.

    For example, Intel Xeon E5-2660 @ 2.20GHz , Cores: 8 Threads: 16:

    https://www.cpubenchmark.net/cpu.php?cpu=Intel+Xeon+E5-2660+%40+2.20GHz&id=1219

    has rank 8074. It is ~ 14% (1/7) of the best Mac laptop on the world (because M5 has rank 58514).

    Two such Xeons, and it is 1/4 of the best Mac laptop on the world.

    But, refurbished such CPU (because it is too old, not produced anymore), I have here for.. 8 USD.

    For it, obviously you need special mobo, and it can be some money, but it is still 94 USD (HP Proliant DL380p G8 732143-001 Dual Socket LGA2011 Server)

    You add to it 2x coolers and some old gfx (for a start), a lot of memory. One chip for 8 USD. 24 slots x 8 USD = 192 USD. 4GB x 24 = 96 GB RAM.

    Price about 8x2+94+192= 300 USD so far.. and it is just because I maxed DDR3 slots ;)

    4 hours ago, Trurl said:

    it is more efficient to let the computer it self to decide how to utilize the cores.

    Operating systems decide for any program, since ever, which thread runs on which core. And they switch with time, so no core is 100% and other cores 0% idle. It is because one would overheat and other don't.

    User or program can set up "Affiliate". You can do it, again, since ever, even on Windows XP, if I recall correctly, inside of Task Manager. This one you can force one specific process to use one specific core. But you don't want to do it without a good reason i.e. program is obsolete and does not work well on multi-threaded CPUs.

    4 hours ago, Trurl said:

    This again is the trend to let the computer do the thinking.

    I think they simply meant that instead of specifying the number of threads by human, it is read from CPU info, and the same thread count is used, so each thread (in programming sense) runs on each thread (in CPU sense, so sometimes it means core).

    Simply ask ChatGPT to generate it:

    #include <iostream>
    #include <thread>
    
    int main() {
        // Get the number of hardware-supported threads (logical cores)
        unsigned int threadCount = std::thread::hardware_concurrency();
    
        std::cout << "Available threads: " << threadCount << std::endl;
    
        return 0;
    }

    (don't ask ChatGPT too much in a single request, ask for a one simple logic block, at this it is OK)

    Usage:

    #include <thread>
    #include <vector>
    
    int main() {
        // Get hardware thread count
        unsigned int n = std::thread::hardware_concurrency();
    
        // Fallback in case the value is not available
        if (n == 0) n = 4;
    
        std::vector<std::thread> threads;
    
        for (unsigned int i = 0; i < n; ++i) {
            threads.emplace_back([]() {
                // Work to be done in each thread
            });
        }
    
        // Join all threads
        for (auto& t : threads) {
            t.join();
        }
    
        return 0;
    }

    I compiled it with g++ src.cpp -o dst and both worked fine.

    You do your heavy computation inside of emplace_back()

    4 hours ago, Trurl said:

    I purchased 2 Xeon workstations for $800 each. They have 2 processors at 6 cores each. So that’s 12 cores.

    2x machines 2x cpus 6x = 24 cores for me ;)

    And they probably have 2x threads = so 48 threads all total.

    That's a very good machine for mathematician or 3D graphician or simply game player.. ;)

    But you need to split work wisely for threads. And have network communication between machines, so they tell each other what range of values they crunch etc.

    If it is meant to primes, it can be pretty simple, 1st machine does only primes-to-be with last digit 1 and 3, and 2nd machine does only 7 and 9 (or 1 & 7, 3 & 9). We can safely exclude 2,4,6,8 and 5,0 for obvious reasons.

    You can set some environment variable with value 1 and 2 on the other, then read it inside of C++ code, and from this crunch different ranges (so no actual network communication is needed, it could be hard for you).

    ChatGPT generated:

    #include <cstdlib>
    #include <string>
    
    // Get integer value from environment variable
    // Returns defaultValue if variable is missing or invalid
    int getEnvInt(const char* name, int defaultValue) {
        // Try to get environment variable
        if (const char* val = std::getenv(name)) {
            try {
                // Convert string to integer
                return std::stoi(val);
            } catch (...) {
                // Conversion failed (invalid format, overflow, etc.)
            }
        }
    
        // Return default if not found or conversion failed
        return defaultValue;
    }
    
    #include <iostream>
    
    int main() {
        int machine = getEnvInt("MACHINE", 0);
        std::cout << "Machine: " << machine << std::endl;
    }

    Set environment variable on each machine to a different value, then in code read it and voila, they crunch different ranges.

  4. 46 minutes ago, exchemist said:

    This is sort of interesting. I thought this, but someone told me that is wrong because window glass, for example, is below something called the "glass transition temperature". So, according to this, a glass is an "amorphous solid" rather than a very viscous liquid.

    However, when I look up what a glass transition temperature is, it appears it is an imprecisely defined range of temperature, rather than a specific value. Furthermore, when making this "transition", there don't seem to be any of the features one associates with a genuine phase change, such as release of latent heat, change in order at the molecular level, etc.

    So now I am left with the suspicion that the distinction is a bit bogus and based only on how it seems best to treat the material in practice, rather than any physical or chemical change in state. But I'd be interested in a comment from anyone better informed.

    https://en.wikipedia.org/wiki/Glass_transition

    I see here changes in heat capacity with increasing temperature on curve on the right graph..

  5. 4 hours ago, swansont said:

    I think you've got the wrong page, because here we see some kind of carrot grater... -p

    GRATER.png

    ps. But seriously M5 Max (release date March 2026) is newer and faster than M2 Ultra (released 2023)..

    4 hours ago, swansont said:

    “M2 Ultra chip for phenomenal performance 24-core CPU”

    “Think differently” (which I interpret as: "think like an idiot")

    Search for M5 and M2 on this list:

    (they are in 1/3 of the page)

    (just a few lines below M5 there is Intel for $420 and a bit below is AMD Ryzen 9 for $400)

  6. 9 hours ago, Trurl said:

    I looked at on of the graphics cards and it was $5,000.

    Gfx for $5k is too weak. Such cards are used for bitcoin mining.

    ChatGPT's A100 is for $10-20k and H100 is for $30-$40k

    >= 30k of such A100/H100 is used simultaneously..

    10 minutes ago, swansont said:

    Are those used in Macs, as I had specified?

    The best one as of 2026 from Mx line is this one:

    https://www.cpubenchmark.net/cpu.php?cpu=Apple+M5+Max+18+Core&id=7231

    Total Cores: 18 Cores, 18 Threads

    Primary Cores: 6 Cores, 6 Threads, 2.0 GHz Base, 4.6 GHz Turbo

    Secondary Cores: 12 Cores, 12 Threads, 3.0 GHz Base, 4.3 GHz Turbo

    It looks poor in comparison to multi-thread charts of the best AMD and Intel. 3x slower (173k vs 58k rank)

    M5 only wins in single-thread charts. https://www.cpubenchmark.net/singleThread.html

  7. 6 hours ago, TheVat said:

    The similarity of the Polish doughnut to the American doughnut is remarkable! I like the way the sack has been ripped open, as if by some ravenous animal. This creates a dramatic tension with the superhuman restraint which the young gentleman is displaying.

    Except that it's not a Polish doughnut. Because Polish doughnut don't have holes in them. They look like this, for example:

    donut.png

    It's hard for them to have holes when they're filled with jam or cream inside.. The jam can be rose, currant, cherry, cream chocolate, vanilla, pistachio, etc. Rose jam is the most popular.

    donut.png

    Here is the procedure for making them:

    https://www.instagram.com/reel/DUGgJuLCF47/

    Statistics show that 45-55% of all doughnut sold are filled with rose jam.

  8. On 2/26/2026 at 2:42 PM, MigL said:

    Funny how 'open source' systems like ARM microprocessor implementations, (...) and Apple.

    Apple has created their own ARM processors..

    https://en.wikipedia.org/wiki/Apple_M1

    On 2/26/2026 at 2:42 PM, MigL said:

    and Linux distributions have essentially 'eaten the lunch' of established ( proprietary ) actors like Intel, Microsoft and Apple.

    Intel and Apple never played on this play field. Microsoft's Window Server edition has 20% of web server market, and Linux has 80%.

    These statistics can be easily falsified, because you can run a VPS with Linux on a Windows server..

    Statistics are generated by bots that access websites. A database is built based on the server's response. However, it doesn't have to be a real server, but a VPS, which can be run in Docker on both Linux and Windows (which are the actual host OSes of this dedicated server).

    As a result, you receive only information about a VPS and not about a real dedicated server.

    Notice difference between enterprise vs customer market.

  9. ·

    Edited by Sensei

    On 2/26/2026 at 2:42 PM, MigL said:

    ( maybe @Sensei can comment further on the excellent video )

    Indeed, a great movie. An hour well spent. From what perspective should I comment on this?

    He made a lot of mistakes, starting with that 500ms absurd delay that started the whole investigation.

    Everything was overcomplicated to the point of absurdity and not tested enough in real life (hence the memory leak).

    Fedora holds a small share of the desktop Linux market between 1% and 4% of total Linux usage. Fedora test and rolling, a fraction of Fedora. So it didn't work out globally.

    So the effects of this backdoor were very limited. An attempt that failed.

    You won't hear about the attempts that were successful... ;)

  10. ·

    Edited by Sensei

    On 2/26/2026 at 2:42 PM, MigL said:

    I myself did nor know that open source Linux was the system of choice for the large majority of the world's institutions (although my Samsung phone has been telling me that for about ten years now ).

    Both Android and iOS are modified Linux kernels that have had a lot of functionality removed and replaced with something else. You can partially or fully reverse this. Without rooting, partially. With rooting, entirely. Since you say you have a Samsung, start by downloading Termux. I recommend the versions from F-Droid:

    https://f-droid.org/pl/packages/com.termux/

    It does not require rooting, but rooting your phone can be a game-changing solution.

    Unfortunately, you might have trouble typing on a Samsung phone with a Samsung built-in keyboard, so I recommend using the Google keyboard for the first run after installation.

    Then use 'nano .termux/termux.properties' (notice dots)

    and enable line with 'enforce-char-based-input = true' nearly the end of the file. i.e. remove hash (#)

    After that you can go back to Samsung keyboard. Restart Termux. You should be able to work normally (just like on any Linux terminal).

    ps. If you have a bricked Samsung i.e. PIN & password protected, Face-ID protected, Google account protected (FRP), bootloop etc., I can help you resurrect it..

    On 2/26/2026 at 2:42 PM, MigL said:

    New on Veritasium, the couple of year old story of how a foreign actor ( or possibly state sponsored actors ) nearly compromised the secure shell ( SSH ) of 'open source' Linux systems by exploiting the weakness of the XZ compression tool dependency.
    ( maybe @Sensei can comment further on the excellent video )

    All Linux kernels older than 2021 have a critical bug that allows you to gain administrator privileges without knowing any password.

    Due to limitations and modifications, this particular bug does not work on Android and iOS.

    ..watching your video now..

    The bug in XZ from 2024 had no significance. Someone introduced a backdoor to the app, but people didn't install the update globally. It was only in test and rolling versions. It didn't reach the stable versions because it was detected.

    The vulnerability I mentioned earlier was experienced by everyone from 2011 to 2021 (or they still have it if they can't update the system).

    ps2. Hacking Linux is incredibly easy if you have physical access to the machine. Much easier than hacking Windows with physical access,

  11. 8 hours ago, TheVat said:

    Dear "Mr President,"

    Just trying to keep track of your principled and unwavering position on Iran:

    2012: “Now that Obama’s poll numbers are in tailspin — watch for him to launch a strike in Libya or Iran. He is desperate.”

    2013: “Remember that I predicted a long time ago that President Obama will attack Iran because of his inability to negotiate properly — not skilled!”

    2016: “We’re going to stop the reckless and costly policy of regime change.”

    2024: “I’m not going to start wars. I’m going to stop wars.”

    2026: "...the United States military is undertaking a massive and ongoing operation to prevent this very wicked, radical dictatorship from threatening America and our core national security interests."

    Wait...what?

    https://en.wikipedia.org/wiki/Liar_paradox

  12. ·

    Edited by Sensei

    On 2/16/2026 at 1:27 PM, HbWhi5F said:

    I use ChatGPT, should I switch to something else or something local ?

    ChatGPT has 400 GB of GPU memory. At least 5 nVidia cards, each with 80 GB of video memory. In practice, you need a little more because you also need KV, etc.

    That's where those 100 billion parameters come from (100 billion x 4 bytes for IEEE-754 32-bit float = 400 GB)

    Do you have access to such equipment?

    NVIDIA H100 (PCIe) $25,000 - $30,000

    NVIDIA A100 Approximately $10,000 - $15,000

    On 2/16/2026 at 1:27 PM, HbWhi5F said:

    I give it pdfs and a long instruction, and then ask questions.

    Wrong. LLM models (except for Grok, from what I've heard), have a context window. They don't know what's outside that window. They only process what's inside the context window. This is expressed in tokens. English word = 1-2 tokens. Programming 1 character = 1 token.

    After chatting with ChatGPT for a few hours, ask it, “What was the first question I asked you today during this session?” It will respond with something found in the middle or bottom of the entire chat window.

    Grok stores the session on the GPU. If the internet connection is interrupted (this is not visible, it may be due to the browser or another factor), Grok releases the GPU for other users. As a result, I cannot ask Grok any question that refer to previous ones. It does not know what we were talking about a second ago. I was using Firefox on Linux. You may have had a different experience, but from my point of view, Grok is useless.

    On 2/16/2026 at 6:34 PM, CharonY said:

    The issue with AI and perhaps data availability on the internet in general is that many students assume that all necessary facts are out there and that is a waste of time to learn them in the first place. The issue is that as a consequence they lack a very basic foundation to create some level of understanding. Some of the most frequent issues we see among students is that tend to fail at synthesis, i.e., connecting isolated facts. Offloading that further, obviously won't help. It is like having an electric piano that plays scales on its own and wondering why one doesn't get better at playing the instrument.

    After all, these are the effects of what we discussed in another thread about the US education system in the early stages of education. When you learn selectively, you have selective knowledge on basic topics. At university, there is no time to fill in the gaps after years of mediocrity.

  13. 2 hours ago, paulsutton said:

    On a wider note, this hardly seems isolated, Mark Zukerberg seems to be in denial that his products are addictive, despite enough evidence to bring the issue to court, Elon Musk is similar in that things have to go his way, same for President Trump.

    I think you're confusing autism with psychopath/sociopath..

    There were cases of mental illness/disabled in this family:

    https://en.wikipedia.org/wiki/Nerissa_and_Katherine_Bowes-Lyon

  14. On 2/19/2026 at 2:54 PM, swansont said:

    You don’t cite a source for this, and what I found disagrees

    https://menlovc.com/perspective/2025-mid-year-llm-market-update/

    Anthropic 32%, OpenAI 25%, Google 20%

    In your cursory research, you missed the key word, namely, enterprise vs. consumers.

    Statistics indeed show that Claude (Anthropic's LLM the biggest product, which is not research model) is used more often in enterprise.

    But the price of its tokens can be nearly 10 times higher than the price of ChatGPT and Gemini tokens, so if its market share is expressed in dollars and not queries, it doesn't really reflect the true percentage of the amount of electricity used to generate the responses.

    What are these enterprise LLMs mainly used for? I think it's for programming, office support, answering customer questions on store websites, replacing human call centers and store support. It's easy to conclude that these will be marginal uses of LLMs compared to the consumer market (as there are 8 billion potential users worldwide). ChatGPT answers 2.5 billion questions daily.

    Claude (Anthropic) market share both enterprise and consumer markets merged:

    https://fatjoe.com/blog/claude-ai-stats/

    LLM market share.png

    If the above is not enough:

    Enterprise:

    https://www.google.com/search?q=llm+by+market+share+enterprise

    vs

    Consumer:

    https://www.google.com/search?q=llm+by+market+share+consumer

    ps. If we don't know how this market share is calculated - whether in dollars, the number of queries, or the number of tokens processed - it can significantly distort our understanding of these statistics. If something costs $10, 10 times more than the competition, then clearly in dollar-based statistics, it will have a higher percentage than those offering it for $1. And mislead us.

  15. ·

    Edited by Sensei

    8 minutes ago, swansont said:

    The faulty generalization fallacy. One example doesn’t rebut all the others. “It did not rain on Tuesday” does not mean “It rained last week” is false.

    You always come up with this nonsense when you're out of arguments.

    So let's look at the LLM statistics.

    ChatGPT 64.5%, Google Gemini 21.5%. 64.5+21.5=86% of the LLM worldwide market.

    Grok 3%. 86+3=89%.

    Are you all okay?

    32 minutes ago, swansont said:

    When is doing a lot of heavy lifting here. We’re talking about what’s actually happening now with LLMs, and you’re talking about hypotheticals, and shifting the goalposts by bringing datacenters into it.

    I don't understand what you wrote here. I didn't write about any hypothetical things.

    Datacenter = the place where these LLM questions are processed.

    1.png

    If ChatGPT (64.5% of the world market) runs on Azure, and Microsoft claims that Azure is 100% renewable, this means that 64.5% of the world's LLM runs on renewable energy.

    https://datacenters.microsoft.com/globe/powering-sustainable-transformation/

    Same with Google Gemini. So 86% of LLMs are on renewable energy.

    Repeat with smaller models..

    It is physically unprofitable to have a data center without renewable energy.

  16. ·

    Edited by Sensei

    7 minutes ago, swansont said:

    Cloud storage is not AI.

    ChatGPT does not have their own servers- they use cloud in 3rd datacenters.

    LLM mentioned by the OP is Google one, so it is in Google Cloud datacenters.

  17. ·

    Edited by Sensei

    Irrelevant (and untrue as I pointed it out) to this thread were your words that LLM/datacenters has a negative impact on the climate. When each data center has its own solar panels and wind farm, their impact on the climate is zero. So please do not mislead people with your false statements.

  18. 2 minutes ago, exchemist said:

    Irrelevant.

    Nonsense. This is an analysis of what happens to your energy from any electronic device (such as a server in a data center) after it's done these calculations.

    The heat from the light bulb or the heat from the server can be used at a later stage.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.