Local models in GitHub Copilot App: Windows ML, llama.cpp and tuning

GitHub logo in white on a dark circular background

After I read this great article by Michael Niehaus ( can be found here: https://oofhours.com/2026/11/14/using-github-copilot-with-a-free-local-llm/ ) and his experience with running local models with the Github Copilot App it sparked my interest as someone who has done a lot of work with local models and hosting them but not used them specifically with Github Copilot App.

Even if you are a developer, highly technical or a power user I think many people would encounter this situation when trying to perform a coding task with your local model and it takes forever to complete. Compared to just having Claude, ChatGPT, Gemini or any other 3rd party hosted LLM service do it for you.

Most people who run in to this situation would probably stop there and just state, “okay local models is not for me” or “this sucks” and stick with using whatever 3rd party hosted service they prefer. In this article I want to address and explain around the topic of performance and tuning which I also believe is lacking from Microsoft and the GitHub Copilot App documentation and Windows ML. I understand that Microsoft is trying to give some general advice and that llama.cpp supports is a new thing and they can’t go in to all the gritty details but this is a scenario where I think the details are important. Running local models can be a jungle and hopefully this article will clarify a few things and give you some interesting results.

If its not already obvious, I’m a big proponent for local AI, running models of your choice on hardware that you own or control.

Windows ML

Diagram showing Windows ML unified inference framework connecting native or web apps, model formats, silicon partners, and GPU, NPU, and CPU hardware.

Before we start, I want to highlight Windows ML as that’s the framework GitHub Copilot App is using when it comes to local LLMs. Being able to use llama.cpp together with Windows ML ( llama.cpp being one of the most used open source Inference engine ) is a fairly new thing and Microsoft says its “experimental”.

Installing a local model from the model picker

Now lets take a look at this feature within the Github Copilot App that aims to somewhat simplify the way you get a model up and running and using it with the Github Copilot App. This compared to the BYOK (Bring your own key ) method is simpler and easier to get going with. Here Microsoft offers 2 different models:

MAI Code 1.1 Flash
Flint NVFP4


Under the hood llama.cpp is the Inference engine which hosts and runs these 2 models.

Github Copilot App is just the application layer on top that access the model. Both of these models are MoE ( Mixture of experts ) and this matters a lot on which you will see later in this article when we cover performance and tuning.

https://docs.github.com/en/copilot/how-tos/github-copilot-app/add-llm-models#installing-a-local-model-from-the-model-picker

Documentation page titled “Installing a local model from the model picker,” listing Windows prerequisites for MAI Code 1.1 Flash and Flint NVFP4 models, including NVIDIA GPU, RAM, storage, and llama.cpp requirements.


Notice that the size and requirements are different for these 2 models without going in to details about the weight size, performance or the quant they offer or anything about quality. But at this point you might not be concerned about the performance or quality, you just want something that works but there will be differences between these 2 models and there is no mention of that.

Lets test and measure the performance on these 2 models on what could be considered a high end system in todays market where prices on hardware has been skyrocketing. And that’s well within the requirements.

Baseline test

Test system

ComponentSpecification
CPUAMD Ryzen 9850X3D
RAM128 GB DDR5
GPUNvidia RTX 5080 16 GB
SSD2 TB NVMe

So far so good right ? 128GB of DDR5 and 16GB of VRAM from the 5080 graphic card is way more than the 96GB or 48GB minimum combined RAM.

Lets measure the performance and output to get some actual numbers and having something to compare to. I ran a benchmark script that tests 2K & 32K prompts and the 2 metrics to keep an eye on for this test is:

Prompt processing = PP
Token Generation = TG

PP (prompt processing, or “prefill”) = reading speed.

Before the model can answer, it has to read everything you’ve sent it: your question, attached files, the whole conversation history, tool results, instructions. For an LLM, “reading” means working through all of it in one pass, and the pile keeps growing during a coding session. Every file it opens, every command output, all of it lands back in the prompt. PP measures how many tokens it can digest per second. A token is roughly three-quarters of a word.

TG (token generation, or “decode”) = writing speed.

Once it has read everything, it writes the answer one token at a time. Each new token depends on the one before it, so the model can’t produce them in parallel. It’s sequential work, like writing by hand. TG is how many of those tokens it produces per second.

Let’s do some testing on the MAI Code 1.1 Flash model

Model providers settings showing Windows ML downloaded models, with MAI Code 1.1 Flash selected and GPU support indicated.


The results are in and lets start with Token Generation speed:

Token generation: MAI Code 1.1 Flash (stock)

Writing speed, median of three requests per prompt.

2k prompt
7.1tok/s
Unusable
32k prompt
7.8tok/s
Unusable

So are these numbers good or bad ? Actually they are bad, really really bad. So bad that this model is unusable at this point.

The results we see 7,1 – 7,8 t/s which lands in the Unusable category in my totally subjective scale for token generation.

Token Generation Speed

Unusableunder 10
Limited10–14.9
OK15–24.9
Good25–39.9
Excellent40+
0 10 15 25 40 60+ tok/s reading speed



For prompt processing it comes down to how much you like to wait before the model actually starts giving you an output.

Prompt Processing Wait Time: MAI Code 1.1 Flash (stock)

Time before the first word of the answer appears (time to first token)

2k prompt2,464 tokens · 163.0 tok/s
15 s
32k prompt29,529 tokens · 133.1 tok/s
3 min 42 s
0 1 min 2 min 3 min 4 min

But lets not get ahead of our self, lets take a look at the numbers for the Flint NVFP4 model as well.

Model providers settings showing Windows ML downloaded models, with Flint NVFP4 selected and running on GPU.

Token generation: Flint NVFP4 (stock)

Writing speed, median of three requests per prompt.

2k prompt
13.2tok/s
Limited
32k prompt
13.0tok/s
Limited


With the result of 13,2 and 13,0 in TG t/s we land in the “Limited” category.

Token Generation Speed

Unusableunder 10
Limited10–14.9
OK15–24.9
Good25–39.9
Excellent40+
0 10 15 25 40 60+ tok/s reading speed

And prompt processing looks like this

Prompt Processing Wait Time: Flint NVFP4 (stock)

Time before the first word of the answer appears (time to first token)

2k prompt2,305 tokens · 382.2 tok/s
6 s
32k prompt29,537 tokens · 227.2 tok/s
2 min 10 s
0 1 min 2 min 3 min 4 min

Comparing these 2 models just in regards of speed and performance it looks like this. Clear winner is Flint NVFP4 and that’s mostly due to the size of the model as it’s smaller (21GB vs 54GB). A smaller model where more of the model fits in to the GPU and its 16GB of memory and the excess need of memory is spilled over to RAM but the real issue is that it gets transferred over the PCIe bus which on this specific system is PCIe Gen5 16x which is limited to 64GB/s. When this happens we hit a bottleneck and see real performance degradation. However, we can do some fine tuning to address that later.

Worth mentioning is that speed tells you nothing about output quality.

MAI Code 1.1 Flash vs Flint NVFP4

Stock configuration. Median results on the same machine, with a short (2k) and a long (32k) prompt.

Prompt processing (PP)

Reading speed in tokens per second. Longer bar is better.

2k promptFlint 2.3× faster
MAI Code 1.1 Flash
163.0 tok/s
Flint NVFP4
382.2 tok/s
32k promptFlint 1.7× faster
MAI Code 1.1 Flash
133.1 tok/s
Flint NVFP4
227.2 tok/s

Token generation (TG)

Writing speed in tokens per second. Longer bar is better.

2k promptFlint 1.9× faster
MAI Code 1.1 Flash
7.1 tok/s
Flint NVFP4
13.2 tok/s
32k promptFlint 1.7× faster
MAI Code 1.1 Flash
7.8 tok/s
Flint NVFP4
13.0 tok/s

Time to first token (TTFT)

The wait before the answer starts, as estimated by the benchmark. Shorter bar is better.

2k promptFlint 2.5× shorter wait
MAI Code 1.1 Flash
15.3 s
Flint NVFP4
6.1 s
32k promptFlint 1.7× shorter wait
MAI Code 1.1 Flash
3 min 42 s
Flint NVFP4
2 min 10 s

Total time

Measured time from sending the prompt to the finished answer (256 tokens). Shorter bar is better.

2k promptFlint 2.0× quicker
MAI Code 1.1 Flash
51.2 s
Flint NVFP4
25.4 s
32k promptFlint 1.7× quicker
MAI Code 1.1 Flash
4 min 15 s
Flint NVFP4
2 min 30 s

This could have been the end of the story but there are so much more to uncover here and dig in to. Now we have some baseline numbers to actually compare too. At this point we have done 0 configuration except what comes out of the box from Github Copilot App.

Next we will take a look at the parameters and configuration tuning. This is things that could help improve our result.

MAI Code 1.1 Flash – Config tuning

When we select MAI Code in the Github Copilot App it downloads the model weights in the background and uses llama.cpp to run the model. These weights comes in different sizes and options but looks like Microsoft have preselected specific weights and quants for this model to try to get you the best size per your system requirements. This works but is also hard.

Locally we can find the model file, a GGUF and the name follows the common namingstandard for GGUF models.

Windows File Explorer showing the MAI-Code-1.1-Flash-Q2-XS GGUF model file highlighted in the azurml folder.

Here we also see the llama-config file which contains parameters on how the model is running and here we have options to tune the settings to our benefit and use case. This is a jungle and I won’t go through all settings but the important take away here is that we can adjust and make things a bit faster than what it was. Worth mentioning is that there are compromises with changing the settings.

Stock config to the left and tuned config to the right. (Ignore ctxSize, its 256k for both runs)

Side-by-side code comparison showing JSON configuration files for FlashAttention models in a dark-themed editor.

What changed and why

--n-cpu-moe keeps the expert weights in system RAM on purpose directly from the CPU, so the rest of the model fits in the 5080’s 16 GB of VRAM. The stock config tries to load everything onto the GPU, it doesn’t fit, and Windows quietly pushes the overflow into shared memory over the PCIe bus.

Speculative decoding (dflash + ngram-simple) has a small draft model, or text that already appears in the context, guess the next few tokens. The real model then checks all of them in a single pass.

Larger batch sizes let the model read the prompt in bigger chunks, so the GPU spends more time computing and less time waiting for the next piece.


Test results and many numbers:

Token generation: MAI Code 1.1 Flash (tuned)

Writing speed, median of three requests per prompt.

2k prompt
27.6tok/s
Good
32k prompt
51.6tok/s
Excellent

MAI Code 1.1 Flash: stock vs tuned

Same session, same prompts. Median of three requests per prompt.

Token generation (TG)

Writing speed in tokens per second. Longer bar is better.

2k prompt3.9× faster
Stock
7.1 tok/s
Tuned
27.6 tok/s
32k prompt6.6× faster
Stock
7.8 tok/s
Tuned
51.6 tok/s

Prompt processing (PP)

Reading speed in tokens per second. Longer bar is better.

2k prompt11% faster
Stock
163.0 tok/s
Tuned
180.8 tok/s
32k prompt23% faster
Stock
133.1 tok/s
Tuned
164.0 tok/s

Time to first token (TTFT)

The wait before the answer starts, as estimated by the benchmark. Shorter bar is better.

2k prompt10.4% shorter
Stock
15.3 s
Tuned
13.7 s
32k prompt18.8% shorter
Stock
3 min 42 s
Tuned
3 min 0 s

Total time

Measured time from sending the prompt to the finished answer (256 tokens). Shorter bar is better.

2k prompt55.1% shorter
Stock
51.2 s
Tuned
23.0 s
32k prompt25.9% shorter
Stock
4 min 15 s
Tuned
3 min 9 s

As we can see by looking at the numbers, the tuned config drastically changes the performance and speed we see.

Flint NVFP4

Now lets take a look at Flint NVFP4 and what numbers we get if we change a few parameters.
Stock config to the left and tuned to the right:

Side-by-side code comparison showing JSON configurations for the flint-mvf4.gguf model with GPU and CPU settings


Results and mo’ numbers

Token generation: Flint NVFP4 (tuned)

Writing speed, median of three requests per prompt.

2k prompt
50.7tok/s
Excellent
32k prompt
50.1tok/s
Excellent

Flint NVFP4: stock vs tuned

Same session, same prompts. Median of three requests per prompt.

Token generation (TG)

Writing speed in tokens per second. Longer bar is better.

2k prompt3.8× faster
Stock
13.2 tok/s
Tuned
50.7 tok/s
32k prompt3.9× faster
Stock
13.0 tok/s
Tuned
50.1 tok/s

Prompt processing (PP)

Reading speed in tokens per second. Longer bar is better.

2k prompt3% faster
Stock
382.2 tok/s
Tuned
394.2 tok/s
32k prompt89% faster
Stock
227.2 tok/s
Tuned
429.6 tok/s

Time to first token (TTFT)

The wait before the answer starts, as estimated by the benchmark. Shorter bar is better.

2k prompt3.9% shorter
Stock
6.1 s
Tuned
5.9 s
32k prompt47.1% shorter
Stock
2 min 10 s
Tuned
1 min 9 s

Total time

Measured time from sending the prompt to the finished answer (256 tokens). Shorter bar is better.

2k prompt56.3% shorter
Stock
25.4 s
Tuned
11.1 s
32k prompt50.6% shorter
Stock
2 min 30 s
Tuned
1 min 14 s

Final comparison between both models with tuned configs.

MAI Code 1.1 Flash vs Flint NVFP4, both tuned

Same session, same prompts. Median of three requests per prompt.

Token generation (TG)

Writing speed in tokens per second. Longer bar is better.

2k promptFlint 1.8× faster
MAI Code 1.1 Flash
27.6 tok/s
Flint NVFP4
50.7 tok/s
32k promptAbout equal
MAI Code 1.1 Flash
51.6 tok/s
Flint NVFP4
50.1 tok/s

Prompt processing (PP)

Reading speed in tokens per second. Longer bar is better.

2k promptFlint 2.2× faster
MAI Code 1.1 Flash
180.8 tok/s
Flint NVFP4
394.2 tok/s
32k promptFlint 2.6× faster
MAI Code 1.1 Flash
164.0 tok/s
Flint NVFP4
429.6 tok/s

Time to first token (TTFT)

The wait before the answer starts, as estimated by the benchmark. Shorter bar is better.

2k promptFlint 2.3× shorter wait
MAI Code 1.1 Flash
13.7 s
Flint NVFP4
5.9 s
32k promptFlint 2.6× shorter wait
MAI Code 1.1 Flash
3 min 0 s
Flint NVFP4
1 min 9 s

Total time

Measured time from sending the prompt to the finished answer (256 tokens). Shorter bar is better.

2k promptFlint 2.1× quicker
MAI Code 1.1 Flash
23.0 s
Flint NVFP4
11.1 s
32k promptFlint 2.5× quicker
MAI Code 1.1 Flash
3 min 9 s
Flint NVFP4
1 min 14 s

Once we have done some tuning both models are in a state where they can be used. From here the next step would be to test and see which models gives you the best result depending on the tasks you are doing with it.

Final thoughts

I know it was a lot of numbers and charts but I hope my point came across that just because you have hardware that’s within the minimum requirements, just by using the default config you can get a really bad experience when it comes to performance and by simply changing a few settings we can get up to almost 4x the performance.

Side note

One thing I’ve left out to keep the article short was the fact that its not as simple as going in and changing the configuration JSON for the model. the manifest file and verified JSON file had to be updated with the correct new sha256 hash. If they did not match, the GitHub Copilot App would not accept it.

Black laptop on a stand with text reading “Made for World Makers” and an NVIDIA RTX SPARK badge.



I’m speculating but the documentation was probably aimed towards the new RTX Spark Windows on ARM PCs and since I don’t have one of them I can’t test the performance, but It would probably be a bit different. All hardware is not the same. 128GB of unified memory on the RTX Spark ( LPDDR5X ) is not the same as the 128GB DDR5 on my test system. Bus bandwidth and memory speed makes a huge difference and how the hardware could have different bottlenecks.

I hope Microsoft will address the software, configuration and documentation on this going forward but I don’t envy them, I’ve spent hundreds if not thousands of hours diving in to local AI and its a jungle with all the models, harnesses, software, hardware, configuration and I have not being able to grasp it all. However, I dont doubt that the team and teams within Microsoft want to deliver a good experience for all their users.

Today we only looked at performance but not output quality or how to use the different aspects of local AI and different models. More articles on that is on its way.

That’s it for this time.

You can find me on X (Twitter) @timmyitdotcom or over on LinkedIn.

Leave a Reply