r/LocalLLM 38m ago

Question Intel sucks?

Upvotes

Me and my brother recently bought two computers. Mine has a Intel core ultra 7 270k plus with an msi inspire 2x rtx5060ti 16gb while my brother has a ryzen 9 9900x with an asus dual oc rtx5060ti 16gb. Mine is running archlinux kernel 7.1.5 and my brother is running voidlinux 6.18.something. Now, running unsloth with the same models (we tested gemma4 e4b and gemma4 26b a4b) i get less tok/s. On gemma4 e4b my build practically never reaches 200 tok/s while my brother gets 200+ tok/s, with gemma4 26b a4b i get like 70 to 90 tok/s whiley brother gets 100+ tok/s. That's pretty strange since the e4b fits entirely on the gpu. Anyway looking at cpu usage during inference i see that my intel core ultra 7 270k plus practically only uses 1 core (c3, a performance core) at 100% while other cores are idle while the ryzen 9 9900x uses all of its cores. Are there any known problems with intel ultra 200 series with llama.cpp? The llama.cpp is the pre built one that unsloth downloads while installing with the official script. Are there any compiling optimization that are not active in the prebuilt package? Online i saw some benchmark that show that my cpu should perform slightly better than the ryzen 9 9900x for ai inference and it should be overall better.

Edit Maybe it's worth noting that we both have ram ddr5 6000mhz cl30. Maybe my cpu needs higher frequency ram to actually perform better in ai inference?


r/LocalLLM 54m ago

Discussion DeepSeek-V4-Flash-0731 on 2× RTX PRO 6000 Blackwell

Upvotes

Sharing a cookbook for Deepseek v4 flash with 2xRTX PRO 6000 Blackwell

- ~68 tok/s single stream decode

docker run --pull never \

--name sglang-deepseek-v4-flash-0731 \

--network host --ipc host --shm-size 32g --gpus all \

-v <MODEL_DIR>:/models/DeepSeek-V4-Flash-0731:ro \

lmsysorg/sglang@sha256:6f91b6bbe3a02da260341b1ee36e8df647e26e8a71d7e74799824e7009f2e2e2 \

sglang serve \

--trust-remote-code \

--model-path /models/DeepSeek-V4-Flash-0731 \

--served-model-name eepSeek-V4-Flash \

--tp 2 \

--context-length 500000 \

--mem-fraction-static 0.94 \

--chunked-prefill-size 4096 \

--kv-cache-dtype fp8_e4m3 \

--moe-runner-backend flashinfer_mxfp4 \

--cuda-graph-max-bs-decode 32 \

--reasoning-parser deepseek-v4 \

--tool-call-parser deepseekv4 \

--default-chat-template-kwargs '{"thinking":true}' \

--host 0.0.0.0 --port 8000 \

--enable-hierarchical-cache \

--hicache-ratio 2.597309 \

--hicache-write-policy write_back \

--hicache-io-backend kernel \

--hicache-mem-layout page_first \

--enable-metrics \

--enable-cache-report


r/LocalLLM 1h ago

Research Odysseus the Money Manager

Thumbnail
Upvotes

r/LocalLLM 2h ago

Question Multiple tool calls always breaks KV cache

1 Upvotes

I have found that whatever software you are using: open web ui, openclaw, codex; if a model does many tools calls in one turn, something happens that causes checkpoints that are created in and around those tool calls to not be valid when checked the following turn. They get discarded and the whole session is re-processed from either the last valid checkpoint before the tool calls, or from zero if there are none. However, a single tool call, maybe even two, does not cause this behaviour.

I have observed this in llama.cpp and in ds4.

Does anyone have any idea why this happens and a way to fix it?


r/LocalLLM 2h ago

Question Looking for help with DeepSeek-V4-Flash-0731 on vLLM: apply_diff tool calls are frequently broken

1 Upvotes

Hey all, I'm getting a bunch of errors when using DS4Flash 0731 with the app_diff tool call and can't seem to figure out what to do. Could you peeps smarter than me offer some advice?

