Skip to content

Instantly share code, notes, and snippets.

@0ut0flin3
0ut0flin3 / llamaCPP_Compilation_Execution_low-resources.md
Last active June 5, 2026 07:36
llama.cpp on 2-core CPU + 8GB DDR2: My Full CPU-only Guide

Below are the generic details and resources of the machine I used:

  • Operating System: Linux Mint 22.3 - MATE 64-bit (safe-graphics / boot with 'nomodeset') - Linux Kernel: 6.14.0-37-generic
  • GPU: not relevant / not used
  • CPU: 2 cores – Intel® Core™2 Duo CPU E8400 @ 3.00GHz × 2
  • RAM: 8 GB (DDR2)

Given my recent personal good experience in running inference with CPU-only (no GPU) on local models up to 2B-4B parameters with more than acceptable speed and performance on really limited hardware and very little RAM, I decided to share the instructions and commands I used to compile llama.cpp on my machine and the arguments I currently use to launch llama.

In this short guide, I'll show you how you can make variables in your code accessible from GPT-3, then be modified based on GPT-3 responses.

In the guide below, Python will be used for examples, but the method can be used for any programming language.

So, let's say we have a Python variable called FLAG with value False, so FLAG=False. Let's imagine that we want the value of the FLAG variable to become True only if we ask GPT-3 for something specific, or rather, if GPT-3 will answer us with a certain sentence. To achieve this we must instruct GPT-3 to always respond in the exact same way if we dictate a specific request to it. For example, let's pretend that in our program there is a game mode called "hard mode" and that the FLAG variable should be False if it is off and True if it is on. We can simply tell GPT-3 to always respond with the string ::HARD_MODE_ENABLED:: if we ask it to enable "hard mode" and to always respond with the string ::HARD_MODE_DISABLED:: if we ask it to disable it

Keybase proof

I hereby claim:

  • I am 0ut0flin3 on github.
  • I am 0ut0flin3 (https://keybase.io/0ut0flin3) on keybase.
  • I have a public key ASCTbvGjveoqnRTDl2rN4PG2kOBt9o3XXzHM1w44T2Nb4Qo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am 0ut0flin3 on github.
  • I am fileghost (https://keybase.io/fileghost) on keybase.
  • I have a public key ASAgva96O20XYX47Kqtg-DjBwvr0qPW-9WQWjBQ8YBTJ8Qo

To claim this, I am signing this object: