AI@Home – Llama 3.1 8B Spits Fast

Conditions & context

Today I’m looking at an AI model of Meta’s Llama 3.1 8B. Specifically its 5-bit quantized variant. So, let’s see how it compares to its equivalent — Mistral 7B. These are lightweight models, which should easily fit on a decent half-a-decade-old GPU. Let’s dive in!

As in all my tests, I use the same prompt, the same hardware, and the same methodology. I’m looking at the same set of metrics across every model: VRAM usage, GPU utilization, CPU load, token throughput, tokens written, and total response time. These matter to me because they reveal whether a model is actually usable on consumer hardware — not just in theory, but in practice.

SpecsValue
Linux DistroUbuntu Server 24.04.4 LTS
Linux Kernel6.8.0-101
CPUIntel CORE i7 14th Gen 14700K Cores: 8P/12E Threads: 28
MotherboardMSI PRO B660M-A
RAM80 GB DDR4 (32+16+32+16)
SSDCrucial NVME 1TB
GPUMSI NVidia GeForce RTX 5060Ti Shadow 2X OC PCIe 5.0×8
CUDA Cores4,608
VRAM16 GB GDDR7 128-bit 448 GB/s
GPU DriverNVidia 590.48.01
CUDA version13.1
Ollama version0.17.4
ModelLlama 3.1 8B
QuantizationQ5

The prompt

Write a simple Python function that checks if a number is prime.
Explain how it works in plain English, like you're teaching
a beginner.

The results

Llama 3.1 8B is a spitter with questionable bedside manners. ‘Nuf said!

No preamble or greeting, no pleasantries, no pulsing thinking dot to speak of — it just fires off its saliva at you. Time from Enter to first token is below 1 second, answers arrive before you’ve finished processing your own question, I kid you not. No reasoning overhead, no chain-of-thought warmup. Nothing. Just raw and impatient inference galloping at 72 tokens/sec. That’s what this model was for me. Brisk and frank. No BS or banter.

ModelQuantRunTokens/secTotal TimeTokens WrittenVRAMGPU Util
Llama 3.1 8BQ5172.655s3716.2GB96%
Llama 3.1 8BQ5272.076s3996.2GB96%
Llama 3.1 8BQ5371.066s4066.2GB96%

That consistency is impressive — 96% GPU utilization across all three runs, zero CPU spill again, not a single hiccup. What’s interesting to me is that token output — it grew slightly across runs (371 → 399 → 406) while speed never changed. Even Llama, apparently, gets slightly more talkative over time! The code was correct, the explanations brief and accurate.
I liked that the square root reasoning in Step 2 was actually the most mathematically precise of any model in my test series — it didn’t just say “hey, check up to the square root,” no, it actually explained why, and with actual math. No other model did that for me.
Llama’s output formatting is rather spartan, linguistic personality feels frank and border-line abrasive. Let’s talk about that for a minute…

If my prior test, chat with Mistral 7B felt like talking to a knowledgeable, very patient, albeit a bit scripted, and beyond polite, customer service representative, who bent over backwards and went out of their way to serve and please my whims — then Llama 3.1 8B chat has to be described as you talking to this brilliant, impatient colleague of yours who always gives you an answer to a question and walks away before you can even attempt to say thank you.

Overall, Mistral’s and Llama’s numbers were very comparable, so honestly it is a toss – do you want a chatty and pleasant model or a brash, brief one who won’t shower you with praises and unwanted sentences? You choose.
They are both good!

The conclusion – TL;DR

You will not feel warm and fuzzy conversing with this model. I can tell you that much. What you get instead is cold hard facts, precision and speed. And maybe that’s all you need.

Look at the very bottom of the output example! Llama ended its reply with “That’s it!” and walked out of the room. LOL
I suspect this Llama model would never be caught dead saying “I hope this was helpful. Please do let me know if there’s anything else I can assist you with.”
And honestly? That’s refreshing.

There is truth in the wisdom: “you should not have too much of a good thing”. And I think it applies here perfectly. I’ve seen models who are very polite, talkative, and just natural-born people-pleasers. It feels good on the surface, but when you have a prolonged chat with such a model who thanks you and ask if you need help with anything else? It gets very old. Very fast.
Why? When you read the answers of a long chat, and a very polite model does it in every prompt, these are many (MANY!) redundant sentences you have to read each time. It begs the same question again: Why?
You and the model should already know by now that you are perfectly capable of knowing that the model is there for you, waiting. And you are equally capable of making your own decision when to ask and when not to. What looks like politeness on the surface, feels like patronizing disempowerment on the inside.

The output (pasted & unedited)

Is Prime Function

def is_prime(n):
if n <= 1:
return False
for i in range(2, int(n ** 0.5) + 1):
if n % i == 0:
return False
return True

Let’s break it down step by step:

Step 1: Check the easy cases

We start by checking if n is less than or equal to 1. If so, we immediately return False, because prime numbers are greater than 1.

Step 2: Loop through possible factors

Next, we loop from 2 up to the square root of n. Why only up to the square root? Well, if n has a factor larger than its square root, it must also have a corresponding factor smaller than its square root (because a * b = n implies that b = n / a, and since b < √n, we know that a > √n). So, checking up to the square root is enough.

Step 3: Check for divisibility

Inside the loop, we check if n is divisible by the current number i. We do this using the modulo operator (%). If n % i == 0, it means that n can be divided evenly by i, so we return False.

Step 4: Return True (or False)

If the loop completes without finding a divisor, we know that n is prime, so we return True. If we reached this point and didn’t find any divisors, it’s because n was indeed prime.

That’s it! This function uses a simple iterative approach to check if a number is prime.

Need Help?

Need help streamlining your processes or solving tricky business problems? I offer one-on-one consultations to get you unstuck fast. Book a free consultation with me today at goarcherdynamics.com.

Want more practical tips and workflow hacks? I publish them regularly on my blog — check it out and subscribe for newsletter updates: goarcherdynamics.com

Jiri Krecek Avatar

Posted by

Leave a Reply

Discover more from Archer Dynamics

Subscribe now to keep reading and get access to the full archive.

Continue reading