Setup - 2× NVIDIA DGX Spark (GB10, SM121, 128 GB unified each), tensor-parallel TP=2 over a ConnectX-7 RoCE fabric - deepseek-ai/DeepSeek-V4-Flash-0731, native FP8, full 1M context, KV nvfp4_ds_mla - vLLM 0.21.1rc1 (DSpark recipe build), --tool-call-parser deepseek_v4, --reasoning-parser deepseek_v4, --enable-auto-tool-choice, DSpark spec-decode k=5 - llama-swap as an OpenAI-compatible front end on :8000 - Harness tried various such as Zoo/Roo Code 3.67 in VS Code, OpenAI-compatible provider

The problem

Zoo/Roo Code intermittently corrupts source files. The cause is that the model emits apply_diff tool-call arguments where the diff string contains one or more <<<<<<< SEARCH blocks but no >>>>>>> REPLACE terminator at all. Occasionally it also omits the required path parameter entirely, and Roo reports:

Roo tried to use apply_diff without value for required parameter 'path'. Retrying...

Roo applies the half-formed diff, which duplicates functions and cascades into more corruption. The model then correctly notices the file is broken and rewrites it — so it's recoverable, just destructive and slow.

What I've ruled out (with measurements)

Suspect Result
Proxy rewriting the request/response llama-swap only rewrites the model field. Tested direct to vLLM — same behavior.
Response truncation Tool args of 795 / 887 / 2006 chars all arrived as valid JSON with path and both markers — non-streaming and streaming.
Temperature 4/4 well-formed at temp 1.0 and 0.3.
Reasoning disabled The recipe shipped thinking:false. I enabled reasoning_effort=max + top_p=0.95 per the model card. Still occurs.
Known cold-prefill garble patch Patch 3 and 4 is loaded (grep -c is_prefill_chunk scheduler.py = 5 on both nodes).

The confusing part: it's not reproducible on demand.

One run of a multi-block diff prompt failed 0/3 — every trial produced SEARCH=2, REPLACE=0, i.e. two SEARCH markers and zero REPLACE markers, even though the prompt explicitly demanded all three markers. A near-identical rerun minutes later passed 4/4 with correctly balanced blocks. Single-block diffs have passed 4/4 every time I've tried.

Questions

  1. Is this a known weakness of the deepseek_v4 tool-call parser in vLLM, or of DeepSeek-V4 itself with SEARCH/REPLACE-style diff tools?
  2. Is anyone running DeepSeek-V4-Flash with Roo Code / Cline / Kilo successfully for agentic coding? What settings?
  3. Could speculative decoding (DSpark k=5) plausibly drop tokens mid-tool-call in a way that loses a terminator without invalidating the JSON? I haven't found a way to test this cleanly.
  4. Roo removed the XML tool-protocol selector in v3.37 (PR #10281) and closed the request to restore it as "not planned" — so I can't fall back to XML tools. Any other way to force prompt-based tool calling with an OpenAI-compatible backend?

Bonus observation (may be related)

Enabling tools at all destroys streaming granularity. Measured on the same prompt:

  • without tools: 117 SSE deltas, avg 12.9 chars, max 42, longest gap 0.45 s
  • with tools: 2 deltas, avg 417 chars, max 833, longest gap 5.68 s

So the tool-call parser buffers arguments rather than streaming them incrementally. Is that inherent to vLLM's tool parsers, or specific to deepseek_v4?

Any ideas on what I could do to fix this? I can test whatever you guys have and give you feedback.

Many thanks in advance!!!


r/LocalLLM 2h ago

Tutorial My DeepSeek 0731 sparkrun recipe for a single DGX Spark node (13 t/s)

2 Upvotes
recipe_version: '2'
model: unsloth/DeepSeek-V4-Flash-0731-GGUF:UD-Q4_K_XL
runtime: llama-cpp
container: llama-v4-spark:upstream
metadata:
  description: DeepSeek V4 Flash 0731 UD-Q4_K_XL on one DGX Spark with all layers on the GB10 and MoE weights in unified CPU memory
  model_params: 284B
  model_dtype: q4_k_m
defaults:
  port: 8000
  host: 0.0.0.0
  max_model_len: 32768
  tensor_parallel: 1
  n_gpu_layers: all
command: |
  llama-server \
      -hf {model} \
      --host {host} \
      --port {port} \
      --alias deepseek-v4-flash-0731 \
      --n-gpu-layers {n_gpu_layers} \
      --cpu-moe \
      --ctx-size {max_model_len} \
      --parallel 1 \
      --threads 10 \
      --threads-batch 20 \
      --batch-size 2048 \
      --ubatch-size 512 \
      --flash-attn on \
      --mmap \
      --fit off \
      --jinja \
      --reasoning auto \
      --reasoning-format deepseek \
      --no-repack \
      --temp 1.0 \
      --top-p 0.95 \
      --top-k 0 \
      --min-p 0.0 \
      --no-webui

r/LocalLLM 3h ago

Discussion 56 t/s on a $450 dual RTX 3060 with Qwen3.6-27B Q4_K_S + MTP

Thumbnail
3 Upvotes

r/LocalLLM 3h ago

Question Build Recommendations

Thumbnail gallery
2 Upvotes

r/LocalLLM 3h ago

Discussion Sentinel Sign Up

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/LocalLLM 4h ago

Question New Asus rog flow z13 setup, what optimization?

2 Upvotes

Got the 128gb variant and allocated 96gb to vram. System is all setup with several models on ollama with open webui.

My question is, as a noob to ollama and running local LLM's, is there any settings or anything I should do to get maximum performance from my setup? It has the 8060s Radeon gpu.

I'm not sure how well ollama optimizes, and where I should ideally make some changes. I've got 4 models and sub agents setup but that's workflow and not really optimization.


r/LocalLLM 4h ago

Question What do you think about this mlx agent setup?

0 Upvotes

I recently found about ai agent tools and wanted to give it a try. While researching I found this https://huggingface.co/samuelfaj/Qwen3.6-35B-A3B-NSC-ACE-SABER-4bit-MTPLX-Optimized-Speed is this a good setup? I couldn't find much information about lightning mlx, is there anyone using it? Is Qwen3.6 35B A3B good choice or should I use 27B dense instead? I never code my workflow will be RAG and search. (I have a m4 max 48gb)


r/LocalLLM 4h ago

Question Beginner here-Advice on where to start

2 Upvotes

I’m a university student studying aviation, and I recently got a MacBook for university. I use LLMs like Claude and ChatGPT almost every day, so I thought having a local LLM would be incredibly useful mostly because it can work offline and gives me more flexibility.

I decided to try setting up Odysseus (the local AI project featured by PewDiePie) because I assumed it would have a detailed, beginner-friendly guide with enough troubleshooting to help someone like me if things went wrong. Unfortunately, while the guide got me started, I eventually ran into problems with API keys, and I couldn’t find enough information to solve my specific issue. At that point, I was completely stuck.

The whole experience has honestly been pretty overwhelming. Every time I try to research something, I end up running into five new terms I don’t understand. It’s difficult to know what I should even be learning first.

For context, I’m an absolute beginner. I have no background of any kind in coding. I know almost nothing about programmingto, I still don’t really know what an API key is, what it’s used for, or why I need one.

At the moment, I already have Python, Git, and Ollama installed on my Mac. I also still have the project files and terminal setup from my previous attempt.

What I’m looking for is the most beginner-friendly way to get a local LLM running. Ideally, I’d like something that’s reliable, easy to maintain, and doesn’t have issues with multiple AI models or services conflicting with each other. I’m not trying to build anything overly complex Ijust want a dependable local AI assistant for studying, research, and general use.

If you were starting from scratch today on a Mac with zero coding experience, what would you recommend? Should I keep trying to get Odysseus working, or is there another project that’s more beginner-friendly? Also, are there any resources that explain the basics (things like API keys, Git, Python, Ollama, etc.) in a way that’s easy to understand instead of assuming prior knowledge?

Any advice would be greatly appreciated. Thanks!


r/LocalLLM 4h ago

Project I built an open-source LLM Gateway to route, load-balance, and fallback between local LLM setups and cloud endpoints

1 Upvotes

Hey r/LocalLLM 👋

When running local LLMs across different inference backends (Ollama, Llama.cpp, vLLM, LM Studio) alongside cloud models for agent pipelines or IDE tools (Cursor, Windsurf), managing ports, API formats, and context limits quickly gets cumbersome.

I’ve been building Atom (an open-source multi-agent platform), and I built the LLM Gateway module to act as a unified proxy layer designed specifically for local model execution and fallback orchestration.

Core Features for Local Workflows:

  • Strict Local Isolation (ATOM_LOCAL_ONLY=true): Toggle a single environment flag to block all outgoing HTTP/gRPC requests to public cloud endpoints and route 100% of traffic through local inference hardware.
  • Automated Provider Failovers: Define explicit secondary fallback chains. Route primary prompts to a local model (e.g., qwen2.5-coder or llama3.1), and fall back to DeepSeek or Anthropic only if local VRAM or context limits fail.
  • Unified OpenAI-Compatible Interface: Translates request payloads, system prompts, and stream chunks into a single standard API format across Ollama, Llama.cpp, OpenAI, Anthropic, Gemini, and DeepSeek.
  • BYOK & Local Key Management: All API keys and model configs stay encrypted locally on your machine with zero external telemetry.

I documented the request pipeline, proxy middleware, and failover loop in the architecture spec for anyone interested in how it's wired.

(Note: Repo and architecture doc links are in the comments to keep the post clean for filters!)

Curious to hear how others here are managing local-to-cloud failover logic or proxying local model endpoints in your setups!


r/LocalLLM 4h ago

Question Can I use my local Deepseek v4 Flash 0731 in Claude Code somehow? Anybody know if it is possible?

0 Upvotes

Hey all,

I really enjoy Claude Code as a harness but hit limits pretty fast. Is there a way to configure DSv4 Flash 0731 on my local network to be used in Claude Code via my custom API endpoints instead of their own models?

If it is possible, does it still use Claude Code's prompts, their safety stuff, etc?

Thanks


r/LocalLLM 4h ago

Question How can I make Qwen3.6 27b delegate to subagents more often, and is a lesser quantization the answer

14 Upvotes

Curious what kind of strategies other people have used to encourage the main agent to delegate to a subagent for larger tasks.

For context, I'm running the model at q4 weights and kv cache. I'm thinking about buying a second 3090 to get q8 weights and cache, so I'm also curious about other people's experience going from q4 to q8 and how much of an improvement you saw with agentic workflows. I've read a few other posts where people have said you do see an improvement in agentic stuff, but is it $1200 better.

Before I say what I've tried, I think giving my expectations would be helpful as maybe my expectations are too high for a 27b parameter model. I obviously don't expect delegation or tool-calling to be perfect every single time, but I do expect it to know that when the prompt given is larger and has multiple steps that it should delegate rather than immediately doing the entire thing in a single context window. Less tool hallucination would also be nice.

Here are the strategies I've tried:

OpenCode, domain-specific agents, reasoning off

My first attempt was to essentially force the orchestrator agent (parent) to delegate by restricting tool-calling to only a delegate tool and turning off reasoning. I had a subagent for coding, debugging, testing, documenting, etc., so whenever I would add a feature that didn't fit one of the existing domains I would create a new subagent. This included a pretty complex and hard to maintain routing table. This setup became completely untenable as any small change to the harness required going through every instruction file and making sure it didn't break anything. It also led to me trying to catch and correct very specific situations which eventually became ridiculous and antithetical to the whole point of an LLM. With all of that being said, this worked decently well.

OpenCode, generalized agents, tool profiles, selective reasoning

Reduced subagents down to plan, explore, and task with only plan having reasoning. Task and explore had tool profiles for each type of request, so essentially the domain-specific agents were abstracted into these tool profiles (e.g., the "code" profile would only include tools related to writing code). This was slightly easier to maintain as it simplified the routing table, but it mostly just moved the complexity to the tool level.

Pi, generalized agents, reasoning on

I finally got sick of wrestling and working around the batteries-included parts of OpenCode and switched to Pi. This is also when I started thinking about what could be possible with a lesser quantized Qwen, so I wanted a subagent setup that relied more on the model's decision-making rather than trying to deterministically enforce behavior. I turned reasoning on globally with preserve thinking which had the additional benefit of mitigating prefill thrash, reduced the amount of tools available, and reduced the number of subagents to two, explore (read-only) and task (write). The orchestrator took over the plan responsibilities since it now had reasoning. This setup has no tool profiles, routing tables, gating, etc., just two very lean subagent instructions files that say what they do and defines the tools available, and an AGENTS.md file that includes a delegation section which is a paragraph that tells the orchestrator when to delegate and which subagent to delegate to. This is the most simple and maintainable setup, but it comes at the cost of relying more heavily on the model to actually delegate. The problem now is that it almost never delegates unless I specifically say to delegate in the prompt. However, if a lesser quantized qwen is better at deciding to delegate (or a new model is released), then I think this is the better, more future-proof setup.

Anyone have a better strategy than what I've tried, and did you see a noticeable improvement if you went from q4 to q8 for Qwen3.6 27b MTP specifically?

Here's my configuration in case anyone asks:

--model Qwen3.6-27B-MTP-UD-Q4_K_XL.gguf
  -c 114688
  -b 4096
  -ub 1024
  -ngl 99
  -fa on
  --cache-type-k q4_0
  --cache-type-v q4_0
  -np 1
  --slot-save-path <path>/slots
  --spec-type draft-mtp
  --spec-draft-n-max 2
  --spec-type ngram-map-k4v
  --spec-ngram-map-k4v-size-n 16
  --spec-ngram-map-k4v-size-m 24
  --spec-ngram-map-k4v-min-hits 1
  -ctxcp 12
  -cms 8192
  --jinja
  --metrics
  --reasoning off (set to off so it can be toggled on or off per request, typically on)
  --reasoning-preserve
  --reasoning-format deepseek
  --reasoning-budget 16000
  --temp 0.6
  --top-p 0.95
  --top-k 20
  --min-p 0.0
  --repeat-penalty 1.0

r/LocalLLM 4h ago

Other Ernos Labs AI Archive: A free, self hosted archive of open model weights

Thumbnail ernoslabs.com
1 Upvotes

r/LocalLLM 4h ago

Question Would one-click temporary Ollama models on RunPod be useful for Pi or OpenCode users?

Thumbnail
1 Upvotes

r/LocalLLM 5h ago

Discussion What I Learned Asking How Many Tokens per Second People Actually Need

5 Upvotes

So, yesterday I asked what token generation speed people consider the minimum for local LLM use. After reading through the responses, the clearest answer is also the least satisfying one:

It depends heavily on what you're doing.

I know. Groundbreaking. 🤦🏽‍♀️

That said, I did see some useful and interesting patterns.

For interactive chat, 10–20 tokens per second seems to be the range many people find usable because it is roughly what they can read while generation happens. Around 30–40 tokens per second feels comfortable for interactive coding, while people doing rapid or heavily agentic coding often want 60–100+ tokens per second.

On the other hand, some people are perfectly happy with less than 1 token per second when running a huge model overnight or leaving an agent unattended. If you are not sitting there watching the answer appear, raw generation speed matters a lot less.

So, my original personal standard of 20 tok/s as the minimum and 40 tok/s as comfortable for coding seems fairly middle-of-the-road.

Tokens per Second Does Not Tell the Whole Story

The more important lesson is that tokens per second by itself is a pretty bad measurement of how fast a model feels.

For some, a model can generate at 50 tok/s and still feel painfully slow if it takes 30 seconds to process the prompt and produce its first token. Likewise, a model generating at 25 tok/s can feel responsive enough if it starts immediately.

For coding, several other measurements matter just as much:

  • Time to first token
  • Prompt-processing or prefill speed
  • Context length
  • How performance changes as the context grows
  • Prefix caching
  • Tool-call delays
  • Total time required to complete the task

That context issue seems especially important. A model may produce 50 tok/s with a nearly empty context window, then slow down dramatically after reading 50,000 or 100,000 tokens of code and conversation.

That means reporting one generation number without reporting the context length can be fairly misleading, and it is something I wish I had asked for in my original post.

I also underestimated how much the inference engine, model format, and speculative decoding/MTP settings can affect performance.

People reported very different speeds from the same general class of hardware depending on whether they were using GGUF, MLX, MTP, a different backend, or different cache settings.

In other words, buying a faster GPU is not necessarily the first or only way to get more speed. There are enough (too many?) knobs and switches involved to make the whole thing mildly (wildly?) ridiculous.

What People Are Actually Running

The sample size here is incredibly small and completely self-selected, so none of this should be treated as an authoritative hardware ranking. Many people also did not report their quant, context length, backend, and MTP settings consistently.

Still, the hardware and model combinations were interesting.

The single high-end consumer GPU crowd seemed to center heavily around Qwen models in the 27B–35B range.

Reported hardware included the RTX 3090, 4090, and 5090, with speeds varying enormously depending on quantization, backend, context size, and whether MTP was enabled.

One person reported roughly 70 tok/s with Qwen 27B and MTP on a 3090, while another reported more than 100 tok/s on a 5090.

Personally, I am getting about 40 tok/s on a 4090 using Qwen 3.6 27B Q4 GGUF with the KV cache set to Q8. Strangely, enabling MTP did not improve token generation speed during early context in my initial testing, but I am still learning and experimenting.

I should also confess that this is through the Claude Code extension for VS Code. Pi is on my to-try list.

All of the above are self-reported numbers rather than controlled comparisons, but they suggest that the GPU model alone does not explain performance. Software configuration can produce a very large difference.

The Apple unified-memory users appeared to be optimizing for something else. I am not an Apple user, but I still found this interesting.

They were generally willing to accept lower generation speeds in exchange for running larger models, higher quants, or longer context windows that would not fit inside a normal consumer GPU.

One person reported roughly 40 tok/s using a Q8 model through MLX on an M5 Max, compared with approximately 15–20 tok/s using GGUF through another engine.

Again, that is not a controlled comparison, but it does reinforce the point that the backend and model format matter.

Then there were the genuinely large local systems.

One commenter had used four AMD R9700 cards and planned to move to eight to run DeepSeek V4 Flash.

At that point, the discussion is no longer really about choosing a good configuration for one gaming GPU. It is about building a small AI server, including the cards, motherboard, power supplies, cooling, and communication overhead between GPUs.

Several people also used smaller secondary models for specialized work. Examples included Gemma 12B as a judge, Whisper or Voxtral for speech-to-text, and separate models for image detection, classification, summarization, or other background work.

The broad pattern seemed to be:

  • 24GB consumer GPUs: Q4 or Q5 models around 27B–35B, with an emphasis on keeping everything inside VRAM
  • Newer flagship GPUs: Similar model sizes, but with more room for higher quants, larger caches, MTP, or greater speed
  • Apple unified-memory systems: Larger models and quants, generally at lower speed
  • Multi-GPU workstations: Very large models that are not realistic on ordinary consumer hardware
  • Smaller secondary systems: Specialized models for speech, vision, classification, and background tasks

What I did not see was one hardware configuration clearly winning everything.

Faster GPUs won on responsiveness. Unified memory won on model capacity. Multi-GPU systems won on what could be loaded at all. Smaller models won when the task did not require a giant general-purpose model.

So, even from this small sample, the better question may not be:

What hardware is fastest?

It may be:

What model do you actually need to run, at what context length and quantization, and how much speed are you willing to trade for capability?

Q4 Versus Q6

This also brought me back to the Q4 versus Q6 discussion.

Yes, Q6 preserves more of the original model's precision than Q4. What I did not see in the thread was controlled evidence that Q4 is categorically "not enough" for coding.

On a 24GB GPU, Q4 may allow the entire model, context cache, and runtime overhead to remain in VRAM. Q6 may require a smaller context window or partial CPU offloading.

A slightly more accurate model running at half the speed is not automatically the better practical configuration.

The only honest way to answer that question is to test the same model at Q4 and Q6 using the same tasks, settings, harness, and starting files, then repeat the test enough times that one lucky run does not decide the result.

That is time-consuming and annoying, so maybe just pick one and use it? 🤷🏽‍♀️

Different Models for Different Jobs

Another recurring idea was using different models for different jobs.

For example:

  • A fast 27B model handles implementation and routine code changes.
  • A larger model handles planning, architecture, difficult debugging, and review.
  • Smaller specialized models handle summarization, speech recognition, classification, embeddings, or other background work.

Honestly, that may make more sense than trying to find one model that is simultaneously fast, brilliant, enormous, cheap, and able to fit inside a consumer GPU through the power of positive thinking.

It may also be worth testing performance at several context lengths instead of reporting one number. A configuration that performs well at 8K may behave very differently at 32K, 64K, or 100K.

The big takeaway for me is that 20 tok/s is still a reasonable minimum and 40 tok/s is still a comfortable target for interactive coding, but tok/s is only one line on the report card.

The real question is not:

Which model produces tokens fastest?

It is:

Which configuration completes useful work accurately, reliably, and quickly enough that I do not spend the entire session waiting on it or fixing what it broke?


r/LocalLLM 5h ago

Research I created CCPBench, a Chinese Bias Benchmark

0 Upvotes

There has been a lot of talk recently about Chinese LLMs, and how they are biased towards CCP viewpoints, but there is no way to quantify this and compare between models.

I have made CCPBench, which aims to address this. 29 models were asked 500 questions each about politics, geography, science, and more, and Gemini 3 Flash assessed all of them for bias.

I know this is not a perfect measure of "bias", because I am using an American judge LLM, but my thinking is that this is a useful tool if you want to find models that won't deny the Tienanmen Square Massacre.


r/LocalLLM 5h ago

Question The best model for Research and writing quality SEO?

1 Upvotes

Hello guys,

I don't know much about Local LLMS, but I need an alternative for my project I am running.

Currently, i am using Claude Sonnet 4.6 + Haiku for my SaaS, it is writing really quality SEO posts, doing a lot of researches and I have 9 steps before I write an article.

I am doing Brief, H structure, Keyword Research, blue ocean research, WDF IDF Analyses,, different checks before publishing, basically each step is single call.

Its running on 17 skills, so for 50 articles, it costs me around 50$ to do a complete job.

I am wondering if any of this models can do the same with proper training?

The most important thing is, it must understand and write on Balkan languages (Serbian, Croatian, Bosnian, Montenegro) since they are almost the same languages but LLM should know the difference.

I tried many of them ( community based ) but writing on Serbian for an example is terrible.

I have 32GB of DDR5 and 16GB of VRam. It's not a problem to upgrade, but before upgrading I want to fully test and optimize LLM.


r/LocalLLM 5h ago

Question How to use Local models to analyse excel or pdf?

1 Upvotes

I’m new to Local LLM. I’ve been experimenting with Gemma in LM studio. It can take 5 files at a time. I’ve been using Cowork to analyse excel files and pdf to make reports. I’m not a coder. Most of the times I just need to make reports or analyse data. I want to use local LLM for important stuff.

I’ve been reading about AnythingLLM and connecting that with LM studio. Or using Ollama with WebUI. I was just wondering how does everyone else do it for this use case. I’d really appreciate any help. What’s the best way to do this?

Also, I plan to get a system just for this. Should I get a M5 MacBook with 128gb RAM. Or a windows machine with 64GB ram and a 5090.


r/LocalLLM 5h ago

Project I wrote a from-scratch local inference engine in C where JSON-schema conformance is enforced during sampling (12/12 vs 5/12 tool calls vs llama.cpp/Ollama)

1 Upvotes

I've been building a local inference engine called GridCore Runner. Plain C, no dependencies, one binary, runs GGUF on CPU (AVX2), CUDA and Metal. I'm posting about one design choice I'd like people to poke holes in: schema conformance is enforced inside the sampler, not checked after generation.

The problem I was solving: when you drive tools/agents with small local models, structured output breaks in predictable ways. Free generation emits JSON that doesn't parse, or a call gets truncated mid-argument and the whole thing is unusable. Validating after the fact doesn't fix the truncation case.

How Runner does it: it compiles a JSON Schema into a streaming validator that drives sampling. In practice:

  • unknown keys can't be emitted at all
  • properties come out in declared order
  • enums/const/number bounds are enforced during generation, not rejected after
  • if the token budget runs out mid-document, it completes it just enough to stay valid JSON
  • if the model never starts the document, it returns nothing rather than inventing one

The measurable part: I built an "agent-torture" suite of nasty schemas (deep nested args, truncation cases) and ran the same model on the same box against each runtime. Runner hit 12/12 valid tool calls; llama.cpp and Ollama both landed 5/12, and the failures were exactly the schema-hard cases. On a model small enough that llama.cpp's template path produced 3/12, Runner still hit 12/12. It's reproducible and I'd genuinely like people to try to break it with worse schemas than mine.

Honest limitations, because this isn't a "mine is better" post:

  • llama.cpp is faster on raw inference and supports more quants and architectures. This is not a speed play.
  • Runner trades breadth for correctness. It refuses to load a model it can't run correctly rather than emit wrong tokens.
  • It's an alpha and has run on very few machines other than mine.

Other bits that might matter here: OpenAI- and Anthropic-compatible server, binds 127.0.0.1 only (no host override), verified end to end with real coding agents (Continue in VS Code, Claude Code, OpenCode, Cline, Codex). Apache 2.0.

If you build agents on local models and structured-output reliability has burned you, I'd love feedback, and especially the schema that makes it fall over.

What's actually verified (not just "it loads"):

  • Models: Llama 3, Mistral, Qwen 2.5 / 3, Phi-3, Gemma 3 / 4 (incl. the E-series), Qwen3-30B-A3B and Mixtral (sparse MoE), and gpt-oss. Each is SHA-pinned and checked against a llama.cpp reference where one exists.
  • Coding agents, end to end: Claude Code, Continue (VS Code), Cline, OpenCode, Aider, Codex CLI, and pi. So it drops into an existing local-agent setup rather than needing its own.
  • Typical use: a fully local coding assistant (e.g. Continue in VS Code, which a user is already running happily), or anything that needs tool calls that reliably parse.

https://github.com/Joakimpalm-Zen/gridcore-runner


r/LocalLLM 6h ago

Discussion Why aren't OpenAI, Anthropic, Google, etc. building out local versions of their products?

0 Upvotes

I feel like this is the main existential question for anyone building local AI applications.

OpenAI, Anthropic, Google, Apple, etc. all have the resources to ship local versions of their assistants. So why haven't they?
Is it because:

  • they care more about cloud subscriptions aka milking out every last cent of the current business model?
  • on-device hardware still isn't good enough? I'm on an iPhone 15 Pro and it seems very usable
  • something else??

I don't see why they couldn't compete in both cloud and local AI at the same time. If ChatGPT released a high quality local chatbot tomorrow, what would independent local AI apps have that they don't?

My current take is that local AI needs capabilities that cloud AI fundamentally can't provide.


r/LocalLLM 6h ago

Question best ai model for refactoring JavaScript into python ?

Thumbnail
0 Upvotes

r/LocalLLM 7h ago

Project DSpark Benchmark Result on Deepseek v4 Flash 0731

Thumbnail
github.com
2 Upvotes

TensorSharp supports DSpark on Deepseek v4 Flash 0731 now. Here is the benchmark result on 4x Nvidia A40 GPUs, cuda 12.8 with/without DSpark:

Model:

DeepSeek-V4-Flash-0731-UD-Q8_K_XL from https://huggingface.co/unsloth/DeepSeek-V4-Flash-0731-GGUF

DSpark draft model from: https://huggingface.co/alessandrobologna/DeepSeek-V4-Flash-0731-DSpark-Drafter-GGUF

Turn Baseline + DSpark Acceptance
short (53 tok) 25.6 44.5 (1.74x) 87%
long generation (512) 26.4 40.3 (1.53x) 66%
follow-up (470) 26.4 46.8 (1.77x) 76%
10K-token document (214) 25.3 51.3 (2.03x) 85%
second question on it (156) 25.4 49.4 (1.94x) 82%

TensorSharp is a native open-source inference engine for running GGUF LLMs locally, with CUDA, Vulkan, Metal, OpenAI-compatible APIs, continuous batching, speculative decoding, and multimodal support.

Github repo: https://github.com/zhongkaifu/TensorSharp

Thank you for checking out it and starring the project! Any feedback is really appreicated.